{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Used to 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.Lens as Lens
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
(PutEmailIdentityDkimSigningAttributes
 -> PutEmailIdentityDkimSigningAttributes -> Bool)
-> (PutEmailIdentityDkimSigningAttributes
    -> PutEmailIdentityDkimSigningAttributes -> Bool)
-> Eq PutEmailIdentityDkimSigningAttributes
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
(Int -> PutEmailIdentityDkimSigningAttributes -> ShowS)
-> (PutEmailIdentityDkimSigningAttributes -> String)
-> ([PutEmailIdentityDkimSigningAttributes] -> ShowS)
-> Show PutEmailIdentityDkimSigningAttributes
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.
 PutEmailIdentityDkimSigningAttributes
 -> Rep PutEmailIdentityDkimSigningAttributes x)
-> (forall x.
    Rep PutEmailIdentityDkimSigningAttributes x
    -> PutEmailIdentityDkimSigningAttributes)
-> Generic PutEmailIdentityDkimSigningAttributes
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' :: Maybe DkimSigningAttributes
-> Text
-> DkimSigningAttributesOrigin
-> PutEmailIdentityDkimSigningAttributes
PutEmailIdentityDkimSigningAttributes'
      { $sel:signingAttributes:PutEmailIdentityDkimSigningAttributes' :: Maybe DkimSigningAttributes
signingAttributes =
          Maybe DkimSigningAttributes
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 :: (Maybe DkimSigningAttributes -> f (Maybe DkimSigningAttributes))
-> PutEmailIdentityDkimSigningAttributes
-> f PutEmailIdentityDkimSigningAttributes
putEmailIdentityDkimSigningAttributes_signingAttributes = (PutEmailIdentityDkimSigningAttributes
 -> Maybe DkimSigningAttributes)
-> (PutEmailIdentityDkimSigningAttributes
    -> Maybe DkimSigningAttributes
    -> PutEmailIdentityDkimSigningAttributes)
-> Lens
     PutEmailIdentityDkimSigningAttributes
     PutEmailIdentityDkimSigningAttributes
     (Maybe DkimSigningAttributes)
     (Maybe DkimSigningAttributes)
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 :: (Text -> f Text)
-> PutEmailIdentityDkimSigningAttributes
-> f PutEmailIdentityDkimSigningAttributes
putEmailIdentityDkimSigningAttributes_emailIdentity = (PutEmailIdentityDkimSigningAttributes -> Text)
-> (PutEmailIdentityDkimSigningAttributes
    -> Text -> PutEmailIdentityDkimSigningAttributes)
-> Lens
     PutEmailIdentityDkimSigningAttributes
     PutEmailIdentityDkimSigningAttributes
     Text
     Text
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 :: (DkimSigningAttributesOrigin -> f DkimSigningAttributesOrigin)
-> PutEmailIdentityDkimSigningAttributes
-> f PutEmailIdentityDkimSigningAttributes
putEmailIdentityDkimSigningAttributes_signingAttributesOrigin = (PutEmailIdentityDkimSigningAttributes
 -> DkimSigningAttributesOrigin)
-> (PutEmailIdentityDkimSigningAttributes
    -> DkimSigningAttributesOrigin
    -> PutEmailIdentityDkimSigningAttributes)
-> Lens
     PutEmailIdentityDkimSigningAttributes
     PutEmailIdentityDkimSigningAttributes
     DkimSigningAttributesOrigin
     DkimSigningAttributesOrigin
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 :: PutEmailIdentityDkimSigningAttributes
-> Request PutEmailIdentityDkimSigningAttributes
request = Service
-> PutEmailIdentityDkimSigningAttributes
-> Request PutEmailIdentityDkimSigningAttributes
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutEmailIdentityDkimSigningAttributes
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse PutEmailIdentityDkimSigningAttributes)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse PutEmailIdentityDkimSigningAttributes))
-> Logger
-> Service
-> Proxy PutEmailIdentityDkimSigningAttributes
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse PutEmailIdentityDkimSigningAttributes)))
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 DkimStatus
-> Maybe [Text]
-> Int
-> PutEmailIdentityDkimSigningAttributesResponse
PutEmailIdentityDkimSigningAttributesResponse'
            (Maybe DkimStatus
 -> Maybe [Text]
 -> Int
 -> PutEmailIdentityDkimSigningAttributesResponse)
-> Either String (Maybe DkimStatus)
-> Either
     String
     (Maybe [Text]
      -> Int -> PutEmailIdentityDkimSigningAttributesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe DkimStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DkimStatus")
              Either
  String
  (Maybe [Text]
   -> Int -> PutEmailIdentityDkimSigningAttributesResponse)
-> Either String (Maybe [Text])
-> Either
     String (Int -> PutEmailIdentityDkimSigningAttributesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DkimTokens" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
              Either
  String (Int -> PutEmailIdentityDkimSigningAttributesResponse)
-> Either String Int
-> Either String PutEmailIdentityDkimSigningAttributesResponse
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
    PutEmailIdentityDkimSigningAttributes

instance
  Prelude.NFData
    PutEmailIdentityDkimSigningAttributes

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

instance
  Core.ToJSON
    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
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"SigningAttributes" Text -> DkimSigningAttributes -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DkimSigningAttributes -> Pair)
-> Maybe DkimSigningAttributes -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DkimSigningAttributes
signingAttributes,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"SigningAttributesOrigin"
                  Text -> DkimSigningAttributesOrigin -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DkimSigningAttributesOrigin
signingAttributesOrigin
              )
          ]
      )

