{-# 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.CertificateManagerPCA.Types.CertificateAuthority
-- 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)
module Amazonka.CertificateManagerPCA.Types.CertificateAuthority where

import Amazonka.CertificateManagerPCA.Types.CertificateAuthorityConfiguration
import Amazonka.CertificateManagerPCA.Types.CertificateAuthorityStatus
import Amazonka.CertificateManagerPCA.Types.CertificateAuthorityType
import Amazonka.CertificateManagerPCA.Types.FailureReason
import Amazonka.CertificateManagerPCA.Types.KeyStorageSecurityStandard
import Amazonka.CertificateManagerPCA.Types.RevocationConfiguration
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains information about your private certificate authority (CA). Your
-- private CA can issue and revoke X.509 digital certificates. Digital
-- certificates verify that the entity named in the certificate __Subject__
-- field owns or controls the public key contained in the __Subject Public
-- Key Info__ field. Call the
-- <https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html CreateCertificateAuthority>
-- action to create your private CA. You must then call the
-- <https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_GetCertificateAuthorityCertificate.html GetCertificateAuthorityCertificate>
-- action to retrieve a private CA certificate signing request (CSR). Sign
-- the CSR with your ACM Private CA-hosted or on-premises root or
-- subordinate CA certificate. Call the
-- <https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ImportCertificateAuthorityCertificate.html ImportCertificateAuthorityCertificate>
-- action to import the signed certificate into AWS Certificate Manager
-- (ACM).
--
-- /See:/ 'newCertificateAuthority' smart constructor.
data CertificateAuthority = CertificateAuthority'
  { -- | Status of your private CA.
    CertificateAuthority -> Maybe CertificateAuthorityStatus
status :: Prelude.Maybe CertificateAuthorityStatus,
    -- | Reason the request to create your private CA failed.
    CertificateAuthority -> Maybe FailureReason
failureReason :: Prelude.Maybe FailureReason,
    -- | Your private CA configuration.
    CertificateAuthority -> Maybe CertificateAuthorityConfiguration
certificateAuthorityConfiguration :: Prelude.Maybe CertificateAuthorityConfiguration,
    -- | Amazon Resource Name (ARN) for your private certificate authority (CA).
    -- The format is @ 12345678-1234-1234-1234-123456789012 @.
    CertificateAuthority -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Date and time at which your private CA was created.
    CertificateAuthority -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | Serial number of your private CA.
    CertificateAuthority -> Maybe Text
serial :: Prelude.Maybe Prelude.Text,
    -- | Defines a cryptographic key management compliance standard used for
    -- handling CA keys.
    --
    -- Default: FIPS_140_2_LEVEL_3_OR_HIGHER
    --
    -- Note: AWS Region ap-northeast-3 supports only
    -- FIPS_140_2_LEVEL_2_OR_HIGHER. You must explicitly specify this parameter
    -- and value when creating a CA in that Region. Specifying a different
    -- value (or no value) results in an @InvalidArgsException@ with the
    -- message \"A certificate authority cannot be created in this region with
    -- the specified security standard.\"
    CertificateAuthority -> Maybe KeyStorageSecurityStandard
keyStorageSecurityStandard :: Prelude.Maybe KeyStorageSecurityStandard,
    -- | Date and time before which your private CA certificate is not valid.
    CertificateAuthority -> Maybe POSIX
notBefore :: Prelude.Maybe Core.POSIX,
    -- | The period during which a deleted CA can be restored. For more
    -- information, see the @PermanentDeletionTimeInDays@ parameter of the
    -- <https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_DeleteCertificateAuthorityRequest.html DeleteCertificateAuthorityRequest>
    -- action.
    CertificateAuthority -> Maybe POSIX
restorableUntil :: Prelude.Maybe Core.POSIX,
    -- | Type of your private CA.
    CertificateAuthority -> Maybe CertificateAuthorityType
type' :: Prelude.Maybe CertificateAuthorityType,
    -- | The AWS account ID that owns the certificate authority.
    CertificateAuthority -> Maybe Text
ownerAccount :: Prelude.Maybe Prelude.Text,
    -- | Information about the Online Certificate Status Protocol (OCSP)
    -- configuration or certificate revocation list (CRL) created and
    -- maintained by your private CA.
    CertificateAuthority -> Maybe RevocationConfiguration
revocationConfiguration :: Prelude.Maybe RevocationConfiguration,
    -- | Date and time at which your private CA was last updated.
    CertificateAuthority -> Maybe POSIX
lastStateChangeAt :: Prelude.Maybe Core.POSIX,
    -- | Date and time after which your private CA certificate is not valid.
    CertificateAuthority -> Maybe POSIX
notAfter :: Prelude.Maybe Core.POSIX
  }
  deriving (CertificateAuthority -> CertificateAuthority -> Bool
(CertificateAuthority -> CertificateAuthority -> Bool)
-> (CertificateAuthority -> CertificateAuthority -> Bool)
-> Eq CertificateAuthority
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CertificateAuthority -> CertificateAuthority -> Bool
$c/= :: CertificateAuthority -> CertificateAuthority -> Bool
== :: CertificateAuthority -> CertificateAuthority -> Bool
$c== :: CertificateAuthority -> CertificateAuthority -> Bool
Prelude.Eq, ReadPrec [CertificateAuthority]
ReadPrec CertificateAuthority
Int -> ReadS CertificateAuthority
ReadS [CertificateAuthority]
(Int -> ReadS CertificateAuthority)
-> ReadS [CertificateAuthority]
-> ReadPrec CertificateAuthority
-> ReadPrec [CertificateAuthority]
-> Read CertificateAuthority
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CertificateAuthority]
$creadListPrec :: ReadPrec [CertificateAuthority]
readPrec :: ReadPrec CertificateAuthority
$creadPrec :: ReadPrec CertificateAuthority
readList :: ReadS [CertificateAuthority]
$creadList :: ReadS [CertificateAuthority]
readsPrec :: Int -> ReadS CertificateAuthority
$creadsPrec :: Int -> ReadS CertificateAuthority
Prelude.Read, Int -> CertificateAuthority -> ShowS
[CertificateAuthority] -> ShowS
CertificateAuthority -> String
(Int -> CertificateAuthority -> ShowS)
-> (CertificateAuthority -> String)
-> ([CertificateAuthority] -> ShowS)
-> Show CertificateAuthority
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CertificateAuthority] -> ShowS
$cshowList :: [CertificateAuthority] -> ShowS
show :: CertificateAuthority -> String
$cshow :: CertificateAuthority -> String
showsPrec :: Int -> CertificateAuthority -> ShowS
$cshowsPrec :: Int -> CertificateAuthority -> ShowS
Prelude.Show, (forall x. CertificateAuthority -> Rep CertificateAuthority x)
-> (forall x. Rep CertificateAuthority x -> CertificateAuthority)
-> Generic CertificateAuthority
forall x. Rep CertificateAuthority x -> CertificateAuthority
forall x. CertificateAuthority -> Rep CertificateAuthority x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CertificateAuthority x -> CertificateAuthority
$cfrom :: forall x. CertificateAuthority -> Rep CertificateAuthority x
Prelude.Generic)

