{-# 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.PinpointEmail.PutEmailIdentityMailFromAttributes
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Used to enable or disable the custom Mail-From domain configuration for
-- an email identity.
module Amazonka.PinpointEmail.PutEmailIdentityMailFromAttributes
  ( -- * Creating a Request
    PutEmailIdentityMailFromAttributes (..),
    newPutEmailIdentityMailFromAttributes,

    -- * Request Lenses
    putEmailIdentityMailFromAttributes_behaviorOnMxFailure,
    putEmailIdentityMailFromAttributes_mailFromDomain,
    putEmailIdentityMailFromAttributes_emailIdentity,

    -- * Destructuring the Response
    PutEmailIdentityMailFromAttributesResponse (..),
    newPutEmailIdentityMailFromAttributesResponse,

    -- * Response Lenses
    putEmailIdentityMailFromAttributesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.PinpointEmail.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | A request to configure the custom MAIL FROM domain for a verified
-- identity.
--
-- /See:/ 'newPutEmailIdentityMailFromAttributes' smart constructor.
data PutEmailIdentityMailFromAttributes = PutEmailIdentityMailFromAttributes'
  { -- | The action that you want Amazon Pinpoint to take if it can\'t read the
    -- required MX record when you send an email. When you set this value to
    -- @UseDefaultValue@, Amazon Pinpoint uses /amazonses.com/ as the MAIL FROM
    -- domain. When you set this value to @RejectMessage@, Amazon Pinpoint
    -- returns a @MailFromDomainNotVerified@ error, and doesn\'t attempt to
    -- deliver the email.
    --
    -- These behaviors are taken when the custom MAIL FROM domain configuration
    -- is in the @Pending@, @Failed@, and @TemporaryFailure@ states.
    PutEmailIdentityMailFromAttributes -> Maybe BehaviorOnMxFailure
behaviorOnMxFailure :: Prelude.Maybe BehaviorOnMxFailure,
    -- | The custom MAIL FROM domain that you want the verified identity to use.
    -- The MAIL FROM domain must meet the following criteria:
    --
    -- -   It has to be a subdomain of the verified identity.
    --
    -- -   It can\'t be used to receive email.
    --
    -- -   It can\'t be used in a \"From\" address if the MAIL FROM domain is a
    --     destination for feedback forwarding emails.
    PutEmailIdentityMailFromAttributes -> Maybe Text
mailFromDomain :: Prelude.Maybe Prelude.Text,
    -- | The verified email identity that you want to set up the custom MAIL FROM
    -- domain for.
    PutEmailIdentityMailFromAttributes -> Text
emailIdentity :: Prelude.Text
  }
  deriving (PutEmailIdentityMailFromAttributes
-> PutEmailIdentityMailFromAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutEmailIdentityMailFromAttributes
-> PutEmailIdentityMailFromAttributes -> Bool
$c/= :: PutEmailIdentityMailFromAttributes
-> PutEmailIdentityMailFromAttributes -> Bool
== :: PutEmailIdentityMailFromAttributes
-> PutEmailIdentityMailFromAttributes -> Bool
$c== :: PutEmailIdentityMailFromAttributes
-> PutEmailIdentityMailFromAttributes -> Bool
Prelude.Eq, ReadPrec [PutEmailIdentityMailFromAttributes]
ReadPrec PutEmailIdentityMailFromAttributes
Int -> ReadS PutEmailIdentityMailFromAttributes
ReadS [PutEmailIdentityMailFromAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutEmailIdentityMailFromAttributes]
$creadListPrec :: ReadPrec [PutEmailIdentityMailFromAttributes]
readPrec :: ReadPrec PutEmailIdentityMailFromAttributes
$creadPrec :: ReadPrec PutEmailIdentityMailFromAttributes
readList :: ReadS [PutEmailIdentityMailFromAttributes]
$creadList :: ReadS [PutEmailIdentityMailFromAttributes]
readsPrec :: Int -> ReadS PutEmailIdentityMailFromAttributes
$creadsPrec :: Int -> ReadS PutEmailIdentityMailFromAttributes
Prelude.Read, Int -> PutEmailIdentityMailFromAttributes -> ShowS
[PutEmailIdentityMailFromAttributes] -> ShowS
PutEmailIdentityMailFromAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutEmailIdentityMailFromAttributes] -> ShowS
$cshowList :: [PutEmailIdentityMailFromAttributes] -> ShowS
show :: PutEmailIdentityMailFromAttributes -> String
$cshow :: PutEmailIdentityMailFromAttributes -> String
showsPrec :: Int -> PutEmailIdentityMailFromAttributes -> ShowS
$cshowsPrec :: Int -> PutEmailIdentityMailFromAttributes -> ShowS
Prelude.Show, forall x.
Rep PutEmailIdentityMailFromAttributes x
-> PutEmailIdentityMailFromAttributes
forall x.
PutEmailIdentityMailFromAttributes
-> Rep PutEmailIdentityMailFromAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutEmailIdentityMailFromAttributes x
-> PutEmailIdentityMailFromAttributes
$cfrom :: forall x.
PutEmailIdentityMailFromAttributes
-> Rep PutEmailIdentityMailFromAttributes x
Prelude.Generic)

-- |
-- Create a value of 'PutEmailIdentityMailFromAttributes' 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', 'putEmailIdentityMailFromAttributes_behaviorOnMxFailure' - The action that you want Amazon Pinpoint to take if it can\'t read the
-- required MX record when you send an email. When you set this value to
-- @UseDefaultValue@, Amazon Pinpoint uses /amazonses.com/ as the MAIL FROM
-- domain. When you set this value to @RejectMessage@, Amazon Pinpoint
-- returns a @MailFromDomainNotVerified@ error, and doesn\'t attempt to
-- deliver the email.
--
-- These behaviors are taken when the custom MAIL FROM domain configuration
-- is in the @Pending@, @Failed@, and @TemporaryFailure@ states.
--
-- 'mailFromDomain', 'putEmailIdentityMailFromAttributes_mailFromDomain' - The custom MAIL FROM domain that you want the verified identity to use.
-- The MAIL FROM domain must meet the following criteria:
--
-- -   It has to be a subdomain of the verified identity.
--
-- -   It can\'t be used to receive email.
--
-- -   It can\'t be used in a \"From\" address if the MAIL FROM domain is a
--     destination for feedback forwarding emails.
--
-- 'emailIdentity', 'putEmailIdentityMailFromAttributes_emailIdentity' - The verified email identity that you want to set up the custom MAIL FROM
-- domain for.
newPutEmailIdentityMailFromAttributes ::
  -- | 'emailIdentity'
  Prelude.Text ->
  PutEmailIdentityMailFromAttributes
newPutEmailIdentityMailFromAttributes :: Text -> PutEmailIdentityMailFromAttributes
newPutEmailIdentityMailFromAttributes Text
pEmailIdentity_ =
  PutEmailIdentityMailFromAttributes'
    { $sel:behaviorOnMxFailure:PutEmailIdentityMailFromAttributes' :: Maybe BehaviorOnMxFailure
behaviorOnMxFailure =
        forall a. Maybe a
Prelude.Nothing,
      $sel:mailFromDomain:PutEmailIdentityMailFromAttributes' :: Maybe Text
mailFromDomain = forall a. Maybe a
Prelude.Nothing,
      $sel:emailIdentity:PutEmailIdentityMailFromAttributes' :: Text
emailIdentity = Text
pEmailIdentity_
    }

-- | The action that you want Amazon Pinpoint to take if it can\'t read the
-- required MX record when you send an email. When you set this value to
-- @UseDefaultValue@, Amazon Pinpoint uses /amazonses.com/ as the MAIL FROM
-- domain. When you set this value to @RejectMessage@, Amazon Pinpoint
-- returns a @MailFromDomainNotVerified@ error, and doesn\'t attempt to
-- deliver the email.
--
-- These behaviors are taken when the custom MAIL FROM domain configuration
-- is in the @Pending@, @Failed@, and @TemporaryFailure@ states.
putEmailIdentityMailFromAttributes_behaviorOnMxFailure :: Lens.Lens' PutEmailIdentityMailFromAttributes (Prelude.Maybe BehaviorOnMxFailure)
putEmailIdentityMailFromAttributes_behaviorOnMxFailure :: Lens'
  PutEmailIdentityMailFromAttributes (Maybe BehaviorOnMxFailure)
putEmailIdentityMailFromAttributes_behaviorOnMxFailure = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEmailIdentityMailFromAttributes' {Maybe BehaviorOnMxFailure
behaviorOnMxFailure :: Maybe BehaviorOnMxFailure
$sel:behaviorOnMxFailure:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Maybe BehaviorOnMxFailure
behaviorOnMxFailure} -> Maybe BehaviorOnMxFailure
behaviorOnMxFailure) (\s :: PutEmailIdentityMailFromAttributes
s@PutEmailIdentityMailFromAttributes' {} Maybe BehaviorOnMxFailure
a -> PutEmailIdentityMailFromAttributes
s {$sel:behaviorOnMxFailure:PutEmailIdentityMailFromAttributes' :: Maybe BehaviorOnMxFailure
behaviorOnMxFailure = Maybe BehaviorOnMxFailure
a} :: PutEmailIdentityMailFromAttributes)

