module TD.Query.EditBusinessMessageReplyMarkup
(EditBusinessMessageReplyMarkup(..)
, defaultEditBusinessMessageReplyMarkup
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified Data.Text as T
import qualified TD.Data.ReplyMarkup as ReplyMarkup
data EditBusinessMessageReplyMarkup
= EditBusinessMessageReplyMarkup
{ EditBusinessMessageReplyMarkup -> Maybe Text
business_connection_id :: Maybe T.Text
, EditBusinessMessageReplyMarkup -> Maybe Int
chat_id :: Maybe Int
, EditBusinessMessageReplyMarkup -> Maybe Int
message_id :: Maybe Int
, EditBusinessMessageReplyMarkup -> Maybe ReplyMarkup
reply_markup :: Maybe ReplyMarkup.ReplyMarkup
}
deriving (EditBusinessMessageReplyMarkup
-> EditBusinessMessageReplyMarkup -> Bool
(EditBusinessMessageReplyMarkup
-> EditBusinessMessageReplyMarkup -> Bool)
-> (EditBusinessMessageReplyMarkup
-> EditBusinessMessageReplyMarkup -> Bool)
-> Eq EditBusinessMessageReplyMarkup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EditBusinessMessageReplyMarkup
-> EditBusinessMessageReplyMarkup -> Bool
== :: EditBusinessMessageReplyMarkup
-> EditBusinessMessageReplyMarkup -> Bool
$c/= :: EditBusinessMessageReplyMarkup
-> EditBusinessMessageReplyMarkup -> Bool
/= :: EditBusinessMessageReplyMarkup
-> EditBusinessMessageReplyMarkup -> Bool
Eq, Int -> EditBusinessMessageReplyMarkup -> ShowS
[EditBusinessMessageReplyMarkup] -> ShowS
EditBusinessMessageReplyMarkup -> String
(Int -> EditBusinessMessageReplyMarkup -> ShowS)
-> (EditBusinessMessageReplyMarkup -> String)
-> ([EditBusinessMessageReplyMarkup] -> ShowS)
-> Show EditBusinessMessageReplyMarkup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EditBusinessMessageReplyMarkup -> ShowS
showsPrec :: Int -> EditBusinessMessageReplyMarkup -> ShowS
$cshow :: EditBusinessMessageReplyMarkup -> String
show :: EditBusinessMessageReplyMarkup -> String
$cshowList :: [EditBusinessMessageReplyMarkup] -> ShowS
showList :: [EditBusinessMessageReplyMarkup] -> ShowS
Show)
instance I.ShortShow EditBusinessMessageReplyMarkup where
shortShow :: EditBusinessMessageReplyMarkup -> String
shortShow
EditBusinessMessageReplyMarkup
{ business_connection_id :: EditBusinessMessageReplyMarkup -> Maybe Text
business_connection_id = Maybe Text
business_connection_id_
, chat_id :: EditBusinessMessageReplyMarkup -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_id :: EditBusinessMessageReplyMarkup -> Maybe Int
message_id = Maybe Int
message_id_
, reply_markup :: EditBusinessMessageReplyMarkup -> Maybe ReplyMarkup
reply_markup = Maybe ReplyMarkup
reply_markup_
}
= String
"EditBusinessMessageReplyMarkup"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"business_connection_id" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
business_connection_id_
, 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_
, String
"reply_markup" String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
]
instance AT.ToJSON EditBusinessMessageReplyMarkup where
toJSON :: EditBusinessMessageReplyMarkup -> Value
toJSON
EditBusinessMessageReplyMarkup
{ business_connection_id :: EditBusinessMessageReplyMarkup -> Maybe Text
business_connection_id = Maybe Text
business_connection_id_
, chat_id :: EditBusinessMessageReplyMarkup -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_id :: EditBusinessMessageReplyMarkup -> Maybe Int
message_id = Maybe Int
message_id_
, reply_markup :: EditBusinessMessageReplyMarkup -> Maybe ReplyMarkup
reply_markup = Maybe ReplyMarkup
reply_markup_
}
= [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
"editBusinessMessageReplyMarkup"
, Key
"business_connection_id" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
business_connection_id_
, 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_
, Key
"reply_markup" Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
]
defaultEditBusinessMessageReplyMarkup :: EditBusinessMessageReplyMarkup
defaultEditBusinessMessageReplyMarkup :: EditBusinessMessageReplyMarkup
defaultEditBusinessMessageReplyMarkup =
EditBusinessMessageReplyMarkup
{ business_connection_id :: Maybe Text
business_connection_id = Maybe Text
forall a. Maybe a
Nothing
, 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
, reply_markup :: Maybe ReplyMarkup
reply_markup = Maybe ReplyMarkup
forall a. Maybe a
Nothing
}