-- |
-- Create a value of 'CertificateAuthority' 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:
--
-- 'status', 'certificateAuthority_status' - Status of your private CA.
--
-- 'failureReason', 'certificateAuthority_failureReason' - Reason the request to create your private CA failed.
--
-- 'certificateAuthorityConfiguration', 'certificateAuthority_certificateAuthorityConfiguration' - Your private CA configuration.
--
-- 'arn', 'certificateAuthority_arn' - Amazon Resource Name (ARN) for your private certificate authority (CA).
-- The format is @ 12345678-1234-1234-1234-123456789012 @.
--
-- 'createdAt', 'certificateAuthority_createdAt' - Date and time at which your private CA was created.
--
-- 'serial', 'certificateAuthority_serial' - Serial number of your private CA.
--
-- 'keyStorageSecurityStandard', 'certificateAuthority_keyStorageSecurityStandard' - Defines a cryptographic key management compliance standard used for
-- handling CA keys.
--
-- Default: FIPS_140_2_LEVEL_3_OR_HIGHER
--
-- Note: AWS Region ap-northeast-3 supports only
-- FIPS_140_2_LEVEL_2_OR_HIGHER. You must explicitly specify this parameter
-- and value when creating a CA in that Region. Specifying a different
-- value (or no value) results in an @InvalidArgsException@ with the
-- message \"A certificate authority cannot be created in this region with
-- the specified security standard.\"
--
-- 'notBefore', 'certificateAuthority_notBefore' - Date and time before which your private CA certificate is not valid.
--
-- 'restorableUntil', 'certificateAuthority_restorableUntil' - The period during which a deleted CA can be restored. For more
-- information, see the @PermanentDeletionTimeInDays@ parameter of the
-- <https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_DeleteCertificateAuthorityRequest.html DeleteCertificateAuthorityRequest>
-- action.
--
-- 'type'', 'certificateAuthority_type' - Type of your private CA.
--
-- 'ownerAccount', 'certificateAuthority_ownerAccount' - The AWS account ID that owns the certificate authority.
--
-- 'revocationConfiguration', 'certificateAuthority_revocationConfiguration' - Information about the Online Certificate Status Protocol (OCSP)
-- configuration or certificate revocation list (CRL) created and
-- maintained by your private CA.
--
-- 'lastStateChangeAt', 'certificateAuthority_lastStateChangeAt' - Date and time at which your private CA was last updated.
--
-- 'notAfter', 'certificateAuthority_notAfter' - Date and time after which your private CA certificate is not valid.
newCertificateAuthority ::
  CertificateAuthority
