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