{-# 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.GetEmailIdentity
-- 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)
--
-- Provides information about a specific identity associated with your
-- Amazon Pinpoint account, including the identity\'s verification status,
-- its DKIM authentication status, and its custom Mail-From settings.
module Amazonka.PinpointEmail.GetEmailIdentity
  ( -- * Creating a Request
    GetEmailIdentity (..),
    newGetEmailIdentity,

    -- * Request Lenses
    getEmailIdentity_emailIdentity,

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

    -- * Response Lenses
    getEmailIdentityResponse_dkimAttributes,
    getEmailIdentityResponse_verifiedForSendingStatus,
    getEmailIdentityResponse_identityType,
    getEmailIdentityResponse_mailFromAttributes,
    getEmailIdentityResponse_feedbackForwardingStatus,
    getEmailIdentityResponse_tags,
    getEmailIdentityResponse_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 return details about an email identity.
--
-- /See:/ 'newGetEmailIdentity' smart constructor.
data GetEmailIdentity = GetEmailIdentity'
  { -- | The email identity that you want to retrieve details for.
    GetEmailIdentity -> Text
emailIdentity :: Prelude.Text
  }
  deriving (GetEmailIdentity -> GetEmailIdentity -> Bool
(GetEmailIdentity -> GetEmailIdentity -> Bool)
-> (GetEmailIdentity -> GetEmailIdentity -> Bool)
-> Eq GetEmailIdentity
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]
(Int -> ReadS GetEmailIdentity)
-> ReadS [GetEmailIdentity]
-> ReadPrec GetEmailIdentity
-> ReadPrec [GetEmailIdentity]
-> Read 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
(Int -> GetEmailIdentity -> ShowS)
-> (GetEmailIdentity -> String)
-> ([GetEmailIdentity] -> ShowS)
-> Show GetEmailIdentity
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. GetEmailIdentity -> Rep GetEmailIdentity x)
-> (forall x. Rep GetEmailIdentity x -> GetEmailIdentity)
-> Generic GetEmailIdentity
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 that you want to retrieve details for.
newGetEmailIdentity ::
  -- | 'emailIdentity'
  Prelude.Text ->
  GetEmailIdentity
newGetEmailIdentity :: Text -> GetEmailIdentity
newGetEmailIdentity Text
pEmailIdentity_ =
  GetEmailIdentity' :: Text -> GetEmailIdentity
GetEmailIdentity' {$sel:emailIdentity:GetEmailIdentity' :: Text
emailIdentity = Text
pEmailIdentity_}

-- | The email identity that you want to retrieve details for.
getEmailIdentity_emailIdentity :: Lens.Lens' GetEmailIdentity Prelude.Text
getEmailIdentity_emailIdentity :: (Text -> f Text) -> GetEmailIdentity -> f GetEmailIdentity
getEmailIdentity_emailIdentity = (GetEmailIdentity -> Text)
-> (GetEmailIdentity -> Text -> GetEmailIdentity)
-> Lens GetEmailIdentity GetEmailIdentity Text Text
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 :: GetEmailIdentity -> Request GetEmailIdentity
request = Service -> GetEmailIdentity -> Request GetEmailIdentity
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetEmailIdentity
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetEmailIdentity)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetEmailIdentity))
-> Logger
-> Service
-> Proxy GetEmailIdentity
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetEmailIdentity)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe DkimAttributes
-> Maybe Bool
-> Maybe IdentityType
-> Maybe MailFromAttributes
-> Maybe Bool
-> Maybe [Tag]
-> Int
-> GetEmailIdentityResponse
GetEmailIdentityResponse'
            (Maybe DkimAttributes
 -> Maybe Bool
 -> Maybe IdentityType
 -> Maybe MailFromAttributes
 -> Maybe Bool
 -> Maybe [Tag]
 -> Int
 -> GetEmailIdentityResponse)
