{-# 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.CertificateManager.RequestCertificate
-- 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)
--
-- Requests an ACM certificate for use with other Amazon Web Services
-- services. To request an ACM certificate, you must specify a fully
-- qualified domain name (FQDN) in the @DomainName@ parameter. You can also
-- specify additional FQDNs in the @SubjectAlternativeNames@ parameter.
--
-- If you are requesting a private certificate, domain validation is not
-- required. If you are requesting a public certificate, each domain name
-- that you specify must be validated to verify that you own or control the
-- domain. You can use
-- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html DNS validation>
-- or
-- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html email validation>.
-- We recommend that you use DNS validation. ACM issues public certificates
-- after receiving approval from the domain owner.
--
-- ACM behavior differs from the
-- <https://tools.ietf.org/html/rfc6125#appendix-B.2>RFC 6125 specification
-- of the certificate validation process. first checks for a subject
-- alternative name, and, if it finds one, ignores the common name (CN)
module Amazonka.CertificateManager.RequestCertificate
  ( -- * Creating a Request
    RequestCertificate (..),
    newRequestCertificate,

    -- * Request Lenses
    requestCertificate_idempotencyToken,
    requestCertificate_validationMethod,
    requestCertificate_subjectAlternativeNames,
    requestCertificate_options,
    requestCertificate_domainValidationOptions,
    requestCertificate_certificateAuthorityArn,
    requestCertificate_tags,
    requestCertificate_domainName,

    -- * Destructuring the Response
    RequestCertificateResponse (..),
    newRequestCertificateResponse,

    -- * Response Lenses
    requestCertificateResponse_certificateArn,
    requestCertificateResponse_httpStatus,
  )
where

import Amazonka.CertificateManager.Types
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