-- | The custom MAIL FROM domain that you want the verified identity to use.
-- The MAIL FROM domain must meet the following criteria:
--
-- -   It has to be a subdomain of the verified identity.
--
-- -   It can\'t be used to receive email.
--
-- -   It can\'t be used in a \"From\" address if the MAIL FROM domain is a
--     destination for feedback forwarding emails.
putEmailIdentityMailFromAttributes_mailFromDomain :: Lens.Lens' PutEmailIdentityMailFromAttributes (Prelude.Maybe Prelude.Text)
putEmailIdentityMailFromAttributes_mailFromDomain :: Lens' PutEmailIdentityMailFromAttributes (Maybe Text)
putEmailIdentityMailFromAttributes_mailFromDomain = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEmailIdentityMailFromAttributes' {Maybe Text
mailFromDomain :: Maybe Text
$sel:mailFromDomain:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Maybe Text
mailFromDomain} -> Maybe Text
mailFromDomain) (\s :: PutEmailIdentityMailFromAttributes
s@PutEmailIdentityMailFromAttributes' {} Maybe Text
a -> PutEmailIdentityMailFromAttributes
s {$sel:mailFromDomain:PutEmailIdentityMailFromAttributes' :: Maybe Text
mailFromDomain = Maybe Text
a} :: PutEmailIdentityMailFromAttributes)

