module TD.Query.AddCustomServerLanguagePack
(AddCustomServerLanguagePack(..)
) 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 AddCustomServerLanguagePack
= AddCustomServerLanguagePack
{ AddCustomServerLanguagePack -> Maybe Text
language_pack_id :: Maybe T.Text
}
deriving (AddCustomServerLanguagePack -> AddCustomServerLanguagePack -> Bool
(AddCustomServerLanguagePack
-> AddCustomServerLanguagePack -> Bool)
-> (AddCustomServerLanguagePack
-> AddCustomServerLanguagePack -> Bool)
-> Eq AddCustomServerLanguagePack
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AddCustomServerLanguagePack -> AddCustomServerLanguagePack -> Bool
== :: AddCustomServerLanguagePack -> AddCustomServerLanguagePack -> Bool
$c/= :: AddCustomServerLanguagePack -> AddCustomServerLanguagePack -> Bool
/= :: AddCustomServerLanguagePack -> AddCustomServerLanguagePack -> Bool
Eq, Int -> AddCustomServerLanguagePack -> ShowS
[AddCustomServerLanguagePack] -> ShowS
AddCustomServerLanguagePack -> String
(Int -> AddCustomServerLanguagePack -> ShowS)
-> (AddCustomServerLanguagePack -> String)
-> ([AddCustomServerLanguagePack] -> ShowS)
-> Show AddCustomServerLanguagePack
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AddCustomServerLanguagePack -> ShowS
showsPrec :: Int -> AddCustomServerLanguagePack -> ShowS
$cshow :: AddCustomServerLanguagePack -> String
show :: AddCustomServerLanguagePack -> String
$cshowList :: [AddCustomServerLanguagePack] -> ShowS
showList :: [AddCustomServerLanguagePack] -> ShowS
Show)
instance I.ShortShow AddCustomServerLanguagePack where
shortShow :: AddCustomServerLanguagePack -> String
shortShow
AddCustomServerLanguagePack
{ language_pack_id :: AddCustomServerLanguagePack -> Maybe Text
language_pack_id = Maybe Text
language_pack_id_
}
= String
"AddCustomServerLanguagePack"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"language_pack_id" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
language_pack_id_
]
instance AT.ToJSON AddCustomServerLanguagePack where
toJSON :: AddCustomServerLanguagePack -> Value
toJSON
AddCustomServerLanguagePack
{ language_pack_id :: AddCustomServerLanguagePack -> Maybe Text
language_pack_id = Maybe Text
language_pack_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
"addCustomServerLanguagePack"
, Key
"language_pack_id" 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_pack_id_
]