{-# 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.PutEmailIdentityDkimSigningAttributes
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Used to configure or change the DKIM authentication settings for an
-- email domain identity. You can use this operation to do any of the
-- following:
--
-- -   Update the signing attributes for an identity that uses Bring Your
--     Own DKIM (BYODKIM).
--
-- -   Update the key length that should be used for Easy DKIM.
--
-- -   Change from using no DKIM authentication to using Easy DKIM.
--
-- -   Change from using no DKIM authentication to using BYODKIM.
--
-- -   Change from using Easy DKIM to using BYODKIM.
--
-- -   Change from using BYODKIM to using Easy DKIM.
module Amazonka.SESV2.PutEmailIdentityDkimSigningAttributes
  ( -- * Creating a Request
    PutEmailIdentityDkimSigningAttributes (..),
    newPutEmailIdentityDkimSigningAttributes,

    -- * Request Lenses
    putEmailIdentityDkimSigningAttributes_signingAttributes,
    putEmailIdentityDkimSigningAttributes_emailIdentity,
    putEmailIdentityDkimSigningAttributes_signingAttributesOrigin,

    -- * Destructuring the Response
    PutEmailIdentityDkimSigningAttributesResponse (..),
    newPutEmailIdentityDkimSigningAttributesResponse,

    -- * Response Lenses
    putEmailIdentityDkimSigningAttributesResponse_dkimStatus,
    putEmailIdentityDkimSigningAttributesResponse_dkimTokens,
    putEmailIdentityDkimSigningAttributesResponse_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 change the DKIM attributes for an email identity.
--
-- /See:/ 'newPutEmailIdentityDkimSigningAttributes' smart constructor.
data PutEmailIdentityDkimSigningAttributes = PutEmailIdentityDkimSigningAttributes'
  { -- | An object that contains information about the private key and selector
    -- that you want to use to configure DKIM for the identity for Bring Your
    -- Own DKIM (BYODKIM) for the identity, or, configures the key length to be
    -- used for
    -- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>.
    PutEmailIdentityDkimSigningAttributes
-> Maybe DkimSigningAttributes
signingAttributes :: Prelude.Maybe DkimSigningAttributes,
    -- | The email identity.
    PutEmailIdentityDkimSigningAttributes -> Text
emailIdentity :: Prelude.Text,
    -- | The method to use to configure DKIM for the identity. There are the
    -- following possible values:
    --
    -- -   @AWS_SES@ – Configure DKIM for the identity by using
    --     <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>.
    --
    -- -   @EXTERNAL@ – Configure DKIM for the identity by using Bring Your Own
    --     DKIM (BYODKIM).
    PutEmailIdentityDkimSigningAttributes
-> DkimSigningAttributesOrigin
signingAttributesOrigin :: DkimSigningAttributesOrigin
  }
  deriving (PutEmailIdentityDkimSigningAttributes
-> PutEmailIdentityDkimSigningAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutEmailIdentityDkimSigningAttributes
-> PutEmailIdentityDkimSigningAttributes -> Bool
$c/= :: PutEmailIdentityDkimSigningAttributes
-> PutEmailIdentityDkimSigningAttributes -> Bool
== :: PutEmailIdentityDkimSigningAttributes
-> PutEmailIdentityDkimSigningAttributes -> Bool
$c== :: PutEmailIdentityDkimSigningAttributes
-> PutEmailIdentityDkimSigningAttributes -> Bool
Prelude.Eq, Int -> PutEmailIdentityDkimSigningAttributes -> ShowS
[PutEmailIdentityDkimSigningAttributes] -> ShowS
PutEmailIdentityDkimSigningAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutEmailIdentityDkimSigningAttributes] -> ShowS
$cshowList :: [PutEmailIdentityDkimSigningAttributes] -> ShowS
show :: PutEmailIdentityDkimSigningAttributes -> String
$cshow :: PutEmailIdentityDkimSigningAttributes -> String
showsPrec :: Int -> PutEmailIdentityDkimSigningAttributes -> ShowS
$cshowsPrec :: Int -> PutEmailIdentityDkimSigningAttributes -> ShowS
Prelude.Show, forall x.
Rep PutEmailIdentityDkimSigningAttributes x
-> PutEmailIdentityDkimSigningAttributes
forall x.
PutEmailIdentityDkimSigningAttributes
-> Rep PutEmailIdentityDkimSigningAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutEmailIdentityDkimSigningAttributes x
-> PutEmailIdentityDkimSigningAttributes
$cfrom :: forall x.
PutEmailIdentityDkimSigningAttributes
-> Rep PutEmailIdentityDkimSigningAttributes x
Prelude.Generic)

-- |
-- Create a value of 'PutEmailIdentityDkimSigningAttributes' 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:
--
-- 'signingAttributes', 'putEmailIdentityDkimSigningAttributes_signingAttributes' - An object that contains information about the private key and selector
-- that you want to use to configure DKIM for the identity for Bring Your
-- Own DKIM (BYODKIM) for the identity, or, configures the key length to be
-- used for
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>.
--
-- 'emailIdentity', 'putEmailIdentityDkimSigningAttributes_emailIdentity' - The email identity.
--
-- 'signingAttributesOrigin', 'putEmailIdentityDkimSigningAttributes_signingAttributesOrigin' - The method to use to configure DKIM for the identity. There are the
-- following possible values:
--
-- -   @AWS_SES@ – Configure DKIM for the identity by using
--     <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>.
--
-- -   @EXTERNAL@ – Configure DKIM for the identity by using Bring Your Own
--     DKIM (BYODKIM).
newPutEmailIdentityDkimSigningAttributes ::
  -- | 'emailIdentity'
  Prelude.Text ->
  -- | 'signingAttributesOrigin'
  DkimSigningAttributesOrigin ->
  PutEmailIdentityDkimSigningAttributes
newPutEmailIdentityDkimSigningAttributes :: Text
-> DkimSigningAttributesOrigin
-> PutEmailIdentityDkimSigningAttributes
newPutEmailIdentityDkimSigningAttributes
  Text
pEmailIdentity_
  DkimSigningAttributesOrigin
pSigningAttributesOrigin_ =
    PutEmailIdentityDkimSigningAttributes'
      { $sel:signingAttributes:PutEmailIdentityDkimSigningAttributes' :: Maybe DkimSigningAttributes
signingAttributes =
          forall a. Maybe a
Prelude.Nothing,
        $sel:emailIdentity:PutEmailIdentityDkimSigningAttributes' :: Text
emailIdentity = Text
pEmailIdentity_,
        $sel:signingAttributesOrigin:PutEmailIdentityDkimSigningAttributes' :: DkimSigningAttributesOrigin
signingAttributesOrigin =
          DkimSigningAttributesOrigin
pSigningAttributesOrigin_
      }

-- | An object that contains information about the private key and selector
-- that you want to use to configure DKIM for the identity for Bring Your
-- Own DKIM (BYODKIM) for the identity, or, configures the key length to be
-- used for
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>.
putEmailIdentityDkimSigningAttributes_signingAttributes :: Lens.Lens' PutEmailIdentityDkimSigningAttributes (Prelude.Maybe DkimSigningAttributes)
putEmailIdentityDkimSigningAttributes_signingAttributes :: Lens'
  PutEmailIdentityDkimSigningAttributes (Maybe DkimSigningAttributes)
putEmailIdentityDkimSigningAttributes_signingAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEmailIdentityDkimSigningAttributes' {Maybe DkimSigningAttributes
signingAttributes :: Maybe DkimSigningAttributes
$sel:signingAttributes:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes
-> Maybe DkimSigningAttributes
signingAttributes} -> Maybe DkimSigningAttributes
signingAttributes) (\s :: PutEmailIdentityDkimSigningAttributes
s@PutEmailIdentityDkimSigningAttributes' {} Maybe DkimSigningAttributes
a -> PutEmailIdentityDkimSigningAttributes
s {$sel:signingAttributes:PutEmailIdentityDkimSigningAttributes' :: Maybe DkimSigningAttributes
signingAttributes = Maybe DkimSigningAttributes
a} :: PutEmailIdentityDkimSigningAttributes)

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