-> Either String (Maybe DkimAttributes)
-> Either
     String
     (Maybe Bool
      -> Maybe IdentityType
      -> Maybe MailFromAttributes
      -> Maybe Bool
      -> Maybe [Tag]
      -> Int
      -> GetEmailIdentityResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe DkimAttributes)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DkimAttributes")
            Either
  String
  (Maybe Bool
   -> Maybe IdentityType
   -> Maybe MailFromAttributes
   -> Maybe Bool
   -> Maybe [Tag]
   -> Int
   -> GetEmailIdentityResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe IdentityType
      -> Maybe MailFromAttributes
      -> Maybe Bool
      -> Maybe [Tag]
      -> Int
      -> GetEmailIdentityResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VerifiedForSendingStatus")
            Either
  String
  (Maybe IdentityType
   -> Maybe MailFromAttributes
   -> Maybe Bool
   -> Maybe [Tag]
   -> Int
   -> GetEmailIdentityResponse)
-> Either String (Maybe IdentityType)
-> Either
     String
     (Maybe MailFromAttributes
      -> Maybe Bool -> Maybe [Tag] -> Int -> GetEmailIdentityResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe IdentityType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IdentityType")
            Either
  String
  (Maybe MailFromAttributes
   -> Maybe Bool -> Maybe [Tag] -> Int -> GetEmailIdentityResponse)
-> Either String (Maybe MailFromAttributes)
-> Either
     String
     (Maybe Bool -> Maybe [Tag] -> Int -> GetEmailIdentityResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe MailFromAttributes)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MailFromAttributes")
            Either
  String
  (Maybe Bool -> Maybe [Tag] -> Int -> GetEmailIdentityResponse)
-> Either String (Maybe Bool)
-> Either String (Maybe [Tag] -> Int -> GetEmailIdentityResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FeedbackForwardingStatus")
            Either String (Maybe [Tag] -> Int -> GetEmailIdentityResponse)
-> Either String (Maybe [Tag])
-> Either String (Int -> GetEmailIdentityResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe [Tag]))
-> Maybe [Tag] -> Either String (Maybe [Tag])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetEmailIdentityResponse)
-> Either String Int -> Either String GetEmailIdentityResponse
forall (f :: * -> *) a b. Applicative f => 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 GetEmailIdentity

instance Prelude.NFData GetEmailIdentity

instance Core.ToHeaders GetEmailIdentity where
  toHeaders :: GetEmailIdentity -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetEmailIdentity -> 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.ToPath GetEmailIdentity where
  toPath :: GetEmailIdentity -> ByteString
toPath GetEmailIdentity' {Text
emailIdentity :: Text
$sel:emailIdentity:GetEmailIdentity' :: GetEmailIdentity -> 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]

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

-- | Details about an email identity.
--
-- /See:/ 'newGetEmailIdentityResponse' smart constructor.
data GetEmailIdentityResponse = GetEmailIdentityResponse'
  { -- | An object that contains information about the DKIM attributes for the
    -- identity. This object includes the tokens that you use to create the
    -- CNAME records that are required to complete the DKIM verification
    -- process.
    GetEmailIdentityResponse -> Maybe DkimAttributes
dkimAttributes :: Prelude.Maybe DkimAttributes,
    -- | Specifies whether or not the identity is verified. In Amazon Pinpoint,
    -- 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 email identity type.
    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,
    -- | The feedback forwarding configuration for the identity.
    --
    -- If the value is @true@, Amazon Pinpoint sends you email notifications
    -- when bounce or complaint events occur. Amazon Pinpoint sends this
    -- notification to the address that you specified in the Return-Path header
    -- of the original email.
    --
    -- When you set this value to @false@, Amazon Pinpoint sends notifications
    -- through other mechanisms, such as by notifying an Amazon SNS topic or
    -- another event destination. 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, Amazon Pinpoint sends an
    -- email notification when these events occur (even if this setting is
    -- disabled).
    GetEmailIdentityResponse -> Maybe Bool
feedbackForwardingStatus :: Prelude.Maybe Prelude.Bool,
    -- | 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 response's http status code.
    GetEmailIdentityResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetEmailIdentityResponse -> GetEmailIdentityResponse -> Bool
(GetEmailIdentityResponse -> GetEmailIdentityResponse -> Bool)
-> (GetEmailIdentityResponse -> GetEmailIdentityResponse -> Bool)
-> Eq GetEmailIdentityResponse
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]
(Int -> ReadS GetEmailIdentityResponse)
-> ReadS [GetEmailIdentityResponse]
-> ReadPrec GetEmailIdentityResponse
-> ReadPrec [GetEmailIdentityResponse]
-> Read 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
(Int -> GetEmailIdentityResponse -> ShowS)
-> (GetEmailIdentityResponse -> String)
-> ([GetEmailIdentityResponse] -> ShowS)
-> Show GetEmailIdentityResponse
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.
 GetEmailIdentityResponse -> Rep GetEmailIdentityResponse x)
