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