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