module TD.Query.SetBusinessStartPage
(SetBusinessStartPage(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified TD.Data.InputBusinessStartPage as InputBusinessStartPage
data SetBusinessStartPage
= SetBusinessStartPage
{ SetBusinessStartPage -> Maybe InputBusinessStartPage
start_page :: Maybe InputBusinessStartPage.InputBusinessStartPage
}
deriving (SetBusinessStartPage -> SetBusinessStartPage -> Bool
(SetBusinessStartPage -> SetBusinessStartPage -> Bool)
-> (SetBusinessStartPage -> SetBusinessStartPage -> Bool)
-> Eq SetBusinessStartPage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetBusinessStartPage -> SetBusinessStartPage -> Bool
== :: SetBusinessStartPage -> SetBusinessStartPage -> Bool
$c/= :: SetBusinessStartPage -> SetBusinessStartPage -> Bool
/= :: SetBusinessStartPage -> SetBusinessStartPage -> Bool
Eq, Int -> SetBusinessStartPage -> ShowS
[SetBusinessStartPage] -> ShowS
SetBusinessStartPage -> String
(Int -> SetBusinessStartPage -> ShowS)
-> (SetBusinessStartPage -> String)
-> ([SetBusinessStartPage] -> ShowS)
-> Show SetBusinessStartPage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetBusinessStartPage -> ShowS
showsPrec :: Int -> SetBusinessStartPage -> ShowS
$cshow :: SetBusinessStartPage -> String
show :: SetBusinessStartPage -> String
$cshowList :: [SetBusinessStartPage] -> ShowS
showList :: [SetBusinessStartPage] -> ShowS
Show)
instance I.ShortShow SetBusinessStartPage where
shortShow :: SetBusinessStartPage -> String
shortShow
SetBusinessStartPage
{ start_page :: SetBusinessStartPage -> Maybe InputBusinessStartPage
start_page = Maybe InputBusinessStartPage
start_page_
}
= String
"SetBusinessStartPage"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"start_page" String -> Maybe InputBusinessStartPage -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputBusinessStartPage
start_page_
]
instance AT.ToJSON SetBusinessStartPage where
toJSON :: SetBusinessStartPage -> Value
toJSON
SetBusinessStartPage
{ start_page :: SetBusinessStartPage -> Maybe InputBusinessStartPage
start_page = Maybe InputBusinessStartPage
start_page_
}
= [Pair] -> Value
A.object
[ Key
"@type" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"setBusinessStartPage"
, Key
"start_page" Key -> Maybe InputBusinessStartPage -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputBusinessStartPage
start_page_
]