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