newCertificateAuthority :: CertificateAuthority
newCertificateAuthority =
  CertificateAuthority' :: Maybe CertificateAuthorityStatus
-> Maybe FailureReason
-> Maybe CertificateAuthorityConfiguration
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe KeyStorageSecurityStandard
-> Maybe POSIX
-> Maybe POSIX
-> Maybe CertificateAuthorityType
-> Maybe Text
-> Maybe RevocationConfiguration
-> Maybe POSIX
-> Maybe POSIX
-> CertificateAuthority
CertificateAuthority'
    { $sel:status:CertificateAuthority' :: Maybe CertificateAuthorityStatus
status = Maybe CertificateAuthorityStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:CertificateAuthority' :: Maybe FailureReason
failureReason = Maybe FailureReason
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateAuthorityConfiguration:CertificateAuthority' :: Maybe CertificateAuthorityConfiguration
certificateAuthorityConfiguration = Maybe CertificateAuthorityConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:CertificateAuthority' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:CertificateAuthority' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:serial:CertificateAuthority' :: Maybe Text
serial = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:keyStorageSecurityStandard:CertificateAuthority' :: Maybe KeyStorageSecurityStandard
keyStorageSecurityStandard = Maybe KeyStorageSecurityStandard
forall a. Maybe a
Prelude.Nothing,
      $sel:notBefore:CertificateAuthority' :: Maybe POSIX
notBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:restorableUntil:CertificateAuthority' :: Maybe POSIX
restorableUntil = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:type':CertificateAuthority' :: Maybe CertificateAuthorityType
type' = Maybe CertificateAuthorityType
forall a. Maybe a
Prelude.Nothing,
      $sel:ownerAccount:CertificateAuthority' :: Maybe Text
ownerAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:revocationConfiguration:CertificateAuthority' :: Maybe RevocationConfiguration
revocationConfiguration = Maybe RevocationConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:lastStateChangeAt:CertificateAuthority' :: Maybe POSIX
lastStateChangeAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:notAfter:CertificateAuthority' :: Maybe POSIX
notAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | Status of your private CA.
certificateAuthority_status :: Lens.Lens' CertificateAuthority (Prelude.Maybe CertificateAuthorityStatus)
certificateAuthority_status :: (Maybe CertificateAuthorityStatus
 -> f (Maybe CertificateAuthorityStatus))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_status = (CertificateAuthority -> Maybe CertificateAuthorityStatus)
-> (CertificateAuthority
    -> Maybe CertificateAuthorityStatus -> CertificateAuthority)
-> Lens
     CertificateAuthority
     CertificateAuthority
     (Maybe CertificateAuthorityStatus)
     (Maybe CertificateAuthorityStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe CertificateAuthorityStatus
status :: Maybe CertificateAuthorityStatus
$sel:status:CertificateAuthority' :: CertificateAuthority -> Maybe CertificateAuthorityStatus
status} -> Maybe CertificateAuthorityStatus
status) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe CertificateAuthorityStatus
a -> CertificateAuthority
s {$sel:status:CertificateAuthority' :: Maybe CertificateAuthorityStatus
status = Maybe CertificateAuthorityStatus
a} :: CertificateAuthority)

