module TD.Query.EditInlineMessageCaption
(EditInlineMessageCaption(..)
, defaultEditInlineMessageCaption
) 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.FormattedText as FormattedText
data EditInlineMessageCaption
= EditInlineMessageCaption
{ EditInlineMessageCaption -> Maybe Text
inline_message_id :: Maybe T.Text
, EditInlineMessageCaption -> Maybe ReplyMarkup
reply_markup :: Maybe ReplyMarkup.ReplyMarkup
, EditInlineMessageCaption -> Maybe FormattedText
caption :: Maybe FormattedText.FormattedText
, EditInlineMessageCaption -> Maybe Bool
show_caption_above_media :: Maybe Bool
}
deriving (EditInlineMessageCaption -> EditInlineMessageCaption -> Bool
(EditInlineMessageCaption -> EditInlineMessageCaption -> Bool)
-> (EditInlineMessageCaption -> EditInlineMessageCaption -> Bool)
-> Eq EditInlineMessageCaption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EditInlineMessageCaption -> EditInlineMessageCaption -> Bool
== :: EditInlineMessageCaption -> EditInlineMessageCaption -> Bool
$c/= :: EditInlineMessageCaption -> EditInlineMessageCaption -> Bool
/= :: EditInlineMessageCaption -> EditInlineMessageCaption -> Bool
Eq, Int -> EditInlineMessageCaption -> ShowS
[EditInlineMessageCaption] -> ShowS
EditInlineMessageCaption -> String
(Int -> EditInlineMessageCaption -> ShowS)
-> (EditInlineMessageCaption -> String)
-> ([EditInlineMessageCaption] -> ShowS)
-> Show EditInlineMessageCaption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EditInlineMessageCaption -> ShowS
showsPrec :: Int -> EditInlineMessageCaption -> ShowS
$cshow :: EditInlineMessageCaption -> String
show :: EditInlineMessageCaption -> String
$cshowList :: [EditInlineMessageCaption] -> ShowS
showList :: [EditInlineMessageCaption] -> ShowS
Show)
instance I.ShortShow EditInlineMessageCaption where
shortShow :: EditInlineMessageCaption -> String
shortShow
EditInlineMessageCaption
{ inline_message_id :: EditInlineMessageCaption -> Maybe Text
inline_message_id = Maybe Text
inline_message_id_
, reply_markup :: EditInlineMessageCaption -> Maybe ReplyMarkup
reply_markup = Maybe ReplyMarkup
reply_markup_
, caption :: EditInlineMessageCaption -> Maybe FormattedText
caption = Maybe FormattedText
caption_
, show_caption_above_media :: EditInlineMessageCaption -> Maybe Bool
show_caption_above_media = Maybe Bool
show_caption_above_media_
}
= String
"EditInlineMessageCaption"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"inline_message_id" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
inline_message_id_
, String
"reply_markup" String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
, String
"caption" String -> Maybe FormattedText -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe FormattedText
caption_
, String
"show_caption_above_media" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
show_caption_above_media_
]
instance AT.ToJSON EditInlineMessageCaption where
toJSON :: EditInlineMessageCaption -> Value
toJSON
EditInlineMessageCaption
{ inline_message_id :: EditInlineMessageCaption -> Maybe Text
inline_message_id = Maybe Text
inline_message_id_
, reply_markup :: EditInlineMessageCaption -> Maybe ReplyMarkup
reply_markup = Maybe ReplyMarkup
reply_markup_
, caption :: EditInlineMessageCaption -> Maybe FormattedText
caption = Maybe FormattedText
caption_
, show_caption_above_media :: EditInlineMessageCaption -> Maybe Bool
show_caption_above_media = Maybe Bool
show_caption_above_media_
}
= [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
"editInlineMessageCaption"
, Key
"inline_message_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
inline_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
"caption" Key -> Maybe FormattedText -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe FormattedText
caption_
, Key
"show_caption_above_media" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
show_caption_above_media_
]
defaultEditInlineMessageCaption :: EditInlineMessageCaption
defaultEditInlineMessageCaption :: EditInlineMessageCaption
defaultEditInlineMessageCaption =
EditInlineMessageCaption
{ inline_message_id :: Maybe Text
inline_message_id = Maybe Text
forall a. Maybe a
Nothing
, reply_markup :: Maybe ReplyMarkup
reply_markup = Maybe ReplyMarkup
forall a. Maybe a
Nothing
, caption :: Maybe FormattedText
caption = Maybe FormattedText
forall a. Maybe a
Nothing
, show_caption_above_media :: Maybe Bool
show_caption_above_media = Maybe Bool
forall a. Maybe a
Nothing
}