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