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