module TD.Query.DeleteBotMediaPreviews
(DeleteBotMediaPreviews(..)
, defaultDeleteBotMediaPreviews
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified Data.Text as T
data DeleteBotMediaPreviews
= DeleteBotMediaPreviews
{ DeleteBotMediaPreviews -> Maybe Int
bot_user_id :: Maybe Int
, DeleteBotMediaPreviews -> Maybe Text
language_code :: Maybe T.Text
, DeleteBotMediaPreviews -> Maybe [Int]
file_ids :: Maybe [Int]
}
deriving (DeleteBotMediaPreviews -> DeleteBotMediaPreviews -> Bool
(DeleteBotMediaPreviews -> DeleteBotMediaPreviews -> Bool)
-> (DeleteBotMediaPreviews -> DeleteBotMediaPreviews -> Bool)
-> Eq DeleteBotMediaPreviews
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeleteBotMediaPreviews -> DeleteBotMediaPreviews -> Bool
== :: DeleteBotMediaPreviews -> DeleteBotMediaPreviews -> Bool
$c/= :: DeleteBotMediaPreviews -> DeleteBotMediaPreviews -> Bool
/= :: DeleteBotMediaPreviews -> DeleteBotMediaPreviews -> Bool
Eq, Int -> DeleteBotMediaPreviews -> ShowS
[DeleteBotMediaPreviews] -> ShowS
DeleteBotMediaPreviews -> String
(Int -> DeleteBotMediaPreviews -> ShowS)
-> (DeleteBotMediaPreviews -> String)
-> ([DeleteBotMediaPreviews] -> ShowS)
-> Show DeleteBotMediaPreviews
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeleteBotMediaPreviews -> ShowS
showsPrec :: Int -> DeleteBotMediaPreviews -> ShowS
$cshow :: DeleteBotMediaPreviews -> String
show :: DeleteBotMediaPreviews -> String
$cshowList :: [DeleteBotMediaPreviews] -> ShowS
showList :: [DeleteBotMediaPreviews] -> ShowS
Show)
instance I.ShortShow DeleteBotMediaPreviews where
shortShow :: DeleteBotMediaPreviews -> String
shortShow
DeleteBotMediaPreviews
{ bot_user_id :: DeleteBotMediaPreviews -> Maybe Int
bot_user_id = Maybe Int
bot_user_id_
, language_code :: DeleteBotMediaPreviews -> Maybe Text
language_code = Maybe Text
language_code_
, file_ids :: DeleteBotMediaPreviews -> Maybe [Int]
file_ids = Maybe [Int]
file_ids_
}
= String
"DeleteBotMediaPreviews"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"bot_user_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
bot_user_id_
, String
"language_code" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
language_code_
, String
"file_ids" String -> Maybe [Int] -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe [Int]
file_ids_
]
instance AT.ToJSON DeleteBotMediaPreviews where
toJSON :: DeleteBotMediaPreviews -> Value
toJSON
DeleteBotMediaPreviews
{ bot_user_id :: DeleteBotMediaPreviews -> Maybe Int
bot_user_id = Maybe Int
bot_user_id_
, language_code :: DeleteBotMediaPreviews -> Maybe Text
language_code = Maybe Text
language_code_
, file_ids :: DeleteBotMediaPreviews -> Maybe [Int]
file_ids = Maybe [Int]
file_ids_
}
= [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
"deleteBotMediaPreviews"
, Key
"bot_user_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
bot_user_id_
, Key
"language_code" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
language_code_
, Key
"file_ids" 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_ids_
]
defaultDeleteBotMediaPreviews :: DeleteBotMediaPreviews
defaultDeleteBotMediaPreviews :: DeleteBotMediaPreviews
defaultDeleteBotMediaPreviews =
DeleteBotMediaPreviews
{ bot_user_id :: Maybe Int
bot_user_id = Maybe Int
forall a. Maybe a
Nothing
, language_code :: Maybe Text
language_code = Maybe Text
forall a. Maybe a
Nothing
, file_ids :: Maybe [Int]
file_ids = Maybe [Int]
forall a. Maybe a
Nothing
}