{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SES.Types.IdentityVerificationAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SES.Types.VerificationStatus
data IdentityVerificationAttributes = IdentityVerificationAttributes'
{
IdentityVerificationAttributes -> Maybe Text
verificationToken :: Prelude.Maybe Prelude.Text,
IdentityVerificationAttributes -> VerificationStatus
verificationStatus :: VerificationStatus
}
deriving (IdentityVerificationAttributes
-> IdentityVerificationAttributes -> Bool
(IdentityVerificationAttributes
-> IdentityVerificationAttributes -> Bool)
-> (IdentityVerificationAttributes
-> IdentityVerificationAttributes -> Bool)
-> Eq IdentityVerificationAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IdentityVerificationAttributes
-> IdentityVerificationAttributes -> Bool
$c/= :: IdentityVerificationAttributes
-> IdentityVerificationAttributes -> Bool
== :: IdentityVerificationAttributes
-> IdentityVerificationAttributes -> Bool
$c== :: IdentityVerificationAttributes
-> IdentityVerificationAttributes -> Bool
Prelude.Eq, ReadPrec [IdentityVerificationAttributes]
ReadPrec IdentityVerificationAttributes
Int -> ReadS IdentityVerificationAttributes
ReadS [IdentityVerificationAttributes]
(Int -> ReadS IdentityVerificationAttributes)
-> ReadS [IdentityVerificationAttributes]
-> ReadPrec IdentityVerificationAttributes
-> ReadPrec [IdentityVerificationAttributes]
-> Read IdentityVerificationAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IdentityVerificationAttributes]
$creadListPrec :: ReadPrec [IdentityVerificationAttributes]
readPrec :: ReadPrec IdentityVerificationAttributes
$creadPrec :: ReadPrec IdentityVerificationAttributes
readList :: ReadS [IdentityVerificationAttributes]
$creadList :: ReadS [IdentityVerificationAttributes]
readsPrec :: Int -> ReadS IdentityVerificationAttributes
$creadsPrec :: Int -> ReadS IdentityVerificationAttributes
Prelude.Read, Int -> IdentityVerificationAttributes -> ShowS
[IdentityVerificationAttributes] -> ShowS
IdentityVerificationAttributes -> String
(Int -> IdentityVerificationAttributes -> ShowS)
-> (IdentityVerificationAttributes -> String)
-> ([IdentityVerificationAttributes] -> ShowS)
-> Show IdentityVerificationAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IdentityVerificationAttributes] -> ShowS
$cshowList :: [IdentityVerificationAttributes] -> ShowS
show :: IdentityVerificationAttributes -> String
$cshow :: IdentityVerificationAttributes -> String
showsPrec :: Int -> IdentityVerificationAttributes -> ShowS
$cshowsPrec :: Int -> IdentityVerificationAttributes -> ShowS
Prelude.Show, (forall x.
IdentityVerificationAttributes
-> Rep IdentityVerificationAttributes x)
-> (forall x.
Rep IdentityVerificationAttributes x
-> IdentityVerificationAttributes)
-> Generic IdentityVerificationAttributes
forall x.
Rep IdentityVerificationAttributes x
-> IdentityVerificationAttributes
forall x.
IdentityVerificationAttributes
-> Rep IdentityVerificationAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IdentityVerificationAttributes x
-> IdentityVerificationAttributes
$cfrom :: forall x.
IdentityVerificationAttributes
-> Rep IdentityVerificationAttributes x
Prelude.Generic)
newIdentityVerificationAttributes ::
VerificationStatus ->
IdentityVerificationAttributes
newIdentityVerificationAttributes :: VerificationStatus -> IdentityVerificationAttributes
newIdentityVerificationAttributes
VerificationStatus
pVerificationStatus_ =
IdentityVerificationAttributes' :: Maybe Text -> VerificationStatus -> IdentityVerificationAttributes
IdentityVerificationAttributes'
{ $sel:verificationToken:IdentityVerificationAttributes' :: Maybe Text
verificationToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:verificationStatus:IdentityVerificationAttributes' :: VerificationStatus
verificationStatus = VerificationStatus
pVerificationStatus_
}
identityVerificationAttributes_verificationToken :: Lens.Lens' IdentityVerificationAttributes (Prelude.Maybe Prelude.Text)
identityVerificationAttributes_verificationToken :: (Maybe Text -> f (Maybe Text))
-> IdentityVerificationAttributes
-> f IdentityVerificationAttributes
identityVerificationAttributes_verificationToken = (IdentityVerificationAttributes -> Maybe Text)
-> (IdentityVerificationAttributes
-> Maybe Text -> IdentityVerificationAttributes)
-> Lens
IdentityVerificationAttributes
IdentityVerificationAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityVerificationAttributes' {Maybe Text
verificationToken :: Maybe Text
$sel:verificationToken:IdentityVerificationAttributes' :: IdentityVerificationAttributes -> Maybe Text
verificationToken} -> Maybe Text
verificationToken) (\s :: IdentityVerificationAttributes
s@IdentityVerificationAttributes' {} Maybe Text
a -> IdentityVerificationAttributes
s {$sel:verificationToken:IdentityVerificationAttributes' :: Maybe Text
verificationToken = Maybe Text
a} :: IdentityVerificationAttributes)
identityVerificationAttributes_verificationStatus :: Lens.Lens' IdentityVerificationAttributes VerificationStatus
identityVerificationAttributes_verificationStatus :: (VerificationStatus -> f VerificationStatus)
-> IdentityVerificationAttributes
-> f IdentityVerificationAttributes
identityVerificationAttributes_verificationStatus = (IdentityVerificationAttributes -> VerificationStatus)
-> (IdentityVerificationAttributes
-> VerificationStatus -> IdentityVerificationAttributes)
-> Lens
IdentityVerificationAttributes
IdentityVerificationAttributes
VerificationStatus
VerificationStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityVerificationAttributes' {VerificationStatus
verificationStatus :: VerificationStatus
$sel:verificationStatus:IdentityVerificationAttributes' :: IdentityVerificationAttributes -> VerificationStatus
verificationStatus} -> VerificationStatus
verificationStatus) (\s :: IdentityVerificationAttributes
s@IdentityVerificationAttributes' {} VerificationStatus
a -> IdentityVerificationAttributes
s {$sel:verificationStatus:IdentityVerificationAttributes' :: VerificationStatus
verificationStatus = VerificationStatus
a} :: IdentityVerificationAttributes)
instance Core.FromXML IdentityVerificationAttributes where
parseXML :: [Node] -> Either String IdentityVerificationAttributes
parseXML [Node]
x =
Maybe Text -> VerificationStatus -> IdentityVerificationAttributes
IdentityVerificationAttributes'
(Maybe Text
-> VerificationStatus -> IdentityVerificationAttributes)
-> Either String (Maybe Text)
-> Either
String (VerificationStatus -> IdentityVerificationAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VerificationToken")
Either
String (VerificationStatus -> IdentityVerificationAttributes)
-> Either String VerificationStatus
-> Either String IdentityVerificationAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String VerificationStatus
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"VerificationStatus")
instance
Prelude.Hashable
IdentityVerificationAttributes
instance
Prelude.NFData
IdentityVerificationAttributes