{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SES.SetIdentityMailFromDomain
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Enables or disables the custom MAIL FROM domain setup for a verified
-- identity (an email address or a domain).
--
-- To send emails using the specified MAIL FROM domain, you must add an MX
-- record to your MAIL FROM domain\'s DNS settings. If you want your emails
-- to pass Sender Policy Framework (SPF) checks, you must also add or
-- update an SPF record. For more information, see the
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-set.html Amazon SES Developer Guide>.
--
-- You can execute this operation no more than once per second.
module Amazonka.SES.SetIdentityMailFromDomain
  ( -- * Creating a Request
    SetIdentityMailFromDomain (..),
    newSetIdentityMailFromDomain,

    -- * Request Lenses
    setIdentityMailFromDomain_behaviorOnMXFailure,
    setIdentityMailFromDomain_mailFromDomain,
    setIdentityMailFromDomain_identity,

    -- * Destructuring the Response
    SetIdentityMailFromDomainResponse (..),
    newSetIdentityMailFromDomainResponse,

    -- * Response Lenses
    setIdentityMailFromDomainResponse_httpStatus,
  )
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SES.Types

-- | Represents a request to enable or disable the Amazon SES custom MAIL
-- FROM domain setup for a verified identity. For information about using a
-- custom MAIL FROM domain, see the
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html Amazon SES Developer Guide>.
--
-- /See:/ 'newSetIdentityMailFromDomain' smart constructor.
data SetIdentityMailFromDomain = SetIdentityMailFromDomain'
  { -- | The action that you want Amazon SES to take if it cannot successfully
    -- read the required MX record when you send an email. If you choose
    -- @UseDefaultValue@, Amazon SES will use amazonses.com (or a subdomain of
    -- that) as the MAIL FROM domain. If you choose @RejectMessage@, Amazon SES
    -- will return a @MailFromDomainNotVerified@ error and not send the email.
    --
    -- The action specified in @BehaviorOnMXFailure@ is taken when the custom
    -- MAIL FROM domain setup is in the @Pending@, @Failed@, and
    -- @TemporaryFailure@ states.
    SetIdentityMailFromDomain -> Maybe BehaviorOnMXFailure
behaviorOnMXFailure :: Prelude.Maybe BehaviorOnMXFailure,
    -- | The custom MAIL FROM domain that you want the verified identity to use.
    -- The MAIL FROM domain must 1) be a subdomain of the verified identity, 2)
    -- not be used in a \"From\" address if the MAIL FROM domain is the
    -- destination of email feedback forwarding (for more information, see the
    -- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html Amazon SES Developer Guide>),
    -- and 3) not be used to receive emails. A value of @null@ disables the
    -- custom MAIL FROM setting for the identity.
    SetIdentityMailFromDomain -> Maybe Text
mailFromDomain :: Prelude.Maybe Prelude.Text,
    -- | The verified identity for which you want to enable or disable the
    -- specified custom MAIL FROM domain.
    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
