module TD.Query.RemoveRecentSticker
(RemoveRecentSticker(..)
, defaultRemoveRecentSticker
) 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 RemoveRecentSticker
= RemoveRecentSticker
{ RemoveRecentSticker -> Maybe Bool
is_attached :: Maybe Bool
, RemoveRecentSticker -> Maybe InputFile
sticker :: Maybe InputFile.InputFile
}
deriving (RemoveRecentSticker -> RemoveRecentSticker -> Bool
(RemoveRecentSticker -> RemoveRecentSticker -> Bool)
-> (RemoveRecentSticker -> RemoveRecentSticker -> Bool)
-> Eq RemoveRecentSticker
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RemoveRecentSticker -> RemoveRecentSticker -> Bool
== :: RemoveRecentSticker -> RemoveRecentSticker -> Bool
$c/= :: RemoveRecentSticker -> RemoveRecentSticker -> Bool
/= :: RemoveRecentSticker -> RemoveRecentSticker -> Bool
Eq, Int -> RemoveRecentSticker -> ShowS
[RemoveRecentSticker] -> ShowS
RemoveRecentSticker -> String
(Int -> RemoveRecentSticker -> ShowS)
-> (RemoveRecentSticker -> String)
-> ([RemoveRecentSticker] -> ShowS)
-> Show RemoveRecentSticker
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RemoveRecentSticker -> ShowS
showsPrec :: Int -> RemoveRecentSticker -> ShowS
$cshow :: RemoveRecentSticker -> String
show :: RemoveRecentSticker -> String
$cshowList :: [RemoveRecentSticker] -> ShowS
showList :: [RemoveRecentSticker] -> ShowS
Show)
instance I.ShortShow RemoveRecentSticker where
shortShow :: RemoveRecentSticker -> String
shortShow
RemoveRecentSticker
{ is_attached :: RemoveRecentSticker -> Maybe Bool
is_attached = Maybe Bool
is_attached_
, sticker :: RemoveRecentSticker -> Maybe InputFile
sticker = Maybe InputFile
sticker_
}
= String
"RemoveRecentSticker"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"is_attached" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
is_attached_
, String
"sticker" String -> Maybe InputFile -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputFile
sticker_
]
instance AT.ToJSON RemoveRecentSticker where
toJSON :: RemoveRecentSticker -> Value
toJSON
RemoveRecentSticker
{ is_attached :: RemoveRecentSticker -> Maybe Bool
is_attached = Maybe Bool
is_attached_
, sticker :: RemoveRecentSticker -> 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
"removeRecentSticker"
, Key
"is_attached" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
is_attached_
, 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_
]
defaultRemoveRecentSticker :: RemoveRecentSticker
defaultRemoveRecentSticker :: RemoveRecentSticker
defaultRemoveRecentSticker =
RemoveRecentSticker
{ is_attached :: Maybe Bool
is_attached = Maybe Bool
forall a. Maybe a
Nothing
, sticker :: Maybe InputFile
sticker = Maybe InputFile
forall a. Maybe a
Nothing
}