{-# 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.SESV2.GetEmailIdentity
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Provides information about a specific identity, including the
-- identity\'s verification status, sending authorization policies, its
-- DKIM authentication status, and its custom Mail-From settings.
module Amazonka.SESV2.GetEmailIdentity
  ( -- * Creating a Request
    GetEmailIdentity (..),
    newGetEmailIdentity,

    -- * Request Lenses
    getEmailIdentity_emailIdentity,

    -- * Destructuring the Response
    GetEmailIdentityResponse (..),
    newGetEmailIdentityResponse,

    -- * Response Lenses
    getEmailIdentityResponse_configurationSetName,
    getEmailIdentityResponse_dkimAttributes,
    getEmailIdentityResponse_feedbackForwardingStatus,
    getEmailIdentityResponse_identityType,
    getEmailIdentityResponse_mailFromAttributes,
    getEmailIdentityResponse_policies,
    getEmailIdentityResponse_tags,
    getEmailIdentityResponse_verificationStatus,
    getEmailIdentityResponse_verifiedForSendingStatus,
    getEmailIdentityResponse_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.SESV2.Types

-- | A request to return details about an email identity.
--
-- /See:/ 'newGetEmailIdentity' smart constructor.
data GetEmailIdentity = GetEmailIdentity'
  { -- | The email identity.
    GetEmailIdentity -> Text
emailIdentity :: Prelude.Text
  }
  deriving (GetEmailIdentity -> GetEmailIdentity -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEmailIdentity -> GetEmailIdentity -> Bool
$c/= :: GetEmailIdentity -> GetEmailIdentity -> Bool
== :: GetEmailIdentity -> GetEmailIdentity -> Bool
$c== :: GetEmailIdentity -> GetEmailIdentity -> Bool
Prelude.Eq, ReadPrec [GetEmailIdentity]
ReadPrec GetEmailIdentity
Int -> ReadS GetEmailIdentity
ReadS [GetEmailIdentity]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEmailIdentity]
$creadListPrec :: ReadPrec [GetEmailIdentity]
readPrec :: ReadPrec GetEmailIdentity
$creadPrec :: ReadPrec GetEmailIdentity
readList :: ReadS [GetEmailIdentity]
$creadList :: ReadS [GetEmailIdentity]
readsPrec :: Int -> ReadS GetEmailIdentity
$creadsPrec :: Int -> ReadS GetEmailIdentity
Prelude.Read, Int -> GetEmailIdentity -> ShowS
[GetEmailIdentity] -> ShowS
GetEmailIdentity -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEmailIdentity] -> ShowS
$cshowList :: [GetEmailIdentity] -> ShowS
show :: GetEmailIdentity -> String
$cshow :: GetEmailIdentity -> String
showsPrec :: Int -> GetEmailIdentity -> ShowS
$cshowsPrec :: Int -> GetEmailIdentity -> ShowS
Prelude.Show, forall x. Rep GetEmailIdentity x -> GetEmailIdentity
forall x. GetEmailIdentity -> Rep GetEmailIdentity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetEmailIdentity x -> GetEmailIdentity
$cfrom :: forall x. GetEmailIdentity -> Rep GetEmailIdentity x
Prelude.Generic)

-- |
-- Create a value of 'GetEmailIdentity' 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:
--
-- 'emailIdentity', 'getEmailIdentity_emailIdentity' - The email identity.
newGetEmailIdentity ::
  -- | 'emailIdentity'
  Prelude.Text ->
  GetEmailIdentity
newGetEmailIdentity :: Text -> GetEmailIdentity
newGetEmailIdentity Text
pEmailIdentity_ =
  GetEmailIdentity' {$sel:emailIdentity:GetEmailIdentity' :: Text
emailIdentity = Text
pEmailIdentity_}

-- | The email identity.
getEmailIdentity_emailIdentity :: Lens.Lens' GetEmailIdentity Prelude.Text
getEmailIdentity_emailIdentity :: Lens' GetEmailIdentity Text
getEmailIdentity_emailIdentity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEmailIdentity' {Text
emailIdentity :: Text
$sel:emailIdentity:GetEmailIdentity' :: GetEmailIdentity -> Text
emailIdentity} -> Text
emailIdentity) (\s :: GetEmailIdentity
s@GetEmailIdentity' {} Text
a -> GetEmailIdentity
s {$sel:emailIdentity:GetEmailIdentity' :: Text
emailIdentity = Text
a} :: GetEmailIdentity)

