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