{-# 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.PinpointEmail.Types.MailFromAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.PinpointEmail.Types.BehaviorOnMxFailure
import Amazonka.PinpointEmail.Types.MailFromDomainStatus
import qualified Amazonka.Prelude as Prelude
data MailFromAttributes = MailFromAttributes'
{
MailFromAttributes -> Text
mailFromDomain :: Prelude.Text,
MailFromAttributes -> MailFromDomainStatus
mailFromDomainStatus :: MailFromDomainStatus,
MailFromAttributes -> BehaviorOnMxFailure
behaviorOnMxFailure :: BehaviorOnMxFailure
}
deriving (MailFromAttributes -> MailFromAttributes -> Bool
(MailFromAttributes -> MailFromAttributes -> Bool)
-> (MailFromAttributes -> MailFromAttributes -> Bool)
-> Eq MailFromAttributes
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]
(Int -> ReadS MailFromAttributes)
-> ReadS [MailFromAttributes]
-> ReadPrec MailFromAttributes
-> ReadPrec [MailFromAttributes]
-> Read 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
(Int -> MailFromAttributes -> ShowS)
-> (MailFromAttributes -> String)
-> ([MailFromAttributes] -> ShowS)
-> Show MailFromAttributes
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. MailFromAttributes -> Rep MailFromAttributes x)
-> (forall x. Rep MailFromAttributes x -> MailFromAttributes)
-> Generic MailFromAttributes
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' :: Text
-> MailFromDomainStatus
-> BehaviorOnMxFailure
-> MailFromAttributes
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 :: (Text -> f Text) -> MailFromAttributes -> f MailFromAttributes
mailFromAttributes_mailFromDomain = (MailFromAttributes -> Text)
-> (MailFromAttributes -> Text -> MailFromAttributes)
-> Lens MailFromAttributes MailFromAttributes Text Text
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 :: (MailFromDomainStatus -> f MailFromDomainStatus)
-> MailFromAttributes -> f MailFromAttributes
mailFromAttributes_mailFromDomainStatus = (MailFromAttributes -> MailFromDomainStatus)
-> (MailFromAttributes
-> MailFromDomainStatus -> MailFromAttributes)
-> Lens
MailFromAttributes
MailFromAttributes
MailFromDomainStatus
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 :: (BehaviorOnMxFailure -> f BehaviorOnMxFailure)
-> MailFromAttributes -> f MailFromAttributes
mailFromAttributes_behaviorOnMxFailure = (MailFromAttributes -> BehaviorOnMxFailure)
-> (MailFromAttributes
-> BehaviorOnMxFailure -> MailFromAttributes)
-> Lens
MailFromAttributes
MailFromAttributes
BehaviorOnMxFailure
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 Core.FromJSON MailFromAttributes where
parseJSON :: Value -> Parser MailFromAttributes
parseJSON =
String
-> (Object -> Parser MailFromAttributes)
-> Value
-> Parser MailFromAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MailFromAttributes"
( \Object
x ->
Text
-> MailFromDomainStatus
-> BehaviorOnMxFailure
-> MailFromAttributes
MailFromAttributes'
(Text
-> MailFromDomainStatus
-> BehaviorOnMxFailure
-> MailFromAttributes)
-> Parser Text
-> Parser
(MailFromDomainStatus -> BehaviorOnMxFailure -> MailFromAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MailFromDomain")
Parser
(MailFromDomainStatus -> BehaviorOnMxFailure -> MailFromAttributes)
-> Parser MailFromDomainStatus
-> Parser (BehaviorOnMxFailure -> MailFromAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser MailFromDomainStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MailFromDomainStatus")
Parser (BehaviorOnMxFailure -> MailFromAttributes)
-> Parser BehaviorOnMxFailure -> Parser MailFromAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser BehaviorOnMxFailure
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"BehaviorOnMxFailure")
)
instance Prelude.Hashable MailFromAttributes
instance Prelude.NFData MailFromAttributes