$c== :: SetIdentityMailFromDomain -> SetIdentityMailFromDomain -> Bool
== :: SetIdentityMailFromDomain -> SetIdentityMailFromDomain -> Bool
$c/= :: SetIdentityMailFromDomain -> SetIdentityMailFromDomain -> Bool
/= :: 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
$creadsPrec :: Int -> ReadS SetIdentityMailFromDomain
readsPrec :: Int -> ReadS SetIdentityMailFromDomain
$creadList :: ReadS [SetIdentityMailFromDomain]
readList :: ReadS [SetIdentityMailFromDomain]
$creadPrec :: ReadPrec SetIdentityMailFromDomain
readPrec :: ReadPrec SetIdentityMailFromDomain
$creadListPrec :: ReadPrec [SetIdentityMailFromDomain]
readListPrec :: ReadPrec [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
$cshowsPrec :: Int -> SetIdentityMailFromDomain -> ShowS
showsPrec :: Int -> SetIdentityMailFromDomain -> ShowS
$cshow :: SetIdentityMailFromDomain -> String
show :: SetIdentityMailFromDomain -> String
$cshowList :: [SetIdentityMailFromDomain] -> ShowS
showList :: [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
$cfrom :: forall x.
SetIdentityMailFromDomain -> Rep SetIdentityMailFromDomain x
from :: forall x.
SetIdentityMailFromDomain -> Rep SetIdentityMailFromDomain x
$cto :: forall x.
Rep SetIdentityMailFromDomain x -> SetIdentityMailFromDomain
to :: forall x.
Rep SetIdentityMailFromDomain x -> SetIdentityMailFromDomain
Prelude.Generic)

-- |
-- Create a value of 'SetIdentityMailFromDomain' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'behaviorOnMXFailure', 'setIdentityMailFromDomain_behaviorOnMXFailure' - The action that you want Amazon SES to take if it cannot successfully
-- read the required MX record when you send an email. If you choose
-- @UseDefaultValue@, Amazon SES will use amazonses.com (or a subdomain of
-- that) as the MAIL FROM domain. If you choose @RejectMessage@, Amazon SES
-- will return a @MailFromDomainNotVerified@ error and not send the email.
--
-- The action specified in @BehaviorOnMXFailure@ is taken when the custom
-- MAIL FROM domain setup is in the @Pending@, @Failed@, and
-- @TemporaryFailure@ states.
--
-- 'mailFromDomain', 'setIdentityMailFromDomain_mailFromDomain' - The custom MAIL FROM domain that you want the verified identity to use.
-- The MAIL FROM domain must 1) be a subdomain of the verified identity, 2)
-- not be used in a \"From\" address if the MAIL FROM domain is the
-- destination of email feedback forwarding (for more information, see the
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html Amazon SES Developer Guide>),
-- and 3) not be used to receive emails. A value of @null@ disables the
-- custom MAIL FROM setting for the identity.
--
-- 'identity', 'setIdentityMailFromDomain_identity' - The verified identity for which you want to enable or disable the
-- specified custom MAIL FROM domain.
newSetIdentityMailFromDomain ::
  -- | 'identity'
  Prelude.Text ->
  SetIdentityMailFromDomain
newSetIdentityMailFromDomain :: Text -> SetIdentityMailFromDomain
newSetIdentityMailFromDomain Text
pIdentity_ =
  SetIdentityMailFromDomain'
    { $sel:behaviorOnMXFailure:SetIdentityMailFromDomain' :: Maybe BehaviorOnMXFailure
behaviorOnMXFailure =
        Maybe BehaviorOnMXFailure
forall a. Maybe a
Prelude.Nothing,
      $sel:mailFromDomain:SetIdentityMailFromDomain' :: Maybe Text
mailFromDomain = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:identity:SetIdentityMailFromDomain' :: Text
identity = Text
pIdentity_
    }

-- | The action that you want Amazon SES to take if it cannot successfully
-- read the required MX record when you send an email. If you choose
-- @UseDefaultValue@, Amazon SES will use amazonses.com (or a subdomain of
-- that) as the MAIL FROM domain. If you choose @RejectMessage@, Amazon SES
-- will return a @MailFromDomainNotVerified@ error and not send the email.
--
-- The action specified in @BehaviorOnMXFailure@ is taken when the custom
-- MAIL FROM domain setup is in the @Pending@, @Failed@, and
-- @TemporaryFailure@ states.
setIdentityMailFromDomain_behaviorOnMXFailure :: Lens.Lens' SetIdentityMailFromDomain (Prelude.Maybe BehaviorOnMXFailure)
setIdentityMailFromDomain_behaviorOnMXFailure :: Lens' SetIdentityMailFromDomain (Maybe BehaviorOnMXFailure)
setIdentityMailFromDomain_behaviorOnMXFailure = (SetIdentityMailFromDomain -> Maybe BehaviorOnMXFailure)
-> (SetIdentityMailFromDomain
    -> Maybe BehaviorOnMXFailure -> SetIdentityMailFromDomain)
-> Lens' SetIdentityMailFromDomain (Maybe BehaviorOnMXFailure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityMailFromDomain' {Maybe BehaviorOnMXFailure
$sel:behaviorOnMXFailure:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe BehaviorOnMXFailure
behaviorOnMXFailure :: Maybe BehaviorOnMXFailure
behaviorOnMXFailure} -> Maybe BehaviorOnMXFailure
behaviorOnMXFailure) (\s :: SetIdentityMailFromDomain
s@SetIdentityMailFromDomain' {} Maybe BehaviorOnMXFailure
a -> SetIdentityMailFromDomain
s {behaviorOnMXFailure = a} :: SetIdentityMailFromDomain)

