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