instance Core.AWSRequest GetEmailIdentity where
  type
    AWSResponse GetEmailIdentity =
      GetEmailIdentityResponse
  request :: (Service -> Service)
-> GetEmailIdentity -> Request GetEmailIdentity
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetEmailIdentity
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetEmailIdentity)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe DkimAttributes
-> Maybe Bool
-> Maybe IdentityType
-> Maybe MailFromAttributes
-> Maybe (HashMap Text Text)
-> Maybe [Tag]
-> Maybe VerificationStatus
-> Maybe Bool
-> Int
-> GetEmailIdentityResponse
GetEmailIdentityResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ConfigurationSetName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"DkimAttributes")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"FeedbackForwardingStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"IdentityType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"MailFromAttributes")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Policies" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"VerificationStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"VerifiedForSendingStatus")
            forall (f :: * -> *) a b. Applicative f => 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 GetEmailIdentity where
  hashWithSalt :: Int -> GetEmailIdentity -> Int
hashWithSalt Int
_salt GetEmailIdentity' {Text
emailIdentity :: Text
$sel:emailIdentity:GetEmailIdentity' :: GetEmailIdentity -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
emailIdentity

instance Prelude.NFData GetEmailIdentity where
  rnf :: GetEmailIdentity -> ()
rnf GetEmailIdentity' {Text
emailIdentity :: Text
$sel:emailIdentity:GetEmailIdentity' :: GetEmailIdentity -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
emailIdentity

instance Data.ToHeaders GetEmailIdentity where
  toHeaders :: GetEmailIdentity -> 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.ToPath GetEmailIdentity where
  toPath :: GetEmailIdentity -> ByteString
toPath GetEmailIdentity' {Text
emailIdentity :: Text
$sel:emailIdentity:GetEmailIdentity' :: GetEmailIdentity -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v2/email/identities/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
emailIdentity]

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

