module TD.Query.GetLanguagePackString
(GetLanguagePackString(..)
, defaultGetLanguagePackString
) 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 GetLanguagePackString
= GetLanguagePackString
{ GetLanguagePackString -> Maybe Text
language_pack_database_path :: Maybe T.Text
, GetLanguagePackString -> Maybe Text
localization_target :: Maybe T.Text
, GetLanguagePackString -> Maybe Text
language_pack_id :: Maybe T.Text
, GetLanguagePackString -> Maybe Text
key :: Maybe T.Text
}
deriving (GetLanguagePackString -> GetLanguagePackString -> Bool
(GetLanguagePackString -> GetLanguagePackString -> Bool)
-> (GetLanguagePackString -> GetLanguagePackString -> Bool)
-> Eq GetLanguagePackString
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetLanguagePackString -> GetLanguagePackString -> Bool
== :: GetLanguagePackString -> GetLanguagePackString -> Bool
$c/= :: GetLanguagePackString -> GetLanguagePackString -> Bool
/= :: GetLanguagePackString -> GetLanguagePackString -> Bool
Eq, Int -> GetLanguagePackString -> ShowS
[GetLanguagePackString] -> ShowS
GetLanguagePackString -> String
(Int -> GetLanguagePackString -> ShowS)
-> (GetLanguagePackString -> String)
-> ([GetLanguagePackString] -> ShowS)
-> Show GetLanguagePackString
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetLanguagePackString -> ShowS
showsPrec :: Int -> GetLanguagePackString -> ShowS
$cshow :: GetLanguagePackString -> String
show :: GetLanguagePackString -> String
$cshowList :: [GetLanguagePackString] -> ShowS
showList :: [GetLanguagePackString] -> ShowS
Show)
instance I.ShortShow GetLanguagePackString where
shortShow :: GetLanguagePackString -> String
shortShow
GetLanguagePackString
{ language_pack_database_path :: GetLanguagePackString -> Maybe Text
language_pack_database_path = Maybe Text
language_pack_database_path_
, localization_target :: GetLanguagePackString -> Maybe Text
localization_target = Maybe Text
localization_target_
, language_pack_id :: GetLanguagePackString -> Maybe Text
language_pack_id = Maybe Text
language_pack_id_
, key :: GetLanguagePackString -> Maybe Text
key = Maybe Text
key_
}
= String
"GetLanguagePackString"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"language_pack_database_path" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
language_pack_database_path_
, String
"localization_target" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
localization_target_
, String
"language_pack_id" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
language_pack_id_
, String
"key" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
key_
]
instance AT.ToJSON GetLanguagePackString where
toJSON :: GetLanguagePackString -> Value
toJSON
GetLanguagePackString
{ language_pack_database_path :: GetLanguagePackString -> Maybe Text
language_pack_database_path = Maybe Text
language_pack_database_path_
, localization_target :: GetLanguagePackString -> Maybe Text
localization_target = Maybe Text
localization_target_
, language_pack_id :: GetLanguagePackString -> Maybe Text
language_pack_id = Maybe Text
language_pack_id_
, key :: GetLanguagePackString -> Maybe Text
key = Maybe Text
key_
}
= [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
"getLanguagePackString"
, Key
"language_pack_database_path" 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_database_path_
, Key
"localization_target" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
localization_target_
, 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_
, Key
"key" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
key_
]
defaultGetLanguagePackString :: GetLanguagePackString
defaultGetLanguagePackString :: GetLanguagePackString
defaultGetLanguagePackString =
GetLanguagePackString
{ language_pack_database_path :: Maybe Text
language_pack_database_path = Maybe Text
forall a. Maybe a
Nothing
, localization_target :: Maybe Text
localization_target = Maybe Text
forall a. Maybe a
Nothing
, language_pack_id :: Maybe Text
language_pack_id = Maybe Text
forall a. Maybe a
Nothing
, key :: Maybe Text
key = Maybe Text
forall a. Maybe a
Nothing
}