-- | The verified email identity that you want to set up the custom MAIL FROM
-- domain for.
putEmailIdentityMailFromAttributes_emailIdentity :: Lens.Lens' PutEmailIdentityMailFromAttributes Prelude.Text
putEmailIdentityMailFromAttributes_emailIdentity :: Lens' PutEmailIdentityMailFromAttributes Text
putEmailIdentityMailFromAttributes_emailIdentity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEmailIdentityMailFromAttributes' {Text
emailIdentity :: Text
$sel:emailIdentity:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Text
emailIdentity} -> Text
emailIdentity) (\s :: PutEmailIdentityMailFromAttributes
s@PutEmailIdentityMailFromAttributes' {} Text
a -> PutEmailIdentityMailFromAttributes
s {$sel:emailIdentity:PutEmailIdentityMailFromAttributes' :: Text
emailIdentity = Text
a} :: PutEmailIdentityMailFromAttributes)

instance
  Core.AWSRequest
    PutEmailIdentityMailFromAttributes
  where
  type
    AWSResponse PutEmailIdentityMailFromAttributes =
      PutEmailIdentityMailFromAttributesResponse
  request :: (Service -> Service)
-> PutEmailIdentityMailFromAttributes
-> Request PutEmailIdentityMailFromAttributes
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PutEmailIdentityMailFromAttributes
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse PutEmailIdentityMailFromAttributes)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> PutEmailIdentityMailFromAttributesResponse
PutEmailIdentityMailFromAttributesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    PutEmailIdentityMailFromAttributes
  where
  hashWithSalt :: Int -> PutEmailIdentityMailFromAttributes -> Int