-- | Details about an email identity.
--
-- /See:/ 'newGetEmailIdentityResponse' smart constructor.
data GetEmailIdentityResponse = GetEmailIdentityResponse'
  { -- | The configuration set used by default when sending from this identity.
    GetEmailIdentityResponse -> Maybe Text
configurationSetName :: Prelude.Maybe Prelude.Text,
    -- | An object that contains information about the DKIM attributes for the
    -- identity.
    GetEmailIdentityResponse -> Maybe DkimAttributes
dkimAttributes :: Prelude.Maybe DkimAttributes,
    -- | The feedback forwarding configuration for the identity.
    --
    -- If the value is @true@, you receive email notifications when bounce or
    -- complaint events occur. These notifications are sent to the address that
    -- you specified in the @Return-Path@ header of the original email.
    --
    -- You\'re required to have a method of tracking bounces and complaints. If
    -- you haven\'t set up another mechanism for receiving bounce or complaint
    -- notifications (for example, by setting up an event destination), you
    -- receive an email notification when these events occur (even if this
    -- setting is disabled).
    GetEmailIdentityResponse -> Maybe Bool
feedbackForwardingStatus :: Prelude.Maybe Prelude.Bool,
    -- | The email identity type. Note: the @MANAGED_DOMAIN@ identity type is not
    -- supported.
    GetEmailIdentityResponse -> Maybe IdentityType
identityType :: Prelude.Maybe IdentityType,
    -- | An object that contains information about the Mail-From attributes for
    -- the email identity.
    GetEmailIdentityResponse -> Maybe MailFromAttributes
mailFromAttributes :: Prelude.Maybe MailFromAttributes,
    -- | A map of policy names to policies.
    GetEmailIdentityResponse -> Maybe (HashMap Text Text)
policies :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | An array of objects that define the tags (keys and values) that are
    -- associated with the email identity.
    GetEmailIdentityResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The verification status of the identity. The status can be one of the
    -- following:
    --
    -- -   @PENDING@ – The verification process was initiated, but Amazon SES
    --     hasn\'t yet been able to verify the identity.
    --
    -- -   @SUCCESS@ – The verification process completed successfully.
    --
    -- -   @FAILED@ – The verification process failed.
    --
    -- -   @TEMPORARY_FAILURE@ – A temporary issue is preventing Amazon SES
    --     from determining the verification status of the identity.
    --
    -- -   @NOT_STARTED@ – The verification process hasn\'t been initiated for
    --     the identity.
    GetEmailIdentityResponse -> Maybe VerificationStatus
verificationStatus :: Prelude.Maybe VerificationStatus,
    -- | Specifies whether or not the identity is verified. You can only send
    -- email from verified email addresses or domains. For more information
    -- about verifying identities, see the
    -- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-email-manage-verify.html Amazon Pinpoint User Guide>.
    GetEmailIdentityResponse -> Maybe Bool
verifiedForSendingStatus :: Prelude.Maybe Prelude.Bool,
    -- | The response's http status code.
    GetEmailIdentityResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetEmailIdentityResponse -> GetEmailIdentityResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEmailIdentityResponse -> GetEmailIdentityResponse -> Bool
$c/= :: GetEmailIdentityResponse -> GetEmailIdentityResponse -> Bool
== :: GetEmailIdentityResponse -> GetEmailIdentityResponse -> Bool
$c== :: GetEmailIdentityResponse -> GetEmailIdentityResponse -> Bool
Prelude.Eq, ReadPrec [GetEmailIdentityResponse]
ReadPrec GetEmailIdentityResponse
Int -> ReadS GetEmailIdentityResponse
ReadS [GetEmailIdentityResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEmailIdentityResponse]
$creadListPrec :: ReadPrec [GetEmailIdentityResponse]
readPrec :: ReadPrec GetEmailIdentityResponse
$creadPrec :: ReadPrec GetEmailIdentityResponse
readList :: ReadS [GetEmailIdentityResponse]
$creadList :: ReadS [GetEmailIdentityResponse]
readsPrec :: Int -> ReadS GetEmailIdentityResponse
$creadsPrec :: Int -> ReadS GetEmailIdentityResponse
Prelude.Read, Int -> GetEmailIdentityResponse -> ShowS
[GetEmailIdentityResponse] -> ShowS
GetEmailIdentityResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEmailIdentityResponse] -> ShowS
$cshowList :: [GetEmailIdentityResponse] -> ShowS
show :: GetEmailIdentityResponse -> String
$cshow :: GetEmailIdentityResponse -> String
showsPrec :: Int -> GetEmailIdentityResponse -> ShowS
$cshowsPrec :: Int -> GetEmailIdentityResponse -> ShowS
Prelude.Show, forall x.
Rep GetEmailIdentityResponse x -> GetEmailIdentityResponse
forall x.
GetEmailIdentityResponse -> Rep GetEmailIdentityResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetEmailIdentityResponse x -> GetEmailIdentityResponse
$cfrom :: forall x.
GetEmailIdentityResponse -> Rep GetEmailIdentityResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetEmailIdentityResponse' 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:
--
-- 'configurationSetName', 'getEmailIdentityResponse_configurationSetName' - The configuration set used by default when sending from this identity.
--
-- 'dkimAttributes', 'getEmailIdentityResponse_dkimAttributes' - An object that contains information about the DKIM attributes for the
-- identity.
--
-- 'feedbackForwardingStatus', 'getEmailIdentityResponse_feedbackForwardingStatus' - The feedback forwarding configuration for the identity.
--
-- If the value is @true@, you receive email notifications when bounce or
-- complaint events occur. These notifications are sent to the address that
-- you specified in the @Return-Path@ header of the original email.
--
-- You\'re required to have a method of tracking bounces and complaints. If
-- you haven\'t set up another mechanism for receiving bounce or complaint
-- notifications (for example, by setting up an event destination), you
-- receive an email notification when these events occur (even if this
-- setting is disabled).
--
-- 'identityType', 'getEmailIdentityResponse_identityType' - The email identity type. Note: the @MANAGED_DOMAIN@ identity type is not
-- supported.
--
-- 'mailFromAttributes', 'getEmailIdentityResponse_mailFromAttributes' - An object that contains information about the Mail-From attributes for
-- the email identity.
--
-- 'policies', 'getEmailIdentityResponse_policies' - A map of policy names to policies.
--
-- 'tags', 'getEmailIdentityResponse_tags' - An array of objects that define the tags (keys and values) that are
-- associated with the email identity.
--
-- 'verificationStatus', 'getEmailIdentityResponse_verificationStatus' - The verification status of the identity. The status can be one of the
-- following:
--
-- -   @PENDING@ – The verification process was initiated, but Amazon SES
--     hasn\'t yet been able to verify the identity.
--
-- -   @SUCCESS@ – The verification process completed successfully.
--
-- -   @FAILED@ – The verification process failed.
--
-- -   @TEMPORARY_FAILURE@ – A temporary issue is preventing Amazon SES
--     from determining the verification status of the identity.
--
-- -   @NOT_STARTED@ – The verification process hasn\'t been initiated for
--     the identity.
--
-- 'verifiedForSendingStatus', 'getEmailIdentityResponse_verifiedForSendingStatus' - Specifies whether or not the identity is verified. You can only send
-- email from verified email addresses or domains. For more information
-- about verifying identities, see the
-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-email-manage-verify.html Amazon Pinpoint User Guide>.
--
-- 'httpStatus', 'getEmailIdentityResponse_httpStatus' - The response's http status code.
newGetEmailIdentityResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetEmailIdentityResponse
newGetEmailIdentityResponse :: Int -> GetEmailIdentityResponse
newGetEmailIdentityResponse Int
pHttpStatus_ =
  GetEmailIdentityResponse'
    { $sel:configurationSetName:GetEmailIdentityResponse' :: Maybe Text
configurationSetName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dkimAttributes:GetEmailIdentityResponse' :: Maybe DkimAttributes
dkimAttributes = forall a. Maybe a
Prelude.Nothing,
      $sel:feedbackForwardingStatus:GetEmailIdentityResponse' :: Maybe Bool
feedbackForwardingStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:identityType:GetEmailIdentityResponse' :: Maybe IdentityType
identityType = forall a. Maybe a
Prelude.Nothing,
      $sel:mailFromAttributes:GetEmailIdentityResponse' :: Maybe MailFromAttributes
mailFromAttributes = forall a. Maybe a
Prelude.Nothing,
      $sel:policies:GetEmailIdentityResponse' :: Maybe (HashMap Text Text)
policies = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetEmailIdentityResponse' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:verificationStatus:GetEmailIdentityResponse' :: Maybe VerificationStatus
verificationStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:verifiedForSendingStatus:GetEmailIdentityResponse' :: Maybe Bool
verifiedForSendingStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetEmailIdentityResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The configuration set used by default when sending from this identity.
getEmailIdentityResponse_configurationSetName :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe Prelude.Text)
getEmailIdentityResponse_configurationSetName :: Lens' GetEmailIdentityResponse (Maybe Text)
getEmailIdentityResponse_configurationSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEmailIdentityResponse' {Maybe Text
configurationSetName :: Maybe Text
$sel:configurationSetName:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe Text
configurationSetName} -> Maybe Text
configurationSetName) (\s :: GetEmailIdentityResponse
s@GetEmailIdentityResponse' {} Maybe Text
a -> GetEmailIdentityResponse
s {$sel:configurationSetName:GetEmailIdentityResponse' :: Maybe Text
configurationSetName = Maybe Text
a} :: GetEmailIdentityResponse)

