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