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