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