-- | Reason the request to create your private CA failed.
certificateAuthority_failureReason :: Lens.Lens' CertificateAuthority (Prelude.Maybe FailureReason)
certificateAuthority_failureReason :: (Maybe FailureReason -> f (Maybe FailureReason))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_failureReason = (CertificateAuthority -> Maybe FailureReason)
-> (CertificateAuthority
    -> Maybe FailureReason -> CertificateAuthority)
-> Lens
     CertificateAuthority
     CertificateAuthority
     (Maybe FailureReason)
     (Maybe FailureReason)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe FailureReason
failureReason :: Maybe FailureReason
$sel:failureReason:CertificateAuthority' :: CertificateAuthority -> Maybe FailureReason
failureReason} -> Maybe FailureReason
failureReason) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe FailureReason
a -> CertificateAuthority
s {$sel:failureReason:CertificateAuthority' :: Maybe FailureReason
failureReason = Maybe FailureReason
a} :: CertificateAuthority)

-- | Your private CA configuration.
certificateAuthority_certificateAuthorityConfiguration :: Lens.Lens' CertificateAuthority (Prelude.Maybe CertificateAuthorityConfiguration)
certificateAuthority_certificateAuthorityConfiguration :: (Maybe CertificateAuthorityConfiguration
 -> f (Maybe CertificateAuthorityConfiguration))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_certificateAuthorityConfiguration = (CertificateAuthority -> Maybe CertificateAuthorityConfiguration)
-> (CertificateAuthority
    -> Maybe CertificateAuthorityConfiguration -> CertificateAuthority)
-> Lens
     CertificateAuthority
     CertificateAuthority
     (Maybe CertificateAuthorityConfiguration)
     (Maybe CertificateAuthorityConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe CertificateAuthorityConfiguration
certificateAuthorityConfiguration :: Maybe CertificateAuthorityConfiguration
$sel:certificateAuthorityConfiguration:CertificateAuthority' :: CertificateAuthority -> Maybe CertificateAuthorityConfiguration
certificateAuthorityConfiguration} -> Maybe CertificateAuthorityConfiguration
certificateAuthorityConfiguration) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe CertificateAuthorityConfiguration
a -> CertificateAuthority
s {$sel:certificateAuthorityConfiguration:CertificateAuthority' :: Maybe CertificateAuthorityConfiguration
certificateAuthorityConfiguration = Maybe CertificateAuthorityConfiguration
a} :: CertificateAuthority)

-- | Amazon Resource Name (ARN) for your private certificate authority (CA).
-- The format is @ 12345678-1234-1234-1234-123456789012 @.
certificateAuthority_arn :: Lens.Lens' CertificateAuthority (Prelude.Maybe Prelude.Text)
certificateAuthority_arn :: (Maybe Text -> f (Maybe Text))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_arn = (CertificateAuthority -> Maybe Text)
-> (CertificateAuthority -> Maybe Text -> CertificateAuthority)
-> Lens
     CertificateAuthority CertificateAuthority (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe Text
arn :: Maybe Text
$sel:arn:CertificateAuthority' :: CertificateAuthority -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe Text
a -> CertificateAuthority
s {$sel:arn:CertificateAuthority' :: Maybe Text
arn = Maybe Text
a} :: CertificateAuthority)

-- | Date and time at which your private CA was created.
certificateAuthority_createdAt :: Lens.Lens' CertificateAuthority (Prelude.Maybe Prelude.UTCTime)
certificateAuthority_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_createdAt = (CertificateAuthority -> Maybe POSIX)
-> (CertificateAuthority -> Maybe POSIX -> CertificateAuthority)
-> Lens
     CertificateAuthority
     CertificateAuthority
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:CertificateAuthority' :: CertificateAuthority -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe POSIX
a -> CertificateAuthority
s {$sel:createdAt:CertificateAuthority' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: CertificateAuthority) ((Maybe POSIX -> f (Maybe POSIX))
 -> CertificateAuthority -> f CertificateAuthority)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CertificateAuthority
