{-# 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.SESV2.Types.MailFromAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SESV2.Types.BehaviorOnMxFailure
import Amazonka.SESV2.Types.MailFromDomainStatus
data MailFromAttributes = MailFromAttributes'
{
MailFromAttributes -> Text
mailFromDomain :: Prelude.Text,
MailFromAttributes -> MailFromDomainStatus
mailFromDomainStatus :: MailFromDomainStatus,
MailFromAttributes -> BehaviorOnMxFailure
behaviorOnMxFailure :: BehaviorOnMxFailure
}
deriving (MailFromAttributes -> MailFromAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MailFromAttributes -> MailFromAttributes -> Bool
$c/= :: MailFromAttributes -> MailFromAttributes -> Bool
== :: MailFromAttributes -> MailFromAttributes -> Bool
$c== :: MailFromAttributes -> MailFromAttributes -> Bool
Prelude.Eq, ReadPrec [MailFromAttributes]
ReadPrec MailFromAttributes
Int -> ReadS MailFromAttributes
ReadS [MailFromAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MailFromAttributes]
$creadListPrec :: ReadPrec [MailFromAttributes]
readPrec :: ReadPrec MailFromAttributes
$creadPrec :: ReadPrec MailFromAttributes
readList :: ReadS [MailFromAttributes]
$creadList :: ReadS [MailFromAttributes]
readsPrec :: Int -> ReadS MailFromAttributes
$creadsPrec :: Int -> ReadS MailFromAttributes
Prelude.Read, Int -> MailFromAttributes -> ShowS
[MailFromAttributes] -> ShowS
MailFromAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MailFromAttributes] -> ShowS
$cshowList :: [MailFromAttributes] -> ShowS
show :: MailFromAttributes -> String
$cshow :: MailFromAttributes -> String
showsPrec :: Int -> MailFromAttributes -> ShowS
$cshowsPrec :: Int -> MailFromAttributes -> ShowS
Prelude.Show, forall x. Rep MailFromAttributes x -> MailFromAttributes
forall x. MailFromAttributes -> Rep MailFromAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MailFromAttributes x -> MailFromAttributes
$cfrom :: forall x. MailFromAttributes -> Rep MailFromAttributes x
Prelude.Generic)
newMailFromAttributes ::
Prelude.Text ->
MailFromDomainStatus ->
BehaviorOnMxFailure ->
MailFromAttributes
newMailFromAttributes :: Text
-> MailFromDomainStatus
-> BehaviorOnMxFailure
-> MailFromAttributes
newMailFromAttributes
Text
pMailFromDomain_
MailFromDomainStatus
pMailFromDomainStatus_
BehaviorOnMxFailure
pBehaviorOnMxFailure_ =
MailFromAttributes'
{ $sel:mailFromDomain:MailFromAttributes' :: Text
mailFromDomain =
Text
pMailFromDomain_,
$sel:mailFromDomainStatus:MailFromAttributes' :: MailFromDomainStatus
mailFromDomainStatus = MailFromDomainStatus
pMailFromDomainStatus_,
$sel:behaviorOnMxFailure:MailFromAttributes' :: BehaviorOnMxFailure
behaviorOnMxFailure = BehaviorOnMxFailure
pBehaviorOnMxFailure_
}
mailFromAttributes_mailFromDomain :: Lens.Lens' MailFromAttributes Prelude.Text
mailFromAttributes_mailFromDomain :: Lens' MailFromAttributes Text
mailFromAttributes_mailFromDomain = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailFromAttributes' {Text
mailFromDomain :: Text
$sel:mailFromDomain:MailFromAttributes' :: MailFromAttributes -> Text
mailFromDomain} -> Text
mailFromDomain) (\s :: MailFromAttributes
s@MailFromAttributes' {} Text
a -> MailFromAttributes
s {$sel:mailFromDomain:MailFromAttributes' :: Text
mailFromDomain = Text
a} :: MailFromAttributes)
mailFromAttributes_mailFromDomainStatus :: Lens.Lens' MailFromAttributes MailFromDomainStatus
mailFromAttributes_mailFromDomainStatus :: Lens' MailFromAttributes MailFromDomainStatus
mailFromAttributes_mailFromDomainStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailFromAttributes' {MailFromDomainStatus
mailFromDomainStatus :: MailFromDomainStatus
$sel:mailFromDomainStatus:MailFromAttributes' :: MailFromAttributes -> MailFromDomainStatus
mailFromDomainStatus} -> MailFromDomainStatus
mailFromDomainStatus) (\s :: MailFromAttributes
s@MailFromAttributes' {} MailFromDomainStatus
a -> MailFromAttributes
s {$sel:mailFromDomainStatus:MailFromAttributes' :: MailFromDomainStatus
mailFromDomainStatus = MailFromDomainStatus
a} :: MailFromAttributes)
mailFromAttributes_behaviorOnMxFailure :: Lens.Lens' MailFromAttributes BehaviorOnMxFailure
mailFromAttributes_behaviorOnMxFailure :: Lens' MailFromAttributes BehaviorOnMxFailure
mailFromAttributes_behaviorOnMxFailure = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailFromAttributes' {BehaviorOnMxFailure
behaviorOnMxFailure :: BehaviorOnMxFailure
$sel:behaviorOnMxFailure:MailFromAttributes' :: MailFromAttributes -> BehaviorOnMxFailure
behaviorOnMxFailure} -> BehaviorOnMxFailure
behaviorOnMxFailure) (\s :: MailFromAttributes
s@MailFromAttributes' {} BehaviorOnMxFailure
a -> MailFromAttributes
s {$sel:behaviorOnMxFailure:MailFromAttributes' :: BehaviorOnMxFailure
behaviorOnMxFailure = BehaviorOnMxFailure
a} :: MailFromAttributes)
instance Data.FromJSON MailFromAttributes where
parseJSON :: Value -> Parser MailFromAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MailFromAttributes"
( \Object
x ->
Text
-> MailFromDomainStatus
-> BehaviorOnMxFailure
-> MailFromAttributes
MailFromAttributes'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"MailFromDomain")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"MailFromDomainStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"BehaviorOnMxFailure")
)
instance Prelude.Hashable MailFromAttributes where
hashWithSalt :: Int -> MailFromAttributes -> Int
hashWithSalt Int
_salt MailFromAttributes' {Text
BehaviorOnMxFailure
MailFromDomainStatus
behaviorOnMxFailure :: BehaviorOnMxFailure
mailFromDomainStatus :: MailFromDomainStatus
mailFromDomain :: Text
$sel:behaviorOnMxFailure:MailFromAttributes' :: MailFromAttributes -> BehaviorOnMxFailure
$sel:mailFromDomainStatus:MailFromAttributes' :: MailFromAttributes -> MailFromDomainStatus
$sel:mailFromDomain:MailFromAttributes' :: MailFromAttributes -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
mailFromDomain
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` MailFromDomainStatus
mailFromDomainStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BehaviorOnMxFailure
behaviorOnMxFailure
instance Prelude.NFData MailFromAttributes where
rnf :: MailFromAttributes -> ()
rnf MailFromAttributes' {Text
BehaviorOnMxFailure
MailFromDomainStatus
behaviorOnMxFailure :: BehaviorOnMxFailure
mailFromDomainStatus :: MailFromDomainStatus
mailFromDomain :: Text
$sel:behaviorOnMxFailure:MailFromAttributes' :: MailFromAttributes -> BehaviorOnMxFailure
$sel:mailFromDomainStatus:MailFromAttributes' :: MailFromAttributes -> MailFromDomainStatus
$sel:mailFromDomain:MailFromAttributes' :: MailFromAttributes -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
mailFromDomain
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf MailFromDomainStatus
mailFromDomainStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BehaviorOnMxFailure
behaviorOnMxFailure