module TD.Query.CheckLoginEmailAddressCode
(CheckLoginEmailAddressCode(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified TD.Data.EmailAddressAuthentication as EmailAddressAuthentication
data CheckLoginEmailAddressCode
= CheckLoginEmailAddressCode
{ CheckLoginEmailAddressCode -> Maybe EmailAddressAuthentication
code :: Maybe EmailAddressAuthentication.EmailAddressAuthentication
}
deriving (CheckLoginEmailAddressCode -> CheckLoginEmailAddressCode -> Bool
(CheckLoginEmailAddressCode -> CheckLoginEmailAddressCode -> Bool)
-> (CheckLoginEmailAddressCode
-> CheckLoginEmailAddressCode -> Bool)
-> Eq CheckLoginEmailAddressCode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CheckLoginEmailAddressCode -> CheckLoginEmailAddressCode -> Bool
== :: CheckLoginEmailAddressCode -> CheckLoginEmailAddressCode -> Bool
$c/= :: CheckLoginEmailAddressCode -> CheckLoginEmailAddressCode -> Bool
/= :: CheckLoginEmailAddressCode -> CheckLoginEmailAddressCode -> Bool
Eq, Int -> CheckLoginEmailAddressCode -> ShowS
[CheckLoginEmailAddressCode] -> ShowS
CheckLoginEmailAddressCode -> String
(Int -> CheckLoginEmailAddressCode -> ShowS)
-> (CheckLoginEmailAddressCode -> String)
-> ([CheckLoginEmailAddressCode] -> ShowS)
-> Show CheckLoginEmailAddressCode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CheckLoginEmailAddressCode -> ShowS
showsPrec :: Int -> CheckLoginEmailAddressCode -> ShowS
$cshow :: CheckLoginEmailAddressCode -> String
show :: CheckLoginEmailAddressCode -> String
$cshowList :: [CheckLoginEmailAddressCode] -> ShowS
showList :: [CheckLoginEmailAddressCode] -> ShowS
Show)
instance I.ShortShow CheckLoginEmailAddressCode where
shortShow :: CheckLoginEmailAddressCode -> String
shortShow
CheckLoginEmailAddressCode
{ code :: CheckLoginEmailAddressCode -> Maybe EmailAddressAuthentication
code = Maybe EmailAddressAuthentication
code_
}
= String
"CheckLoginEmailAddressCode"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"code" String -> Maybe EmailAddressAuthentication -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe EmailAddressAuthentication
code_
]
instance AT.ToJSON CheckLoginEmailAddressCode where
toJSON :: CheckLoginEmailAddressCode -> Value
toJSON
CheckLoginEmailAddressCode
{ code :: CheckLoginEmailAddressCode -> Maybe EmailAddressAuthentication
code = Maybe EmailAddressAuthentication
code_
}
= [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
"checkLoginEmailAddressCode"
, Key
"code" Key -> Maybe EmailAddressAuthentication -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe EmailAddressAuthentication
code_
]