-- | An object that contains information about the DKIM attributes for the
-- identity.
getEmailIdentityResponse_dkimAttributes :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe DkimAttributes)
getEmailIdentityResponse_dkimAttributes :: Lens' GetEmailIdentityResponse (Maybe DkimAttributes)
getEmailIdentityResponse_dkimAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEmailIdentityResponse' {Maybe DkimAttributes
dkimAttributes :: Maybe DkimAttributes
$sel:dkimAttributes:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe DkimAttributes
dkimAttributes} -> Maybe DkimAttributes
dkimAttributes) (\s :: GetEmailIdentityResponse
s@GetEmailIdentityResponse' {} Maybe DkimAttributes
a -> GetEmailIdentityResponse
s {$sel:dkimAttributes:GetEmailIdentityResponse' :: Maybe DkimAttributes
dkimAttributes = Maybe DkimAttributes
a} :: GetEmailIdentityResponse)

-- | The feedback forwarding configuration for the identity.
--
-- If the value is @true@, you receive email notifications when bounce or
-- complaint events occur. These notifications are sent to the address that
-- you specified in the @Return-Path@ header of the original email.
--
-- You\'re required to have a method of tracking bounces and complaints. If
-- you haven\'t set up another mechanism for receiving bounce or complaint
-- notifications (for example, by setting up an event destination), you
-- receive an email notification when these events occur (even if this
-- setting is disabled).
getEmailIdentityResponse_feedbackForwardingStatus :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe Prelude.Bool)
getEmailIdentityResponse_feedbackForwardingStatus :: Lens' GetEmailIdentityResponse (Maybe Bool)
getEmailIdentityResponse_feedbackForwardingStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEmailIdentityResponse' {Maybe Bool
feedbackForwardingStatus :: Maybe Bool
$sel:feedbackForwardingStatus:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe Bool
feedbackForwardingStatus} -> Maybe Bool
feedbackForwardingStatus) (\s :: GetEmailIdentityResponse
s@GetEmailIdentityResponse' {} Maybe Bool
a -> GetEmailIdentityResponse
s {$sel:feedbackForwardingStatus:GetEmailIdentityResponse' :: Maybe Bool
feedbackForwardingStatus = Maybe Bool
a} :: GetEmailIdentityResponse)