-> (forall x.
    Rep GetEmailIdentityResponse x -> GetEmailIdentityResponse)
-> Generic GetEmailIdentityResponse
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:
--
-- 'dkimAttributes', 'getEmailIdentityResponse_dkimAttributes' - An object that contains information about the DKIM attributes for the
-- identity. This object includes the tokens that you use to create the
-- CNAME records that are required to complete the DKIM verification
-- process.
--
-- 'verifiedForSendingStatus', 'getEmailIdentityResponse_verifiedForSendingStatus' - Specifies whether or not the identity is verified. In Amazon Pinpoint,
-- 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>.
--
-- 'identityType', 'getEmailIdentityResponse_identityType' - The email identity type.
--
-- 'mailFromAttributes', 'getEmailIdentityResponse_mailFromAttributes' - An object that contains information about the Mail-From attributes for
-- the email identity.
--
-- 'feedbackForwardingStatus', 'getEmailIdentityResponse_feedbackForwardingStatus' - The feedback forwarding configuration for the identity.
--
-- If the value is @true@, Amazon Pinpoint sends you email notifications
-- when bounce or complaint events occur. Amazon Pinpoint sends this
-- notification to the address that you specified in the Return-Path header
-- of the original email.
--
-- When you set this value to @false@, Amazon Pinpoint sends notifications
-- through other mechanisms, such as by notifying an Amazon SNS topic or
-- another event destination. 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, Amazon Pinpoint sends an
-- email notification when these events occur (even if this setting is
-- disabled).
--
-- 'tags', 'getEmailIdentityResponse_tags' - An array of objects that define the tags (keys and values) that are
-- associated with the email identity.
--
-- 'httpStatus', 'getEmailIdentityResponse_httpStatus' - The response's http status code.
newGetEmailIdentityResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetEmailIdentityResponse
newGetEmailIdentityResponse :: Int -> GetEmailIdentityResponse
newGetEmailIdentityResponse Int
pHttpStatus_ =
  GetEmailIdentityResponse' :: Maybe DkimAttributes
-> Maybe Bool
-> Maybe IdentityType
-> Maybe MailFromAttributes
-> Maybe Bool
-> Maybe [Tag]
-> Int
-> GetEmailIdentityResponse
GetEmailIdentityResponse'
    { $sel:dkimAttributes:GetEmailIdentityResponse' :: Maybe DkimAttributes
dkimAttributes =
        Maybe DkimAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:verifiedForSendingStatus:GetEmailIdentityResponse' :: Maybe Bool
verifiedForSendingStatus = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:identityType:GetEmailIdentityResponse' :: Maybe IdentityType
identityType = Maybe IdentityType
forall a. Maybe a
Prelude.Nothing,
      $sel:mailFromAttributes:GetEmailIdentityResponse' :: Maybe MailFromAttributes
mailFromAttributes = Maybe MailFromAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:feedbackForwardingStatus:GetEmailIdentityResponse' :: Maybe Bool
feedbackForwardingStatus = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetEmailIdentityResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetEmailIdentityResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An object that contains information about the DKIM attributes for the
-- identity. This object includes the tokens that you use to create the
-- CNAME records that are required to complete the DKIM verification
-- process.
getEmailIdentityResponse_dkimAttributes :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe DkimAttributes)
getEmailIdentityResponse_dkimAttributes :: (Maybe DkimAttributes -> f (Maybe DkimAttributes))
-> GetEmailIdentityResponse -> f GetEmailIdentityResponse
getEmailIdentityResponse_dkimAttributes = (GetEmailIdentityResponse -> Maybe DkimAttributes)
-> (GetEmailIdentityResponse
    -> Maybe DkimAttributes -> GetEmailIdentityResponse)
