module TD.Query.ReaddQuickReplyShortcutMessages
(ReaddQuickReplyShortcutMessages(..)
, defaultReaddQuickReplyShortcutMessages
) 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
data ReaddQuickReplyShortcutMessages
= ReaddQuickReplyShortcutMessages
{ ReaddQuickReplyShortcutMessages -> Maybe Text
shortcut_name :: Maybe T.Text
, ReaddQuickReplyShortcutMessages -> Maybe [Int]
message_ids :: Maybe [Int]
}
deriving (ReaddQuickReplyShortcutMessages
-> ReaddQuickReplyShortcutMessages -> Bool
(ReaddQuickReplyShortcutMessages
-> ReaddQuickReplyShortcutMessages -> Bool)
-> (ReaddQuickReplyShortcutMessages
-> ReaddQuickReplyShortcutMessages -> Bool)
-> Eq ReaddQuickReplyShortcutMessages
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReaddQuickReplyShortcutMessages
-> ReaddQuickReplyShortcutMessages -> Bool
== :: ReaddQuickReplyShortcutMessages
-> ReaddQuickReplyShortcutMessages -> Bool
$c/= :: ReaddQuickReplyShortcutMessages
-> ReaddQuickReplyShortcutMessages -> Bool
/= :: ReaddQuickReplyShortcutMessages
-> ReaddQuickReplyShortcutMessages -> Bool
Eq, Int -> ReaddQuickReplyShortcutMessages -> ShowS
[ReaddQuickReplyShortcutMessages] -> ShowS
ReaddQuickReplyShortcutMessages -> String
(Int -> ReaddQuickReplyShortcutMessages -> ShowS)
-> (ReaddQuickReplyShortcutMessages -> String)
-> ([ReaddQuickReplyShortcutMessages] -> ShowS)
-> Show ReaddQuickReplyShortcutMessages
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReaddQuickReplyShortcutMessages -> ShowS
showsPrec :: Int -> ReaddQuickReplyShortcutMessages -> ShowS
$cshow :: ReaddQuickReplyShortcutMessages -> String
show :: ReaddQuickReplyShortcutMessages -> String
$cshowList :: [ReaddQuickReplyShortcutMessages] -> ShowS
showList :: [ReaddQuickReplyShortcutMessages] -> ShowS
Show)
instance I.ShortShow ReaddQuickReplyShortcutMessages where
shortShow :: ReaddQuickReplyShortcutMessages -> String
shortShow
ReaddQuickReplyShortcutMessages
{ shortcut_name :: ReaddQuickReplyShortcutMessages -> Maybe Text
shortcut_name = Maybe Text
shortcut_name_
, message_ids :: ReaddQuickReplyShortcutMessages -> Maybe [Int]
message_ids = Maybe [Int]
message_ids_
}
= String
"ReaddQuickReplyShortcutMessages"
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
"message_ids" String -> Maybe [Int] -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe [Int]
message_ids_
]
instance AT.ToJSON ReaddQuickReplyShortcutMessages where
toJSON :: ReaddQuickReplyShortcutMessages -> Value
toJSON
ReaddQuickReplyShortcutMessages
{ shortcut_name :: ReaddQuickReplyShortcutMessages -> Maybe Text
shortcut_name = Maybe Text
shortcut_name_
, message_ids :: ReaddQuickReplyShortcutMessages -> 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
"readdQuickReplyShortcutMessages"
, 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
"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_
]
defaultReaddQuickReplyShortcutMessages :: ReaddQuickReplyShortcutMessages
defaultReaddQuickReplyShortcutMessages :: ReaddQuickReplyShortcutMessages
defaultReaddQuickReplyShortcutMessages =
ReaddQuickReplyShortcutMessages
{ shortcut_name :: Maybe Text
shortcut_name = Maybe Text
forall a. Maybe a
Nothing
, message_ids :: Maybe [Int]
message_ids = Maybe [Int]
forall a. Maybe a
Nothing
}