-- | The custom MAIL FROM domain that you want the verified identity to use.
-- The MAIL FROM domain must 1) be a subdomain of the verified identity, 2)
-- not be used in a \"From\" address if the MAIL FROM domain is the
-- destination of email feedback forwarding (for more information, see the
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html Amazon SES Developer Guide>),
-- and 3) not be used to receive emails. A value of @null@ disables the
-- custom MAIL FROM setting for the identity.
setIdentityMailFromDomain_mailFromDomain :: Lens.Lens' SetIdentityMailFromDomain (Prelude.Maybe Prelude.Text)
setIdentityMailFromDomain_mailFromDomain :: Lens' SetIdentityMailFromDomain (Maybe Text)
setIdentityMailFromDomain_mailFromDomain = (SetIdentityMailFromDomain -> Maybe Text)
-> (SetIdentityMailFromDomain
    -> Maybe Text -> SetIdentityMailFromDomain)
-> Lens' SetIdentityMailFromDomain (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityMailFromDomain' {Maybe Text
$sel:mailFromDomain:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe Text
mailFromDomain :: Maybe Text
mailFromDomain} -> Maybe Text
mailFromDomain) (\s :: SetIdentityMailFromDomain
s@SetIdentityMailFromDomain' {} Maybe Text
a -> SetIdentityMailFromDomain
s {mailFromDomain = a} :: SetIdentityMailFromDomain)

-- | The verified identity for which you want to enable or disable the
-- specified custom MAIL FROM domain.
setIdentityMailFromDomain_identity :: Lens.Lens' SetIdentityMailFromDomain Prelude.Text
setIdentityMailFromDomain_identity :: Lens' SetIdentityMailFromDomain Text
setIdentityMailFromDomain_identity = (SetIdentityMailFromDomain -> Text)
-> (SetIdentityMailFromDomain -> Text -> SetIdentityMailFromDomain)
-> Lens' SetIdentityMailFromDomain Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityMailFromDomain' {Text
$sel:identity:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Text
identity :: Text
identity} -> Text
identity) (\s :: SetIdentityMailFromDomain
s@SetIdentityMailFromDomain' {} Text
a -> SetIdentityMailFromDomain
s {identity = a} :: SetIdentityMailFromDomain)

instance Core.AWSRequest SetIdentityMailFromDomain where
  type
    AWSResponse SetIdentityMailFromDomain =
      SetIdentityMailFromDomainResponse
  request :: (Service -> Service)
-> SetIdentityMailFromDomain -> Request SetIdentityMailFromDomain
request Service -> Service
overrides =
    Service
-> SetIdentityMailFromDomain -> Request SetIdentityMailFromDomain
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SetIdentityMailFromDomain
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse SetIdentityMailFromDomain)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse SetIdentityMailFromDomain))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SetIdentityMailFromDomain
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse SetIdentityMailFromDomain)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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 a. a -> Either String a
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 where
  hashWithSalt :: Int -> SetIdentityMailFromDomain -> Int
hashWithSalt Int
_salt SetIdentityMailFromDomain' {Maybe Text
Maybe BehaviorOnMXFailure
Text
$sel:behaviorOnMXFailure:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe BehaviorOnMXFailure
$sel:mailFromDomain:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe Text
$sel:identity:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Text
behaviorOnMXFailure :: Maybe BehaviorOnMXFailure
mailFromDomain :: Maybe Text
identity :: Text
..} =
    Int
_salt
      Int -> Maybe BehaviorOnMXFailure -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BehaviorOnMXFailure
behaviorOnMXFailure
      Int -> Maybe Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
mailFromDomain
      Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
identity

instance Prelude.NFData SetIdentityMailFromDomain where
  rnf :: SetIdentityMailFromDomain -> ()
rnf SetIdentityMailFromDomain' {Maybe Text
Maybe BehaviorOnMXFailure
Text
$sel:behaviorOnMXFailure:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe BehaviorOnMXFailure
$sel:mailFromDomain:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe Text
$sel:identity:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Text
behaviorOnMXFailure :: Maybe BehaviorOnMXFailure
mailFromDomain :: Maybe Text
identity :: Text
..} =
    Maybe BehaviorOnMXFailure -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe BehaviorOnMXFailure
behaviorOnMXFailure
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
mailFromDomain
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
identity

instance Data.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 Data.ToPath SetIdentityMailFromDomain where
  toPath :: SetIdentityMailFromDomain -> ByteString
toPath = ByteString -> SetIdentityMailFromDomain -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery SetIdentityMailFromDomain where
  toQuery :: SetIdentityMailFromDomain -> QueryString
toQuery SetIdentityMailFromDomain' {Maybe Text
Maybe BehaviorOnMXFailure
Text
$sel:behaviorOnMXFailure:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe BehaviorOnMXFailure
$sel:mailFromDomain:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Maybe Text
$sel:identity:SetIdentityMailFromDomain' :: SetIdentityMailFromDomain -> Text
behaviorOnMXFailure :: Maybe BehaviorOnMXFailure
mailFromDomain :: Maybe Text
identity :: Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"SetIdentityMailFromDomain" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
        ByteString