-- | /See:/ 'newRequestCertificate' smart constructor.
data RequestCertificate = RequestCertificate'
  { -- | Customer chosen string that can be used to distinguish between calls to
    -- @RequestCertificate@. Idempotency tokens time out after one hour.
    -- Therefore, if you call @RequestCertificate@ multiple times with the same
    -- idempotency token within one hour, ACM recognizes that you are
    -- requesting only one certificate and will issue only one. If you change
    -- the idempotency token for each call, ACM recognizes that you are
    -- requesting multiple certificates.
    RequestCertificate -> Maybe Text
idempotencyToken :: Prelude.Maybe Prelude.Text,
    -- | The method you want to use if you are requesting a public certificate to
    -- validate that you own or control domain. You can
    -- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html validate with DNS>
    -- or
    -- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html validate with email>.
    -- We recommend that you use DNS validation.
    RequestCertificate -> Maybe ValidationMethod
validationMethod :: Prelude.Maybe ValidationMethod,
    -- | Additional FQDNs to be included in the Subject Alternative Name
    -- extension of the ACM certificate. For example, add the name
    -- www.example.net to a certificate for which the @DomainName@ field is
    -- www.example.com if users can reach your site by using either name. The
    -- maximum number of domain names that you can add to an ACM certificate is
    -- 100. However, the initial quota is 10 domain names. If you need more
    -- than 10 names, you must request a quota increase. For more information,
    -- see
    -- <https://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html Quotas>.
    --
    -- The maximum length of a SAN DNS name is 253 octets. The name is made up
    -- of multiple labels separated by periods. No label can be longer than 63
    -- octets. Consider the following examples:
    --
    -- -   @(63 octets).(63 octets).(63 octets).(61 octets)@ is legal because
    --     the total length is 253 octets (63+1+63+1+63+1+61) and no label
    --     exceeds 63 octets.
    --
    -- -   @(64 octets).(63 octets).(63 octets).(61 octets)@ is not legal
    --     because the total length exceeds 253 octets (64+1+63+1+63+1+61) and
    --     the first label exceeds 63 octets.
    --
    -- -   @(63 octets).(63 octets).(63 octets).(62 octets)@ is not legal
    --     because the total length of the DNS name (63+1+63+1+63+1+62) exceeds
    --     253 octets.
    RequestCertificate -> Maybe (NonEmpty Text)
subjectAlternativeNames :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Currently, you can use this parameter to specify whether to add the
    -- certificate to a certificate transparency log. Certificate transparency
    -- makes it possible to detect SSL\/TLS certificates that have been
    -- mistakenly or maliciously issued. Certificates that have not been logged
    -- typically produce an error message in a browser. For more information,
    -- see
    -- <https://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency Opting Out of Certificate Transparency Logging>.
    RequestCertificate -> Maybe CertificateOptions
options :: Prelude.Maybe CertificateOptions,
    -- | The domain name that you want ACM to use to send you emails so that you
    -- can validate domain ownership.
    RequestCertificate -> Maybe (NonEmpty DomainValidationOption)
domainValidationOptions :: Prelude.Maybe (Prelude.NonEmpty DomainValidationOption),
    -- | The Amazon Resource Name (ARN) of the private certificate authority (CA)
    -- that will be used to issue the certificate. If you do not provide an ARN
    -- and you are trying to request a private certificate, ACM will attempt to
    -- issue a public certificate. For more information about private CAs, see
    -- the
    -- <https://docs.aws.amazon.com/acm-pca/latest/userguide/PcaWelcome.html Amazon Web Services Certificate Manager Private Certificate Authority (PCA)>
    -- user guide. The ARN must have the following form:
    --
    -- @arn:aws:acm-pca:region:account:certificate-authority\/12345678-1234-1234-1234-123456789012@
    RequestCertificate -> Maybe Text
certificateAuthorityArn :: Prelude.Maybe Prelude.Text,
    -- | One or more resource tags to associate with the certificate.
    RequestCertificate -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | Fully qualified domain name (FQDN), such as www.example.com, that you
    -- want to secure with an ACM certificate. Use an asterisk (*) to create a
    -- wildcard certificate that protects several sites in the same domain. For
    -- example, *.example.com protects www.example.com, site.example.com, and
    -- images.example.com.
    --
    -- The first domain name you enter cannot exceed 64 octets, including
    -- periods. Each subsequent Subject Alternative Name (SAN), however, can be
    -- up to 253 octets in length.
    RequestCertificate -> Text
domainName :: Prelude.Text
  }
  deriving (RequestCertificate -> RequestCertificate -> Bool
(RequestCertificate -> RequestCertificate -> Bool)
-> (RequestCertificate -> RequestCertificate -> Bool)
-> Eq RequestCertificate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestCertificate -> RequestCertificate -> Bool
$c/= :: RequestCertificate -> RequestCertificate -> Bool
== :: RequestCertificate -> RequestCertificate -> Bool
$c== :: RequestCertificate -> RequestCertificate -> Bool
Prelude.Eq, ReadPrec [RequestCertificate]
ReadPrec RequestCertificate
Int -> ReadS RequestCertificate
ReadS [RequestCertificate]
(Int -> ReadS RequestCertificate)
-> ReadS [RequestCertificate]
-> ReadPrec RequestCertificate
-> ReadPrec [RequestCertificate]
-> Read RequestCertificate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RequestCertificate]
$creadListPrec :: ReadPrec [RequestCertificate]
readPrec :: ReadPrec RequestCertificate
$creadPrec :: ReadPrec RequestCertificate
readList :: ReadS [RequestCertificate]
$creadList :: ReadS [RequestCertificate]
readsPrec :: Int -> ReadS RequestCertificate
$creadsPrec :: Int -> ReadS RequestCertificate
Prelude.Read, Int -> RequestCertificate -> ShowS
[RequestCertificate] -> ShowS
RequestCertificate -> String
(Int -> RequestCertificate -> ShowS)
-> (RequestCertificate -> String)
-> ([RequestCertificate] -> ShowS)
-> Show RequestCertificate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RequestCertificate] -> ShowS
$cshowList :: [RequestCertificate] -> ShowS
show :: RequestCertificate -> String
$cshow :: RequestCertificate -> String
showsPrec :: Int -> RequestCertificate -> ShowS
$cshowsPrec :: Int -> RequestCertificate -> ShowS
Prelude.Show, (forall x. RequestCertificate -> Rep RequestCertificate x)
-> (forall x. Rep RequestCertificate x -> RequestCertificate)
-> Generic RequestCertificate
forall x. Rep RequestCertificate x -> RequestCertificate
forall x. RequestCertificate -> Rep RequestCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RequestCertificate x -> RequestCertificate
$cfrom :: forall x. RequestCertificate -> Rep RequestCertificate x
Prelude.Generic)

