module TD.Query.CheckQuickReplyShortcutName
(CheckQuickReplyShortcutName(..)
) 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 CheckQuickReplyShortcutName
= CheckQuickReplyShortcutName
{ CheckQuickReplyShortcutName -> Maybe Text
name :: Maybe T.Text
}
deriving (CheckQuickReplyShortcutName -> CheckQuickReplyShortcutName -> Bool
(CheckQuickReplyShortcutName
-> CheckQuickReplyShortcutName -> Bool)
-> (CheckQuickReplyShortcutName
-> CheckQuickReplyShortcutName -> Bool)
-> Eq CheckQuickReplyShortcutName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CheckQuickReplyShortcutName -> CheckQuickReplyShortcutName -> Bool
== :: CheckQuickReplyShortcutName -> CheckQuickReplyShortcutName -> Bool
$c/= :: CheckQuickReplyShortcutName -> CheckQuickReplyShortcutName -> Bool
/= :: CheckQuickReplyShortcutName -> CheckQuickReplyShortcutName -> Bool
Eq, Int -> CheckQuickReplyShortcutName -> ShowS
[CheckQuickReplyShortcutName] -> ShowS
CheckQuickReplyShortcutName -> String
(Int -> CheckQuickReplyShortcutName -> ShowS)
-> (CheckQuickReplyShortcutName -> String)
-> ([CheckQuickReplyShortcutName] -> ShowS)
-> Show CheckQuickReplyShortcutName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CheckQuickReplyShortcutName -> ShowS
showsPrec :: Int -> CheckQuickReplyShortcutName -> ShowS
$cshow :: CheckQuickReplyShortcutName -> String
show :: CheckQuickReplyShortcutName -> String
$cshowList :: [CheckQuickReplyShortcutName] -> ShowS
showList :: [CheckQuickReplyShortcutName] -> ShowS
Show)
instance I.ShortShow CheckQuickReplyShortcutName where
shortShow :: CheckQuickReplyShortcutName -> String
shortShow
CheckQuickReplyShortcutName
{ name :: CheckQuickReplyShortcutName -> Maybe Text
name = Maybe Text
name_
}
= String
"CheckQuickReplyShortcutName"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
name_
]
instance AT.ToJSON CheckQuickReplyShortcutName where
toJSON :: CheckQuickReplyShortcutName -> Value
toJSON
CheckQuickReplyShortcutName
{ name :: CheckQuickReplyShortcutName -> Maybe Text
name = Maybe Text
name_
}
= [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
"checkQuickReplyShortcutName"
, Key
"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
name_
]