-- | The email identity type. Note: the @MANAGED_DOMAIN@ identity type is not
-- supported.
getEmailIdentityResponse_identityType :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe IdentityType)
getEmailIdentityResponse_identityType :: Lens' GetEmailIdentityResponse (Maybe IdentityType)
getEmailIdentityResponse_identityType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEmailIdentityResponse' {Maybe IdentityType
identityType :: Maybe IdentityType
$sel:identityType:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe IdentityType
identityType} -> Maybe IdentityType
identityType) (\s :: GetEmailIdentityResponse
s@GetEmailIdentityResponse' {} Maybe IdentityType
a -> GetEmailIdentityResponse
s {$sel:identityType:GetEmailIdentityResponse' :: Maybe IdentityType
identityType = Maybe IdentityType
a} :: GetEmailIdentityResponse)

-- | An object that contains information about the Mail-From attributes for
-- the email identity.
getEmailIdentityResponse_mailFromAttributes :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe MailFromAttributes)
getEmailIdentityResponse_mailFromAttributes :: Lens' GetEmailIdentityResponse (Maybe MailFromAttributes)
getEmailIdentityResponse_mailFromAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEmailIdentityResponse' {Maybe MailFromAttributes
mailFromAttributes :: Maybe MailFromAttributes
$sel:mailFromAttributes:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe MailFromAttributes
mailFromAttributes} -> Maybe MailFromAttributes
mailFromAttributes) (\s :: GetEmailIdentityResponse
s@GetEmailIdentityResponse' {} Maybe MailFromAttributes
a -> GetEmailIdentityResponse
s {$sel:mailFromAttributes:GetEmailIdentityResponse' :: Maybe MailFromAttributes
mailFromAttributes = Maybe MailFromAttributes
a} :: GetEmailIdentityResponse)

