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