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