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