-- | The method to use to configure DKIM for the identity. There are the
-- following possible values:
--
-- -   @AWS_SES@ – Configure DKIM for the identity by using
--     <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>.
--
-- -   @EXTERNAL@ – Configure DKIM for the identity by using Bring Your Own
--     DKIM (BYODKIM).
putEmailIdentityDkimSigningAttributes_signingAttributesOrigin :: Lens.Lens' PutEmailIdentityDkimSigningAttributes DkimSigningAttributesOrigin
putEmailIdentityDkimSigningAttributes_signingAttributesOrigin :: Lens'
  PutEmailIdentityDkimSigningAttributes DkimSigningAttributesOrigin
putEmailIdentityDkimSigningAttributes_signingAttributesOrigin = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEmailIdentityDkimSigningAttributes' {DkimSigningAttributesOrigin
signingAttributesOrigin :: DkimSigningAttributesOrigin
$sel:signingAttributesOrigin:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes
-> DkimSigningAttributesOrigin
signingAttributesOrigin} -> DkimSigningAttributesOrigin
signingAttributesOrigin) (\s :: PutEmailIdentityDkimSigningAttributes
s@PutEmailIdentityDkimSigningAttributes' {} DkimSigningAttributesOrigin
a -> PutEmailIdentityDkimSigningAttributes
s {$sel:signingAttributesOrigin:PutEmailIdentityDkimSigningAttributes' :: DkimSigningAttributesOrigin
signingAttributesOrigin = DkimSigningAttributesOrigin
a} :: PutEmailIdentityDkimSigningAttributes)

