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