instance
  Core.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
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v1/email/identities/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
emailIdentity,
        ByteString
"/dkim/signing"
      ]

instance
  Core.ToQuery
    PutEmailIdentityDkimSigningAttributes
  where
  toQuery :: PutEmailIdentityDkimSigningAttributes -> QueryString
toQuery = QueryString -> PutEmailIdentityDkimSigningAttributes -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(PutEmailIdentityDkimSigningAttributesResponse
 -> PutEmailIdentityDkimSigningAttributesResponse -> Bool)
-> (PutEmailIdentityDkimSigningAttributesResponse
    -> PutEmailIdentityDkimSigningAttributesResponse -> Bool)
-> Eq PutEmailIdentityDkimSigningAttributesResponse
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]
(Int -> ReadS PutEmailIdentityDkimSigningAttributesResponse)
-> ReadS [PutEmailIdentityDkimSigningAttributesResponse]
-> ReadPrec PutEmailIdentityDkimSigningAttributesResponse
-> ReadPrec [PutEmailIdentityDkimSigningAttributesResponse]
-> Read 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
(Int -> PutEmailIdentityDkimSigningAttributesResponse -> ShowS)
-> (PutEmailIdentityDkimSigningAttributesResponse -> String)
-> ([PutEmailIdentityDkimSigningAttributesResponse] -> ShowS)
-> Show PutEmailIdentityDkimSigningAttributesResponse
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.
 PutEmailIdentityDkimSigningAttributesResponse
 -> Rep PutEmailIdentityDkimSigningAttributesResponse x)
-> (forall x.
    Rep PutEmailIdentityDkimSigningAttributesResponse x
    -> PutEmailIdentityDkimSigningAttributesResponse)
-> Generic PutEmailIdentityDkimSigningAttributesResponse
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' :: Maybe DkimStatus
-> Maybe [Text]
-> Int
-> PutEmailIdentityDkimSigningAttributesResponse
PutEmailIdentityDkimSigningAttributesResponse'
      { $sel:dkimStatus:PutEmailIdentityDkimSigningAttributesResponse' :: Maybe DkimStatus
dkimStatus =
          Maybe DkimStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:dkimTokens:PutEmailIdentityDkimSigningAttributesResponse' :: Maybe [Text]
dkimTokens = Maybe [Text]
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 :: (Maybe DkimStatus -> f (Maybe DkimStatus))
-> PutEmailIdentityDkimSigningAttributesResponse
-> f PutEmailIdentityDkimSigningAttributesResponse
putEmailIdentityDkimSigningAttributesResponse_dkimStatus = (PutEmailIdentityDkimSigningAttributesResponse -> Maybe DkimStatus)
-> (PutEmailIdentityDkimSigningAttributesResponse
    -> Maybe DkimStatus
    -> PutEmailIdentityDkimSigningAttributesResponse)
-> Lens
     PutEmailIdentityDkimSigningAttributesResponse
     PutEmailIdentityDkimSigningAttributesResponse
     (Maybe DkimStatus)
     (Maybe 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 :: (Maybe [Text] -> f (Maybe [Text]))
-> PutEmailIdentityDkimSigningAttributesResponse
-> f PutEmailIdentityDkimSigningAttributesResponse
putEmailIdentityDkimSigningAttributesResponse_dkimTokens = (PutEmailIdentityDkimSigningAttributesResponse -> Maybe [Text])
-> (PutEmailIdentityDkimSigningAttributesResponse
    -> Maybe [Text] -> PutEmailIdentityDkimSigningAttributesResponse)
-> Lens
     PutEmailIdentityDkimSigningAttributesResponse
     PutEmailIdentityDkimSigningAttributesResponse
     (Maybe [Text])
     (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> PutEmailIdentityDkimSigningAttributesResponse
 -> f PutEmailIdentityDkimSigningAttributesResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> PutEmailIdentityDkimSigningAttributesResponse
-> f PutEmailIdentityDkimSigningAttributesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
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 :: (Int -> f Int)
-> PutEmailIdentityDkimSigningAttributesResponse
-> f PutEmailIdentityDkimSigningAttributesResponse
putEmailIdentityDkimSigningAttributesResponse_httpStatus = (PutEmailIdentityDkimSigningAttributesResponse -> Int)
-> (PutEmailIdentityDkimSigningAttributesResponse
    -> Int -> PutEmailIdentityDkimSigningAttributesResponse)
-> Lens
     PutEmailIdentityDkimSigningAttributesResponse
     PutEmailIdentityDkimSigningAttributesResponse
     Int
     Int
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