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