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