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