module TD.Query.DeclineGroupCallInvitation
(DeclineGroupCallInvitation(..)
, defaultDeclineGroupCallInvitation
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data DeclineGroupCallInvitation
= DeclineGroupCallInvitation
{ DeclineGroupCallInvitation -> Maybe Int
chat_id :: Maybe Int
, DeclineGroupCallInvitation -> Maybe Int
message_id :: Maybe Int
}
deriving (DeclineGroupCallInvitation -> DeclineGroupCallInvitation -> Bool
(DeclineGroupCallInvitation -> DeclineGroupCallInvitation -> Bool)
-> (DeclineGroupCallInvitation
-> DeclineGroupCallInvitation -> Bool)
-> Eq DeclineGroupCallInvitation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeclineGroupCallInvitation -> DeclineGroupCallInvitation -> Bool
== :: DeclineGroupCallInvitation -> DeclineGroupCallInvitation -> Bool
$c/= :: DeclineGroupCallInvitation -> DeclineGroupCallInvitation -> Bool
/= :: DeclineGroupCallInvitation -> DeclineGroupCallInvitation -> Bool
Eq, Int -> DeclineGroupCallInvitation -> ShowS
[DeclineGroupCallInvitation] -> ShowS
DeclineGroupCallInvitation -> String
(Int -> DeclineGroupCallInvitation -> ShowS)
-> (DeclineGroupCallInvitation -> String)
-> ([DeclineGroupCallInvitation] -> ShowS)
-> Show DeclineGroupCallInvitation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeclineGroupCallInvitation -> ShowS
showsPrec :: Int -> DeclineGroupCallInvitation -> ShowS
$cshow :: DeclineGroupCallInvitation -> String
show :: DeclineGroupCallInvitation -> String
$cshowList :: [DeclineGroupCallInvitation] -> ShowS
showList :: [DeclineGroupCallInvitation] -> ShowS
Show)
instance I.ShortShow DeclineGroupCallInvitation where
shortShow :: DeclineGroupCallInvitation -> String
shortShow
DeclineGroupCallInvitation
{ chat_id :: DeclineGroupCallInvitation -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_id :: DeclineGroupCallInvitation -> Maybe Int
message_id = Maybe Int
message_id_
}
= String
"DeclineGroupCallInvitation"
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
"message_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
message_id_
]
instance AT.ToJSON DeclineGroupCallInvitation where
toJSON :: DeclineGroupCallInvitation -> Value
toJSON
DeclineGroupCallInvitation
{ chat_id :: DeclineGroupCallInvitation -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_id :: DeclineGroupCallInvitation -> Maybe Int
message_id = Maybe Int
message_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
"declineGroupCallInvitation"
, 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
"message_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
message_id_
]
defaultDeclineGroupCallInvitation :: DeclineGroupCallInvitation
defaultDeclineGroupCallInvitation :: DeclineGroupCallInvitation
defaultDeclineGroupCallInvitation =
DeclineGroupCallInvitation
{ chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, message_id :: Maybe Int
message_id = Maybe Int
forall a. Maybe a
Nothing
}