-> Lens
     GetEmailIdentityResponse
     GetEmailIdentityResponse
     (Maybe DkimAttributes)
     (Maybe 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)

-- | Specifies whether or not the identity is verified. In Amazon Pinpoint,
-- 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 :: (Maybe Bool -> f (Maybe Bool))
-> GetEmailIdentityResponse -> f GetEmailIdentityResponse
getEmailIdentityResponse_verifiedForSendingStatus = (GetEmailIdentityResponse -> Maybe Bool)
-> (GetEmailIdentityResponse
    -> Maybe Bool -> GetEmailIdentityResponse)
-> Lens
     GetEmailIdentityResponse
     GetEmailIdentityResponse
     (Maybe Bool)
     (Maybe Bool)
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 email identity type.
getEmailIdentityResponse_identityType :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe IdentityType)
getEmailIdentityResponse_identityType :: (Maybe IdentityType -> f (Maybe IdentityType))
-> GetEmailIdentityResponse -> f GetEmailIdentityResponse
getEmailIdentityResponse_identityType = (GetEmailIdentityResponse -> Maybe IdentityType)
-> (GetEmailIdentityResponse
    -> Maybe IdentityType -> GetEmailIdentityResponse)
-> Lens
     GetEmailIdentityResponse
     GetEmailIdentityResponse
     (Maybe IdentityType)
     (Maybe 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 :: (Maybe MailFromAttributes -> f (Maybe MailFromAttributes))
-> GetEmailIdentityResponse -> f GetEmailIdentityResponse
getEmailIdentityResponse_mailFromAttributes = (GetEmailIdentityResponse -> Maybe MailFromAttributes)
-> (GetEmailIdentityResponse
    -> Maybe MailFromAttributes -> GetEmailIdentityResponse)
-> Lens
     GetEmailIdentityResponse
     GetEmailIdentityResponse
     (Maybe MailFromAttributes)
     (Maybe 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)

-- | The feedback forwarding configuration for the identity.
--
-- If the value is @true@, Amazon Pinpoint sends you email notifications
-- when bounce or complaint events occur. Amazon Pinpoint sends this
-- notification to the address that you specified in the Return-Path header
-- of the original email.
--
-- When you set this value to @false@, Amazon Pinpoint sends notifications
-- through other mechanisms, such as by notifying an Amazon SNS topic or
-- another event destination. 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, Amazon Pinpoint sends an
-- email notification when these events occur (even if this setting is
-- disabled).
getEmailIdentityResponse_feedbackForwardingStatus :: Lens.Lens' GetEmailIdentityResponse (Prelude.Maybe Prelude.Bool)
getEmailIdentityResponse_feedbackForwardingStatus :: (Maybe Bool -> f (Maybe Bool))
-> GetEmailIdentityResponse -> f GetEmailIdentityResponse
getEmailIdentityResponse_feedbackForwardingStatus = (GetEmailIdentityResponse -> Maybe Bool)
-> (GetEmailIdentityResponse
    -> Maybe Bool -> GetEmailIdentityResponse)
-> Lens
     GetEmailIdentityResponse
     GetEmailIdentityResponse
     (Maybe Bool)
     (Maybe Bool)
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)

-- | 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 :: (Maybe [Tag] -> f (Maybe [Tag]))
-> GetEmailIdentityResponse -> f GetEmailIdentityResponse
getEmailIdentityResponse_tags = (GetEmailIdentityResponse -> Maybe [Tag])
-> (GetEmailIdentityResponse
    -> Maybe [Tag] -> GetEmailIdentityResponse)
-> Lens
     GetEmailIdentityResponse
     GetEmailIdentityResponse
     (Maybe [Tag])
     (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> GetEmailIdentityResponse -> f GetEmailIdentityResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> GetEmailIdentityResponse
-> f GetEmailIdentityResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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