module TD.Query.AddFavoriteSticker
(AddFavoriteSticker(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified TD.Data.InputFile as InputFile
data AddFavoriteSticker
= AddFavoriteSticker
{ AddFavoriteSticker -> Maybe InputFile
sticker :: Maybe InputFile.InputFile
}
deriving (AddFavoriteSticker -> AddFavoriteSticker -> Bool
(AddFavoriteSticker -> AddFavoriteSticker -> Bool)
-> (AddFavoriteSticker -> AddFavoriteSticker -> Bool)
-> Eq AddFavoriteSticker
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AddFavoriteSticker -> AddFavoriteSticker -> Bool
== :: AddFavoriteSticker -> AddFavoriteSticker -> Bool
$c/= :: AddFavoriteSticker -> AddFavoriteSticker -> Bool
/= :: AddFavoriteSticker -> AddFavoriteSticker -> Bool
Eq, Int -> AddFavoriteSticker -> ShowS
[AddFavoriteSticker] -> ShowS
AddFavoriteSticker -> String
(Int -> AddFavoriteSticker -> ShowS)
-> (AddFavoriteSticker -> String)
-> ([AddFavoriteSticker] -> ShowS)
-> Show AddFavoriteSticker
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AddFavoriteSticker -> ShowS
showsPrec :: Int -> AddFavoriteSticker -> ShowS
$cshow :: AddFavoriteSticker -> String
show :: AddFavoriteSticker -> String
$cshowList :: [AddFavoriteSticker] -> ShowS
showList :: [AddFavoriteSticker] -> ShowS
Show)
instance I.ShortShow AddFavoriteSticker where
shortShow :: AddFavoriteSticker -> String
shortShow
AddFavoriteSticker
{ sticker :: AddFavoriteSticker -> Maybe InputFile
sticker = Maybe InputFile
sticker_
}
= String
"AddFavoriteSticker"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"sticker" String -> Maybe InputFile -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputFile
sticker_
]
instance AT.ToJSON AddFavoriteSticker where
toJSON :: AddFavoriteSticker -> Value
toJSON
AddFavoriteSticker
{ sticker :: AddFavoriteSticker -> Maybe InputFile
sticker = Maybe InputFile
sticker_
}
= [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
"addFavoriteSticker"
, Key
"sticker" Key -> Maybe InputFile -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputFile
sticker_
]