instance
  Core.AWSRequest
    PutEmailIdentityDkimSigningAttributes
  where
  type
    AWSResponse
      PutEmailIdentityDkimSigningAttributes =
      PutEmailIdentityDkimSigningAttributesResponse
  request :: (Service -> Service)
-> PutEmailIdentityDkimSigningAttributes
-> Request PutEmailIdentityDkimSigningAttributes
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PutEmailIdentityDkimSigningAttributes
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse PutEmailIdentityDkimSigningAttributes)))
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 DkimStatus
-> Maybe [Text]
-> Int
-> PutEmailIdentityDkimSigningAttributesResponse
PutEmailIdentityDkimSigningAttributesResponse'
            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
"DkimStatus")
            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
"DkimTokens" 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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    PutEmailIdentityDkimSigningAttributes
  where
  hashWithSalt :: Int -> PutEmailIdentityDkimSigningAttributes -> Int
hashWithSalt
    Int
_salt
    PutEmailIdentityDkimSigningAttributes' {Maybe DkimSigningAttributes
Text
DkimSigningAttributesOrigin
signingAttributesOrigin :: DkimSigningAttributesOrigin
emailIdentity :: Text
signingAttributes :: Maybe DkimSigningAttributes
$sel:signingAttributesOrigin:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes
-> DkimSigningAttributesOrigin
$sel:emailIdentity:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes -> Text
$sel:signingAttributes:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes
-> Maybe DkimSigningAttributes
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DkimSigningAttributes
signingAttributes
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
emailIdentity
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DkimSigningAttributesOrigin
signingAttributesOrigin

instance
  Prelude.NFData
    PutEmailIdentityDkimSigningAttributes
  where
  rnf :: PutEmailIdentityDkimSigningAttributes -> ()
rnf PutEmailIdentityDkimSigningAttributes' {Maybe DkimSigningAttributes
Text
DkimSigningAttributesOrigin
signingAttributesOrigin :: DkimSigningAttributesOrigin
emailIdentity :: Text
signingAttributes :: Maybe DkimSigningAttributes
$sel:signingAttributesOrigin:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes
-> DkimSigningAttributesOrigin
$sel:emailIdentity:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes -> Text
$sel:signingAttributes:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes
-> Maybe DkimSigningAttributes
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe DkimSigningAttributes
signingAttributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
emailIdentity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DkimSigningAttributesOrigin
signingAttributesOrigin

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

instance
  Data.ToJSON
    PutEmailIdentityDkimSigningAttributes
  where
  toJSON :: PutEmailIdentityDkimSigningAttributes -> Value
