module TD.Query.ToggleGeneralForumTopicIsHidden
(ToggleGeneralForumTopicIsHidden(..)
, defaultToggleGeneralForumTopicIsHidden
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data ToggleGeneralForumTopicIsHidden
= ToggleGeneralForumTopicIsHidden
{ ToggleGeneralForumTopicIsHidden -> Maybe Int
chat_id :: Maybe Int
, ToggleGeneralForumTopicIsHidden -> Maybe Bool
is_hidden :: Maybe Bool
}
deriving (ToggleGeneralForumTopicIsHidden
-> ToggleGeneralForumTopicIsHidden -> Bool
(ToggleGeneralForumTopicIsHidden
-> ToggleGeneralForumTopicIsHidden -> Bool)
-> (ToggleGeneralForumTopicIsHidden
-> ToggleGeneralForumTopicIsHidden -> Bool)
-> Eq ToggleGeneralForumTopicIsHidden
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ToggleGeneralForumTopicIsHidden
-> ToggleGeneralForumTopicIsHidden -> Bool
== :: ToggleGeneralForumTopicIsHidden
-> ToggleGeneralForumTopicIsHidden -> Bool
$c/= :: ToggleGeneralForumTopicIsHidden
-> ToggleGeneralForumTopicIsHidden -> Bool
/= :: ToggleGeneralForumTopicIsHidden
-> ToggleGeneralForumTopicIsHidden -> Bool
Eq, Int -> ToggleGeneralForumTopicIsHidden -> ShowS
[ToggleGeneralForumTopicIsHidden] -> ShowS
ToggleGeneralForumTopicIsHidden -> String
(Int -> ToggleGeneralForumTopicIsHidden -> ShowS)
-> (ToggleGeneralForumTopicIsHidden -> String)
-> ([ToggleGeneralForumTopicIsHidden] -> ShowS)
-> Show ToggleGeneralForumTopicIsHidden
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ToggleGeneralForumTopicIsHidden -> ShowS
showsPrec :: Int -> ToggleGeneralForumTopicIsHidden -> ShowS
$cshow :: ToggleGeneralForumTopicIsHidden -> String
show :: ToggleGeneralForumTopicIsHidden -> String
$cshowList :: [ToggleGeneralForumTopicIsHidden] -> ShowS
showList :: [ToggleGeneralForumTopicIsHidden] -> ShowS
Show)
instance I.ShortShow ToggleGeneralForumTopicIsHidden where
shortShow :: ToggleGeneralForumTopicIsHidden -> String
shortShow
ToggleGeneralForumTopicIsHidden
{ chat_id :: ToggleGeneralForumTopicIsHidden -> Maybe Int
chat_id = Maybe Int
chat_id_
, is_hidden :: ToggleGeneralForumTopicIsHidden -> Maybe Bool
is_hidden = Maybe Bool
is_hidden_
}
= String
"ToggleGeneralForumTopicIsHidden"
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_hidden" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
is_hidden_
]
instance AT.ToJSON ToggleGeneralForumTopicIsHidden where
toJSON :: ToggleGeneralForumTopicIsHidden -> Value
toJSON
ToggleGeneralForumTopicIsHidden
{ chat_id :: ToggleGeneralForumTopicIsHidden -> Maybe Int
chat_id = Maybe Int
chat_id_
, is_hidden :: ToggleGeneralForumTopicIsHidden -> Maybe Bool
is_hidden = Maybe Bool
is_hidden_
}
= [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
"toggleGeneralForumTopicIsHidden"
, 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_hidden" 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_hidden_
]
defaultToggleGeneralForumTopicIsHidden :: ToggleGeneralForumTopicIsHidden
defaultToggleGeneralForumTopicIsHidden :: ToggleGeneralForumTopicIsHidden
defaultToggleGeneralForumTopicIsHidden =
ToggleGeneralForumTopicIsHidden
{ chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, is_hidden :: Maybe Bool
is_hidden = Maybe Bool
forall a. Maybe a
Nothing
}