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