module TD.Query.GetTextCompositionStyleExample
(GetTextCompositionStyleExample(..)
, defaultGetTextCompositionStyleExample
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified Data.Text as T
data GetTextCompositionStyleExample
= GetTextCompositionStyleExample
{ GetTextCompositionStyleExample -> Maybe Text
name :: Maybe T.Text
, GetTextCompositionStyleExample -> Maybe Int
example_number :: Maybe Int
}
deriving (GetTextCompositionStyleExample
-> GetTextCompositionStyleExample -> Bool
(GetTextCompositionStyleExample
-> GetTextCompositionStyleExample -> Bool)
-> (GetTextCompositionStyleExample
-> GetTextCompositionStyleExample -> Bool)
-> Eq GetTextCompositionStyleExample
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetTextCompositionStyleExample
-> GetTextCompositionStyleExample -> Bool
== :: GetTextCompositionStyleExample
-> GetTextCompositionStyleExample -> Bool
$c/= :: GetTextCompositionStyleExample
-> GetTextCompositionStyleExample -> Bool
/= :: GetTextCompositionStyleExample
-> GetTextCompositionStyleExample -> Bool
Eq, Int -> GetTextCompositionStyleExample -> ShowS
[GetTextCompositionStyleExample] -> ShowS
GetTextCompositionStyleExample -> String
(Int -> GetTextCompositionStyleExample -> ShowS)
-> (GetTextCompositionStyleExample -> String)
-> ([GetTextCompositionStyleExample] -> ShowS)
-> Show GetTextCompositionStyleExample
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetTextCompositionStyleExample -> ShowS
showsPrec :: Int -> GetTextCompositionStyleExample -> ShowS
$cshow :: GetTextCompositionStyleExample -> String
show :: GetTextCompositionStyleExample -> String
$cshowList :: [GetTextCompositionStyleExample] -> ShowS
showList :: [GetTextCompositionStyleExample] -> ShowS
Show)
instance I.ShortShow GetTextCompositionStyleExample where
shortShow :: GetTextCompositionStyleExample -> String
shortShow
GetTextCompositionStyleExample
{ name :: GetTextCompositionStyleExample -> Maybe Text
name = Maybe Text
name_
, example_number :: GetTextCompositionStyleExample -> Maybe Int
example_number = Maybe Int
example_number_
}
= String
"GetTextCompositionStyleExample"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
name_
, String
"example_number" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
example_number_
]
instance AT.ToJSON GetTextCompositionStyleExample where
toJSON :: GetTextCompositionStyleExample -> Value
toJSON
GetTextCompositionStyleExample
{ name :: GetTextCompositionStyleExample -> Maybe Text
name = Maybe Text
name_
, example_number :: GetTextCompositionStyleExample -> Maybe Int
example_number = Maybe Int
example_number_
}
= [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
"getTextCompositionStyleExample"
, Key
"name" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
name_
, Key
"example_number" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
example_number_
]
defaultGetTextCompositionStyleExample :: GetTextCompositionStyleExample
defaultGetTextCompositionStyleExample :: GetTextCompositionStyleExample
defaultGetTextCompositionStyleExample =
GetTextCompositionStyleExample
{ name :: Maybe Text
name = Maybe Text
forall a. Maybe a
Nothing
, example_number :: Maybe Int
example_number = Maybe Int
forall a. Maybe a
Nothing
}