-- |
-- Create a value of 'RequestCertificate' 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:
--
-- 'idempotencyToken', 'requestCertificate_idempotencyToken' - Customer chosen string that can be used to distinguish between calls to
-- @RequestCertificate@. Idempotency tokens time out after one hour.
-- Therefore, if you call @RequestCertificate@ multiple times with the same
-- idempotency token within one hour, ACM recognizes that you are
-- requesting only one certificate and will issue only one. If you change
-- the idempotency token for each call, ACM recognizes that you are
-- requesting multiple certificates.
--
-- 'validationMethod', 'requestCertificate_validationMethod' - The method you want to use if you are requesting a public certificate to
-- validate that you own or control domain. You can
-- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html validate with DNS>
-- or
-- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html validate with email>.
-- We recommend that you use DNS validation.
--
-- 'subjectAlternativeNames', 'requestCertificate_subjectAlternativeNames' - Additional FQDNs to be included in the Subject Alternative Name
-- extension of the ACM certificate. For example, add the name
-- www.example.net to a certificate for which the @DomainName@ field is
-- www.example.com if users can reach your site by using either name. The
-- maximum number of domain names that you can add to an ACM certificate is
-- 100. However, the initial quota is 10 domain names. If you need more
-- than 10 names, you must request a quota increase. For more information,
-- see
-- <https://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html Quotas>.
--
-- The maximum length of a SAN DNS name is 253 octets. The name is made up
-- of multiple labels separated by periods. No label can be longer than 63
-- octets. Consider the following examples:
--
-- -   @(63 octets).(63 octets).(63 octets).(61 octets)@ is legal because
--     the total length is 253 octets (63+1+63+1+63+1+61) and no label
--     exceeds 63 octets.
--
-- -   @(64 octets).(63 octets).(63 octets).(61 octets)@ is not legal
--     because the total length exceeds 253 octets (64+1+63+1+63+1+61) and
--     the first label exceeds 63 octets.
--
-- -   @(63 octets).(63 octets).(63 octets).(62 octets)@ is not legal
--     because the total length of the DNS name (63+1+63+1+63+1+62) exceeds
--     253 octets.
--
-- 'options', 'requestCertificate_options' - Currently, you can use this parameter to specify whether to add the
-- certificate to a certificate transparency log. Certificate transparency
-- makes it possible to detect SSL\/TLS certificates that have been
-- mistakenly or maliciously issued. Certificates that have not been logged
-- typically produce an error message in a browser. For more information,
-- see
-- <https://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency Opting Out of Certificate Transparency Logging>.
--
-- 'domainValidationOptions', 'requestCertificate_domainValidationOptions' - The domain name that you want ACM to use to send you emails so that you
-- can validate domain ownership.
--
-- 'certificateAuthorityArn', 'requestCertificate_certificateAuthorityArn' - The Amazon Resource Name (ARN) of the private certificate authority (CA)
-- that will be used to issue the certificate. If you do not provide an ARN
-- and you are trying to request a private certificate, ACM will attempt to
-- issue a public certificate. For more information about private CAs, see
-- the
-- <https://docs.aws.amazon.com/acm-pca/latest/userguide/PcaWelcome.html Amazon Web Services Certificate Manager Private Certificate Authority (PCA)>
-- user guide. The ARN must have the following form:
--
-- @arn:aws:acm-pca:region:account:certificate-authority\/12345678-1234-1234-1234-123456789012@
--
-- 'tags', 'requestCertificate_tags' - One or more resource tags to associate with the certificate.
--
-- 'domainName', 'requestCertificate_domainName' - Fully qualified domain name (FQDN), such as www.example.com, that you
-- want to secure with an ACM certificate. Use an asterisk (*) to create a
-- wildcard certificate that protects several sites in the same domain. For
-- example, *.example.com protects www.example.com, site.example.com, and
-- images.example.com.
--
-- The first domain name you enter cannot exceed 64 octets, including
-- periods. Each subsequent Subject Alternative Name (SAN), however, can be
-- up to 253 octets in length.
newRequestCertificate ::
  -- | 'domainName'
  Prelude.Text ->
  RequestCertificate
newRequestCertificate :: Text -> RequestCertificate
newRequestCertificate Text
pDomainName_ =
  RequestCertificate' :: Maybe Text