toJSON PutEmailIdentityDkimSigningAttributes' {Maybe DkimSigningAttributes
Text
DkimSigningAttributesOrigin
signingAttributesOrigin :: DkimSigningAttributesOrigin
emailIdentity :: Text
signingAttributes :: Maybe DkimSigningAttributes
$sel:signingAttributesOrigin:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes
-> DkimSigningAttributesOrigin
$sel:emailIdentity:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes -> Text
$sel:signingAttributes:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes
-> Maybe DkimSigningAttributes
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"SigningAttributes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DkimSigningAttributes
signingAttributes,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"SigningAttributesOrigin"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DkimSigningAttributesOrigin
signingAttributesOrigin
              )
          ]
      )

instance
  Data.ToPath
    PutEmailIdentityDkimSigningAttributes
  where
  toPath :: PutEmailIdentityDkimSigningAttributes -> ByteString
toPath PutEmailIdentityDkimSigningAttributes' {Maybe DkimSigningAttributes
Text
DkimSigningAttributesOrigin
signingAttributesOrigin :: DkimSigningAttributesOrigin
emailIdentity :: Text
signingAttributes :: Maybe DkimSigningAttributes
$sel:signingAttributesOrigin:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes
-> DkimSigningAttributesOrigin
$sel:emailIdentity:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes -> Text
$sel:signingAttributes:PutEmailIdentityDkimSigningAttributes' :: PutEmailIdentityDkimSigningAttributes
-> Maybe DkimSigningAttributes
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v1/email/identities/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
emailIdentity,
        ByteString
"/dkim/signing"
      ]

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

