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