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