-- | If the action is successful, the service sends back an HTTP 200
-- response.
--
-- The following data is returned in JSON format by the service.
--
-- /See:/ 'newPutEmailIdentityDkimSigningAttributesResponse' smart constructor.
data PutEmailIdentityDkimSigningAttributesResponse = PutEmailIdentityDkimSigningAttributesResponse'
  { -- | The DKIM authentication status of the identity. Amazon SES determines
    -- the authentication status by searching for specific records in the DNS
    -- configuration for your domain. If you used
    -- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>
    -- to set up DKIM authentication, Amazon SES tries to find three unique
    -- CNAME records in the DNS configuration for your domain.
    --
    -- If you provided a public key to perform DKIM authentication, Amazon SES
    -- tries to find a TXT record that uses the selector that you specified.
    -- The value of the TXT record must be a public key that\'s paired with the
    -- private key that you specified in the process of creating the identity.
    --
    -- The status can be one of the following:
    --
    -- -   @PENDING@ – The verification process was initiated, but Amazon SES
    --     hasn\'t yet detected the DKIM records in the DNS configuration for
    --     the domain.
    --
    -- -   @SUCCESS@ – The verification process completed successfully.
    --
    -- -   @FAILED@ – The verification process failed. This typically occurs
    --     when Amazon SES fails to find the DKIM records in the DNS
    --     configuration of the domain.
    --
    -- -   @TEMPORARY_FAILURE@ – A temporary issue is preventing Amazon SES
    --     from determining the DKIM authentication status of the domain.
    --
    -- -   @NOT_STARTED@ – The DKIM verification process hasn\'t been initiated
    --     for the domain.
    PutEmailIdentityDkimSigningAttributesResponse -> Maybe DkimStatus
dkimStatus :: Prelude.Maybe DkimStatus,
    -- | If you used
    -- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>
    -- to configure DKIM authentication for the domain, then this object
    -- contains a set of unique strings that you use to create a set of CNAME
    -- records that you add to the DNS configuration for your domain. When
    -- Amazon SES detects these records in the DNS configuration for your
    -- domain, the DKIM authentication process is complete.
    --
    -- If you configured DKIM authentication for the domain by providing your
    -- own public-private key pair, then this object contains the selector
    -- that\'s associated with your public key.
    --
    -- Regardless of the DKIM authentication method you use, Amazon SES
    -- searches for the appropriate records in the DNS configuration of the
    -- domain for up to 72 hours.
    PutEmailIdentityDkimSigningAttributesResponse -> Maybe [Text]
dkimTokens :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    PutEmailIdentityDkimSigningAttributesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutEmailIdentityDkimSigningAttributesResponse
-> PutEmailIdentityDkimSigningAttributesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutEmailIdentityDkimSigningAttributesResponse
-> PutEmailIdentityDkimSigningAttributesResponse -> Bool
$c/= :: PutEmailIdentityDkimSigningAttributesResponse
-> PutEmailIdentityDkimSigningAttributesResponse -> Bool
== :: PutEmailIdentityDkimSigningAttributesResponse
-> PutEmailIdentityDkimSigningAttributesResponse -> Bool
$c== :: PutEmailIdentityDkimSigningAttributesResponse
-> PutEmailIdentityDkimSigningAttributesResponse -> Bool
Prelude.Eq, ReadPrec [PutEmailIdentityDkimSigningAttributesResponse]
ReadPrec PutEmailIdentityDkimSigningAttributesResponse
Int -> ReadS PutEmailIdentityDkimSigningAttributesResponse
ReadS [PutEmailIdentityDkimSigningAttributesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutEmailIdentityDkimSigningAttributesResponse]
$creadListPrec :: ReadPrec [PutEmailIdentityDkimSigningAttributesResponse]
readPrec :: ReadPrec PutEmailIdentityDkimSigningAttributesResponse
$creadPrec :: ReadPrec PutEmailIdentityDkimSigningAttributesResponse
readList :: ReadS [PutEmailIdentityDkimSigningAttributesResponse]
$creadList :: ReadS [PutEmailIdentityDkimSigningAttributesResponse]
readsPrec :: Int -> ReadS PutEmailIdentityDkimSigningAttributesResponse
$creadsPrec :: Int -> ReadS PutEmailIdentityDkimSigningAttributesResponse
Prelude.Read, Int -> PutEmailIdentityDkimSigningAttributesResponse -> ShowS
[PutEmailIdentityDkimSigningAttributesResponse] -> ShowS
PutEmailIdentityDkimSigningAttributesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutEmailIdentityDkimSigningAttributesResponse] -> ShowS
$cshowList :: [PutEmailIdentityDkimSigningAttributesResponse] -> ShowS
show :: PutEmailIdentityDkimSigningAttributesResponse -> String
$cshow :: PutEmailIdentityDkimSigningAttributesResponse -> String
showsPrec :: Int -> PutEmailIdentityDkimSigningAttributesResponse -> ShowS
$cshowsPrec :: Int -> PutEmailIdentityDkimSigningAttributesResponse -> ShowS
Prelude.Show, forall x.
Rep PutEmailIdentityDkimSigningAttributesResponse x
-> PutEmailIdentityDkimSigningAttributesResponse
forall x.
PutEmailIdentityDkimSigningAttributesResponse
-> Rep PutEmailIdentityDkimSigningAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutEmailIdentityDkimSigningAttributesResponse x
-> PutEmailIdentityDkimSigningAttributesResponse
$cfrom :: forall x.
PutEmailIdentityDkimSigningAttributesResponse
-> Rep PutEmailIdentityDkimSigningAttributesResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutEmailIdentityDkimSigningAttributesResponse' 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:
--
-- 'dkimStatus', 'putEmailIdentityDkimSigningAttributesResponse_dkimStatus' - The DKIM authentication status of the identity. Amazon SES determines
-- the authentication status by searching for specific records in the DNS
-- configuration for your domain. If you used
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>
-- to set up DKIM authentication, Amazon SES tries to find three unique
-- CNAME records in the DNS configuration for your domain.
--
-- If you provided a public key to perform DKIM authentication, Amazon SES
-- tries to find a TXT record that uses the selector that you specified.
-- The value of the TXT record must be a public key that\'s paired with the
-- private key that you specified in the process of creating the identity.
--
-- The status can be one of the following:
--
-- -   @PENDING@ – The verification process was initiated, but Amazon SES
--     hasn\'t yet detected the DKIM records in the DNS configuration for
--     the domain.
--
-- -   @SUCCESS@ – The verification process completed successfully.
--
-- -   @FAILED@ – The verification process failed. This typically occurs
--     when Amazon SES fails to find the DKIM records in the DNS
--     configuration of the domain.
--
-- -   @TEMPORARY_FAILURE@ – A temporary issue is preventing Amazon SES
--     from determining the DKIM authentication status of the domain.
--
-- -   @NOT_STARTED@ – The DKIM verification process hasn\'t been initiated
--     for the domain.
--
-- 'dkimTokens', 'putEmailIdentityDkimSigningAttributesResponse_dkimTokens' - If you used
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>
-- to configure DKIM authentication for the domain, then this object
-- contains a set of unique strings that you use to create a set of CNAME
-- records that you add to the DNS configuration for your domain. When
-- Amazon SES detects these records in the DNS configuration for your
-- domain, the DKIM authentication process is complete.
--
-- If you configured DKIM authentication for the domain by providing your
-- own public-private key pair, then this object contains the selector
-- that\'s associated with your public key.
--
-- Regardless of the DKIM authentication method you use, Amazon SES
-- searches for the appropriate records in the DNS configuration of the
-- domain for up to 72 hours.
--
-- 'httpStatus', 'putEmailIdentityDkimSigningAttributesResponse_httpStatus' - The response's http status code.
newPutEmailIdentityDkimSigningAttributesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutEmailIdentityDkimSigningAttributesResponse
newPutEmailIdentityDkimSigningAttributesResponse :: Int -> PutEmailIdentityDkimSigningAttributesResponse
newPutEmailIdentityDkimSigningAttributesResponse
  Int
