module TD.Query.SetVideoChatDefaultParticipant
(SetVideoChatDefaultParticipant(..)
, defaultSetVideoChatDefaultParticipant
) 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.MessageSender as MessageSender
data SetVideoChatDefaultParticipant
= SetVideoChatDefaultParticipant
{ SetVideoChatDefaultParticipant -> Maybe Int
chat_id :: Maybe Int
, SetVideoChatDefaultParticipant -> Maybe MessageSender
default_participant_id :: Maybe MessageSender.MessageSender
}
deriving (SetVideoChatDefaultParticipant
-> SetVideoChatDefaultParticipant -> Bool
(SetVideoChatDefaultParticipant
-> SetVideoChatDefaultParticipant -> Bool)
-> (SetVideoChatDefaultParticipant
-> SetVideoChatDefaultParticipant -> Bool)
-> Eq SetVideoChatDefaultParticipant
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetVideoChatDefaultParticipant
-> SetVideoChatDefaultParticipant -> Bool
== :: SetVideoChatDefaultParticipant
-> SetVideoChatDefaultParticipant -> Bool
$c/= :: SetVideoChatDefaultParticipant
-> SetVideoChatDefaultParticipant -> Bool
/= :: SetVideoChatDefaultParticipant
-> SetVideoChatDefaultParticipant -> Bool
Eq, Int -> SetVideoChatDefaultParticipant -> ShowS
[SetVideoChatDefaultParticipant] -> ShowS
SetVideoChatDefaultParticipant -> String
(Int -> SetVideoChatDefaultParticipant -> ShowS)
-> (SetVideoChatDefaultParticipant -> String)
-> ([SetVideoChatDefaultParticipant] -> ShowS)
-> Show SetVideoChatDefaultParticipant
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetVideoChatDefaultParticipant -> ShowS
showsPrec :: Int -> SetVideoChatDefaultParticipant -> ShowS
$cshow :: SetVideoChatDefaultParticipant -> String
show :: SetVideoChatDefaultParticipant -> String
$cshowList :: [SetVideoChatDefaultParticipant] -> ShowS
showList :: [SetVideoChatDefaultParticipant] -> ShowS
Show)
instance I.ShortShow SetVideoChatDefaultParticipant where
shortShow :: SetVideoChatDefaultParticipant -> String
shortShow
SetVideoChatDefaultParticipant
{ chat_id :: SetVideoChatDefaultParticipant -> Maybe Int
chat_id = Maybe Int
chat_id_
, default_participant_id :: SetVideoChatDefaultParticipant -> Maybe MessageSender
default_participant_id = Maybe MessageSender
default_participant_id_
}
= String
"SetVideoChatDefaultParticipant"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"chat_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
chat_id_
, String
"default_participant_id" String -> Maybe MessageSender -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe MessageSender
default_participant_id_
]
instance AT.ToJSON SetVideoChatDefaultParticipant where
toJSON :: SetVideoChatDefaultParticipant -> Value
toJSON
SetVideoChatDefaultParticipant
{ chat_id :: SetVideoChatDefaultParticipant -> Maybe Int
chat_id = Maybe Int
chat_id_
, default_participant_id :: SetVideoChatDefaultParticipant -> Maybe MessageSender
default_participant_id = Maybe MessageSender
default_participant_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
"setVideoChatDefaultParticipant"
, Key
"chat_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
chat_id_
, Key
"default_participant_id" Key -> Maybe MessageSender -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe MessageSender
default_participant_id_
]
defaultSetVideoChatDefaultParticipant :: SetVideoChatDefaultParticipant
defaultSetVideoChatDefaultParticipant :: SetVideoChatDefaultParticipant
defaultSetVideoChatDefaultParticipant =
SetVideoChatDefaultParticipant
{ chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, default_participant_id :: Maybe MessageSender
default_participant_id = Maybe MessageSender
forall a. Maybe a
Nothing
}