-> f CertificateAuthority
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Serial number of your private CA.
certificateAuthority_serial :: Lens.Lens' CertificateAuthority (Prelude.Maybe Prelude.Text)
certificateAuthority_serial :: (Maybe Text -> f (Maybe Text))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_serial = (CertificateAuthority -> Maybe Text)
-> (CertificateAuthority -> Maybe Text -> CertificateAuthority)
-> Lens
     CertificateAuthority CertificateAuthority (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe Text
serial :: Maybe Text
$sel:serial:CertificateAuthority' :: CertificateAuthority -> Maybe Text
serial} -> Maybe Text
serial) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe Text
a -> CertificateAuthority
s {$sel:serial:CertificateAuthority' :: Maybe Text
serial = Maybe Text
a} :: CertificateAuthority)

-- | Defines a cryptographic key management compliance standard used for
-- handling CA keys.
--
-- Default: FIPS_140_2_LEVEL_3_OR_HIGHER
--
-- Note: AWS Region ap-northeast-3 supports only
-- FIPS_140_2_LEVEL_2_OR_HIGHER. You must explicitly specify this parameter
-- and value when creating a CA in that Region. Specifying a different
-- value (or no value) results in an @InvalidArgsException@ with the
-- message \"A certificate authority cannot be created in this region with
-- the specified security standard.\"
certificateAuthority_keyStorageSecurityStandard :: Lens.Lens' CertificateAuthority (Prelude.Maybe KeyStorageSecurityStandard)
certificateAuthority_keyStorageSecurityStandard :: (Maybe KeyStorageSecurityStandard
 -> f (Maybe KeyStorageSecurityStandard))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_keyStorageSecurityStandard = (CertificateAuthority -> Maybe KeyStorageSecurityStandard)
-> (CertificateAuthority
    -> Maybe KeyStorageSecurityStandard -> CertificateAuthority)
-> Lens
     CertificateAuthority
     CertificateAuthority
     (Maybe KeyStorageSecurityStandard)
     (Maybe KeyStorageSecurityStandard)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe KeyStorageSecurityStandard
keyStorageSecurityStandard :: Maybe KeyStorageSecurityStandard
$sel:keyStorageSecurityStandard:CertificateAuthority' :: CertificateAuthority -> Maybe KeyStorageSecurityStandard
keyStorageSecurityStandard} -> Maybe KeyStorageSecurityStandard
keyStorageSecurityStandard) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe KeyStorageSecurityStandard
a -> CertificateAuthority
s {$sel:keyStorageSecurityStandard:CertificateAuthority' :: Maybe KeyStorageSecurityStandard
keyStorageSecurityStandard = Maybe KeyStorageSecurityStandard
a} :: CertificateAuthority)

-- | Date and time before which your private CA certificate is not valid.
certificateAuthority_notBefore :: Lens.Lens' CertificateAuthority (Prelude.Maybe Prelude.UTCTime)
certificateAuthority_notBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_notBefore = (CertificateAuthority -> Maybe POSIX)
-> (CertificateAuthority -> Maybe POSIX -> CertificateAuthority)
-> Lens
     CertificateAuthority
     CertificateAuthority
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe POSIX
notBefore :: Maybe POSIX
$sel:notBefore:CertificateAuthority' :: CertificateAuthority -> Maybe POSIX
notBefore} -> Maybe POSIX
notBefore) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe POSIX
a -> CertificateAuthority
s {$sel:notBefore:CertificateAuthority' :: Maybe POSIX
notBefore = Maybe POSIX
a} :: CertificateAuthority) ((Maybe POSIX -> f (Maybe POSIX))
 -> CertificateAuthority -> f CertificateAuthority)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CertificateAuthority
-> f CertificateAuthority
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The period during which a deleted CA can be restored. For more
-- information, see the @PermanentDeletionTimeInDays@ parameter of the
-- <https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_DeleteCertificateAuthorityRequest.html DeleteCertificateAuthorityRequest>
-- action.
certificateAuthority_restorableUntil :: Lens.Lens' CertificateAuthority (Prelude.Maybe Prelude.UTCTime)
certificateAuthority_restorableUntil :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_restorableUntil = (CertificateAuthority -> Maybe POSIX)
-> (CertificateAuthority -> Maybe POSIX -> CertificateAuthority)
-> Lens
     CertificateAuthority
     CertificateAuthority
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe POSIX
restorableUntil :: Maybe POSIX
$sel:restorableUntil:CertificateAuthority' :: CertificateAuthority -> Maybe POSIX
restorableUntil} -> Maybe POSIX
restorableUntil) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe POSIX
a -> CertificateAuthority
s {$sel:restorableUntil:CertificateAuthority' :: Maybe POSIX
restorableUntil = Maybe POSIX
a} :: CertificateAuthority) ((Maybe POSIX -> f (Maybe POSIX))
 -> CertificateAuthority -> f CertificateAuthority)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CertificateAuthority
-> f CertificateAuthority
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Type of your private CA.
certificateAuthority_type :: Lens.Lens' CertificateAuthority (Prelude.Maybe CertificateAuthorityType)
certificateAuthority_type :: (Maybe CertificateAuthorityType
 -> f (Maybe CertificateAuthorityType))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_type = (CertificateAuthority -> Maybe CertificateAuthorityType)
-> (CertificateAuthority
    -> Maybe CertificateAuthorityType -> CertificateAuthority)
-> Lens
     CertificateAuthority
     CertificateAuthority
     (Maybe CertificateAuthorityType)
     (Maybe CertificateAuthorityType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe CertificateAuthorityType
type' :: Maybe CertificateAuthorityType
$sel:type':CertificateAuthority' :: CertificateAuthority -> Maybe CertificateAuthorityType
type'} -> Maybe CertificateAuthorityType
type') (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe CertificateAuthorityType
a -> CertificateAuthority
s {$sel:type':CertificateAuthority' :: Maybe CertificateAuthorityType
type' = Maybe CertificateAuthorityType
a} :: CertificateAuthority)

-- | The AWS account ID that owns the certificate authority.
certificateAuthority_ownerAccount :: Lens.Lens' CertificateAuthority (Prelude.Maybe Prelude.Text)
certificateAuthority_ownerAccount :: (Maybe Text -> f (Maybe Text))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_ownerAccount = (CertificateAuthority -> Maybe Text)
-> (CertificateAuthority -> Maybe Text -> CertificateAuthority)
-> Lens
     CertificateAuthority CertificateAuthority (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe Text
ownerAccount :: Maybe Text
$sel:ownerAccount:CertificateAuthority' :: CertificateAuthority -> Maybe Text
ownerAccount} -> Maybe Text
ownerAccount) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe Text
a -> CertificateAuthority
s {$sel:ownerAccount:CertificateAuthority' :: Maybe Text
ownerAccount = Maybe Text
a} :: CertificateAuthority)

-- | Information about the Online Certificate Status Protocol (OCSP)
-- configuration or certificate revocation list (CRL) created and
-- maintained by your private CA.
certificateAuthority_revocationConfiguration :: Lens.Lens' CertificateAuthority (Prelude.Maybe RevocationConfiguration)
certificateAuthority_revocationConfiguration :: (Maybe RevocationConfiguration
 -> f (Maybe RevocationConfiguration))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_revocationConfiguration = (CertificateAuthority -> Maybe RevocationConfiguration)
-> (CertificateAuthority
    -> Maybe RevocationConfiguration -> CertificateAuthority)
-> Lens
     CertificateAuthority
     CertificateAuthority
     (Maybe RevocationConfiguration)
     (Maybe RevocationConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe RevocationConfiguration
revocationConfiguration :: Maybe RevocationConfiguration
$sel:revocationConfiguration:CertificateAuthority' :: CertificateAuthority -> Maybe RevocationConfiguration
revocationConfiguration} -> Maybe RevocationConfiguration
revocationConfiguration) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe RevocationConfiguration
a -> CertificateAuthority
s {$sel:revocationConfiguration:CertificateAuthority' :: Maybe RevocationConfiguration
revocationConfiguration = Maybe RevocationConfiguration
a} :: CertificateAuthority)

-- | Date and time at which your private CA was last updated.
certificateAuthority_lastStateChangeAt :: Lens.Lens' CertificateAuthority (Prelude.Maybe Prelude.UTCTime)
certificateAuthority_lastStateChangeAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_lastStateChangeAt = (CertificateAuthority -> Maybe POSIX)
-> (CertificateAuthority -> Maybe POSIX -> CertificateAuthority)
-> Lens
     CertificateAuthority
     CertificateAuthority
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe POSIX
lastStateChangeAt :: Maybe POSIX
$sel:lastStateChangeAt:CertificateAuthority' :: CertificateAuthority -> Maybe POSIX
lastStateChangeAt} -> Maybe POSIX
lastStateChangeAt) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe POSIX
a -> CertificateAuthority
s {$sel:lastStateChangeAt:CertificateAuthority' :: Maybe POSIX
lastStateChangeAt = Maybe POSIX
a} :: CertificateAuthority) ((Maybe POSIX -> f (Maybe POSIX))
 -> CertificateAuthority -> f CertificateAuthority)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CertificateAuthority
-> f CertificateAuthority
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Date and time after which your private CA certificate is not valid.
certificateAuthority_notAfter :: Lens.Lens' CertificateAuthority (Prelude.Maybe Prelude.UTCTime)
certificateAuthority_notAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CertificateAuthority -> f CertificateAuthority
certificateAuthority_notAfter = (CertificateAuthority -> Maybe POSIX)
-> (CertificateAuthority -> Maybe POSIX -> CertificateAuthority)
-> Lens
     CertificateAuthority
     CertificateAuthority
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CertificateAuthority' {Maybe POSIX
notAfter :: Maybe POSIX
$sel:notAfter:CertificateAuthority' :: CertificateAuthority -> Maybe POSIX
notAfter} -> Maybe POSIX
notAfter) (\s :: CertificateAuthority
s@CertificateAuthority' {} Maybe POSIX
a -> CertificateAuthority
s {$sel:notAfter:CertificateAuthority' :: Maybe POSIX
notAfter = Maybe POSIX
a} :: CertificateAuthority) ((Maybe POSIX -> f (Maybe POSIX))
 -> CertificateAuthority -> f CertificateAuthority)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CertificateAuthority
-> f CertificateAuthority
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON CertificateAuthority where
  parseJSON :: Value -> Parser CertificateAuthority
parseJSON =
    String
-> (Object -> Parser CertificateAuthority)
-> Value
-> Parser CertificateAuthority
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"CertificateAuthority"
      ( \Object
x ->
          Maybe CertificateAuthorityStatus
-> Maybe FailureReason
-> Maybe CertificateAuthorityConfiguration
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe KeyStorageSecurityStandard
-> Maybe POSIX
-> Maybe POSIX
-> Maybe CertificateAuthorityType
-> Maybe Text
-> Maybe RevocationConfiguration
-> Maybe POSIX
-> Maybe POSIX
-> CertificateAuthority
CertificateAuthority'
            (Maybe CertificateAuthorityStatus
 -> Maybe FailureReason
 -> Maybe CertificateAuthorityConfiguration
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe KeyStorageSecurityStandard
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe CertificateAuthorityType
 -> Maybe Text
 -> Maybe RevocationConfiguration
 -> Maybe POSIX
 -> Maybe POSIX
 -> CertificateAuthority)
-> Parser (Maybe CertificateAuthorityStatus)
-> Parser
     (Maybe FailureReason
      -> Maybe CertificateAuthorityConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe KeyStorageSecurityStandard
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe CertificateAuthorityType
      -> Maybe Text
      -> Maybe RevocationConfiguration
      -> Maybe POSIX
      -> Maybe POSIX
      -> CertificateAuthority)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe CertificateAuthorityStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe FailureReason
   -> Maybe CertificateAuthorityConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe KeyStorageSecurityStandard
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe CertificateAuthorityType
   -> Maybe Text
   -> Maybe RevocationConfiguration
   -> Maybe POSIX
   -> Maybe POSIX
   -> CertificateAuthority)
-> Parser (Maybe FailureReason)
-> Parser
     (Maybe CertificateAuthorityConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe KeyStorageSecurityStandard
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe CertificateAuthorityType
      -> Maybe Text
      -> Maybe RevocationConfiguration
      -> Maybe POSIX
      -> Maybe POSIX
      -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FailureReason)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FailureReason")
            Parser
  (Maybe CertificateAuthorityConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe KeyStorageSecurityStandard
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe CertificateAuthorityType
   -> Maybe Text
   -> Maybe RevocationConfiguration
   -> Maybe POSIX
   -> Maybe POSIX
   -> CertificateAuthority)
