module TD.Query.AddQuickReplyShortcutMessageAlbum
(AddQuickReplyShortcutMessageAlbum(..)
, defaultAddQuickReplyShortcutMessageAlbum
) 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.InputMessageContent as InputMessageContent
data AddQuickReplyShortcutMessageAlbum
= AddQuickReplyShortcutMessageAlbum
{ AddQuickReplyShortcutMessageAlbum -> Maybe Text
shortcut_name :: Maybe T.Text
, AddQuickReplyShortcutMessageAlbum -> Maybe Int
reply_to_message_id :: Maybe Int
, AddQuickReplyShortcutMessageAlbum -> Maybe [InputMessageContent]
input_message_contents :: Maybe [InputMessageContent.InputMessageContent]
}
deriving (AddQuickReplyShortcutMessageAlbum
-> AddQuickReplyShortcutMessageAlbum -> Bool
(AddQuickReplyShortcutMessageAlbum
-> AddQuickReplyShortcutMessageAlbum -> Bool)
-> (AddQuickReplyShortcutMessageAlbum
-> AddQuickReplyShortcutMessageAlbum -> Bool)
-> Eq AddQuickReplyShortcutMessageAlbum
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AddQuickReplyShortcutMessageAlbum
-> AddQuickReplyShortcutMessageAlbum -> Bool
== :: AddQuickReplyShortcutMessageAlbum
-> AddQuickReplyShortcutMessageAlbum -> Bool
$c/= :: AddQuickReplyShortcutMessageAlbum
-> AddQuickReplyShortcutMessageAlbum -> Bool
/= :: AddQuickReplyShortcutMessageAlbum
-> AddQuickReplyShortcutMessageAlbum -> Bool
Eq, Int -> AddQuickReplyShortcutMessageAlbum -> ShowS
[AddQuickReplyShortcutMessageAlbum] -> ShowS
AddQuickReplyShortcutMessageAlbum -> String
(Int -> AddQuickReplyShortcutMessageAlbum -> ShowS)
-> (AddQuickReplyShortcutMessageAlbum -> String)
-> ([AddQuickReplyShortcutMessageAlbum] -> ShowS)
-> Show AddQuickReplyShortcutMessageAlbum
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AddQuickReplyShortcutMessageAlbum -> ShowS
showsPrec :: Int -> AddQuickReplyShortcutMessageAlbum -> ShowS
$cshow :: AddQuickReplyShortcutMessageAlbum -> String
show :: AddQuickReplyShortcutMessageAlbum -> String
$cshowList :: [AddQuickReplyShortcutMessageAlbum] -> ShowS
showList :: [AddQuickReplyShortcutMessageAlbum] -> ShowS
Show)
instance I.ShortShow AddQuickReplyShortcutMessageAlbum where
shortShow :: AddQuickReplyShortcutMessageAlbum -> String
shortShow
AddQuickReplyShortcutMessageAlbum
{ shortcut_name :: AddQuickReplyShortcutMessageAlbum -> Maybe Text
shortcut_name = Maybe Text
shortcut_name_
, reply_to_message_id :: AddQuickReplyShortcutMessageAlbum -> Maybe Int
reply_to_message_id = Maybe Int
reply_to_message_id_
, input_message_contents :: AddQuickReplyShortcutMessageAlbum -> Maybe [InputMessageContent]
input_message_contents = Maybe [InputMessageContent]
input_message_contents_
}
= String
"AddQuickReplyShortcutMessageAlbum"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"shortcut_name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
shortcut_name_
, String
"reply_to_message_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
reply_to_message_id_
, String
"input_message_contents" String -> Maybe [InputMessageContent] -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe [InputMessageContent]
input_message_contents_
]
instance AT.ToJSON AddQuickReplyShortcutMessageAlbum where
toJSON :: AddQuickReplyShortcutMessageAlbum -> Value
toJSON
AddQuickReplyShortcutMessageAlbum
{ shortcut_name :: AddQuickReplyShortcutMessageAlbum -> Maybe Text
shortcut_name = Maybe Text
shortcut_name_
, reply_to_message_id :: AddQuickReplyShortcutMessageAlbum -> Maybe Int
reply_to_message_id = Maybe Int
reply_to_message_id_
, input_message_contents :: AddQuickReplyShortcutMessageAlbum -> Maybe [InputMessageContent]
input_message_contents = Maybe [InputMessageContent]
input_message_contents_
}
= [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
"addQuickReplyShortcutMessageAlbum"
, Key
"shortcut_name" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
shortcut_name_
, Key
"reply_to_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
reply_to_message_id_
, Key
"input_message_contents" 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_contents_
]
defaultAddQuickReplyShortcutMessageAlbum :: AddQuickReplyShortcutMessageAlbum
defaultAddQuickReplyShortcutMessageAlbum :: AddQuickReplyShortcutMessageAlbum
defaultAddQuickReplyShortcutMessageAlbum =
AddQuickReplyShortcutMessageAlbum
{ shortcut_name :: Maybe Text
shortcut_name = Maybe Text
forall a. Maybe a
Nothing
, reply_to_message_id :: Maybe Int
reply_to_message_id = Maybe Int
forall a. Maybe a
Nothing
, input_message_contents :: Maybe [InputMessageContent]
input_message_contents = Maybe [InputMessageContent]
forall a. Maybe a
Nothing
}