hashWithSalt
    Int
_salt
    PutEmailIdentityMailFromAttributes' {Maybe Text
Maybe BehaviorOnMxFailure
Text
emailIdentity :: Text
mailFromDomain :: Maybe Text
behaviorOnMxFailure :: Maybe BehaviorOnMxFailure
$sel:emailIdentity:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Text
$sel:mailFromDomain:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Maybe Text
$sel:behaviorOnMxFailure:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Maybe BehaviorOnMxFailure
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BehaviorOnMxFailure
behaviorOnMxFailure
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
mailFromDomain
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
emailIdentity

instance
  Prelude.NFData
    PutEmailIdentityMailFromAttributes
  where
  rnf :: PutEmailIdentityMailFromAttributes -> ()
rnf PutEmailIdentityMailFromAttributes' {Maybe Text
Maybe BehaviorOnMxFailure
Text
emailIdentity :: Text
mailFromDomain :: Maybe Text
behaviorOnMxFailure :: Maybe BehaviorOnMxFailure
$sel:emailIdentity:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Text
$sel:mailFromDomain:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Maybe Text
$sel:behaviorOnMxFailure:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Maybe BehaviorOnMxFailure
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe BehaviorOnMxFailure
behaviorOnMxFailure
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
mailFromDomain
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
emailIdentity

instance
  Data.ToHeaders
    PutEmailIdentityMailFromAttributes
  where
  toHeaders :: PutEmailIdentityMailFromAttributes -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Data.ToJSON
    PutEmailIdentityMailFromAttributes
  where
  toJSON :: PutEmailIdentityMailFromAttributes -> Value
toJSON PutEmailIdentityMailFromAttributes' {Maybe Text
Maybe BehaviorOnMxFailure
Text
emailIdentity :: Text
mailFromDomain :: Maybe Text
behaviorOnMxFailure :: Maybe BehaviorOnMxFailure
$sel:emailIdentity:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Text
$sel:mailFromDomain:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Maybe Text
$sel:behaviorOnMxFailure:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Maybe BehaviorOnMxFailure
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"BehaviorOnMxFailure" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BehaviorOnMxFailure
behaviorOnMxFailure,
            (Key
"MailFromDomain" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
mailFromDomain
          ]
      )

instance
  Data.ToPath
    PutEmailIdentityMailFromAttributes
  where
  toPath :: PutEmailIdentityMailFromAttributes -> ByteString
toPath PutEmailIdentityMailFromAttributes' {Maybe Text
Maybe BehaviorOnMxFailure
Text
emailIdentity :: Text
mailFromDomain :: Maybe Text
behaviorOnMxFailure :: Maybe BehaviorOnMxFailure
$sel:emailIdentity:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Text
$sel:mailFromDomain:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Maybe Text
$sel:behaviorOnMxFailure:PutEmailIdentityMailFromAttributes' :: PutEmailIdentityMailFromAttributes -> Maybe BehaviorOnMxFailure
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v1/email/identities/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
emailIdentity,
        ByteString
"/mail-from"
      ]

