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