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