module TD.Query.SendQuickReplyShortcutMessages
(SendQuickReplyShortcutMessages(..)
, defaultSendQuickReplyShortcutMessages
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data SendQuickReplyShortcutMessages
= SendQuickReplyShortcutMessages
{ SendQuickReplyShortcutMessages -> Maybe Int
chat_id :: Maybe Int
, SendQuickReplyShortcutMessages -> Maybe Int
shortcut_id :: Maybe Int
, SendQuickReplyShortcutMessages -> Maybe Int
sending_id :: Maybe Int
}
deriving (SendQuickReplyShortcutMessages
-> SendQuickReplyShortcutMessages -> Bool
(SendQuickReplyShortcutMessages
-> SendQuickReplyShortcutMessages -> Bool)
-> (SendQuickReplyShortcutMessages
-> SendQuickReplyShortcutMessages -> Bool)
-> Eq SendQuickReplyShortcutMessages
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SendQuickReplyShortcutMessages
-> SendQuickReplyShortcutMessages -> Bool
== :: SendQuickReplyShortcutMessages
-> SendQuickReplyShortcutMessages -> Bool
$c/= :: SendQuickReplyShortcutMessages
-> SendQuickReplyShortcutMessages -> Bool
/= :: SendQuickReplyShortcutMessages
-> SendQuickReplyShortcutMessages -> Bool
Eq, Int -> SendQuickReplyShortcutMessages -> ShowS
[SendQuickReplyShortcutMessages] -> ShowS
SendQuickReplyShortcutMessages -> String
(Int -> SendQuickReplyShortcutMessages -> ShowS)
-> (SendQuickReplyShortcutMessages -> String)
-> ([SendQuickReplyShortcutMessages] -> ShowS)
-> Show SendQuickReplyShortcutMessages
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SendQuickReplyShortcutMessages -> ShowS
showsPrec :: Int -> SendQuickReplyShortcutMessages -> ShowS
$cshow :: SendQuickReplyShortcutMessages -> String
show :: SendQuickReplyShortcutMessages -> String
$cshowList :: [SendQuickReplyShortcutMessages] -> ShowS
showList :: [SendQuickReplyShortcutMessages] -> ShowS
Show)
instance I.ShortShow SendQuickReplyShortcutMessages where
shortShow :: SendQuickReplyShortcutMessages -> String
shortShow
SendQuickReplyShortcutMessages
{ chat_id :: SendQuickReplyShortcutMessages -> Maybe Int
chat_id = Maybe Int
chat_id_
, shortcut_id :: SendQuickReplyShortcutMessages -> Maybe Int
shortcut_id = Maybe Int
shortcut_id_
, sending_id :: SendQuickReplyShortcutMessages -> Maybe Int
sending_id = Maybe Int
sending_id_
}
= String
"SendQuickReplyShortcutMessages"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"chat_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
chat_id_
, String
"shortcut_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
shortcut_id_
, String
"sending_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
sending_id_
]
instance AT.ToJSON SendQuickReplyShortcutMessages where
toJSON :: SendQuickReplyShortcutMessages -> Value
toJSON
SendQuickReplyShortcutMessages
{ chat_id :: SendQuickReplyShortcutMessages -> Maybe Int
chat_id = Maybe Int
chat_id_
, shortcut_id :: SendQuickReplyShortcutMessages -> Maybe Int
shortcut_id = Maybe Int
shortcut_id_
, sending_id :: SendQuickReplyShortcutMessages -> Maybe Int
sending_id = Maybe Int
sending_id_
}
= [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
"sendQuickReplyShortcutMessages"
, 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
"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
"sending_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
sending_id_
]
defaultSendQuickReplyShortcutMessages :: SendQuickReplyShortcutMessages
defaultSendQuickReplyShortcutMessages :: SendQuickReplyShortcutMessages
defaultSendQuickReplyShortcutMessages =
SendQuickReplyShortcutMessages
{ chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, shortcut_id :: Maybe Int
shortcut_id = Maybe Int
forall a. Maybe a
Nothing
, sending_id :: Maybe Int
sending_id = Maybe Int
forall a. Maybe a
Nothing
}