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