{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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_mailFromDomain,
    putEmailIdentityMailFromAttributes_behaviorOnMxFailure,
    putEmailIdentityMailFromAttributes_emailIdentity,

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

    -- * Response Lenses
    putEmailIdentityMailFromAttributesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 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 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 verified email identity that you want to set up the custom MAIL FROM
    -- domain for.
    PutEmailIdentityMailFromAttributes -> Text
emailIdentity :: Prelude.Text
  }
  deriving (PutEmailIdentityMailFromAttributes
-> PutEmailIdentityMailFromAttributes -> Bool
(PutEmailIdentityMailFromAttributes
 -> PutEmailIdentityMailFromAttributes -> Bool)
-> (PutEmailIdentityMailFromAttributes
    -> PutEmailIdentityMailFromAttributes -> Bool)
-> Eq PutEmailIdentityMailFromAttributes
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]
(Int -> ReadS PutEmailIdentityMailFromAttributes)
-> ReadS [PutEmailIdentityMailFromAttributes]
-> ReadPrec PutEmailIdentityMailFromAttributes
-> ReadPrec [PutEmailIdentityMailFromAttributes]
-> Read 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
(Int -> PutEmailIdentityMailFromAttributes -> ShowS)
-> (PutEmailIdentityMailFromAttributes -> String)
-> ([PutEmailIdentityMailFromAttributes] -> ShowS)
-> Show PutEmailIdentityMailFromAttributes
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.
 PutEmailIdentityMailFromAttributes
 -> Rep PutEmailIdentityMailFromAttributes x)
-> (forall x.
    Rep PutEmailIdentityMailFromAttributes x
    -> PutEmailIdentityMailFromAttributes)
-> Generic PutEmailIdentityMailFromAttributes
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:
--
-- '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.
--
-- '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.
--
-- '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' :: Maybe Text
-> Maybe BehaviorOnMxFailure
-> Text
-> PutEmailIdentityMailFromAttributes
PutEmailIdentityMailFromAttributes'
    { $sel:mailFromDomain:PutEmailIdentityMailFromAttributes' :: Maybe Text
mailFromDomain =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:behaviorOnMxFailure:PutEmailIdentityMailFromAttributes' :: Maybe BehaviorOnMxFailure
behaviorOnMxFailure = Maybe BehaviorOnMxFailure
forall a. Maybe a
Prelude.Nothing,
      $sel:emailIdentity:PutEmailIdentityMailFromAttributes' :: Text
emailIdentity = Text
pEmailIdentity_
    }

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> PutEmailIdentityMailFromAttributes
-> f PutEmailIdentityMailFromAttributes
putEmailIdentityMailFromAttributes_mailFromDomain = (PutEmailIdentityMailFromAttributes -> Maybe Text)
-> (PutEmailIdentityMailFromAttributes
    -> Maybe Text -> PutEmailIdentityMailFromAttributes)
-> Lens
     PutEmailIdentityMailFromAttributes
     PutEmailIdentityMailFromAttributes
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe BehaviorOnMxFailure -> f (Maybe BehaviorOnMxFailure))
-> PutEmailIdentityMailFromAttributes
-> f PutEmailIdentityMailFromAttributes
putEmailIdentityMailFromAttributes_behaviorOnMxFailure = (PutEmailIdentityMailFromAttributes -> Maybe BehaviorOnMxFailure)
-> (PutEmailIdentityMailFromAttributes
    -> Maybe BehaviorOnMxFailure -> PutEmailIdentityMailFromAttributes)
