{-# 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.IdentityMailFromDomainAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SES.Types.BehaviorOnMXFailure
import Amazonka.SES.Types.CustomMailFromStatus
data IdentityMailFromDomainAttributes = IdentityMailFromDomainAttributes'
{
IdentityMailFromDomainAttributes -> Text
mailFromDomain :: Prelude.Text,
IdentityMailFromDomainAttributes -> CustomMailFromStatus
mailFromDomainStatus :: CustomMailFromStatus,
IdentityMailFromDomainAttributes -> BehaviorOnMXFailure
behaviorOnMXFailure :: BehaviorOnMXFailure
}
deriving (IdentityMailFromDomainAttributes
-> IdentityMailFromDomainAttributes -> Bool
(IdentityMailFromDomainAttributes
-> IdentityMailFromDomainAttributes -> Bool)
-> (IdentityMailFromDomainAttributes
-> IdentityMailFromDomainAttributes -> Bool)
-> Eq IdentityMailFromDomainAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IdentityMailFromDomainAttributes
-> IdentityMailFromDomainAttributes -> Bool
$c/= :: IdentityMailFromDomainAttributes
-> IdentityMailFromDomainAttributes -> Bool
== :: IdentityMailFromDomainAttributes
-> IdentityMailFromDomainAttributes -> Bool
$c== :: IdentityMailFromDomainAttributes
-> IdentityMailFromDomainAttributes -> Bool
Prelude.Eq, ReadPrec [IdentityMailFromDomainAttributes]
ReadPrec IdentityMailFromDomainAttributes
Int -> ReadS IdentityMailFromDomainAttributes
ReadS [IdentityMailFromDomainAttributes]
(Int -> ReadS IdentityMailFromDomainAttributes)
-> ReadS [IdentityMailFromDomainAttributes]
-> ReadPrec IdentityMailFromDomainAttributes
-> ReadPrec [IdentityMailFromDomainAttributes]
-> Read IdentityMailFromDomainAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IdentityMailFromDomainAttributes]
$creadListPrec :: ReadPrec [IdentityMailFromDomainAttributes]
readPrec :: ReadPrec IdentityMailFromDomainAttributes
$creadPrec :: ReadPrec IdentityMailFromDomainAttributes
readList :: ReadS [IdentityMailFromDomainAttributes]
$creadList :: ReadS [IdentityMailFromDomainAttributes]
readsPrec :: Int -> ReadS IdentityMailFromDomainAttributes
$creadsPrec :: Int -> ReadS IdentityMailFromDomainAttributes
Prelude.Read, Int -> IdentityMailFromDomainAttributes -> ShowS
[IdentityMailFromDomainAttributes] -> ShowS
IdentityMailFromDomainAttributes -> String
(Int -> IdentityMailFromDomainAttributes -> ShowS)
-> (IdentityMailFromDomainAttributes -> String)
-> ([IdentityMailFromDomainAttributes] -> ShowS)
-> Show IdentityMailFromDomainAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IdentityMailFromDomainAttributes] -> ShowS
$cshowList :: [IdentityMailFromDomainAttributes] -> ShowS
show :: IdentityMailFromDomainAttributes -> String
$cshow :: IdentityMailFromDomainAttributes -> String
showsPrec :: Int -> IdentityMailFromDomainAttributes -> ShowS
$cshowsPrec :: Int -> IdentityMailFromDomainAttributes -> ShowS
Prelude.Show, (forall x.
IdentityMailFromDomainAttributes
-> Rep IdentityMailFromDomainAttributes x)
-> (forall x.
Rep IdentityMailFromDomainAttributes x
-> IdentityMailFromDomainAttributes)
-> Generic IdentityMailFromDomainAttributes
forall x.
Rep IdentityMailFromDomainAttributes x
-> IdentityMailFromDomainAttributes
forall x.
IdentityMailFromDomainAttributes
-> Rep IdentityMailFromDomainAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IdentityMailFromDomainAttributes x
-> IdentityMailFromDomainAttributes
$cfrom :: forall x.
IdentityMailFromDomainAttributes
-> Rep IdentityMailFromDomainAttributes x
Prelude.Generic)
newIdentityMailFromDomainAttributes ::
Prelude.Text ->
CustomMailFromStatus ->
BehaviorOnMXFailure ->
IdentityMailFromDomainAttributes
newIdentityMailFromDomainAttributes :: Text
-> CustomMailFromStatus
-> BehaviorOnMXFailure
-> IdentityMailFromDomainAttributes
newIdentityMailFromDomainAttributes
Text
pMailFromDomain_
CustomMailFromStatus
pMailFromDomainStatus_
BehaviorOnMXFailure
pBehaviorOnMXFailure_ =
IdentityMailFromDomainAttributes' :: Text
-> CustomMailFromStatus
-> BehaviorOnMXFailure
-> IdentityMailFromDomainAttributes
IdentityMailFromDomainAttributes'
{ $sel:mailFromDomain:IdentityMailFromDomainAttributes' :: Text
mailFromDomain =
Text
pMailFromDomain_,
$sel:mailFromDomainStatus:IdentityMailFromDomainAttributes' :: CustomMailFromStatus
mailFromDomainStatus =
CustomMailFromStatus
pMailFromDomainStatus_,
$sel:behaviorOnMXFailure:IdentityMailFromDomainAttributes' :: BehaviorOnMXFailure
behaviorOnMXFailure =
BehaviorOnMXFailure
pBehaviorOnMXFailure_
}
identityMailFromDomainAttributes_mailFromDomain :: Lens.Lens' IdentityMailFromDomainAttributes Prelude.Text
identityMailFromDomainAttributes_mailFromDomain :: (Text -> f Text)
-> IdentityMailFromDomainAttributes
-> f IdentityMailFromDomainAttributes
identityMailFromDomainAttributes_mailFromDomain = (IdentityMailFromDomainAttributes -> Text)
-> (IdentityMailFromDomainAttributes
-> Text -> IdentityMailFromDomainAttributes)
-> Lens
IdentityMailFromDomainAttributes
IdentityMailFromDomainAttributes
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityMailFromDomainAttributes' {Text
mailFromDomain :: Text
$sel:mailFromDomain:IdentityMailFromDomainAttributes' :: IdentityMailFromDomainAttributes -> Text
mailFromDomain} -> Text
mailFromDomain) (\s :: IdentityMailFromDomainAttributes
s@IdentityMailFromDomainAttributes' {} Text
a -> IdentityMailFromDomainAttributes
s {$sel:mailFromDomain:IdentityMailFromDomainAttributes' :: Text
mailFromDomain = Text
a} :: IdentityMailFromDomainAttributes)
identityMailFromDomainAttributes_mailFromDomainStatus :: Lens.Lens' IdentityMailFromDomainAttributes CustomMailFromStatus
identityMailFromDomainAttributes_mailFromDomainStatus :: (CustomMailFromStatus -> f CustomMailFromStatus)
-> IdentityMailFromDomainAttributes
-> f IdentityMailFromDomainAttributes
identityMailFromDomainAttributes_mailFromDomainStatus = (IdentityMailFromDomainAttributes -> CustomMailFromStatus)
-> (IdentityMailFromDomainAttributes
-> CustomMailFromStatus -> IdentityMailFromDomainAttributes)
-> Lens
IdentityMailFromDomainAttributes
IdentityMailFromDomainAttributes
CustomMailFromStatus
CustomMailFromStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityMailFromDomainAttributes' {CustomMailFromStatus
mailFromDomainStatus :: CustomMailFromStatus
$sel:mailFromDomainStatus:IdentityMailFromDomainAttributes' :: IdentityMailFromDomainAttributes -> CustomMailFromStatus
mailFromDomainStatus} -> CustomMailFromStatus
mailFromDomainStatus) (\s :: IdentityMailFromDomainAttributes
s@IdentityMailFromDomainAttributes' {} CustomMailFromStatus
a -> IdentityMailFromDomainAttributes
s {$sel:mailFromDomainStatus:IdentityMailFromDomainAttributes' :: CustomMailFromStatus
mailFromDomainStatus = CustomMailFromStatus
a} :: IdentityMailFromDomainAttributes)
identityMailFromDomainAttributes_behaviorOnMXFailure :: Lens.Lens' IdentityMailFromDomainAttributes BehaviorOnMXFailure
identityMailFromDomainAttributes_behaviorOnMXFailure :: (BehaviorOnMXFailure -> f BehaviorOnMXFailure)
-> IdentityMailFromDomainAttributes
-> f IdentityMailFromDomainAttributes
identityMailFromDomainAttributes_behaviorOnMXFailure = (IdentityMailFromDomainAttributes -> BehaviorOnMXFailure)
-> (IdentityMailFromDomainAttributes
-> BehaviorOnMXFailure -> IdentityMailFromDomainAttributes)
-> Lens
IdentityMailFromDomainAttributes
IdentityMailFromDomainAttributes
BehaviorOnMXFailure
BehaviorOnMXFailure
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityMailFromDomainAttributes' {BehaviorOnMXFailure
behaviorOnMXFailure :: BehaviorOnMXFailure
$sel:behaviorOnMXFailure:IdentityMailFromDomainAttributes' :: IdentityMailFromDomainAttributes -> BehaviorOnMXFailure
behaviorOnMXFailure} -> BehaviorOnMXFailure
behaviorOnMXFailure) (\s :: IdentityMailFromDomainAttributes
s@IdentityMailFromDomainAttributes' {} BehaviorOnMXFailure
a -> IdentityMailFromDomainAttributes
s {$sel:behaviorOnMXFailure:IdentityMailFromDomainAttributes' :: BehaviorOnMXFailure
behaviorOnMXFailure = BehaviorOnMXFailure
a} :: IdentityMailFromDomainAttributes)
instance
Core.FromXML
IdentityMailFromDomainAttributes
where
parseXML :: [Node] -> Either String IdentityMailFromDomainAttributes
parseXML [Node]
x =
Text
-> CustomMailFromStatus
-> BehaviorOnMXFailure
-> IdentityMailFromDomainAttributes
IdentityMailFromDomainAttributes'
(Text
-> CustomMailFromStatus
-> BehaviorOnMXFailure
-> IdentityMailFromDomainAttributes)
-> Either String Text
-> Either
String
(CustomMailFromStatus
-> BehaviorOnMXFailure -> IdentityMailFromDomainAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"MailFromDomain")
Either
String
(CustomMailFromStatus
-> BehaviorOnMXFailure -> IdentityMailFromDomainAttributes)
-> Either String CustomMailFromStatus
-> Either
String (BehaviorOnMXFailure -> IdentityMailFromDomainAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String CustomMailFromStatus
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"MailFromDomainStatus")
Either
String (BehaviorOnMXFailure -> IdentityMailFromDomainAttributes)
-> Either String BehaviorOnMXFailure
-> Either String IdentityMailFromDomainAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String BehaviorOnMXFailure
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"BehaviorOnMXFailure")
instance
Prelude.Hashable
IdentityMailFromDomainAttributes
instance
Prelude.NFData
IdentityMailFromDomainAttributes