module TD.Query.ToggleGroupCallParticipantIsHandRaised
(ToggleGroupCallParticipantIsHandRaised(..)
, defaultToggleGroupCallParticipantIsHandRaised
) 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 ToggleGroupCallParticipantIsHandRaised
= ToggleGroupCallParticipantIsHandRaised
{ ToggleGroupCallParticipantIsHandRaised -> Maybe Int
group_call_id :: Maybe Int
, ToggleGroupCallParticipantIsHandRaised -> Maybe MessageSender
participant_id :: Maybe MessageSender.MessageSender
, ToggleGroupCallParticipantIsHandRaised -> Maybe Bool
is_hand_raised :: Maybe Bool
}
deriving (ToggleGroupCallParticipantIsHandRaised
-> ToggleGroupCallParticipantIsHandRaised -> Bool
(ToggleGroupCallParticipantIsHandRaised
-> ToggleGroupCallParticipantIsHandRaised -> Bool)
-> (ToggleGroupCallParticipantIsHandRaised
-> ToggleGroupCallParticipantIsHandRaised -> Bool)
-> Eq ToggleGroupCallParticipantIsHandRaised
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ToggleGroupCallParticipantIsHandRaised
-> ToggleGroupCallParticipantIsHandRaised -> Bool
== :: ToggleGroupCallParticipantIsHandRaised
-> ToggleGroupCallParticipantIsHandRaised -> Bool
$c/= :: ToggleGroupCallParticipantIsHandRaised
-> ToggleGroupCallParticipantIsHandRaised -> Bool
/= :: ToggleGroupCallParticipantIsHandRaised
-> ToggleGroupCallParticipantIsHandRaised -> Bool
Eq, Int -> ToggleGroupCallParticipantIsHandRaised -> ShowS
[ToggleGroupCallParticipantIsHandRaised] -> ShowS
ToggleGroupCallParticipantIsHandRaised -> String
(Int -> ToggleGroupCallParticipantIsHandRaised -> ShowS)
-> (ToggleGroupCallParticipantIsHandRaised -> String)
-> ([ToggleGroupCallParticipantIsHandRaised] -> ShowS)
-> Show ToggleGroupCallParticipantIsHandRaised
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ToggleGroupCallParticipantIsHandRaised -> ShowS
showsPrec :: Int -> ToggleGroupCallParticipantIsHandRaised -> ShowS
$cshow :: ToggleGroupCallParticipantIsHandRaised -> String
show :: ToggleGroupCallParticipantIsHandRaised -> String
$cshowList :: [ToggleGroupCallParticipantIsHandRaised] -> ShowS
showList :: [ToggleGroupCallParticipantIsHandRaised] -> ShowS
Show)
instance I.ShortShow ToggleGroupCallParticipantIsHandRaised where
shortShow :: ToggleGroupCallParticipantIsHandRaised -> String
shortShow
ToggleGroupCallParticipantIsHandRaised
{ group_call_id :: ToggleGroupCallParticipantIsHandRaised -> Maybe Int
group_call_id = Maybe Int
group_call_id_
, participant_id :: ToggleGroupCallParticipantIsHandRaised -> Maybe MessageSender
participant_id = Maybe MessageSender
participant_id_
, is_hand_raised :: ToggleGroupCallParticipantIsHandRaised -> Maybe Bool
is_hand_raised = Maybe Bool
is_hand_raised_
}
= String
"ToggleGroupCallParticipantIsHandRaised"
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_
, String
"participant_id" String -> Maybe MessageSender -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe MessageSender
participant_id_
, String
"is_hand_raised" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
is_hand_raised_
]
instance AT.ToJSON ToggleGroupCallParticipantIsHandRaised where
toJSON :: ToggleGroupCallParticipantIsHandRaised -> Value
toJSON
ToggleGroupCallParticipantIsHandRaised
{ group_call_id :: ToggleGroupCallParticipantIsHandRaised -> Maybe Int
group_call_id = Maybe Int
group_call_id_
, participant_id :: ToggleGroupCallParticipantIsHandRaised -> Maybe MessageSender
participant_id = Maybe MessageSender
participant_id_
, is_hand_raised :: ToggleGroupCallParticipantIsHandRaised -> Maybe Bool
is_hand_raised = Maybe Bool
is_hand_raised_
}
= [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
"toggleGroupCallParticipantIsHandRaised"
, 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_
, Key
"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
participant_id_
, Key
"is_hand_raised" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
is_hand_raised_
]
defaultToggleGroupCallParticipantIsHandRaised :: ToggleGroupCallParticipantIsHandRaised
defaultToggleGroupCallParticipantIsHandRaised :: ToggleGroupCallParticipantIsHandRaised
defaultToggleGroupCallParticipantIsHandRaised =
ToggleGroupCallParticipantIsHandRaised
{ group_call_id :: Maybe Int
group_call_id = Maybe Int
forall a. Maybe a
Nothing
, participant_id :: Maybe MessageSender
participant_id = Maybe MessageSender
forall a. Maybe a
Nothing
, is_hand_raised :: Maybe Bool
is_hand_raised = Maybe Bool
forall a. Maybe a
Nothing
}