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