module TD.Query.EditQuickReplyMessage
(EditQuickReplyMessage(..)
, defaultEditQuickReplyMessage
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified TD.Data.InputMessageContent as InputMessageContent
data EditQuickReplyMessage
= EditQuickReplyMessage
{ EditQuickReplyMessage -> Maybe Int
shortcut_id :: Maybe Int
, EditQuickReplyMessage -> Maybe Int
message_id :: Maybe Int
, EditQuickReplyMessage -> Maybe InputMessageContent
input_message_content :: Maybe InputMessageContent.InputMessageContent
}
deriving (EditQuickReplyMessage -> EditQuickReplyMessage -> Bool
(EditQuickReplyMessage -> EditQuickReplyMessage -> Bool)
-> (EditQuickReplyMessage -> EditQuickReplyMessage -> Bool)
-> Eq EditQuickReplyMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EditQuickReplyMessage -> EditQuickReplyMessage -> Bool
== :: EditQuickReplyMessage -> EditQuickReplyMessage -> Bool
$c/= :: EditQuickReplyMessage -> EditQuickReplyMessage -> Bool
/= :: EditQuickReplyMessage -> EditQuickReplyMessage -> Bool
Eq, Int -> EditQuickReplyMessage -> ShowS
[EditQuickReplyMessage] -> ShowS
EditQuickReplyMessage -> String
(Int -> EditQuickReplyMessage -> ShowS)
-> (EditQuickReplyMessage -> String)
-> ([EditQuickReplyMessage] -> ShowS)
-> Show EditQuickReplyMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EditQuickReplyMessage -> ShowS
showsPrec :: Int -> EditQuickReplyMessage -> ShowS
$cshow :: EditQuickReplyMessage -> String
show :: EditQuickReplyMessage -> String
$cshowList :: [EditQuickReplyMessage] -> ShowS
showList :: [EditQuickReplyMessage] -> ShowS
Show)
instance I.ShortShow EditQuickReplyMessage where
shortShow :: EditQuickReplyMessage -> String
shortShow
EditQuickReplyMessage
{ shortcut_id :: EditQuickReplyMessage -> Maybe Int
shortcut_id = Maybe Int
shortcut_id_
, message_id :: EditQuickReplyMessage -> Maybe Int
message_id = Maybe Int
message_id_
, input_message_content :: EditQuickReplyMessage -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
}
= String
"EditQuickReplyMessage"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"shortcut_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
shortcut_id_
, String
"message_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
message_id_
, 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 EditQuickReplyMessage where
toJSON :: EditQuickReplyMessage -> Value
toJSON
EditQuickReplyMessage
{ shortcut_id :: EditQuickReplyMessage -> Maybe Int
shortcut_id = Maybe Int
shortcut_id_
, message_id :: EditQuickReplyMessage -> Maybe Int
message_id = Maybe Int
message_id_
, input_message_content :: EditQuickReplyMessage -> 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
"editQuickReplyMessage"
, Key
"shortcut_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
shortcut_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
"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_
]
defaultEditQuickReplyMessage :: EditQuickReplyMessage
defaultEditQuickReplyMessage :: EditQuickReplyMessage
defaultEditQuickReplyMessage =
EditQuickReplyMessage
{ shortcut_id :: Maybe Int
shortcut_id = Maybe Int
forall a. Maybe a
Nothing
, message_id :: Maybe Int
message_id = Maybe Int
forall a. Maybe a
Nothing
, input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
forall a. Maybe a
Nothing
}