-- | A map of policy names to policies.
getEmailIdentityResponse_policies :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getEmailIdentityResponse_policies :: Lens' GetEmailIdentityResponse (Maybe (HashMap Text Text))
getEmailIdentityResponse_policies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEmailIdentityResponse' {Maybe (HashMap Text Text)
policies :: Maybe (HashMap Text Text)
$sel:policies:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe (HashMap Text Text)
policies} -> Maybe (HashMap Text Text)
policies) (\s :: GetEmailIdentityResponse
s@GetEmailIdentityResponse' {} Maybe (HashMap Text Text)
a -> GetEmailIdentityResponse
s {$sel:policies:GetEmailIdentityResponse' :: Maybe (HashMap Text Text)
policies = Maybe (HashMap Text Text)
a} :: GetEmailIdentityResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An array of objects that define the tags (keys and values) that are
-- associated with the email identity.
getEmailIdentityResponse_tags :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe [Tag])
getEmailIdentityResponse_tags :: Lens' GetEmailIdentityResponse (Maybe [Tag])
getEmailIdentityResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEmailIdentityResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: GetEmailIdentityResponse
s@GetEmailIdentityResponse' {} Maybe [Tag]
a -> GetEmailIdentityResponse
s {$sel:tags:GetEmailIdentityResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: GetEmailIdentityResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The verification status of the identity. The status can be one of the
-- following:
--
-- -   @PENDING@ – The verification process was initiated, but Amazon SES
--     hasn\'t yet been able to verify the identity.
--
-- -   @SUCCESS@ – The verification process completed successfully.
--
-- -   @FAILED@ – The verification process failed.
--
-- -   @TEMPORARY_FAILURE@ – A temporary issue is preventing Amazon SES
--     from determining the verification status of the identity.
--
-- -   @NOT_STARTED@ – The verification process hasn\'t been initiated for
--     the identity.
getEmailIdentityResponse_verificationStatus :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe VerificationStatus)
getEmailIdentityResponse_verificationStatus :: Lens' GetEmailIdentityResponse (Maybe VerificationStatus)
getEmailIdentityResponse_verificationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEmailIdentityResponse' {Maybe VerificationStatus
verificationStatus :: Maybe VerificationStatus
$sel:verificationStatus:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe VerificationStatus
verificationStatus} -> Maybe VerificationStatus
verificationStatus) (\s :: GetEmailIdentityResponse
s@GetEmailIdentityResponse' {} Maybe VerificationStatus
a -> GetEmailIdentityResponse
s {$sel:verificationStatus:GetEmailIdentityResponse' :: Maybe VerificationStatus
verificationStatus = Maybe VerificationStatus
a} :: GetEmailIdentityResponse)

-- | Specifies whether or not the identity is verified. You can only send
-- email from verified email addresses or domains. For more information
-- about verifying identities, see the
-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-email-manage-verify.html Amazon Pinpoint User Guide>.
getEmailIdentityResponse_verifiedForSendingStatus :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe Prelude.Bool)
getEmailIdentityResponse_verifiedForSendingStatus :: Lens' GetEmailIdentityResponse (Maybe Bool)
getEmailIdentityResponse_verifiedForSendingStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEmailIdentityResponse' {Maybe Bool
verifiedForSendingStatus :: Maybe Bool
$sel:verifiedForSendingStatus:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe Bool
verifiedForSendingStatus} -> Maybe Bool
verifiedForSendingStatus) (\s :: GetEmailIdentityResponse
s@GetEmailIdentityResponse' {} Maybe Bool
a -> GetEmailIdentityResponse
s {$sel:verifiedForSendingStatus:GetEmailIdentityResponse' :: Maybe Bool
verifiedForSendingStatus = Maybe Bool
a} :: GetEmailIdentityResponse)

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

instance Prelude.NFData GetEmailIdentityResponse where
  rnf :: GetEmailIdentityResponse -> ()
rnf GetEmailIdentityResponse' {Int
Maybe Bool
Maybe [Tag]
Maybe Text
Maybe (HashMap Text Text)
Maybe DkimAttributes
Maybe IdentityType
Maybe MailFromAttributes
Maybe VerificationStatus
httpStatus :: Int
verifiedForSendingStatus :: Maybe Bool
verificationStatus :: Maybe VerificationStatus
tags :: Maybe [Tag]
policies :: Maybe (HashMap Text Text)
mailFromAttributes :: Maybe MailFromAttributes
identityType :: Maybe IdentityType
feedbackForwardingStatus :: Maybe Bool
dkimAttributes :: Maybe DkimAttributes
configurationSetName :: Maybe Text
$sel:httpStatus:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Int
$sel:verifiedForSendingStatus:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe Bool
$sel:verificationStatus:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe VerificationStatus
$sel:tags:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe [Tag]
$sel:policies:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe (HashMap Text Text)
$sel:mailFromAttributes:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe MailFromAttributes
$sel:identityType:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe IdentityType
$sel:feedbackForwardingStatus:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe Bool
$sel:dkimAttributes:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe DkimAttributes
$sel:configurationSetName:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationSetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DkimAttributes
dkimAttributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
feedbackForwardingStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IdentityType
identityType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MailFromAttributes
mailFromAttributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
policies
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VerificationStatus
verificationStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
verifiedForSendingStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus