{-# 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-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 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_feedbackForwardingStatus,
    getEmailIdentityResponse_identityType,
    getEmailIdentityResponse_mailFromAttributes,
    getEmailIdentityResponse_tags,
    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 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
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 that you want to retrieve details for.
newGetEmailIdentity ::
  -- | 'emailIdentity'
  Prelude.Text ->
  GetEmailIdentity
newGetEmailIdentity :: Text -> GetEmailIdentity
newGetEmailIdentity Text
pEmailIdentity_ =
  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 :: 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 DkimAttributes
-> Maybe Bool
-> Maybe IdentityType
-> Maybe MailFromAttributes
-> Maybe [Tag]
-> 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
"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
"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
"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
"/v1/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'
  { -- | 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,
    -- | 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,
    -- | 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,
    -- | 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],
    -- | 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 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:
--
-- '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.
--
-- '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).
--
-- 'identityType', 'getEmailIdentityResponse_identityType' - The email identity type.
--
-- 'mailFromAttributes', 'getEmailIdentityResponse_mailFromAttributes' - An object that contains information about the Mail-From attributes for
-- the email identity.
--
-- 'tags', 'getEmailIdentityResponse_tags' - An array of objects that define the tags (keys and values) that are
-- associated with the email identity.
--
-- '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>.
--
-- 'httpStatus', 'getEmailIdentityResponse_httpStatus' - The response's http status code.
newGetEmailIdentityResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetEmailIdentityResponse
newGetEmailIdentityResponse :: Int -> GetEmailIdentityResponse
newGetEmailIdentityResponse Int
pHttpStatus_ =
  GetEmailIdentityResponse'
    { $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:tags:GetEmailIdentityResponse' :: Maybe [Tag]
tags = 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_
    }

-- | 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 :: 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@, 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 :: 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.
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)

-- | 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

-- | 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 :: 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 DkimAttributes
Maybe IdentityType
Maybe MailFromAttributes
httpStatus :: Int
verifiedForSendingStatus :: Maybe Bool
tags :: Maybe [Tag]
mailFromAttributes :: Maybe MailFromAttributes
identityType :: Maybe IdentityType
feedbackForwardingStatus :: Maybe Bool
dkimAttributes :: Maybe DkimAttributes
$sel:httpStatus:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Int
$sel:verifiedForSendingStatus:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe Bool
$sel:tags:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe [Tag]
$sel:mailFromAttributes:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe MailFromAttributes
$sel:identityType:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe IdentityType
$sel:feedbackForwardingStatus:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe Bool
$sel:dkimAttributes:GetEmailIdentityResponse' :: GetEmailIdentityResponse -> Maybe DkimAttributes
..} =
    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 [Tag]
tags
      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