pHttpStatus_ =
    PutEmailIdentityDkimSigningAttributesResponse'
      { $sel:dkimStatus:PutEmailIdentityDkimSigningAttributesResponse' :: Maybe DkimStatus
dkimStatus =
          forall a. Maybe a
Prelude.Nothing,
        $sel:dkimTokens:PutEmailIdentityDkimSigningAttributesResponse' :: Maybe [Text]
dkimTokens = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:PutEmailIdentityDkimSigningAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The DKIM authentication status of the identity. Amazon SES determines
-- the authentication status by searching for specific records in the DNS
-- configuration for your domain. If you used
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>
-- to set up DKIM authentication, Amazon SES tries to find three unique
-- CNAME records in the DNS configuration for your domain.
--
-- If you provided a public key to perform DKIM authentication, Amazon SES
-- tries to find a TXT record that uses the selector that you specified.
-- The value of the TXT record must be a public key that\'s paired with the
-- private key that you specified in the process of creating the identity.
--
-- The status can be one of the following:
--
-- -   @PENDING@ – The verification process was initiated, but Amazon SES
--     hasn\'t yet detected the DKIM records in the DNS configuration for
--     the domain.
--
-- -   @SUCCESS@ – The verification process completed successfully.
--
-- -   @FAILED@ – The verification process failed. This typically occurs
--     when Amazon SES fails to find the DKIM records in the DNS
--     configuration of the domain.
--
-- -   @TEMPORARY_FAILURE@ – A temporary issue is preventing Amazon SES
--     from determining the DKIM authentication status of the domain.
--
-- -   @NOT_STARTED@ – The DKIM verification process hasn\'t been initiated
--     for the domain.
putEmailIdentityDkimSigningAttributesResponse_dkimStatus :: Lens.Lens' PutEmailIdentityDkimSigningAttributesResponse (Prelude.Maybe DkimStatus)
putEmailIdentityDkimSigningAttributesResponse_dkimStatus :: Lens'
  PutEmailIdentityDkimSigningAttributesResponse (Maybe DkimStatus)
putEmailIdentityDkimSigningAttributesResponse_dkimStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEmailIdentityDkimSigningAttributesResponse' {Maybe DkimStatus
dkimStatus :: Maybe DkimStatus
$sel:dkimStatus:PutEmailIdentityDkimSigningAttributesResponse' :: PutEmailIdentityDkimSigningAttributesResponse -> Maybe DkimStatus
dkimStatus} -> Maybe DkimStatus
dkimStatus) (\s :: PutEmailIdentityDkimSigningAttributesResponse
s@PutEmailIdentityDkimSigningAttributesResponse' {} Maybe DkimStatus
a -> PutEmailIdentityDkimSigningAttributesResponse
s {$sel:dkimStatus:PutEmailIdentityDkimSigningAttributesResponse' :: Maybe DkimStatus
dkimStatus = Maybe DkimStatus
a} :: PutEmailIdentityDkimSigningAttributesResponse)

