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