{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SES.SetIdentityMailFromDomain
(
SetIdentityMailFromDomain (..),
newSetIdentityMailFromDomain,
setIdentityMailFromDomain_mailFromDomain,
setIdentityMailFromDomain_behaviorOnMXFailure,
setIdentityMailFromDomain_identity,
SetIdentityMailFromDomainResponse (..),
newSetIdentityMailFromDomainResponse,
setIdentityMailFromDomainResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SES.Types
data SetIdentityMailFromDomain = SetIdentityMailFromDomain'
{
SetIdentityMailFromDomain -> Maybe Text
mailFromDomain :: Prelude.Maybe Prelude.Text,
SetIdentityMailFromDomain -> Maybe BehaviorOnMXFailure
behaviorOnMXFailure :: Prelude.Maybe BehaviorOnMXFailure,
SetIdentityMailFromDomain -> Text
identity :: Prelude.Text
}
deriving (SetIdentityMailFromDomain -> SetIdentityMailFromDomain -> Bool
(SetIdentityMailFromDomain -> SetIdentityMailFromDomain -> Bool)
-> (SetIdentityMailFromDomain -> SetIdentityMailFromDomain -> Bool)
-> Eq SetIdentityMailFromDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetIdentityMailFromDomain -> SetIdentityMailFromDomain -> Bool
$c/= :: SetIdentityMailFromDomain -> SetIdentityMailFromDomain -> Bool
== :: SetIdentityMailFromDomain -> SetIdentityMailFromDomain -> Bool
$c== :: SetIdentityMailFromDomain -> SetIdentityMailFromDomain -> Bool
Prelude.Eq, ReadPrec [SetIdentityMailFromDomain]
ReadPrec SetIdentityMailFromDomain
Int -> ReadS SetIdentityMailFromDomain
ReadS [SetIdentityMailFromDomain]
(Int -> ReadS SetIdentityMailFromDomain)
-> ReadS [SetIdentityMailFromDomain]
-> ReadPrec SetIdentityMailFromDomain
-> ReadPrec [SetIdentityMailFromDomain]
-> Read SetIdentityMailFromDomain
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetIdentityMailFromDomain]
$creadListPrec :: ReadPrec [SetIdentityMailFromDomain]
readPrec :: ReadPrec SetIdentityMailFromDomain
$creadPrec :: ReadPrec SetIdentityMailFromDomain
readList :: ReadS [SetIdentityMailFromDomain]
$creadList :: ReadS [SetIdentityMailFromDomain]
readsPrec :: Int -> ReadS SetIdentityMailFromDomain
$creadsPrec :: Int -> ReadS SetIdentityMailFromDomain
Prelude.Read, Int -> SetIdentityMailFromDomain -> ShowS
[SetIdentityMailFromDomain] -> ShowS
SetIdentityMailFromDomain -> String
(Int -> SetIdentityMailFromDomain -> ShowS)
-> (SetIdentityMailFromDomain -> String)
-> ([SetIdentityMailFromDomain] -> ShowS)
-> Show SetIdentityMailFromDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetIdentityMailFromDomain] -> ShowS
$cshowList :: [SetIdentityMailFromDomain] -> ShowS
show :: SetIdentityMailFromDomain -> String
$cshow :: SetIdentityMailFromDomain -> String
showsPrec :: Int -> SetIdentityMailFromDomain -> ShowS
$cshowsPrec :: Int -> SetIdentityMailFromDomain -> ShowS
Prelude.Show, (forall x.
SetIdentityMailFromDomain -> Rep SetIdentityMailFromDomain x)
-> (forall x.
Rep SetIdentityMailFromDomain x -> SetIdentityMailFromDomain)
-> Generic SetIdentityMailFromDomain
forall x.
Rep SetIdentityMailFromDomain x -> SetIdentityMailFromDomain
forall x.
SetIdentityMailFromDomain -> Rep SetIdentityMailFromDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetIdentityMailFromDomain x -> SetIdentityMailFromDomain
$cfrom :: forall x.
SetIdentityMailFromDomain -> Rep SetIdentityMailFromDomain x
Prelude.Generic)
newSetIdentityMailFromDomain ::
Prelude.Text ->
SetIdentityMailFromDomain
newSetIdentityMailFromDomain :: Text -> SetIdentityMailFromDomain
newSetIdentityMailFromDomain Text
pIdentity_ =
SetIdentityMailFromDomain' :: Maybe Text
-> Maybe BehaviorOnMXFailure -> Text -> SetIdentityMailFromDomain
SetIdentityMailFromDomain'
{ $sel:mailFromDomain:SetIdentityMailFromDomain' :: Maybe Text
mailFromDomain =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:behaviorOnMXFailure:SetIdentityMailFromDomain' :: Maybe BehaviorOnMXFailure
behaviorOnMXFailure = Maybe BehaviorOnMXFailure
forall a. Maybe a
Prelude.Nothing,
$sel:identity:SetIdentityMailFromDomain' :: Text
identity = Text
pIdentity_
}
setIdentityMailFromDomain_mailFromDomain :: Lens.Lens' SetIdentityMailFromDomain (Prelude.Maybe Prelude.Text)
setIdentityMailFromDomain_mailFromDomain :: (Maybe Text -> f (Maybe Text))
-> SetIdentityMailFromDomain -> f SetIdentityMailFromDomain
setIdentityMailFromDomain_mailFromDomain = (SetIdentityMailFromDomain -> Maybe Text)
-> (SetIdentityMailFromDomain
-> Maybe Text -> SetIdentityMailFromDomain)
-> Lens
SetIdentityMailFromDomain
SetIdentityMailFromDomain
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityMailFromDomain' {Maybe Text
mailFromDomain :: Maybe Text
$sel:mailFromDomain:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe Text
mailFromDomain} -> Maybe Text
mailFromDomain) (\s :: SetIdentityMailFromDomain
s@SetIdentityMailFromDomain' {} Maybe Text
a -> SetIdentityMailFromDomain
s {$sel:mailFromDomain:SetIdentityMailFromDomain' :: Maybe Text
mailFromDomain = Maybe Text
a} :: SetIdentityMailFromDomain)
setIdentityMailFromDomain_behaviorOnMXFailure :: Lens.Lens' SetIdentityMailFromDomain (Prelude.Maybe BehaviorOnMXFailure)
setIdentityMailFromDomain_behaviorOnMXFailure :: (Maybe BehaviorOnMXFailure -> f (Maybe BehaviorOnMXFailure))
-> SetIdentityMailFromDomain -> f SetIdentityMailFromDomain
setIdentityMailFromDomain_behaviorOnMXFailure = (SetIdentityMailFromDomain -> Maybe BehaviorOnMXFailure)
-> (SetIdentityMailFromDomain
-> Maybe BehaviorOnMXFailure -> SetIdentityMailFromDomain)
-> Lens
SetIdentityMailFromDomain
SetIdentityMailFromDomain
(Maybe BehaviorOnMXFailure)
(Maybe BehaviorOnMXFailure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityMailFromDomain' {Maybe BehaviorOnMXFailure
behaviorOnMXFailure :: Maybe BehaviorOnMXFailure
$sel:behaviorOnMXFailure:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe BehaviorOnMXFailure
behaviorOnMXFailure} -> Maybe BehaviorOnMXFailure
behaviorOnMXFailure) (\s :: SetIdentityMailFromDomain
s@SetIdentityMailFromDomain' {} Maybe BehaviorOnMXFailure
a -> SetIdentityMailFromDomain
s {$sel:behaviorOnMXFailure:SetIdentityMailFromDomain' :: Maybe BehaviorOnMXFailure
behaviorOnMXFailure = Maybe BehaviorOnMXFailure
a} :: SetIdentityMailFromDomain)
setIdentityMailFromDomain_identity :: Lens.Lens' SetIdentityMailFromDomain Prelude.Text
setIdentityMailFromDomain_identity :: (Text -> f Text)
-> SetIdentityMailFromDomain -> f SetIdentityMailFromDomain
setIdentityMailFromDomain_identity = (SetIdentityMailFromDomain -> Text)
-> (SetIdentityMailFromDomain -> Text -> SetIdentityMailFromDomain)
-> Lens
SetIdentityMailFromDomain SetIdentityMailFromDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityMailFromDomain' {Text
identity :: Text
$sel:identity:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Text
identity} -> Text
identity) (\s :: SetIdentityMailFromDomain
s@SetIdentityMailFromDomain' {} Text
a -> SetIdentityMailFromDomain
s {$sel:identity:SetIdentityMailFromDomain' :: Text
identity = Text
a} :: SetIdentityMailFromDomain)
instance Core.AWSRequest SetIdentityMailFromDomain where
type
AWSResponse SetIdentityMailFromDomain =
SetIdentityMailFromDomainResponse
request :: SetIdentityMailFromDomain -> Request SetIdentityMailFromDomain
request = Service
-> SetIdentityMailFromDomain -> Request SetIdentityMailFromDomain
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy SetIdentityMailFromDomain
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetIdentityMailFromDomain)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse SetIdentityMailFromDomain))
-> Logger
-> Service
-> Proxy SetIdentityMailFromDomain
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetIdentityMailFromDomain)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"SetIdentityMailFromDomainResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> SetIdentityMailFromDomainResponse
SetIdentityMailFromDomainResponse'
(Int -> SetIdentityMailFromDomainResponse)
-> Either String Int
-> Either String SetIdentityMailFromDomainResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable SetIdentityMailFromDomain
instance Prelude.NFData SetIdentityMailFromDomain
instance Core.ToHeaders SetIdentityMailFromDomain where
toHeaders :: SetIdentityMailFromDomain -> ResponseHeaders
toHeaders = ResponseHeaders -> SetIdentityMailFromDomain -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath SetIdentityMailFromDomain where
toPath :: SetIdentityMailFromDomain -> ByteString
toPath = ByteString -> SetIdentityMailFromDomain -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SetIdentityMailFromDomain where
toQuery :: SetIdentityMailFromDomain -> QueryString
toQuery SetIdentityMailFromDomain' {Maybe Text
Maybe BehaviorOnMXFailure
Text
identity :: Text
behaviorOnMXFailure :: Maybe BehaviorOnMXFailure
mailFromDomain :: Maybe Text
$sel:identity:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Text
$sel:behaviorOnMXFailure:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe BehaviorOnMXFailure
$sel:mailFromDomain:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"SetIdentityMailFromDomain" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"MailFromDomain" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
mailFromDomain,
ByteString
"BehaviorOnMXFailure" ByteString -> Maybe BehaviorOnMXFailure -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe BehaviorOnMXFailure
behaviorOnMXFailure,
ByteString
"Identity" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
identity
]
data SetIdentityMailFromDomainResponse = SetIdentityMailFromDomainResponse'
{
SetIdentityMailFromDomainResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SetIdentityMailFromDomainResponse
-> SetIdentityMailFromDomainResponse -> Bool
(SetIdentityMailFromDomainResponse
-> SetIdentityMailFromDomainResponse -> Bool)
-> (SetIdentityMailFromDomainResponse
-> SetIdentityMailFromDomainResponse -> Bool)
-> Eq SetIdentityMailFromDomainResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetIdentityMailFromDomainResponse
-> SetIdentityMailFromDomainResponse -> Bool
$c/= :: SetIdentityMailFromDomainResponse
-> SetIdentityMailFromDomainResponse -> Bool
== :: SetIdentityMailFromDomainResponse
-> SetIdentityMailFromDomainResponse -> Bool
$c== :: SetIdentityMailFromDomainResponse
-> SetIdentityMailFromDomainResponse -> Bool
Prelude.Eq, ReadPrec [SetIdentityMailFromDomainResponse]
ReadPrec SetIdentityMailFromDomainResponse
Int -> ReadS SetIdentityMailFromDomainResponse
ReadS [SetIdentityMailFromDomainResponse]
(Int -> ReadS SetIdentityMailFromDomainResponse)
-> ReadS [SetIdentityMailFromDomainResponse]
-> ReadPrec SetIdentityMailFromDomainResponse
-> ReadPrec [SetIdentityMailFromDomainResponse]
-> Read SetIdentityMailFromDomainResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetIdentityMailFromDomainResponse]
$creadListPrec :: ReadPrec [SetIdentityMailFromDomainResponse]
readPrec :: ReadPrec SetIdentityMailFromDomainResponse
$creadPrec :: ReadPrec SetIdentityMailFromDomainResponse
readList :: ReadS [SetIdentityMailFromDomainResponse]
$creadList :: ReadS [SetIdentityMailFromDomainResponse]
readsPrec :: Int -> ReadS SetIdentityMailFromDomainResponse
$creadsPrec :: Int -> ReadS SetIdentityMailFromDomainResponse
Prelude.Read, Int -> SetIdentityMailFromDomainResponse -> ShowS
[SetIdentityMailFromDomainResponse] -> ShowS
SetIdentityMailFromDomainResponse -> String
(Int -> SetIdentityMailFromDomainResponse -> ShowS)
-> (SetIdentityMailFromDomainResponse -> String)
-> ([SetIdentityMailFromDomainResponse] -> ShowS)
-> Show SetIdentityMailFromDomainResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetIdentityMailFromDomainResponse] -> ShowS
$cshowList :: [SetIdentityMailFromDomainResponse] -> ShowS
show :: SetIdentityMailFromDomainResponse -> String
$cshow :: SetIdentityMailFromDomainResponse -> String
showsPrec :: Int -> SetIdentityMailFromDomainResponse -> ShowS
$cshowsPrec :: Int -> SetIdentityMailFromDomainResponse -> ShowS
Prelude.Show, (forall x.
SetIdentityMailFromDomainResponse
-> Rep SetIdentityMailFromDomainResponse x)
-> (forall x.
Rep SetIdentityMailFromDomainResponse x
-> SetIdentityMailFromDomainResponse)
-> Generic SetIdentityMailFromDomainResponse
forall x.
Rep SetIdentityMailFromDomainResponse x
-> SetIdentityMailFromDomainResponse
forall x.
SetIdentityMailFromDomainResponse
-> Rep SetIdentityMailFromDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetIdentityMailFromDomainResponse x
-> SetIdentityMailFromDomainResponse
$cfrom :: forall x.
SetIdentityMailFromDomainResponse
-> Rep SetIdentityMailFromDomainResponse x
Prelude.Generic)
newSetIdentityMailFromDomainResponse ::
Prelude.Int ->
SetIdentityMailFromDomainResponse
newSetIdentityMailFromDomainResponse :: Int -> SetIdentityMailFromDomainResponse
newSetIdentityMailFromDomainResponse Int
pHttpStatus_ =
SetIdentityMailFromDomainResponse' :: Int -> SetIdentityMailFromDomainResponse
SetIdentityMailFromDomainResponse'
{ $sel:httpStatus:SetIdentityMailFromDomainResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
setIdentityMailFromDomainResponse_httpStatus :: Lens.Lens' SetIdentityMailFromDomainResponse Prelude.Int
setIdentityMailFromDomainResponse_httpStatus :: (Int -> f Int)
-> SetIdentityMailFromDomainResponse
-> f SetIdentityMailFromDomainResponse
setIdentityMailFromDomainResponse_httpStatus = (SetIdentityMailFromDomainResponse -> Int)
-> (SetIdentityMailFromDomainResponse
-> Int -> SetIdentityMailFromDomainResponse)
-> Lens
SetIdentityMailFromDomainResponse
SetIdentityMailFromDomainResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityMailFromDomainResponse' {Int
httpStatus :: Int
$sel:httpStatus:SetIdentityMailFromDomainResponse' :: SetIdentityMailFromDomainResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SetIdentityMailFromDomainResponse
s@SetIdentityMailFromDomainResponse' {} Int
a -> SetIdentityMailFromDomainResponse
s {$sel:httpStatus:SetIdentityMailFromDomainResponse' :: Int
httpStatus = Int
a} :: SetIdentityMailFromDomainResponse)
instance
Prelude.NFData
SetIdentityMailFromDomainResponse