"BehaviorOnMXFailure" ByteString -> Maybe BehaviorOnMXFailure -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe BehaviorOnMXFailure
behaviorOnMXFailure,
        ByteString
"MailFromDomain" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
mailFromDomain,
        ByteString
"Identity" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
identity
      ]

-- | An empty element returned on a successful request.
--
-- /See:/ 'newSetIdentityMailFromDomainResponse' smart constructor.
data SetIdentityMailFromDomainResponse = SetIdentityMailFromDomainResponse'
  { -- | The response's http status code.
    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
$c== :: SetIdentityMailFromDomainResponse
-> SetIdentityMailFromDomainResponse -> Bool
== :: SetIdentityMailFromDomainResponse
-> SetIdentityMailFromDomainResponse -> Bool
$c/= :: SetIdentityMailFromDomainResponse
-> SetIdentityMailFromDomainResponse -> Bool
/= :: 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
$creadsPrec :: Int -> ReadS SetIdentityMailFromDomainResponse
readsPrec :: Int -> ReadS SetIdentityMailFromDomainResponse
$creadList :: ReadS [SetIdentityMailFromDomainResponse]
readList :: ReadS [SetIdentityMailFromDomainResponse]
$creadPrec :: ReadPrec SetIdentityMailFromDomainResponse
readPrec :: ReadPrec SetIdentityMailFromDomainResponse
$creadListPrec :: ReadPrec [SetIdentityMailFromDomainResponse]
readListPrec :: ReadPrec [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
$cshowsPrec :: Int -> SetIdentityMailFromDomainResponse -> ShowS
showsPrec :: Int -> SetIdentityMailFromDomainResponse -> ShowS
$cshow :: SetIdentityMailFromDomainResponse -> String
show :: SetIdentityMailFromDomainResponse -> String
$cshowList :: [SetIdentityMailFromDomainResponse] -> ShowS
showList :: [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
$cfrom :: forall x.
SetIdentityMailFromDomainResponse
-> Rep SetIdentityMailFromDomainResponse x
from :: forall x.
SetIdentityMailFromDomainResponse
-> Rep SetIdentityMailFromDomainResponse x
$cto :: forall x.
Rep SetIdentityMailFromDomainResponse x
-> SetIdentityMailFromDomainResponse
to :: forall x.
Rep SetIdentityMailFromDomainResponse x
-> SetIdentityMailFromDomainResponse
Prelude.Generic)

-- |
-- Create a value of 'SetIdentityMailFromDomainResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'setIdentityMailFromDomainResponse_httpStatus' - The response's http status code.
newSetIdentityMailFromDomainResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SetIdentityMailFromDomainResponse
newSetIdentityMailFromDomainResponse :: Int -> SetIdentityMailFromDomainResponse
newSetIdentityMailFromDomainResponse Int
pHttpStatus_ =
  SetIdentityMailFromDomainResponse'
    { $sel:httpStatus:SetIdentityMailFromDomainResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

-- | The response's http status code.
setIdentityMailFromDomainResponse_httpStatus :: Lens.Lens' SetIdentityMailFromDomainResponse Prelude.Int
setIdentityMailFromDomainResponse_httpStatus :: Lens' SetIdentityMailFromDomainResponse Int
setIdentityMailFromDomainResponse_httpStatus = (SetIdentityMailFromDomainResponse -> Int)
-> (SetIdentityMailFromDomainResponse
    -> Int -> SetIdentityMailFromDomainResponse)
-> Lens' SetIdentityMailFromDomainResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityMailFromDomainResponse' {Int
$sel:httpStatus:SetIdentityMailFromDomainResponse' :: SetIdentityMailFromDomainResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: SetIdentityMailFromDomainResponse
s@SetIdentityMailFromDomainResponse' {} Int
a -> SetIdentityMailFromDomainResponse
s {httpStatus = a} :: SetIdentityMailFromDomainResponse)

instance
  Prelude.NFData
    SetIdentityMailFromDomainResponse
  where
  rnf :: SetIdentityMailFromDomainResponse -> ()
rnf SetIdentityMailFromDomainResponse' {Int
$sel:httpStatus:SetIdentityMailFromDomainResponse' :: SetIdentityMailFromDomainResponse -> Int
httpStatus :: Int
..} =
    Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus