module TD.Query.SynchronizeLanguagePack
(SynchronizeLanguagePack(..)
) 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 SynchronizeLanguagePack
= SynchronizeLanguagePack
{ SynchronizeLanguagePack -> Maybe Text
language_pack_id :: Maybe T.Text
}
deriving (SynchronizeLanguagePack -> SynchronizeLanguagePack -> Bool
(SynchronizeLanguagePack -> SynchronizeLanguagePack -> Bool)
-> (SynchronizeLanguagePack -> SynchronizeLanguagePack -> Bool)
-> Eq SynchronizeLanguagePack
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SynchronizeLanguagePack -> SynchronizeLanguagePack -> Bool
== :: SynchronizeLanguagePack -> SynchronizeLanguagePack -> Bool
$c/= :: SynchronizeLanguagePack -> SynchronizeLanguagePack -> Bool
/= :: SynchronizeLanguagePack -> SynchronizeLanguagePack -> Bool
Eq, Int -> SynchronizeLanguagePack -> ShowS
[SynchronizeLanguagePack] -> ShowS
SynchronizeLanguagePack -> String
(Int -> SynchronizeLanguagePack -> ShowS)
-> (SynchronizeLanguagePack -> String)
-> ([SynchronizeLanguagePack] -> ShowS)
-> Show SynchronizeLanguagePack
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SynchronizeLanguagePack -> ShowS
showsPrec :: Int -> SynchronizeLanguagePack -> ShowS
$cshow :: SynchronizeLanguagePack -> String
show :: SynchronizeLanguagePack -> String
$cshowList :: [SynchronizeLanguagePack] -> ShowS
showList :: [SynchronizeLanguagePack] -> ShowS
Show)
instance I.ShortShow SynchronizeLanguagePack where
shortShow :: SynchronizeLanguagePack -> String
shortShow
SynchronizeLanguagePack
{ language_pack_id :: SynchronizeLanguagePack -> Maybe Text
language_pack_id = Maybe Text
language_pack_id_
}
= String
"SynchronizeLanguagePack"
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 SynchronizeLanguagePack where
toJSON :: SynchronizeLanguagePack -> Value
toJSON
SynchronizeLanguagePack
{ language_pack_id :: SynchronizeLanguagePack -> 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
"synchronizeLanguagePack"
, 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_
]