module TD.Query.LoadQuickReplyShortcutMessages
(LoadQuickReplyShortcutMessages(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data LoadQuickReplyShortcutMessages
= LoadQuickReplyShortcutMessages
{ LoadQuickReplyShortcutMessages -> Maybe Int
shortcut_id :: Maybe Int
}
deriving (LoadQuickReplyShortcutMessages
-> LoadQuickReplyShortcutMessages -> Bool
(LoadQuickReplyShortcutMessages
-> LoadQuickReplyShortcutMessages -> Bool)
-> (LoadQuickReplyShortcutMessages
-> LoadQuickReplyShortcutMessages -> Bool)
-> Eq LoadQuickReplyShortcutMessages
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LoadQuickReplyShortcutMessages
-> LoadQuickReplyShortcutMessages -> Bool
== :: LoadQuickReplyShortcutMessages
-> LoadQuickReplyShortcutMessages -> Bool
$c/= :: LoadQuickReplyShortcutMessages
-> LoadQuickReplyShortcutMessages -> Bool
/= :: LoadQuickReplyShortcutMessages
-> LoadQuickReplyShortcutMessages -> Bool
Eq, Int -> LoadQuickReplyShortcutMessages -> ShowS
[LoadQuickReplyShortcutMessages] -> ShowS
LoadQuickReplyShortcutMessages -> String
(Int -> LoadQuickReplyShortcutMessages -> ShowS)
-> (LoadQuickReplyShortcutMessages -> String)
-> ([LoadQuickReplyShortcutMessages] -> ShowS)
-> Show LoadQuickReplyShortcutMessages
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LoadQuickReplyShortcutMessages -> ShowS
showsPrec :: Int -> LoadQuickReplyShortcutMessages -> ShowS
$cshow :: LoadQuickReplyShortcutMessages -> String
show :: LoadQuickReplyShortcutMessages -> String
$cshowList :: [LoadQuickReplyShortcutMessages] -> ShowS
showList :: [LoadQuickReplyShortcutMessages] -> ShowS
Show)
instance I.ShortShow LoadQuickReplyShortcutMessages where
shortShow :: LoadQuickReplyShortcutMessages -> String
shortShow
LoadQuickReplyShortcutMessages
{ shortcut_id :: LoadQuickReplyShortcutMessages -> Maybe Int
shortcut_id = Maybe Int
shortcut_id_
}
= String
"LoadQuickReplyShortcutMessages"
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_
]
instance AT.ToJSON LoadQuickReplyShortcutMessages where
toJSON :: LoadQuickReplyShortcutMessages -> Value
toJSON
LoadQuickReplyShortcutMessages
{ shortcut_id :: LoadQuickReplyShortcutMessages -> Maybe Int
shortcut_id = Maybe Int
shortcut_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
"loadQuickReplyShortcutMessages"
, 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_
]