-- | If you used
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html Easy DKIM>
-- to configure DKIM authentication for the domain, then this object
-- contains a set of unique strings that you use to create a set of CNAME
-- records that you add to the DNS configuration for your domain. When
-- Amazon SES detects these records in the DNS configuration for your
-- domain, the DKIM authentication process is complete.
--
-- If you configured DKIM authentication for the domain by providing your
-- own public-private key pair, then this object contains the selector
-- that\'s associated with your public key.
--
-- Regardless of the DKIM authentication method you use, Amazon SES
-- searches for the appropriate records in the DNS configuration of the
-- domain for up to 72 hours.
putEmailIdentityDkimSigningAttributesResponse_dkimTokens :: Lens.Lens' PutEmailIdentityDkimSigningAttributesResponse (Prelude.Maybe [Prelude.Text])
putEmailIdentityDkimSigningAttributesResponse_dkimTokens :: Lens' PutEmailIdentityDkimSigningAttributesResponse (Maybe [Text])
putEmailIdentityDkimSigningAttributesResponse_dkimTokens = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEmailIdentityDkimSigningAttributesResponse' {Maybe [Text]
dkimTokens :: Maybe [Text]
$sel:dkimTokens:PutEmailIdentityDkimSigningAttributesResponse' :: PutEmailIdentityDkimSigningAttributesResponse -> Maybe [Text]
dkimTokens} -> Maybe [Text]
dkimTokens) (\s :: PutEmailIdentityDkimSigningAttributesResponse
s@PutEmailIdentityDkimSigningAttributesResponse' {} Maybe [Text]
a -> PutEmailIdentityDkimSigningAttributesResponse
s {$sel:dkimTokens:PutEmailIdentityDkimSigningAttributesResponse' :: Maybe [Text]
dkimTokens = Maybe [Text]
a} :: PutEmailIdentityDkimSigningAttributesResponse) 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 response's http status code.
putEmailIdentityDkimSigningAttributesResponse_httpStatus :: Lens.Lens' PutEmailIdentityDkimSigningAttributesResponse Prelude.Int
putEmailIdentityDkimSigningAttributesResponse_httpStatus :: Lens' PutEmailIdentityDkimSigningAttributesResponse Int
putEmailIdentityDkimSigningAttributesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutEmailIdentityDkimSigningAttributesResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutEmailIdentityDkimSigningAttributesResponse' :: PutEmailIdentityDkimSigningAttributesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutEmailIdentityDkimSigningAttributesResponse
s@PutEmailIdentityDkimSigningAttributesResponse' {} Int
a -> PutEmailIdentityDkimSigningAttributesResponse
s {$sel:httpStatus:PutEmailIdentityDkimSigningAttributesResponse' :: Int
httpStatus = Int
a} :: PutEmailIdentityDkimSigningAttributesResponse)

instance
  Prelude.NFData
    PutEmailIdentityDkimSigningAttributesResponse
  where
  rnf :: PutEmailIdentityDkimSigningAttributesResponse -> ()
rnf
    PutEmailIdentityDkimSigningAttributesResponse' {Int
Maybe [Text]
Maybe DkimStatus
httpStatus :: Int
dkimTokens :: Maybe [Text]
dkimStatus :: Maybe DkimStatus
$sel:httpStatus:PutEmailIdentityDkimSigningAttributesResponse' :: PutEmailIdentityDkimSigningAttributesResponse -> Int
$sel:dkimTokens:PutEmailIdentityDkimSigningAttributesResponse' :: PutEmailIdentityDkimSigningAttributesResponse -> Maybe [Text]
$sel:dkimStatus:PutEmailIdentityDkimSigningAttributesResponse' :: PutEmailIdentityDkimSigningAttributesResponse -> Maybe DkimStatus
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe DkimStatus
dkimStatus
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
dkimTokens
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus