{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Lightsail.Types.Certificate
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Lightsail.Types.Certificate where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lightsail.Types.CertificateStatus
import Amazonka.Lightsail.Types.DomainValidationRecord
import Amazonka.Lightsail.Types.RenewalSummary
import Amazonka.Lightsail.Types.Tag
import qualified Amazonka.Prelude as Prelude

-- | Describes the full details of an Amazon Lightsail SSL\/TLS certificate.
--
-- To get a summary of a certificate, use the @GetCertificates@ action and
-- ommit @includeCertificateDetails@ from your request. The response will
-- include only the certificate Amazon Resource Name (ARN), certificate
-- name, domain name, and tags.
--
-- /See:/ 'newCertificate' smart constructor.
data Certificate = Certificate'
  { -- | The Amazon Resource Name (ARN) of the certificate.
    Certificate -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the certificate was created.
    Certificate -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
    -- | The domain name of the certificate.
    Certificate -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    -- | An array of objects that describe the domain validation records of the
    -- certificate.
    Certificate -> Maybe [DomainValidationRecord]
domainValidationRecords :: Prelude.Maybe [DomainValidationRecord],
    -- | The renewal eligibility of the certificate.
    Certificate -> Maybe Text
eligibleToRenew :: Prelude.Maybe Prelude.Text,
    -- | The number of Lightsail resources that the certificate is attached to.
    Certificate -> Maybe Int
inUseResourceCount :: Prelude.Maybe Prelude.Int,
    -- | The timestamp when the certificate was issued.
    Certificate -> Maybe POSIX
issuedAt :: Prelude.Maybe Data.POSIX,
    -- | The certificate authority that issued the certificate.
    Certificate -> Maybe Text
issuerCA :: Prelude.Maybe Prelude.Text,
    -- | The algorithm used to generate the key pair (the public and private key)
    -- of the certificate.
    Certificate -> Maybe Text
keyAlgorithm :: Prelude.Maybe Prelude.Text,
    -- | The name of the certificate (e.g., @my-certificate@).
    Certificate -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the certificate expires.
    Certificate -> Maybe POSIX
notAfter :: Prelude.Maybe Data.POSIX,
    -- | The timestamp when the certificate is first valid.
    Certificate -> Maybe POSIX
notBefore :: Prelude.Maybe Data.POSIX,
    -- | An object that describes the status of the certificate renewal managed
    -- by Lightsail.
    Certificate -> Maybe RenewalSummary
renewalSummary :: Prelude.Maybe RenewalSummary,
    -- | The validation failure reason, if any, of the certificate.
    --
    -- The following failure reasons are possible:
    --
    -- -   __@NO_AVAILABLE_CONTACTS@__ - This failure applies to email
    --     validation, which is not available for Lightsail certificates.
    --
    -- -   __@ADDITIONAL_VERIFICATION_REQUIRED@__ - Lightsail requires
    --     additional information to process this certificate request. This can
    --     happen as a fraud-protection measure, such as when the domain ranks
    --     within the Alexa top 1000 websites. To provide the required
    --     information, use the
    --     <https://console.aws.amazon.com/support/home Amazon Web Services Support Center>
    --     to contact Amazon Web Services Support.
    --
    --     You cannot request a certificate for Amazon-owned domain names such
    --     as those ending in amazonaws.com, cloudfront.net, or
    --     elasticbeanstalk.com.
    --
    -- -   __@DOMAIN_NOT_ALLOWED@__ - One or more of the domain names in the
    --     certificate request was reported as an unsafe domain by
    --     <https://www.virustotal.com/gui/home/url VirusTotal>. To correct the
    --     problem, search for your domain name on the
    --     <https://www.virustotal.com/gui/home/url VirusTotal> website. If
    --     your domain is reported as suspicious, see
    --     <https://developers.google.com/web/fundamentals/security/hacked Google Help for Hacked Websites>
    --     to learn what you can do.
    --
    --     If you believe that the result is a false positive, notify the
    --     organization that is reporting the domain. VirusTotal is an
    --     aggregate of several antivirus and URL scanners and cannot remove
    --     your domain from a block list itself. After you correct the problem
    --     and the VirusTotal registry has been updated, request a new
    --     certificate.
    --
    --     If you see this error and your domain is not included in the
    --     VirusTotal list, visit the
    --     <https://console.aws.amazon.com/support/home Amazon Web Services Support Center>
    --     and create a case.
    --
    -- -   __@INVALID_PUBLIC_DOMAIN@__ - One or more of the domain names in the
    --     certificate request is not valid. Typically, this is because a
    --     domain name in the request is not a valid top-level domain. Try to
    --     request a certificate again, correcting any spelling errors or typos
    --     that were in the failed request, and ensure that all domain names in
    --     the request are for valid top-level domains. For example, you cannot
    --     request a certificate for @example.invalidpublicdomain@ because
    --     @invalidpublicdomain@ is not a valid top-level domain.
    --
    -- -   __@OTHER@__ - Typically, this failure occurs when there is a
    --     typographical error in one or more of the domain names in the
    --     certificate request. Try to request a certificate again, correcting
    --     any spelling errors or typos that were in the failed request.
    Certificate -> Maybe Text
requestFailureReason :: Prelude.Maybe Prelude.Text,
    -- | The reason the certificate was revoked. This value is present only when
    -- the certificate status is @REVOKED@.
    Certificate -> Maybe Text
revocationReason :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the certificate was revoked. This value is present
    -- only when the certificate status is @REVOKED@.
    Certificate -> Maybe POSIX
revokedAt :: Prelude.Maybe Data.POSIX,
    -- | The serial number of the certificate.
    Certificate -> Maybe Text
serialNumber :: Prelude.Maybe Prelude.Text,
    -- | The validation status of the certificate.
    Certificate -> Maybe CertificateStatus
status :: Prelude.Maybe CertificateStatus,
    -- | An array of strings that specify the alternate domains (e.g.,
    -- @example2.com@) and subdomains (e.g., @blog.example.com@) of the
    -- certificate.
    Certificate -> Maybe [Text]
subjectAlternativeNames :: Prelude.Maybe [Prelude.Text],
    -- | The support code. Include this code in your email to support when you
    -- have questions about your Lightsail certificate. This code enables our
    -- support team to look up your Lightsail information more easily.
    Certificate -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text,
    -- | The tag keys and optional values for the resource. For more information
    -- about tags in Lightsail, see the
    -- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
    Certificate -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (Certificate -> Certificate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Certificate -> Certificate -> Bool
$c/= :: Certificate -> Certificate -> Bool
== :: Certificate -> Certificate -> Bool
$c== :: Certificate -> Certificate -> Bool
Prelude.Eq, ReadPrec [Certificate]
ReadPrec Certificate
Int -> ReadS Certificate
ReadS [Certificate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Certificate]
$creadListPrec :: ReadPrec [Certificate]
readPrec :: ReadPrec Certificate
$creadPrec :: ReadPrec Certificate
readList :: ReadS [Certificate]
$creadList :: ReadS [Certificate]
readsPrec :: Int -> ReadS Certificate
$creadsPrec :: Int -> ReadS Certificate
Prelude.Read, Int -> Certificate -> ShowS
[Certificate] -> ShowS
Certificate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Certificate] -> ShowS
$cshowList :: [Certificate] -> ShowS
show :: Certificate -> String
$cshow :: Certificate -> String
showsPrec :: Int -> Certificate -> ShowS
$cshowsPrec :: Int -> Certificate -> ShowS
Prelude.Show, forall x. Rep Certificate x -> Certificate
forall x. Certificate -> Rep Certificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Certificate x -> Certificate
$cfrom :: forall x. Certificate -> Rep Certificate x
Prelude.Generic)

-- |
-- Create a value of 'Certificate' 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:
--
-- 'arn', 'certificate_arn' - The Amazon Resource Name (ARN) of the certificate.
--
-- 'createdAt', 'certificate_createdAt' - The timestamp when the certificate was created.
--
-- 'domainName', 'certificate_domainName' - The domain name of the certificate.
--
-- 'domainValidationRecords', 'certificate_domainValidationRecords' - An array of objects that describe the domain validation records of the
-- certificate.
--
-- 'eligibleToRenew', 'certificate_eligibleToRenew' - The renewal eligibility of the certificate.
--
-- 'inUseResourceCount', 'certificate_inUseResourceCount' - The number of Lightsail resources that the certificate is attached to.
--
-- 'issuedAt', 'certificate_issuedAt' - The timestamp when the certificate was issued.
--
-- 'issuerCA', 'certificate_issuerCA' - The certificate authority that issued the certificate.
--
-- 'keyAlgorithm', 'certificate_keyAlgorithm' - The algorithm used to generate the key pair (the public and private key)
-- of the certificate.
--
-- 'name', 'certificate_name' - The name of the certificate (e.g., @my-certificate@).
--
-- 'notAfter', 'certificate_notAfter' - The timestamp when the certificate expires.
--
-- 'notBefore', 'certificate_notBefore' - The timestamp when the certificate is first valid.
--
-- 'renewalSummary', 'certificate_renewalSummary' - An object that describes the status of the certificate renewal managed
-- by Lightsail.
--
-- 'requestFailureReason', 'certificate_requestFailureReason' - The validation failure reason, if any, of the certificate.
--
-- The following failure reasons are possible:
--
-- -   __@NO_AVAILABLE_CONTACTS@__ - This failure applies to email
--     validation, which is not available for Lightsail certificates.
--
-- -   __@ADDITIONAL_VERIFICATION_REQUIRED@__ - Lightsail requires
--     additional information to process this certificate request. This can
--     happen as a fraud-protection measure, such as when the domain ranks
--     within the Alexa top 1000 websites. To provide the required
--     information, use the
--     <https://console.aws.amazon.com/support/home Amazon Web Services Support Center>
--     to contact Amazon Web Services Support.
--
--     You cannot request a certificate for Amazon-owned domain names such
--     as those ending in amazonaws.com, cloudfront.net, or
--     elasticbeanstalk.com.
--
-- -   __@DOMAIN_NOT_ALLOWED@__ - One or more of the domain names in the
--     certificate request was reported as an unsafe domain by
--     <https://www.virustotal.com/gui/home/url VirusTotal>. To correct the
--     problem, search for your domain name on the
--     <https://www.virustotal.com/gui/home/url VirusTotal> website. If
--     your domain is reported as suspicious, see
--     <https://developers.google.com/web/fundamentals/security/hacked Google Help for Hacked Websites>
--     to learn what you can do.
--
--     If you believe that the result is a false positive, notify the
--     organization that is reporting the domain. VirusTotal is an
--     aggregate of several antivirus and URL scanners and cannot remove
--     your domain from a block list itself. After you correct the problem
--     and the VirusTotal registry has been updated, request a new
--     certificate.
--
--     If you see this error and your domain is not included in the
--     VirusTotal list, visit the
--     <https://console.aws.amazon.com/support/home Amazon Web Services Support Center>
--     and create a case.
--
-- -   __@INVALID_PUBLIC_DOMAIN@__ - One or more of the domain names in the
--     certificate request is not valid. Typically, this is because a
--     domain name in the request is not a valid top-level domain. Try to
--     request a certificate again, correcting any spelling errors or typos
--     that were in the failed request, and ensure that all domain names in
--     the request are for valid top-level domains. For example, you cannot
--     request a certificate for @example.invalidpublicdomain@ because
--     @invalidpublicdomain@ is not a valid top-level domain.
--
-- -   __@OTHER@__ - Typically, this failure occurs when there is a
--     typographical error in one or more of the domain names in the
--     certificate request. Try to request a certificate again, correcting
--     any spelling errors or typos that were in the failed request.
--
-- 'revocationReason', 'certificate_revocationReason' - The reason the certificate was revoked. This value is present only when
-- the certificate status is @REVOKED@.
--
-- 'revokedAt', 'certificate_revokedAt' - The timestamp when the certificate was revoked. This value is present
-- only when the certificate status is @REVOKED@.
--
-- 'serialNumber', 'certificate_serialNumber' - The serial number of the certificate.
--
-- 'status', 'certificate_status' - The validation status of the certificate.
--
-- 'subjectAlternativeNames', 'certificate_subjectAlternativeNames' - An array of strings that specify the alternate domains (e.g.,
-- @example2.com@) and subdomains (e.g., @blog.example.com@) of the
-- certificate.
--
-- 'supportCode', 'certificate_supportCode' - The support code. Include this code in your email to support when you
-- have questions about your Lightsail certificate. This code enables our
-- support team to look up your Lightsail information more easily.
--
-- 'tags', 'certificate_tags' - The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
newCertificate ::
  Certificate
newCertificate :: Certificate
newCertificate =
  Certificate'
    { $sel:arn:Certificate' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Certificate' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:Certificate' :: Maybe Text
domainName = forall a. Maybe a
Prelude.Nothing,
      $sel:domainValidationRecords:Certificate' :: Maybe [DomainValidationRecord]
domainValidationRecords = forall a. Maybe a
Prelude.Nothing,
      $sel:eligibleToRenew:Certificate' :: Maybe Text
eligibleToRenew = forall a. Maybe a
Prelude.Nothing,
      $sel:inUseResourceCount:Certificate' :: Maybe Int
inUseResourceCount = forall a. Maybe a
Prelude.Nothing,
      $sel:issuedAt:Certificate' :: Maybe POSIX
issuedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:issuerCA:Certificate' :: Maybe Text
issuerCA = forall a. Maybe a
Prelude.Nothing,
      $sel:keyAlgorithm:Certificate' :: Maybe Text
keyAlgorithm = forall a. Maybe a
Prelude.Nothing,
      $sel:name:Certificate' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:notAfter:Certificate' :: Maybe POSIX
notAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:notBefore:Certificate' :: Maybe POSIX
notBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:renewalSummary:Certificate' :: Maybe RenewalSummary
renewalSummary = forall a. Maybe a
Prelude.Nothing,
      $sel:requestFailureReason:Certificate' :: Maybe Text
requestFailureReason = forall a. Maybe a
Prelude.Nothing,
      $sel:revocationReason:Certificate' :: Maybe Text
revocationReason = forall a. Maybe a
Prelude.Nothing,
      $sel:revokedAt:Certificate' :: Maybe POSIX
revokedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:serialNumber:Certificate' :: Maybe Text
serialNumber = forall a. Maybe a
Prelude.Nothing,
      $sel:status:Certificate' :: Maybe CertificateStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:subjectAlternativeNames:Certificate' :: Maybe [Text]
subjectAlternativeNames = forall a. Maybe a
Prelude.Nothing,
      $sel:supportCode:Certificate' :: Maybe Text
supportCode = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Certificate' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the certificate.
certificate_arn :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_arn :: Lens' Certificate (Maybe Text)
certificate_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
arn :: Maybe Text
$sel:arn:Certificate' :: Certificate -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:arn:Certificate' :: Maybe Text
arn = Maybe Text
a} :: Certificate)

-- | The timestamp when the certificate was created.
certificate_createdAt :: Lens.Lens' Certificate (Prelude.Maybe Prelude.UTCTime)
certificate_createdAt :: Lens' Certificate (Maybe UTCTime)
certificate_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Certificate' :: Certificate -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Certificate
s@Certificate' {} Maybe POSIX
a -> Certificate
s {$sel:createdAt:Certificate' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Certificate) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The domain name of the certificate.
certificate_domainName :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_domainName :: Lens' Certificate (Maybe Text)
certificate_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
domainName :: Maybe Text
$sel:domainName:Certificate' :: Certificate -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:domainName:Certificate' :: Maybe Text
domainName = Maybe Text
a} :: Certificate)

-- | An array of objects that describe the domain validation records of the
-- certificate.
certificate_domainValidationRecords :: Lens.Lens' Certificate (Prelude.Maybe [DomainValidationRecord])
certificate_domainValidationRecords :: Lens' Certificate (Maybe [DomainValidationRecord])
certificate_domainValidationRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe [DomainValidationRecord]
domainValidationRecords :: Maybe [DomainValidationRecord]
$sel:domainValidationRecords:Certificate' :: Certificate -> Maybe [DomainValidationRecord]
domainValidationRecords} -> Maybe [DomainValidationRecord]
domainValidationRecords) (\s :: Certificate
s@Certificate' {} Maybe [DomainValidationRecord]
a -> Certificate
s {$sel:domainValidationRecords:Certificate' :: Maybe [DomainValidationRecord]
domainValidationRecords = Maybe [DomainValidationRecord]
a} :: Certificate) 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 renewal eligibility of the certificate.
certificate_eligibleToRenew :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_eligibleToRenew :: Lens' Certificate (Maybe Text)
certificate_eligibleToRenew = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
eligibleToRenew :: Maybe Text
$sel:eligibleToRenew:Certificate' :: Certificate -> Maybe Text
eligibleToRenew} -> Maybe Text
eligibleToRenew) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:eligibleToRenew:Certificate' :: Maybe Text
eligibleToRenew = Maybe Text
a} :: Certificate)

-- | The number of Lightsail resources that the certificate is attached to.
certificate_inUseResourceCount :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Int)
certificate_inUseResourceCount :: Lens' Certificate (Maybe Int)
certificate_inUseResourceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Int
inUseResourceCount :: Maybe Int
$sel:inUseResourceCount:Certificate' :: Certificate -> Maybe Int
inUseResourceCount} -> Maybe Int
inUseResourceCount) (\s :: Certificate
s@Certificate' {} Maybe Int
a -> Certificate
s {$sel:inUseResourceCount:Certificate' :: Maybe Int
inUseResourceCount = Maybe Int
a} :: Certificate)

-- | The timestamp when the certificate was issued.
certificate_issuedAt :: Lens.Lens' Certificate (Prelude.Maybe Prelude.UTCTime)
certificate_issuedAt :: Lens' Certificate (Maybe UTCTime)
certificate_issuedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe POSIX
issuedAt :: Maybe POSIX
$sel:issuedAt:Certificate' :: Certificate -> Maybe POSIX
issuedAt} -> Maybe POSIX
issuedAt) (\s :: Certificate
s@Certificate' {} Maybe POSIX
a -> Certificate
s {$sel:issuedAt:Certificate' :: Maybe POSIX
issuedAt = Maybe POSIX
a} :: Certificate) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The certificate authority that issued the certificate.
certificate_issuerCA :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_issuerCA :: Lens' Certificate (Maybe Text)
certificate_issuerCA = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
issuerCA :: Maybe Text
$sel:issuerCA:Certificate' :: Certificate -> Maybe Text
issuerCA} -> Maybe Text
issuerCA) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:issuerCA:Certificate' :: Maybe Text
issuerCA = Maybe Text
a} :: Certificate)

-- | The algorithm used to generate the key pair (the public and private key)
-- of the certificate.
certificate_keyAlgorithm :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_keyAlgorithm :: Lens' Certificate (Maybe Text)
certificate_keyAlgorithm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
keyAlgorithm :: Maybe Text
$sel:keyAlgorithm:Certificate' :: Certificate -> Maybe Text
keyAlgorithm} -> Maybe Text
keyAlgorithm) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:keyAlgorithm:Certificate' :: Maybe Text
keyAlgorithm = Maybe Text
a} :: Certificate)

-- | The name of the certificate (e.g., @my-certificate@).
certificate_name :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_name :: Lens' Certificate (Maybe Text)
certificate_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
name :: Maybe Text
$sel:name:Certificate' :: Certificate -> Maybe Text
name} -> Maybe Text
name) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:name:Certificate' :: Maybe Text
name = Maybe Text
a} :: Certificate)

-- | The timestamp when the certificate expires.
certificate_notAfter :: Lens.Lens' Certificate (Prelude.Maybe Prelude.UTCTime)
certificate_notAfter :: Lens' Certificate (Maybe UTCTime)
certificate_notAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe POSIX
notAfter :: Maybe POSIX
$sel:notAfter:Certificate' :: Certificate -> Maybe POSIX
notAfter} -> Maybe POSIX
notAfter) (\s :: Certificate
s@Certificate' {} Maybe POSIX
a -> Certificate
s {$sel:notAfter:Certificate' :: Maybe POSIX
notAfter = Maybe POSIX
a} :: Certificate) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The timestamp when the certificate is first valid.
certificate_notBefore :: Lens.Lens' Certificate (Prelude.Maybe Prelude.UTCTime)
certificate_notBefore :: Lens' Certificate (Maybe UTCTime)
certificate_notBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe POSIX
notBefore :: Maybe POSIX
$sel:notBefore:Certificate' :: Certificate -> Maybe POSIX
notBefore} -> Maybe POSIX
notBefore) (\s :: Certificate
s@Certificate' {} Maybe POSIX
a -> Certificate
s {$sel:notBefore:Certificate' :: Maybe POSIX
notBefore = Maybe POSIX
a} :: Certificate) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | An object that describes the status of the certificate renewal managed
-- by Lightsail.
certificate_renewalSummary :: Lens.Lens' Certificate (Prelude.Maybe RenewalSummary)
certificate_renewalSummary :: Lens' Certificate (Maybe RenewalSummary)
certificate_renewalSummary = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe RenewalSummary
renewalSummary :: Maybe RenewalSummary
$sel:renewalSummary:Certificate' :: Certificate -> Maybe RenewalSummary
renewalSummary} -> Maybe RenewalSummary
renewalSummary) (\s :: Certificate
s@Certificate' {} Maybe RenewalSummary
a -> Certificate
s {$sel:renewalSummary:Certificate' :: Maybe RenewalSummary
renewalSummary = Maybe RenewalSummary
a} :: Certificate)

-- | The validation failure reason, if any, of the certificate.
--
-- The following failure reasons are possible:
--
-- -   __@NO_AVAILABLE_CONTACTS@__ - This failure applies to email
--     validation, which is not available for Lightsail certificates.
--
-- -   __@ADDITIONAL_VERIFICATION_REQUIRED@__ - Lightsail requires
--     additional information to process this certificate request. This can
--     happen as a fraud-protection measure, such as when the domain ranks
--     within the Alexa top 1000 websites. To provide the required
--     information, use the
--     <https://console.aws.amazon.com/support/home Amazon Web Services Support Center>
--     to contact Amazon Web Services Support.
--
--     You cannot request a certificate for Amazon-owned domain names such
--     as those ending in amazonaws.com, cloudfront.net, or
--     elasticbeanstalk.com.
--
-- -   __@DOMAIN_NOT_ALLOWED@__ - One or more of the domain names in the
--     certificate request was reported as an unsafe domain by
--     <https://www.virustotal.com/gui/home/url VirusTotal>. To correct the
--     problem, search for your domain name on the
--     <https://www.virustotal.com/gui/home/url VirusTotal> website. If
--     your domain is reported as suspicious, see
--     <https://developers.google.com/web/fundamentals/security/hacked Google Help for Hacked Websites>
--     to learn what you can do.
--
--     If you believe that the result is a false positive, notify the
--     organization that is reporting the domain. VirusTotal is an
--     aggregate of several antivirus and URL scanners and cannot remove
--     your domain from a block list itself. After you correct the problem
--     and the VirusTotal registry has been updated, request a new
--     certificate.
--
--     If you see this error and your domain is not included in the
--     VirusTotal list, visit the
--     <https://console.aws.amazon.com/support/home Amazon Web Services Support Center>
--     and create a case.
--
-- -   __@INVALID_PUBLIC_DOMAIN@__ - One or more of the domain names in the
--     certificate request is not valid. Typically, this is because a
--     domain name in the request is not a valid top-level domain. Try to
--     request a certificate again, correcting any spelling errors or typos
--     that were in the failed request, and ensure that all domain names in
--     the request are for valid top-level domains. For example, you cannot
--     request a certificate for @example.invalidpublicdomain@ because
--     @invalidpublicdomain@ is not a valid top-level domain.
--
-- -   __@OTHER@__ - Typically, this failure occurs when there is a
--     typographical error in one or more of the domain names in the
--     certificate request. Try to request a certificate again, correcting
--     any spelling errors or typos that were in the failed request.
certificate_requestFailureReason :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_requestFailureReason :: Lens' Certificate (Maybe Text)
certificate_requestFailureReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
requestFailureReason :: Maybe Text
$sel:requestFailureReason:Certificate' :: Certificate -> Maybe Text
requestFailureReason} -> Maybe Text
requestFailureReason) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:requestFailureReason:Certificate' :: Maybe Text
requestFailureReason = Maybe Text
a} :: Certificate)

-- | The reason the certificate was revoked. This value is present only when
-- the certificate status is @REVOKED@.
certificate_revocationReason :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_revocationReason :: Lens' Certificate (Maybe Text)
certificate_revocationReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
revocationReason :: Maybe Text
$sel:revocationReason:Certificate' :: Certificate -> Maybe Text
revocationReason} -> Maybe Text
revocationReason) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:revocationReason:Certificate' :: Maybe Text
revocationReason = Maybe Text
a} :: Certificate)

-- | The timestamp when the certificate was revoked. This value is present
-- only when the certificate status is @REVOKED@.
certificate_revokedAt :: Lens.Lens' Certificate (Prelude.Maybe Prelude.UTCTime)
certificate_revokedAt :: Lens' Certificate (Maybe UTCTime)
certificate_revokedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe POSIX
revokedAt :: Maybe POSIX
$sel:revokedAt:Certificate' :: Certificate -> Maybe POSIX
revokedAt} -> Maybe POSIX
revokedAt) (\s :: Certificate
s@Certificate' {} Maybe POSIX
a -> Certificate
s {$sel:revokedAt:Certificate' :: Maybe POSIX
revokedAt = Maybe POSIX
a} :: Certificate) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The serial number of the certificate.
certificate_serialNumber :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_serialNumber :: Lens' Certificate (Maybe Text)
certificate_serialNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
serialNumber :: Maybe Text
$sel:serialNumber:Certificate' :: Certificate -> Maybe Text
serialNumber} -> Maybe Text
serialNumber) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:serialNumber:Certificate' :: Maybe Text
serialNumber = Maybe Text
a} :: Certificate)

-- | The validation status of the certificate.
certificate_status :: Lens.Lens' Certificate (Prelude.Maybe CertificateStatus)
certificate_status :: Lens' Certificate (Maybe CertificateStatus)
certificate_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe CertificateStatus
status :: Maybe CertificateStatus
$sel:status:Certificate' :: Certificate -> Maybe CertificateStatus
status} -> Maybe CertificateStatus
status) (\s :: Certificate
s@Certificate' {} Maybe CertificateStatus
a -> Certificate
s {$sel:status:Certificate' :: Maybe CertificateStatus
status = Maybe CertificateStatus
a} :: Certificate)

-- | An array of strings that specify the alternate domains (e.g.,
-- @example2.com@) and subdomains (e.g., @blog.example.com@) of the
-- certificate.
certificate_subjectAlternativeNames :: Lens.Lens' Certificate (Prelude.Maybe [Prelude.Text])
certificate_subjectAlternativeNames :: Lens' Certificate (Maybe [Text])
certificate_subjectAlternativeNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe [Text]
subjectAlternativeNames :: Maybe [Text]
$sel:subjectAlternativeNames:Certificate' :: Certificate -> Maybe [Text]
subjectAlternativeNames} -> Maybe [Text]
subjectAlternativeNames) (\s :: Certificate
s@Certificate' {} Maybe [Text]
a -> Certificate
s {$sel:subjectAlternativeNames:Certificate' :: Maybe [Text]
subjectAlternativeNames = Maybe [Text]
a} :: Certificate) 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 support code. Include this code in your email to support when you
-- have questions about your Lightsail certificate. This code enables our
-- support team to look up your Lightsail information more easily.
certificate_supportCode :: Lens.Lens' Certificate (Prelude.Maybe Prelude.Text)
certificate_supportCode :: Lens' Certificate (Maybe Text)
certificate_supportCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe Text
supportCode :: Maybe Text
$sel:supportCode:Certificate' :: Certificate -> Maybe Text
supportCode} -> Maybe Text
supportCode) (\s :: Certificate
s@Certificate' {} Maybe Text
a -> Certificate
s {$sel:supportCode:Certificate' :: Maybe Text
supportCode = Maybe Text
a} :: Certificate)

-- | The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
certificate_tags :: Lens.Lens' Certificate (Prelude.Maybe [Tag])
certificate_tags :: Lens' Certificate (Maybe [Tag])
certificate_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Certificate' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Certificate' :: Certificate -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Certificate
s@Certificate' {} Maybe [Tag]
a -> Certificate
s {$sel:tags:Certificate' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Certificate) 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

instance Data.FromJSON Certificate where
  parseJSON :: Value -> Parser Certificate
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Certificate"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [DomainValidationRecord]
-> Maybe Text
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe RenewalSummary
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe CertificateStatus
-> Maybe [Text]
-> Maybe Text
-> Maybe [Tag]
-> Certificate
Certificate'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"domainName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"domainValidationRecords"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"eligibleToRenew")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"inUseResourceCount")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"issuedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"issuerCA")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"keyAlgorithm")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"notAfter")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"notBefore")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"renewalSummary")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"requestFailureReason")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"revocationReason")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"revokedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"serialNumber")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"subjectAlternativeNames"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"supportCode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable Certificate where
  hashWithSalt :: Int -> Certificate -> Int
hashWithSalt Int
_salt Certificate' {Maybe Int
Maybe [Text]
Maybe [DomainValidationRecord]
Maybe [Tag]
Maybe Text
Maybe POSIX
Maybe CertificateStatus
Maybe RenewalSummary
tags :: Maybe [Tag]
supportCode :: Maybe Text
subjectAlternativeNames :: Maybe [Text]
status :: Maybe CertificateStatus
serialNumber :: Maybe Text
revokedAt :: Maybe POSIX
revocationReason :: Maybe Text
requestFailureReason :: Maybe Text
renewalSummary :: Maybe RenewalSummary
notBefore :: Maybe POSIX
notAfter :: Maybe POSIX
name :: Maybe Text
keyAlgorithm :: Maybe Text
issuerCA :: Maybe Text
issuedAt :: Maybe POSIX
inUseResourceCount :: Maybe Int
eligibleToRenew :: Maybe Text
domainValidationRecords :: Maybe [DomainValidationRecord]
domainName :: Maybe Text
createdAt :: Maybe POSIX
arn :: Maybe Text
$sel:tags:Certificate' :: Certificate -> Maybe [Tag]
$sel:supportCode:Certificate' :: Certificate -> Maybe Text
$sel:subjectAlternativeNames:Certificate' :: Certificate -> Maybe [Text]
$sel:status:Certificate' :: Certificate -> Maybe CertificateStatus
$sel:serialNumber:Certificate' :: Certificate -> Maybe Text
$sel:revokedAt:Certificate' :: Certificate -> Maybe POSIX
$sel:revocationReason:Certificate' :: Certificate -> Maybe Text
$sel:requestFailureReason:Certificate' :: Certificate -> Maybe Text
$sel:renewalSummary:Certificate' :: Certificate -> Maybe RenewalSummary
$sel:notBefore:Certificate' :: Certificate -> Maybe POSIX
$sel:notAfter:Certificate' :: Certificate -> Maybe POSIX
$sel:name:Certificate' :: Certificate -> Maybe Text
$sel:keyAlgorithm:Certificate' :: Certificate -> Maybe Text
$sel:issuerCA:Certificate' :: Certificate -> Maybe Text
$sel:issuedAt:Certificate' :: Certificate -> Maybe POSIX
$sel:inUseResourceCount:Certificate' :: Certificate -> Maybe Int
$sel:eligibleToRenew:Certificate' :: Certificate -> Maybe Text
$sel:domainValidationRecords:Certificate' :: Certificate -> Maybe [DomainValidationRecord]
$sel:domainName:Certificate' :: Certificate -> Maybe Text
$sel:createdAt:Certificate' :: Certificate -> Maybe POSIX
$sel:arn:Certificate' :: Certificate -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
domainName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [DomainValidationRecord]
domainValidationRecords
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
eligibleToRenew
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
inUseResourceCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
issuedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
issuerCA
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
keyAlgorithm
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
notAfter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
notBefore
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RenewalSummary
renewalSummary
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
requestFailureReason
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
revocationReason
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
revokedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serialNumber
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CertificateStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
subjectAlternativeNames
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
supportCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags

instance Prelude.NFData Certificate where
  rnf :: Certificate -> ()
rnf Certificate' {Maybe Int
Maybe [Text]
Maybe [DomainValidationRecord]
Maybe [Tag]
Maybe Text
Maybe POSIX
Maybe CertificateStatus
Maybe RenewalSummary
tags :: Maybe [Tag]
supportCode :: Maybe Text
subjectAlternativeNames :: Maybe [Text]
status :: Maybe CertificateStatus
serialNumber :: Maybe Text
revokedAt :: Maybe POSIX
revocationReason :: Maybe Text
requestFailureReason :: Maybe Text
renewalSummary :: Maybe RenewalSummary
notBefore :: Maybe POSIX
notAfter :: Maybe POSIX
name :: Maybe Text
keyAlgorithm :: Maybe Text
issuerCA :: Maybe Text
issuedAt :: Maybe POSIX
inUseResourceCount :: Maybe Int
eligibleToRenew :: Maybe Text
domainValidationRecords :: Maybe [DomainValidationRecord]
domainName :: Maybe Text
createdAt :: Maybe POSIX
arn :: Maybe Text
$sel:tags:Certificate' :: Certificate -> Maybe [Tag]
$sel:supportCode:Certificate' :: Certificate -> Maybe Text
$sel:subjectAlternativeNames:Certificate' :: Certificate -> Maybe [Text]
$sel:status:Certificate' :: Certificate -> Maybe CertificateStatus
$sel:serialNumber:Certificate' :: Certificate -> Maybe Text
$sel:revokedAt:Certificate' :: Certificate -> Maybe POSIX
$sel:revocationReason:Certificate' :: Certificate -> Maybe Text
$sel:requestFailureReason:Certificate' :: Certificate -> Maybe Text
$sel:renewalSummary:Certificate' :: Certificate -> Maybe RenewalSummary
$sel:notBefore:Certificate' :: Certificate -> Maybe POSIX
$sel:notAfter:Certificate' :: Certificate -> Maybe POSIX
$sel:name:Certificate' :: Certificate -> Maybe Text
$sel:keyAlgorithm:Certificate' :: Certificate -> Maybe Text
$sel:issuerCA:Certificate' :: Certificate -> Maybe Text
$sel:issuedAt:Certificate' :: Certificate -> Maybe POSIX
$sel:inUseResourceCount:Certificate' :: Certificate -> Maybe Int
$sel:eligibleToRenew:Certificate' :: Certificate -> Maybe Text
$sel:domainValidationRecords:Certificate' :: Certificate -> Maybe [DomainValidationRecord]
$sel:domainName:Certificate' :: Certificate -> Maybe Text
$sel:createdAt:Certificate' :: Certificate -> Maybe POSIX
$sel:arn:Certificate' :: Certificate -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
domainName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [DomainValidationRecord]
domainValidationRecords
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
eligibleToRenew
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
inUseResourceCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
issuedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
issuerCA
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
keyAlgorithm
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
notAfter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
notBefore
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RenewalSummary
renewalSummary
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requestFailureReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
revocationReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
revokedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serialNumber
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CertificateStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [Text]
subjectAlternativeNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
supportCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags