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