-> Parser (Maybe CertificateAuthorityConfiguration)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe KeyStorageSecurityStandard
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe CertificateAuthorityType
      -> Maybe Text
      -> Maybe RevocationConfiguration
      -> Maybe POSIX
      -> Maybe POSIX
      -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CertificateAuthorityConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CertificateAuthorityConfiguration")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe KeyStorageSecurityStandard
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe CertificateAuthorityType
   -> Maybe Text
   -> Maybe RevocationConfiguration
   -> Maybe POSIX
   -> Maybe POSIX
   -> CertificateAuthority)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe KeyStorageSecurityStandard
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe CertificateAuthorityType
      -> Maybe Text
      -> Maybe RevocationConfiguration
      -> Maybe POSIX
      -> Maybe POSIX
      -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Arn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe KeyStorageSecurityStandard
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe CertificateAuthorityType
   -> Maybe Text
   -> Maybe RevocationConfiguration
   -> Maybe POSIX
   -> Maybe POSIX
   -> CertificateAuthority)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe KeyStorageSecurityStandard
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe CertificateAuthorityType
      -> Maybe Text
      -> Maybe RevocationConfiguration
      -> Maybe POSIX
      -> Maybe POSIX
      -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedAt")
            Parser
  (Maybe Text
   -> Maybe KeyStorageSecurityStandard
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe CertificateAuthorityType
   -> Maybe Text
   -> Maybe RevocationConfiguration
   -> Maybe POSIX
   -> Maybe POSIX
   -> CertificateAuthority)
-> Parser (Maybe Text)
-> Parser
     (Maybe KeyStorageSecurityStandard
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe CertificateAuthorityType
      -> Maybe Text
      -> Maybe RevocationConfiguration
      -> Maybe POSIX
      -> Maybe POSIX
      -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Serial")
            Parser
  (Maybe KeyStorageSecurityStandard
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe CertificateAuthorityType
   -> Maybe Text
   -> Maybe RevocationConfiguration
   -> Maybe POSIX
   -> Maybe POSIX
   -> CertificateAuthority)
-> Parser (Maybe KeyStorageSecurityStandard)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe CertificateAuthorityType
      -> Maybe Text
      -> Maybe RevocationConfiguration
      -> Maybe POSIX
      -> Maybe POSIX
      -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe KeyStorageSecurityStandard)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KeyStorageSecurityStandard")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe CertificateAuthorityType
   -> Maybe Text
   -> Maybe RevocationConfiguration
   -> Maybe POSIX
   -> Maybe POSIX
   -> CertificateAuthority)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe CertificateAuthorityType
      -> Maybe Text
      -> Maybe RevocationConfiguration
      -> Maybe POSIX
      -> Maybe POSIX
      -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotBefore")
            Parser
  (Maybe POSIX
   -> Maybe CertificateAuthorityType
   -> Maybe Text
   -> Maybe RevocationConfiguration
   -> Maybe POSIX
   -> Maybe POSIX
   -> CertificateAuthority)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe CertificateAuthorityType
      -> Maybe Text
      -> Maybe RevocationConfiguration
      -> Maybe POSIX
      -> Maybe POSIX
      -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RestorableUntil")
            Parser
  (Maybe CertificateAuthorityType
   -> Maybe Text
   -> Maybe RevocationConfiguration
   -> Maybe POSIX
   -> Maybe POSIX
   -> CertificateAuthority)
-> Parser (Maybe CertificateAuthorityType)
-> Parser
     (Maybe Text
      -> Maybe RevocationConfiguration
      -> Maybe POSIX
      -> Maybe POSIX
      -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CertificateAuthorityType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
            Parser
  (Maybe Text
   -> Maybe RevocationConfiguration
   -> Maybe POSIX
   -> Maybe POSIX
   -> CertificateAuthority)
-> Parser (Maybe Text)
-> Parser
     (Maybe RevocationConfiguration
      -> Maybe POSIX -> Maybe POSIX -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OwnerAccount")
            Parser
  (Maybe RevocationConfiguration
   -> Maybe POSIX -> Maybe POSIX -> CertificateAuthority)
-> Parser (Maybe RevocationConfiguration)
-> Parser (Maybe POSIX -> Maybe POSIX -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RevocationConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RevocationConfiguration")
            Parser (Maybe POSIX -> Maybe POSIX -> CertificateAuthority)
-> Parser (Maybe POSIX)
-> Parser (Maybe POSIX -> CertificateAuthority)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastStateChangeAt")
            Parser (Maybe POSIX -> CertificateAuthority)
-> Parser (Maybe POSIX) -> Parser CertificateAuthority
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotAfter")
      )

instance Prelude.Hashable CertificateAuthority

instance Prelude.NFData CertificateAuthority