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