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