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