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