instance
  Data.ToQuery
    PutEmailIdentityMailFromAttributes
  where
  toQuery :: PutEmailIdentityMailFromAttributes -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | An HTTP 200 response if the request succeeds, or an error message if the
-- request fails.
--
-- /See:/ 'newPutEmailIdentityMailFromAttributesResponse' smart constructor.
data PutEmailIdentityMailFromAttributesResponse = PutEmailIdentityMailFromAttributesResponse'
  { -- | The response's http status code.
    PutEmailIdentityMailFromAttributesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutEmailIdentityMailFromAttributesResponse
-> PutEmailIdentityMailFromAttributesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutEmailIdentityMailFromAttributesResponse
-> PutEmailIdentityMailFromAttributesResponse -> Bool
$c/= :: PutEmailIdentityMailFromAttributesResponse
-> PutEmailIdentityMailFromAttributesResponse -> Bool
== :: PutEmailIdentityMailFromAttributesResponse
-> PutEmailIdentityMailFromAttributesResponse -> Bool
$c== :: PutEmailIdentityMailFromAttributesResponse
-> PutEmailIdentityMailFromAttributesResponse -> Bool
Prelude.Eq, ReadPrec [PutEmailIdentityMailFromAttributesResponse]
ReadPrec PutEmailIdentityMailFromAttributesResponse
Int -> ReadS PutEmailIdentityMailFromAttributesResponse
ReadS [PutEmailIdentityMailFromAttributesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutEmailIdentityMailFromAttributesResponse]
$creadListPrec :: ReadPrec [PutEmailIdentityMailFromAttributesResponse]
readPrec :: ReadPrec PutEmailIdentityMailFromAttributesResponse
$creadPrec :: ReadPrec PutEmailIdentityMailFromAttributesResponse
readList :: ReadS [PutEmailIdentityMailFromAttributesResponse]
$creadList :: ReadS [PutEmailIdentityMailFromAttributesResponse]
readsPrec :: Int -> ReadS PutEmailIdentityMailFromAttributesResponse
$creadsPrec :: Int -> ReadS PutEmailIdentityMailFromAttributesResponse
Prelude.Read, Int -> PutEmailIdentityMailFromAttributesResponse -> ShowS
[PutEmailIdentityMailFromAttributesResponse] -> ShowS
PutEmailIdentityMailFromAttributesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutEmailIdentityMailFromAttributesResponse] -> ShowS
$cshowList :: [PutEmailIdentityMailFromAttributesResponse] -> ShowS
show :: PutEmailIdentityMailFromAttributesResponse -> String
$cshow :: PutEmailIdentityMailFromAttributesResponse -> String
showsPrec :: Int -> PutEmailIdentityMailFromAttributesResponse -> ShowS
$cshowsPrec :: Int -> PutEmailIdentityMailFromAttributesResponse -> ShowS
Prelude.Show, forall x.
Rep PutEmailIdentityMailFromAttributesResponse x
-> PutEmailIdentityMailFromAttributesResponse
forall x.
PutEmailIdentityMailFromAttributesResponse
-> Rep PutEmailIdentityMailFromAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutEmailIdentityMailFromAttributesResponse x
-> PutEmailIdentityMailFromAttributesResponse
$cfrom :: forall x.
PutEmailIdentityMailFromAttributesResponse
-> Rep PutEmailIdentityMailFromAttributesResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutEmailIdentityMailFromAttributesResponse' 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', 'putEmailIdentityMailFromAttributesResponse_httpStatus' - The response's http status code.
newPutEmailIdentityMailFromAttributesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutEmailIdentityMailFromAttributesResponse
newPutEmailIdentityMailFromAttributesResponse :: Int -> PutEmailIdentityMailFromAttributesResponse
newPutEmailIdentityMailFromAttributesResponse
  Int
pHttpStatus_ =
    PutEmailIdentityMailFromAttributesResponse'
      { $sel:httpStatus:PutEmailIdentityMailFromAttributesResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

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

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