-> Maybe ValidationMethod
-> Maybe (NonEmpty Text)
-> Maybe CertificateOptions
-> Maybe (NonEmpty DomainValidationOption)
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> Text
-> RequestCertificate
RequestCertificate'
    { $sel:idempotencyToken:RequestCertificate' :: Maybe Text
idempotencyToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:validationMethod:RequestCertificate' :: Maybe ValidationMethod
validationMethod = Maybe ValidationMethod
forall a. Maybe a
Prelude.Nothing,
      $sel:subjectAlternativeNames:RequestCertificate' :: Maybe (NonEmpty Text)
subjectAlternativeNames = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:options:RequestCertificate' :: Maybe CertificateOptions
options = Maybe CertificateOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:domainValidationOptions:RequestCertificate' :: Maybe (NonEmpty DomainValidationOption)
domainValidationOptions = Maybe (NonEmpty DomainValidationOption)
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateAuthorityArn:RequestCertificate' :: Maybe Text
certificateAuthorityArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:RequestCertificate' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:RequestCertificate' :: Text
domainName = Text
pDomainName_
    }

-- | Customer chosen string that can be used to distinguish between calls to
-- @RequestCertificate@. Idempotency tokens time out after one hour.
-- Therefore, if you call @RequestCertificate@ multiple times with the same
-- idempotency token within one hour, ACM recognizes that you are
-- requesting only one certificate and will issue only one. If you change
-- the idempotency token for each call, ACM recognizes that you are
-- requesting multiple certificates.
requestCertificate_idempotencyToken :: Lens.Lens' RequestCertificate (Prelude.Maybe Prelude.Text)
requestCertificate_idempotencyToken :: (Maybe Text -> f (Maybe Text))
-> RequestCertificate -> f RequestCertificate
requestCertificate_idempotencyToken = (RequestCertificate -> Maybe Text)
-> (RequestCertificate -> Maybe Text -> RequestCertificate)
-> Lens
     RequestCertificate RequestCertificate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe Text
idempotencyToken :: Maybe Text
$sel:idempotencyToken:RequestCertificate' :: RequestCertificate -> Maybe Text
idempotencyToken} -> Maybe Text
idempotencyToken) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe Text
a -> RequestCertificate
s {$sel:idempotencyToken:RequestCertificate' :: Maybe Text
idempotencyToken = Maybe Text
a} :: RequestCertificate)

-- | The method you want to use if you are requesting a public certificate to
-- validate that you own or control domain. You can
-- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html validate with DNS>
-- or
-- <https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html validate with email>.
-- We recommend that you use DNS validation.
requestCertificate_validationMethod :: Lens.Lens' RequestCertificate (Prelude.Maybe ValidationMethod)
requestCertificate_validationMethod :: (Maybe ValidationMethod -> f (Maybe ValidationMethod))
-> RequestCertificate -> f RequestCertificate
requestCertificate_validationMethod = (RequestCertificate -> Maybe ValidationMethod)
-> (RequestCertificate
    -> Maybe ValidationMethod -> RequestCertificate)
-> Lens
     RequestCertificate
     RequestCertificate
     (Maybe ValidationMethod)
     (Maybe ValidationMethod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe ValidationMethod
validationMethod :: Maybe ValidationMethod
$sel:validationMethod:RequestCertificate' :: RequestCertificate -> Maybe ValidationMethod
validationMethod} -> Maybe ValidationMethod
validationMethod) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe ValidationMethod
a -> RequestCertificate
s {$sel:validationMethod:RequestCertificate' :: Maybe ValidationMethod
validationMethod = Maybe ValidationMethod
a} :: RequestCertificate)

-- | Additional FQDNs to be included in the Subject Alternative Name
-- extension of the ACM certificate. For example, add the name
-- www.example.net to a certificate for which the @DomainName@ field is
-- www.example.com if users can reach your site by using either name. The
-- maximum number of domain names that you can add to an ACM certificate is
-- 100. However, the initial quota is 10 domain names. If you need more
-- than 10 names, you must request a quota increase. For more information,
-- see
-- <https://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html Quotas>.
--
-- The maximum length of a SAN DNS name is 253 octets. The name is made up
-- of multiple labels separated by periods. No label can be longer than 63
-- octets. Consider the following examples:
--
-- -   @(63 octets).(63 octets).(63 octets).(61 octets)@ is legal because
--     the total length is 253 octets (63+1+63+1+63+1+61) and no label
--     exceeds 63 octets.
--
-- -   @(64 octets).(63 octets).(63 octets).(61 octets)@ is not legal
--     because the total length exceeds 253 octets (64+1+63+1+63+1+61) and
--     the first label exceeds 63 octets.
--
-- -   @(63 octets).(63 octets).(63 octets).(62 octets)@ is not legal
--     because the total length of the DNS name (63+1+63+1+63+1+62) exceeds
--     253 octets.
requestCertificate_subjectAlternativeNames :: Lens.Lens' RequestCertificate (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
requestCertificate_subjectAlternativeNames :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> RequestCertificate -> f RequestCertificate
requestCertificate_subjectAlternativeNames = (RequestCertificate -> Maybe (NonEmpty Text))
-> (RequestCertificate
    -> Maybe (NonEmpty Text) -> RequestCertificate)
-> Lens
     RequestCertificate
     RequestCertificate
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe (NonEmpty Text)
subjectAlternativeNames :: Maybe (NonEmpty Text)
$sel:subjectAlternativeNames:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Text)
subjectAlternativeNames} -> Maybe (NonEmpty Text)
subjectAlternativeNames) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe (NonEmpty Text)
a -> RequestCertificate
s {$sel:subjectAlternativeNames:RequestCertificate' :: Maybe (NonEmpty Text)
subjectAlternativeNames = Maybe (NonEmpty Text)
a} :: RequestCertificate) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> RequestCertificate -> f RequestCertificate)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> RequestCertificate
-> f RequestCertificate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Currently, you can use this parameter to specify whether to add the
-- certificate to a certificate transparency log. Certificate transparency
-- makes it possible to detect SSL\/TLS certificates that have been
-- mistakenly or maliciously issued. Certificates that have not been logged
-- typically produce an error message in a browser. For more information,
-- see
-- <https://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency Opting Out of Certificate Transparency Logging>.
requestCertificate_options :: Lens.Lens' RequestCertificate (Prelude.Maybe CertificateOptions)
requestCertificate_options :: (Maybe CertificateOptions -> f (Maybe CertificateOptions))
-> RequestCertificate -> f RequestCertificate
requestCertificate_options = (RequestCertificate -> Maybe CertificateOptions)
-> (RequestCertificate
    -> Maybe CertificateOptions -> RequestCertificate)
-> Lens
     RequestCertificate
     RequestCertificate
     (Maybe CertificateOptions)
     (Maybe CertificateOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe CertificateOptions
options :: Maybe CertificateOptions
$sel:options:RequestCertificate' :: RequestCertificate -> Maybe CertificateOptions
options} -> Maybe CertificateOptions
options) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe CertificateOptions
a -> RequestCertificate
s {$sel:options:RequestCertificate' :: Maybe CertificateOptions
options = Maybe CertificateOptions
a} :: RequestCertificate)

-- | The domain name that you want ACM to use to send you emails so that you
-- can validate domain ownership.
requestCertificate_domainValidationOptions :: Lens.Lens' RequestCertificate (Prelude.Maybe (Prelude.NonEmpty DomainValidationOption))
requestCertificate_domainValidationOptions :: (Maybe (NonEmpty DomainValidationOption)
 -> f (Maybe (NonEmpty DomainValidationOption)))
-> RequestCertificate -> f RequestCertificate
requestCertificate_domainValidationOptions = (RequestCertificate -> Maybe (NonEmpty DomainValidationOption))
-> (RequestCertificate
    -> Maybe (NonEmpty DomainValidationOption) -> RequestCertificate)
-> Lens
     RequestCertificate
     RequestCertificate
     (Maybe (NonEmpty DomainValidationOption))
     (Maybe (NonEmpty DomainValidationOption))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe (NonEmpty DomainValidationOption)
domainValidationOptions :: Maybe (NonEmpty DomainValidationOption)
$sel:domainValidationOptions:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty DomainValidationOption)
domainValidationOptions} -> Maybe (NonEmpty DomainValidationOption)
domainValidationOptions) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe (NonEmpty DomainValidationOption)
a -> RequestCertificate
s {$sel:domainValidationOptions:RequestCertificate' :: Maybe (NonEmpty DomainValidationOption)
domainValidationOptions = Maybe (NonEmpty DomainValidationOption)
a} :: RequestCertificate) ((Maybe (NonEmpty DomainValidationOption)
  -> f (Maybe (NonEmpty DomainValidationOption)))
 -> RequestCertificate -> f RequestCertificate)
-> ((Maybe (NonEmpty DomainValidationOption)
     -> f (Maybe (NonEmpty DomainValidationOption)))
    -> Maybe (NonEmpty DomainValidationOption)
    -> f (Maybe (NonEmpty DomainValidationOption)))
-> (Maybe (NonEmpty DomainValidationOption)
    -> f (Maybe (NonEmpty DomainValidationOption)))
-> RequestCertificate
-> f RequestCertificate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty DomainValidationOption)
  (NonEmpty DomainValidationOption)
  (NonEmpty DomainValidationOption)
  (NonEmpty DomainValidationOption)
-> Iso
     (Maybe (NonEmpty DomainValidationOption))
     (Maybe (NonEmpty DomainValidationOption))
     (Maybe (NonEmpty DomainValidationOption))
     (Maybe (NonEmpty DomainValidationOption))
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
  (NonEmpty DomainValidationOption)
  (NonEmpty DomainValidationOption)
  (NonEmpty DomainValidationOption)
  (NonEmpty DomainValidationOption)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the private certificate authority (CA)
-- that will be used to issue the certificate. If you do not provide an ARN
-- and you are trying to request a private certificate, ACM will attempt to
-- issue a public certificate. For more information about private CAs, see
-- the
-- <https://docs.aws.amazon.com/acm-pca/latest/userguide/PcaWelcome.html Amazon Web Services Certificate Manager Private Certificate Authority (PCA)>
-- user guide. The ARN must have the following form:
--
-- @arn:aws:acm-pca:region:account:certificate-authority\/12345678-1234-1234-1234-123456789012@
requestCertificate_certificateAuthorityArn :: Lens.Lens' RequestCertificate (Prelude.Maybe Prelude.Text)
requestCertificate_certificateAuthorityArn :: (Maybe Text -> f (Maybe Text))
-> RequestCertificate -> f RequestCertificate
requestCertificate_certificateAuthorityArn = (RequestCertificate -> Maybe Text)
-> (RequestCertificate -> Maybe Text -> RequestCertificate)
-> Lens
     RequestCertificate RequestCertificate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe Text
certificateAuthorityArn :: Maybe Text
$sel:certificateAuthorityArn:RequestCertificate' :: RequestCertificate -> Maybe Text
certificateAuthorityArn} -> Maybe Text
certificateAuthorityArn) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe Text
a -> RequestCertificate
s {$sel:certificateAuthorityArn:RequestCertificate' :: Maybe Text
certificateAuthorityArn = Maybe Text
a} :: RequestCertificate)

-- | One or more resource tags to associate with the certificate.
requestCertificate_tags :: Lens.Lens' RequestCertificate (Prelude.Maybe (Prelude.NonEmpty Tag))
requestCertificate_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> RequestCertificate -> f RequestCertificate
requestCertificate_tags = (RequestCertificate -> Maybe (NonEmpty Tag))
-> (RequestCertificate
    -> Maybe (NonEmpty Tag) -> RequestCertificate)
-> Lens
     RequestCertificate
     RequestCertificate
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: RequestCertificate
s@RequestCertificate' {} Maybe (NonEmpty Tag)
a -> RequestCertificate
s {$sel:tags:RequestCertificate' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: RequestCertificate) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
 -> RequestCertificate -> f RequestCertificate)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
    -> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> RequestCertificate
-> f RequestCertificate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
-> Iso
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Fully qualified domain name (FQDN), such as www.example.com, that you
-- want to secure with an ACM certificate. Use an asterisk (*) to create a
-- wildcard certificate that protects several sites in the same domain. For
-- example, *.example.com protects www.example.com, site.example.com, and
-- images.example.com.
--
-- The first domain name you enter cannot exceed 64 octets, including
-- periods. Each subsequent Subject Alternative Name (SAN), however, can be
-- up to 253 octets in length.
requestCertificate_domainName :: Lens.Lens' RequestCertificate Prelude.Text
requestCertificate_domainName :: (Text -> f Text) -> RequestCertificate -> f RequestCertificate
requestCertificate_domainName = (RequestCertificate -> Text)
-> (RequestCertificate -> Text -> RequestCertificate)
-> Lens RequestCertificate RequestCertificate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificate' {Text
domainName :: Text
$sel:domainName:RequestCertificate' :: RequestCertificate -> Text
domainName} -> Text
domainName) (\s :: RequestCertificate
s@RequestCertificate' {} Text
a -> RequestCertificate
s {$sel:domainName:RequestCertificate' :: Text
domainName = Text
a} :: RequestCertificate)

instance Core.AWSRequest RequestCertificate where
  type
    AWSResponse RequestCertificate =
      RequestCertificateResponse
  request :: RequestCertificate -> Request RequestCertificate
request = Service -> RequestCertificate -> Request RequestCertificate
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy RequestCertificate
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RequestCertificate)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse RequestCertificate))
-> Logger
-> Service
-> Proxy RequestCertificate
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RequestCertificate)))
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 Text -> Int -> RequestCertificateResponse
RequestCertificateResponse'
            (Maybe Text -> Int -> RequestCertificateResponse)
-> Either String (Maybe Text)
-> Either String (Int -> RequestCertificateResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CertificateArn")
            Either String (Int -> RequestCertificateResponse)
-> Either String Int -> Either String RequestCertificateResponse
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 RequestCertificate

instance Prelude.NFData RequestCertificate

instance Core.ToHeaders RequestCertificate where
  toHeaders :: RequestCertificate -> ResponseHeaders
toHeaders =
    ResponseHeaders -> RequestCertificate -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"CertificateManager.RequestCertificate" ::
                          Prelude.ByteString
                      ),
            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 RequestCertificate where
  toJSON :: RequestCertificate -> Value
toJSON RequestCertificate' {Maybe (NonEmpty Text)
Maybe (NonEmpty DomainValidationOption)
Maybe (NonEmpty Tag)
Maybe Text
Maybe CertificateOptions
Maybe ValidationMethod
Text
domainName :: Text
tags :: Maybe (NonEmpty Tag)
certificateAuthorityArn :: Maybe Text
domainValidationOptions :: Maybe (NonEmpty DomainValidationOption)
options :: Maybe CertificateOptions
subjectAlternativeNames :: Maybe (NonEmpty Text)
validationMethod :: Maybe ValidationMethod
idempotencyToken :: Maybe Text
$sel:domainName:RequestCertificate' :: RequestCertificate -> Text
$sel:tags:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Tag)
$sel:certificateAuthorityArn:RequestCertificate' :: RequestCertificate -> Maybe Text
$sel:domainValidationOptions:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty DomainValidationOption)
$sel:options:RequestCertificate' :: RequestCertificate -> Maybe CertificateOptions
$sel:subjectAlternativeNames:RequestCertificate' :: RequestCertificate -> Maybe (NonEmpty Text)
$sel:validationMethod:RequestCertificate' :: RequestCertificate -> Maybe ValidationMethod
$sel:idempotencyToken:RequestCertificate' :: RequestCertificate -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"IdempotencyToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
idempotencyToken,
            (Text
"ValidationMethod" Text -> ValidationMethod -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ValidationMethod -> Pair) -> Maybe ValidationMethod -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ValidationMethod
validationMethod,
            (Text
"SubjectAlternativeNames" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
subjectAlternativeNames,
            (Text
"Options" Text -> CertificateOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CertificateOptions -> Pair)
-> Maybe CertificateOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CertificateOptions
options,
            (Text
"DomainValidationOptions" Text -> NonEmpty DomainValidationOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty DomainValidationOption -> Pair)
-> Maybe (NonEmpty DomainValidationOption) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty DomainValidationOption)
domainValidationOptions,
            (Text
"CertificateAuthorityArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
certificateAuthorityArn,
            (Text
"Tags" Text -> NonEmpty Tag -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Tag -> Pair) -> Maybe (NonEmpty Tag) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Tag)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainName)
          ]
      )

instance Core.ToPath RequestCertificate where
  toPath :: RequestCertificate -> ByteString
toPath = ByteString -> RequestCertificate -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newRequestCertificateResponse' smart constructor.
data RequestCertificateResponse = RequestCertificateResponse'
  { -- | String that contains the ARN of the issued certificate. This must be of
    -- the form:
    --
    -- @arn:aws:acm:us-east-1:123456789012:certificate\/12345678-1234-1234-1234-123456789012@
    RequestCertificateResponse -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    RequestCertificateResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RequestCertificateResponse -> RequestCertificateResponse -> Bool
(RequestCertificateResponse -> RequestCertificateResponse -> Bool)
-> (RequestCertificateResponse
    -> RequestCertificateResponse -> Bool)
-> Eq RequestCertificateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestCertificateResponse -> RequestCertificateResponse -> Bool
$c/= :: RequestCertificateResponse -> RequestCertificateResponse -> Bool
== :: RequestCertificateResponse -> RequestCertificateResponse -> Bool
$c== :: RequestCertificateResponse -> RequestCertificateResponse -> Bool
Prelude.Eq, ReadPrec [RequestCertificateResponse]
ReadPrec RequestCertificateResponse
Int -> ReadS RequestCertificateResponse
ReadS [RequestCertificateResponse]
(Int -> ReadS RequestCertificateResponse)
-> ReadS [RequestCertificateResponse]
-> ReadPrec RequestCertificateResponse
-> ReadPrec [RequestCertificateResponse]
-> Read RequestCertificateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RequestCertificateResponse]
$creadListPrec :: ReadPrec [RequestCertificateResponse]
readPrec :: ReadPrec RequestCertificateResponse
$creadPrec :: ReadPrec RequestCertificateResponse
readList :: ReadS [RequestCertificateResponse]
$creadList :: ReadS [RequestCertificateResponse]
readsPrec :: Int -> ReadS RequestCertificateResponse
$creadsPrec :: Int -> ReadS RequestCertificateResponse
Prelude.Read, Int -> RequestCertificateResponse -> ShowS
[RequestCertificateResponse] -> ShowS
RequestCertificateResponse -> String
(Int -> RequestCertificateResponse -> ShowS)
-> (RequestCertificateResponse -> String)
-> ([RequestCertificateResponse] -> ShowS)
-> Show RequestCertificateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RequestCertificateResponse] -> ShowS
$cshowList :: [RequestCertificateResponse] -> ShowS
show :: RequestCertificateResponse -> String
$cshow :: RequestCertificateResponse -> String
showsPrec :: Int -> RequestCertificateResponse -> ShowS
$cshowsPrec :: Int -> RequestCertificateResponse -> ShowS
Prelude.Show, (forall x.
 RequestCertificateResponse -> Rep RequestCertificateResponse x)
-> (forall x.
    Rep RequestCertificateResponse x -> RequestCertificateResponse)
-> Generic RequestCertificateResponse
forall x.
Rep RequestCertificateResponse x -> RequestCertificateResponse
forall x.
RequestCertificateResponse -> Rep RequestCertificateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RequestCertificateResponse x -> RequestCertificateResponse
$cfrom :: forall x.
RequestCertificateResponse -> Rep RequestCertificateResponse x
Prelude.Generic)

-- |
-- Create a value of 'RequestCertificateResponse' 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:
--
-- 'certificateArn', 'requestCertificateResponse_certificateArn' - String that contains the ARN of the issued certificate. This must be of
-- the form:
--
-- @arn:aws:acm:us-east-1:123456789012:certificate\/12345678-1234-1234-1234-123456789012@
--
-- 'httpStatus', 'requestCertificateResponse_httpStatus' - The response's http status code.
newRequestCertificateResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RequestCertificateResponse
newRequestCertificateResponse :: Int -> RequestCertificateResponse
newRequestCertificateResponse Int
pHttpStatus_ =
  RequestCertificateResponse' :: Maybe Text -> Int -> RequestCertificateResponse
RequestCertificateResponse'
    { $sel:certificateArn:RequestCertificateResponse' :: Maybe Text
certificateArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RequestCertificateResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | String that contains the ARN of the issued certificate. This must be of
-- the form:
--
-- @arn:aws:acm:us-east-1:123456789012:certificate\/12345678-1234-1234-1234-123456789012@
requestCertificateResponse_certificateArn :: Lens.Lens' RequestCertificateResponse (Prelude.Maybe Prelude.Text)
requestCertificateResponse_certificateArn :: (Maybe Text -> f (Maybe Text))
-> RequestCertificateResponse -> f RequestCertificateResponse
requestCertificateResponse_certificateArn = (RequestCertificateResponse -> Maybe Text)
-> (RequestCertificateResponse
    -> Maybe Text -> RequestCertificateResponse)
-> Lens
     RequestCertificateResponse
     RequestCertificateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RequestCertificateResponse' {Maybe Text
certificateArn :: Maybe Text
$sel:certificateArn:RequestCertificateResponse' :: RequestCertificateResponse -> Maybe Text
certificateArn} -> Maybe Text
certificateArn) (\s :: RequestCertificateResponse
s@RequestCertificateResponse' {} Maybe Text
a -> RequestCertificateResponse
s {$sel:certificateArn:RequestCertificateResponse' :: Maybe Text
certificateArn = Maybe Text
a} :: RequestCertificateResponse)

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

instance Prelude.NFData RequestCertificateResponse