-> Lens
     PutEmailIdentityMailFromAttributes
     PutEmailIdentityMailFromAttributes
     (Maybe BehaviorOnMxFailure)
     (Maybe 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 verified email identity that you want to set up the custom MAIL FROM
-- domain for.
putEmailIdentityMailFromAttributes_emailIdentity :: Lens.Lens' PutEmailIdentityMailFromAttributes Prelude.Text
putEmailIdentityMailFromAttributes_emailIdentity :: (Text -> f Text)
-> PutEmailIdentityMailFromAttributes
-> f PutEmailIdentityMailFromAttributes
putEmailIdentityMailFromAttributes_emailIdentity = (PutEmailIdentityMailFromAttributes -> Text)
-> (PutEmailIdentityMailFromAttributes
    -> Text -> PutEmailIdentityMailFromAttributes)
-> Lens
     PutEmailIdentityMailFromAttributes
     PutEmailIdentityMailFromAttributes
     Text
     Text
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 :: PutEmailIdentityMailFromAttributes
-> Request PutEmailIdentityMailFromAttributes
request = Service
-> PutEmailIdentityMailFromAttributes
-> Request PutEmailIdentityMailFromAttributes
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutEmailIdentityMailFromAttributes
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse PutEmailIdentityMailFromAttributes)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse PutEmailIdentityMailFromAttributes))
-> Logger
-> Service
-> Proxy PutEmailIdentityMailFromAttributes
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse PutEmailIdentityMailFromAttributes)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> PutEmailIdentityMailFromAttributesResponse
PutEmailIdentityMailFromAttributesResponse'
            (Int -> PutEmailIdentityMailFromAttributesResponse)
-> Either String Int
-> Either String PutEmailIdentityMailFromAttributesResponse
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
    PutEmailIdentityMailFromAttributes

instance
  Prelude.NFData
    PutEmailIdentityMailFromAttributes

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

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

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

instance
  Core.ToQuery
    PutEmailIdentityMailFromAttributes
  where
  toQuery :: PutEmailIdentityMailFromAttributes -> QueryString
toQuery = QueryString -> PutEmailIdentityMailFromAttributes -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(PutEmailIdentityMailFromAttributesResponse
 -> PutEmailIdentityMailFromAttributesResponse -> Bool)
-> (PutEmailIdentityMailFromAttributesResponse
    -> PutEmailIdentityMailFromAttributesResponse -> Bool)
-> Eq PutEmailIdentityMailFromAttributesResponse
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]
(Int -> ReadS PutEmailIdentityMailFromAttributesResponse)
-> ReadS [PutEmailIdentityMailFromAttributesResponse]
-> ReadPrec PutEmailIdentityMailFromAttributesResponse
-> ReadPrec [PutEmailIdentityMailFromAttributesResponse]
-> Read 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
(Int -> PutEmailIdentityMailFromAttributesResponse -> ShowS)
-> (PutEmailIdentityMailFromAttributesResponse -> String)
-> ([PutEmailIdentityMailFromAttributesResponse] -> ShowS)
-> Show PutEmailIdentityMailFromAttributesResponse
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.
 PutEmailIdentityMailFromAttributesResponse
 -> Rep PutEmailIdentityMailFromAttributesResponse x)
-> (forall x.
    Rep PutEmailIdentityMailFromAttributesResponse x
    -> PutEmailIdentityMailFromAttributesResponse)
-> Generic PutEmailIdentityMailFromAttributesResponse
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' :: Int -> PutEmailIdentityMailFromAttributesResponse
PutEmailIdentityMailFromAttributesResponse'
      { $sel:httpStatus:PutEmailIdentityMailFromAttributesResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | The response's http status code.
putEmailIdentityMailFromAttributesResponse_httpStatus :: Lens.Lens' PutEmailIdentityMailFromAttributesResponse Prelude.Int
putEmailIdentityMailFromAttributesResponse_httpStatus :: (Int -> f Int)
-> PutEmailIdentityMailFromAttributesResponse
-> f PutEmailIdentityMailFromAttributesResponse
putEmailIdentityMailFromAttributesResponse_httpStatus = (PutEmailIdentityMailFromAttributesResponse -> Int)
-> (PutEmailIdentityMailFromAttributesResponse
    -> Int -> PutEmailIdentityMailFromAttributesResponse)
-> Lens
     PutEmailIdentityMailFromAttributesResponse
     PutEmailIdentityMailFromAttributesResponse
     Int
     Int
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