module TD.Query.GetPhoneNumberInfoSync
(GetPhoneNumberInfoSync(..)
, defaultGetPhoneNumberInfoSync
) 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 GetPhoneNumberInfoSync
= GetPhoneNumberInfoSync
{ GetPhoneNumberInfoSync -> Maybe Text
language_code :: Maybe T.Text
, GetPhoneNumberInfoSync -> Maybe Text
phone_number_prefix :: Maybe T.Text
}
deriving (GetPhoneNumberInfoSync -> GetPhoneNumberInfoSync -> Bool
(GetPhoneNumberInfoSync -> GetPhoneNumberInfoSync -> Bool)
-> (GetPhoneNumberInfoSync -> GetPhoneNumberInfoSync -> Bool)
-> Eq GetPhoneNumberInfoSync
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetPhoneNumberInfoSync -> GetPhoneNumberInfoSync -> Bool
== :: GetPhoneNumberInfoSync -> GetPhoneNumberInfoSync -> Bool
$c/= :: GetPhoneNumberInfoSync -> GetPhoneNumberInfoSync -> Bool
/= :: GetPhoneNumberInfoSync -> GetPhoneNumberInfoSync -> Bool
Eq, Int -> GetPhoneNumberInfoSync -> ShowS
[GetPhoneNumberInfoSync] -> ShowS
GetPhoneNumberInfoSync -> String
(Int -> GetPhoneNumberInfoSync -> ShowS)
-> (GetPhoneNumberInfoSync -> String)
-> ([GetPhoneNumberInfoSync] -> ShowS)
-> Show GetPhoneNumberInfoSync
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetPhoneNumberInfoSync -> ShowS
showsPrec :: Int -> GetPhoneNumberInfoSync -> ShowS
$cshow :: GetPhoneNumberInfoSync -> String
show :: GetPhoneNumberInfoSync -> String
$cshowList :: [GetPhoneNumberInfoSync] -> ShowS
showList :: [GetPhoneNumberInfoSync] -> ShowS
Show)
instance I.ShortShow GetPhoneNumberInfoSync where
shortShow :: GetPhoneNumberInfoSync -> String
shortShow
GetPhoneNumberInfoSync
{ language_code :: GetPhoneNumberInfoSync -> Maybe Text
language_code = Maybe Text
language_code_
, phone_number_prefix :: GetPhoneNumberInfoSync -> Maybe Text
phone_number_prefix = Maybe Text
phone_number_prefix_
}
= String
"GetPhoneNumberInfoSync"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"language_code" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
language_code_
, String
"phone_number_prefix" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
phone_number_prefix_
]
instance AT.ToJSON GetPhoneNumberInfoSync where
toJSON :: GetPhoneNumberInfoSync -> Value
toJSON
GetPhoneNumberInfoSync
{ language_code :: GetPhoneNumberInfoSync -> Maybe Text
language_code = Maybe Text
language_code_
, phone_number_prefix :: GetPhoneNumberInfoSync -> Maybe Text
phone_number_prefix = Maybe Text
phone_number_prefix_
}
= [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
"getPhoneNumberInfoSync"
, 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
"phone_number_prefix" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
phone_number_prefix_
]
defaultGetPhoneNumberInfoSync :: GetPhoneNumberInfoSync
defaultGetPhoneNumberInfoSync :: GetPhoneNumberInfoSync
defaultGetPhoneNumberInfoSync =
GetPhoneNumberInfoSync
{ language_code :: Maybe Text
language_code = Maybe Text
forall a. Maybe a
Nothing
, phone_number_prefix :: Maybe Text
phone_number_prefix = Maybe Text
forall a. Maybe a
Nothing
}