module TD.Query.CancelPreliminaryUploadFile
(CancelPreliminaryUploadFile(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data CancelPreliminaryUploadFile
= CancelPreliminaryUploadFile
{ CancelPreliminaryUploadFile -> Maybe Int
file_id :: Maybe Int
}
deriving (CancelPreliminaryUploadFile -> CancelPreliminaryUploadFile -> Bool
(CancelPreliminaryUploadFile
-> CancelPreliminaryUploadFile -> Bool)
-> (CancelPreliminaryUploadFile
-> CancelPreliminaryUploadFile -> Bool)
-> Eq CancelPreliminaryUploadFile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CancelPreliminaryUploadFile -> CancelPreliminaryUploadFile -> Bool
== :: CancelPreliminaryUploadFile -> CancelPreliminaryUploadFile -> Bool
$c/= :: CancelPreliminaryUploadFile -> CancelPreliminaryUploadFile -> Bool
/= :: CancelPreliminaryUploadFile -> CancelPreliminaryUploadFile -> Bool
Eq, Int -> CancelPreliminaryUploadFile -> ShowS
[CancelPreliminaryUploadFile] -> ShowS
CancelPreliminaryUploadFile -> String
(Int -> CancelPreliminaryUploadFile -> ShowS)
-> (CancelPreliminaryUploadFile -> String)
-> ([CancelPreliminaryUploadFile] -> ShowS)
-> Show CancelPreliminaryUploadFile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CancelPreliminaryUploadFile -> ShowS
showsPrec :: Int -> CancelPreliminaryUploadFile -> ShowS
$cshow :: CancelPreliminaryUploadFile -> String
show :: CancelPreliminaryUploadFile -> String
$cshowList :: [CancelPreliminaryUploadFile] -> ShowS
showList :: [CancelPreliminaryUploadFile] -> ShowS
Show)
instance I.ShortShow CancelPreliminaryUploadFile where
shortShow :: CancelPreliminaryUploadFile -> String
shortShow
CancelPreliminaryUploadFile
{ file_id :: CancelPreliminaryUploadFile -> Maybe Int
file_id = Maybe Int
file_id_
}
= String
"CancelPreliminaryUploadFile"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"file_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
file_id_
]
instance AT.ToJSON CancelPreliminaryUploadFile where
toJSON :: CancelPreliminaryUploadFile -> Value
toJSON
CancelPreliminaryUploadFile
{ file_id :: CancelPreliminaryUploadFile -> Maybe Int
file_id = Maybe Int
file_id_
}
= [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
"cancelPreliminaryUploadFile"
, Key
"file_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
file_id_
]