module TD.Query.SetTonWalletCardStickers
(SetTonWalletCardStickers(..)
, defaultSetTonWalletCardStickers
) 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.InputTonWalletCardSticker as InputTonWalletCardSticker
import qualified Data.Text as T
data SetTonWalletCardStickers
= SetTonWalletCardStickers
{ SetTonWalletCardStickers -> Maybe [InputTonWalletCardSticker]
stickers :: Maybe [InputTonWalletCardSticker.InputTonWalletCardSticker]
, SetTonWalletCardStickers -> Maybe Text
background_nft_address :: Maybe T.Text
}
deriving (SetTonWalletCardStickers -> SetTonWalletCardStickers -> Bool
(SetTonWalletCardStickers -> SetTonWalletCardStickers -> Bool)
-> (SetTonWalletCardStickers -> SetTonWalletCardStickers -> Bool)
-> Eq SetTonWalletCardStickers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetTonWalletCardStickers -> SetTonWalletCardStickers -> Bool
== :: SetTonWalletCardStickers -> SetTonWalletCardStickers -> Bool
$c/= :: SetTonWalletCardStickers -> SetTonWalletCardStickers -> Bool
/= :: SetTonWalletCardStickers -> SetTonWalletCardStickers -> Bool
Eq, Int -> SetTonWalletCardStickers -> ShowS
[SetTonWalletCardStickers] -> ShowS
SetTonWalletCardStickers -> String
(Int -> SetTonWalletCardStickers -> ShowS)
-> (SetTonWalletCardStickers -> String)
-> ([SetTonWalletCardStickers] -> ShowS)
-> Show SetTonWalletCardStickers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetTonWalletCardStickers -> ShowS
showsPrec :: Int -> SetTonWalletCardStickers -> ShowS
$cshow :: SetTonWalletCardStickers -> String
show :: SetTonWalletCardStickers -> String
$cshowList :: [SetTonWalletCardStickers] -> ShowS
showList :: [SetTonWalletCardStickers] -> ShowS
Show)
instance I.ShortShow SetTonWalletCardStickers where
shortShow :: SetTonWalletCardStickers -> String
shortShow
SetTonWalletCardStickers
{ stickers :: SetTonWalletCardStickers -> Maybe [InputTonWalletCardSticker]
stickers = Maybe [InputTonWalletCardSticker]
stickers_
, background_nft_address :: SetTonWalletCardStickers -> Maybe Text
background_nft_address = Maybe Text
background_nft_address_
}
= String
"SetTonWalletCardStickers"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"stickers" String -> Maybe [InputTonWalletCardSticker] -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe [InputTonWalletCardSticker]
stickers_
, String
"background_nft_address" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
background_nft_address_
]
instance AT.ToJSON SetTonWalletCardStickers where
toJSON :: SetTonWalletCardStickers -> Value
toJSON
SetTonWalletCardStickers
{ stickers :: SetTonWalletCardStickers -> Maybe [InputTonWalletCardSticker]
stickers = Maybe [InputTonWalletCardSticker]
stickers_
, background_nft_address :: SetTonWalletCardStickers -> Maybe Text
background_nft_address = Maybe Text
background_nft_address_
}
= [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
"setTonWalletCardStickers"
, Key
"stickers" Key -> Maybe [InputTonWalletCardSticker] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe [InputTonWalletCardSticker]
stickers_
, Key
"background_nft_address" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
background_nft_address_
]
defaultSetTonWalletCardStickers :: SetTonWalletCardStickers
defaultSetTonWalletCardStickers :: SetTonWalletCardStickers
defaultSetTonWalletCardStickers =
SetTonWalletCardStickers
{ stickers :: Maybe [InputTonWalletCardSticker]
stickers = Maybe [InputTonWalletCardSticker]
forall a. Maybe a
Nothing
, background_nft_address :: Maybe Text
background_nft_address = Maybe Text
forall a. Maybe a
Nothing
}