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

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

-- |
-- Module      : Amazonka.CertificateManagerPCA.DescribeCertificateAuthorityAuditReport
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists information about a specific audit report created by calling the
-- <https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthorityAuditReport.html CreateCertificateAuthorityAuditReport>
-- action. Audit information is created every time the certificate
-- authority (CA) private key is used. The private key is used when you
-- call the
-- <https://docs.aws.amazon.com/privateca/latest/APIReference/API_IssueCertificate.html IssueCertificate>
-- action or the
-- <https://docs.aws.amazon.com/privateca/latest/APIReference/API_RevokeCertificate.html RevokeCertificate>
-- action.
module Amazonka.CertificateManagerPCA.DescribeCertificateAuthorityAuditReport
  ( -- * Creating a Request
    DescribeCertificateAuthorityAuditReport (..),
    newDescribeCertificateAuthorityAuditReport,

    -- * Request Lenses
    describeCertificateAuthorityAuditReport_certificateAuthorityArn,
    describeCertificateAuthorityAuditReport_auditReportId,

    -- * Destructuring the Response
    DescribeCertificateAuthorityAuditReportResponse (..),
    newDescribeCertificateAuthorityAuditReportResponse,

    -- * Response Lenses
    describeCertificateAuthorityAuditReportResponse_auditReportStatus,
    describeCertificateAuthorityAuditReportResponse_createdAt,
    describeCertificateAuthorityAuditReportResponse_s3BucketName,
    describeCertificateAuthorityAuditReportResponse_s3Key,
    describeCertificateAuthorityAuditReportResponse_httpStatus,
  )
where

import Amazonka.CertificateManagerPCA.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeCertificateAuthorityAuditReport' smart constructor.
data DescribeCertificateAuthorityAuditReport = DescribeCertificateAuthorityAuditReport'
  { -- | The Amazon Resource Name (ARN) of the private CA. This must be of the
    -- form:
    --
    -- @arn:aws:acm-pca:@/@region@/@:@/@account@/@:certificate-authority\/@/@12345678-1234-1234-1234-123456789012@/@ @.
    DescribeCertificateAuthorityAuditReport -> Text
certificateAuthorityArn :: Prelude.Text,
    -- | The report ID returned by calling the
    -- <https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthorityAuditReport.html CreateCertificateAuthorityAuditReport>
    -- action.
    DescribeCertificateAuthorityAuditReport -> Text
auditReportId :: Prelude.Text
  }
  deriving (DescribeCertificateAuthorityAuditReport
-> DescribeCertificateAuthorityAuditReport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCertificateAuthorityAuditReport
-> DescribeCertificateAuthorityAuditReport -> Bool
$c/= :: DescribeCertificateAuthorityAuditReport
-> DescribeCertificateAuthorityAuditReport -> Bool
== :: DescribeCertificateAuthorityAuditReport
-> DescribeCertificateAuthorityAuditReport -> Bool
$c== :: DescribeCertificateAuthorityAuditReport
-> DescribeCertificateAuthorityAuditReport -> Bool
Prelude.Eq, ReadPrec [DescribeCertificateAuthorityAuditReport]
ReadPrec DescribeCertificateAuthorityAuditReport
Int -> ReadS DescribeCertificateAuthorityAuditReport
ReadS [DescribeCertificateAuthorityAuditReport]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCertificateAuthorityAuditReport]
$creadListPrec :: ReadPrec [DescribeCertificateAuthorityAuditReport]
readPrec :: ReadPrec DescribeCertificateAuthorityAuditReport
$creadPrec :: ReadPrec DescribeCertificateAuthorityAuditReport
readList :: ReadS [DescribeCertificateAuthorityAuditReport]
$creadList :: ReadS [DescribeCertificateAuthorityAuditReport]
readsPrec :: Int -> ReadS DescribeCertificateAuthorityAuditReport
$creadsPrec :: Int -> ReadS DescribeCertificateAuthorityAuditReport
Prelude.Read, Int -> DescribeCertificateAuthorityAuditReport -> ShowS
[DescribeCertificateAuthorityAuditReport] -> ShowS
DescribeCertificateAuthorityAuditReport -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCertificateAuthorityAuditReport] -> ShowS
$cshowList :: [DescribeCertificateAuthorityAuditReport] -> ShowS
show :: DescribeCertificateAuthorityAuditReport -> String
$cshow :: DescribeCertificateAuthorityAuditReport -> String
showsPrec :: Int -> DescribeCertificateAuthorityAuditReport -> ShowS
$cshowsPrec :: Int -> DescribeCertificateAuthorityAuditReport -> ShowS
Prelude.Show, forall x.
Rep DescribeCertificateAuthorityAuditReport x
-> DescribeCertificateAuthorityAuditReport
forall x.
DescribeCertificateAuthorityAuditReport
-> Rep DescribeCertificateAuthorityAuditReport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCertificateAuthorityAuditReport x
-> DescribeCertificateAuthorityAuditReport
$cfrom :: forall x.
DescribeCertificateAuthorityAuditReport
-> Rep DescribeCertificateAuthorityAuditReport x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCertificateAuthorityAuditReport' 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:
--
-- 'certificateAuthorityArn', 'describeCertificateAuthorityAuditReport_certificateAuthorityArn' - The Amazon Resource Name (ARN) of the private CA. This must be of the
-- form:
--
-- @arn:aws:acm-pca:@/@region@/@:@/@account@/@:certificate-authority\/@/@12345678-1234-1234-1234-123456789012@/@ @.
--
-- 'auditReportId', 'describeCertificateAuthorityAuditReport_auditReportId' - The report ID returned by calling the
-- <https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthorityAuditReport.html CreateCertificateAuthorityAuditReport>
-- action.
newDescribeCertificateAuthorityAuditReport ::
  -- | 'certificateAuthorityArn'
  Prelude.Text ->
  -- | 'auditReportId'
  Prelude.Text ->
  DescribeCertificateAuthorityAuditReport
newDescribeCertificateAuthorityAuditReport :: Text -> Text -> DescribeCertificateAuthorityAuditReport
newDescribeCertificateAuthorityAuditReport
  Text
pCertificateAuthorityArn_
  Text
pAuditReportId_ =
    DescribeCertificateAuthorityAuditReport'
      { $sel:certificateAuthorityArn:DescribeCertificateAuthorityAuditReport' :: Text
certificateAuthorityArn =
          Text
pCertificateAuthorityArn_,
        $sel:auditReportId:DescribeCertificateAuthorityAuditReport' :: Text
auditReportId = Text
pAuditReportId_
      }

-- | The Amazon Resource Name (ARN) of the private CA. This must be of the
-- form:
--
-- @arn:aws:acm-pca:@/@region@/@:@/@account@/@:certificate-authority\/@/@12345678-1234-1234-1234-123456789012@/@ @.
describeCertificateAuthorityAuditReport_certificateAuthorityArn :: Lens.Lens' DescribeCertificateAuthorityAuditReport Prelude.Text
describeCertificateAuthorityAuditReport_certificateAuthorityArn :: Lens' DescribeCertificateAuthorityAuditReport Text
describeCertificateAuthorityAuditReport_certificateAuthorityArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCertificateAuthorityAuditReport' {Text
certificateAuthorityArn :: Text
$sel:certificateAuthorityArn:DescribeCertificateAuthorityAuditReport' :: DescribeCertificateAuthorityAuditReport -> Text
certificateAuthorityArn} -> Text
certificateAuthorityArn) (\s :: DescribeCertificateAuthorityAuditReport
s@DescribeCertificateAuthorityAuditReport' {} Text
a -> DescribeCertificateAuthorityAuditReport
s {$sel:certificateAuthorityArn:DescribeCertificateAuthorityAuditReport' :: Text
certificateAuthorityArn = Text
a} :: DescribeCertificateAuthorityAuditReport)

-- | The report ID returned by calling the
-- <https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthorityAuditReport.html CreateCertificateAuthorityAuditReport>
-- action.
describeCertificateAuthorityAuditReport_auditReportId :: Lens.Lens' DescribeCertificateAuthorityAuditReport Prelude.Text
describeCertificateAuthorityAuditReport_auditReportId :: Lens' DescribeCertificateAuthorityAuditReport Text
describeCertificateAuthorityAuditReport_auditReportId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCertificateAuthorityAuditReport' {Text
auditReportId :: Text
$sel:auditReportId:DescribeCertificateAuthorityAuditReport' :: DescribeCertificateAuthorityAuditReport -> Text
auditReportId} -> Text
auditReportId) (\s :: DescribeCertificateAuthorityAuditReport
s@DescribeCertificateAuthorityAuditReport' {} Text
a -> DescribeCertificateAuthorityAuditReport
s {$sel:auditReportId:DescribeCertificateAuthorityAuditReport' :: Text
auditReportId = Text
a} :: DescribeCertificateAuthorityAuditReport)

instance
  Core.AWSRequest
    DescribeCertificateAuthorityAuditReport
  where
  type
    AWSResponse
      DescribeCertificateAuthorityAuditReport =
      DescribeCertificateAuthorityAuditReportResponse
  request :: (Service -> Service)
-> DescribeCertificateAuthorityAuditReport
-> Request DescribeCertificateAuthorityAuditReport
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeCertificateAuthorityAuditReport
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeCertificateAuthorityAuditReport)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe AuditReportStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeCertificateAuthorityAuditReportResponse
DescribeCertificateAuthorityAuditReportResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"AuditReportStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreatedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"S3BucketName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"S3Key")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    DescribeCertificateAuthorityAuditReport
  where
  hashWithSalt :: Int -> DescribeCertificateAuthorityAuditReport -> Int
hashWithSalt
    Int
_salt
    DescribeCertificateAuthorityAuditReport' {Text
auditReportId :: Text
certificateAuthorityArn :: Text
$sel:auditReportId:DescribeCertificateAuthorityAuditReport' :: DescribeCertificateAuthorityAuditReport -> Text
$sel:certificateAuthorityArn:DescribeCertificateAuthorityAuditReport' :: DescribeCertificateAuthorityAuditReport -> Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
certificateAuthorityArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
auditReportId

instance
  Prelude.NFData
    DescribeCertificateAuthorityAuditReport
  where
  rnf :: DescribeCertificateAuthorityAuditReport -> ()
rnf DescribeCertificateAuthorityAuditReport' {Text
auditReportId :: Text
certificateAuthorityArn :: Text
$sel:auditReportId:DescribeCertificateAuthorityAuditReport' :: DescribeCertificateAuthorityAuditReport -> Text
$sel:certificateAuthorityArn:DescribeCertificateAuthorityAuditReport' :: DescribeCertificateAuthorityAuditReport -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
certificateAuthorityArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
auditReportId

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

instance
  Data.ToJSON
    DescribeCertificateAuthorityAuditReport
  where
  toJSON :: DescribeCertificateAuthorityAuditReport -> Value
toJSON DescribeCertificateAuthorityAuditReport' {Text
auditReportId :: Text
certificateAuthorityArn :: Text
$sel:auditReportId:DescribeCertificateAuthorityAuditReport' :: DescribeCertificateAuthorityAuditReport -> Text
$sel:certificateAuthorityArn:DescribeCertificateAuthorityAuditReport' :: DescribeCertificateAuthorityAuditReport -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              ( Key
"CertificateAuthorityArn"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
certificateAuthorityArn
              ),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"AuditReportId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
auditReportId)
          ]
      )

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

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

-- | /See:/ 'newDescribeCertificateAuthorityAuditReportResponse' smart constructor.
data DescribeCertificateAuthorityAuditReportResponse = DescribeCertificateAuthorityAuditReportResponse'
  { -- | Specifies whether report creation is in progress, has succeeded, or has
    -- failed.
    DescribeCertificateAuthorityAuditReportResponse
-> Maybe AuditReportStatus
auditReportStatus :: Prelude.Maybe AuditReportStatus,
    -- | The date and time at which the report was created.
    DescribeCertificateAuthorityAuditReportResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
    -- | Name of the S3 bucket that contains the report.
    DescribeCertificateAuthorityAuditReportResponse -> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text,
    -- | S3 __key__ that uniquely identifies the report file in your S3 bucket.
    DescribeCertificateAuthorityAuditReportResponse -> Maybe Text
s3Key :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeCertificateAuthorityAuditReportResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeCertificateAuthorityAuditReportResponse
-> DescribeCertificateAuthorityAuditReportResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCertificateAuthorityAuditReportResponse
-> DescribeCertificateAuthorityAuditReportResponse -> Bool
$c/= :: DescribeCertificateAuthorityAuditReportResponse
-> DescribeCertificateAuthorityAuditReportResponse -> Bool
== :: DescribeCertificateAuthorityAuditReportResponse
-> DescribeCertificateAuthorityAuditReportResponse -> Bool
$c== :: DescribeCertificateAuthorityAuditReportResponse
-> DescribeCertificateAuthorityAuditReportResponse -> Bool
Prelude.Eq, ReadPrec [DescribeCertificateAuthorityAuditReportResponse]
ReadPrec DescribeCertificateAuthorityAuditReportResponse
Int -> ReadS DescribeCertificateAuthorityAuditReportResponse
ReadS [DescribeCertificateAuthorityAuditReportResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCertificateAuthorityAuditReportResponse]
$creadListPrec :: ReadPrec [DescribeCertificateAuthorityAuditReportResponse]
readPrec :: ReadPrec DescribeCertificateAuthorityAuditReportResponse
$creadPrec :: ReadPrec DescribeCertificateAuthorityAuditReportResponse
readList :: ReadS [DescribeCertificateAuthorityAuditReportResponse]
$creadList :: ReadS [DescribeCertificateAuthorityAuditReportResponse]
readsPrec :: Int -> ReadS DescribeCertificateAuthorityAuditReportResponse
$creadsPrec :: Int -> ReadS DescribeCertificateAuthorityAuditReportResponse
Prelude.Read, Int -> DescribeCertificateAuthorityAuditReportResponse -> ShowS
[DescribeCertificateAuthorityAuditReportResponse] -> ShowS
DescribeCertificateAuthorityAuditReportResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCertificateAuthorityAuditReportResponse] -> ShowS
$cshowList :: [DescribeCertificateAuthorityAuditReportResponse] -> ShowS
show :: DescribeCertificateAuthorityAuditReportResponse -> String
$cshow :: DescribeCertificateAuthorityAuditReportResponse -> String
showsPrec :: Int -> DescribeCertificateAuthorityAuditReportResponse -> ShowS
$cshowsPrec :: Int -> DescribeCertificateAuthorityAuditReportResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeCertificateAuthorityAuditReportResponse x
-> DescribeCertificateAuthorityAuditReportResponse
forall x.
DescribeCertificateAuthorityAuditReportResponse
-> Rep DescribeCertificateAuthorityAuditReportResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCertificateAuthorityAuditReportResponse x
-> DescribeCertificateAuthorityAuditReportResponse
$cfrom :: forall x.
DescribeCertificateAuthorityAuditReportResponse
-> Rep DescribeCertificateAuthorityAuditReportResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCertificateAuthorityAuditReportResponse' 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:
--
-- 'auditReportStatus', 'describeCertificateAuthorityAuditReportResponse_auditReportStatus' - Specifies whether report creation is in progress, has succeeded, or has
-- failed.
--
-- 'createdAt', 'describeCertificateAuthorityAuditReportResponse_createdAt' - The date and time at which the report was created.
--
-- 's3BucketName', 'describeCertificateAuthorityAuditReportResponse_s3BucketName' - Name of the S3 bucket that contains the report.
--
-- 's3Key', 'describeCertificateAuthorityAuditReportResponse_s3Key' - S3 __key__ that uniquely identifies the report file in your S3 bucket.
--
-- 'httpStatus', 'describeCertificateAuthorityAuditReportResponse_httpStatus' - The response's http status code.
newDescribeCertificateAuthorityAuditReportResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeCertificateAuthorityAuditReportResponse
newDescribeCertificateAuthorityAuditReportResponse :: Int -> DescribeCertificateAuthorityAuditReportResponse
newDescribeCertificateAuthorityAuditReportResponse
  Int
pHttpStatus_ =
    DescribeCertificateAuthorityAuditReportResponse'
      { $sel:auditReportStatus:DescribeCertificateAuthorityAuditReportResponse' :: Maybe AuditReportStatus
auditReportStatus =
          forall a. Maybe a
Prelude.Nothing,
        $sel:createdAt:DescribeCertificateAuthorityAuditReportResponse' :: Maybe POSIX
createdAt =
          forall a. Maybe a
Prelude.Nothing,
        $sel:s3BucketName:DescribeCertificateAuthorityAuditReportResponse' :: Maybe Text
s3BucketName =
          forall a. Maybe a
Prelude.Nothing,
        $sel:s3Key:DescribeCertificateAuthorityAuditReportResponse' :: Maybe Text
s3Key = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeCertificateAuthorityAuditReportResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Specifies whether report creation is in progress, has succeeded, or has
-- failed.
describeCertificateAuthorityAuditReportResponse_auditReportStatus :: Lens.Lens' DescribeCertificateAuthorityAuditReportResponse (Prelude.Maybe AuditReportStatus)
describeCertificateAuthorityAuditReportResponse_auditReportStatus :: Lens'
  DescribeCertificateAuthorityAuditReportResponse
  (Maybe AuditReportStatus)
describeCertificateAuthorityAuditReportResponse_auditReportStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCertificateAuthorityAuditReportResponse' {Maybe AuditReportStatus
auditReportStatus :: Maybe AuditReportStatus
$sel:auditReportStatus:DescribeCertificateAuthorityAuditReportResponse' :: DescribeCertificateAuthorityAuditReportResponse
-> Maybe AuditReportStatus
auditReportStatus} -> Maybe AuditReportStatus
auditReportStatus) (\s :: DescribeCertificateAuthorityAuditReportResponse
s@DescribeCertificateAuthorityAuditReportResponse' {} Maybe AuditReportStatus
a -> DescribeCertificateAuthorityAuditReportResponse
s {$sel:auditReportStatus:DescribeCertificateAuthorityAuditReportResponse' :: Maybe AuditReportStatus
auditReportStatus = Maybe AuditReportStatus
a} :: DescribeCertificateAuthorityAuditReportResponse)

-- | The date and time at which the report was created.
describeCertificateAuthorityAuditReportResponse_createdAt :: Lens.Lens' DescribeCertificateAuthorityAuditReportResponse (Prelude.Maybe Prelude.UTCTime)
describeCertificateAuthorityAuditReportResponse_createdAt :: Lens'
  DescribeCertificateAuthorityAuditReportResponse (Maybe UTCTime)
describeCertificateAuthorityAuditReportResponse_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCertificateAuthorityAuditReportResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:DescribeCertificateAuthorityAuditReportResponse' :: DescribeCertificateAuthorityAuditReportResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: DescribeCertificateAuthorityAuditReportResponse
s@DescribeCertificateAuthorityAuditReportResponse' {} Maybe POSIX
a -> DescribeCertificateAuthorityAuditReportResponse
s {$sel:createdAt:DescribeCertificateAuthorityAuditReportResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: DescribeCertificateAuthorityAuditReportResponse) 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

-- | Name of the S3 bucket that contains the report.
describeCertificateAuthorityAuditReportResponse_s3BucketName :: Lens.Lens' DescribeCertificateAuthorityAuditReportResponse (Prelude.Maybe Prelude.Text)
describeCertificateAuthorityAuditReportResponse_s3BucketName :: Lens' DescribeCertificateAuthorityAuditReportResponse (Maybe Text)
describeCertificateAuthorityAuditReportResponse_s3BucketName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCertificateAuthorityAuditReportResponse' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:DescribeCertificateAuthorityAuditReportResponse' :: DescribeCertificateAuthorityAuditReportResponse -> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: DescribeCertificateAuthorityAuditReportResponse
s@DescribeCertificateAuthorityAuditReportResponse' {} Maybe Text
a -> DescribeCertificateAuthorityAuditReportResponse
s {$sel:s3BucketName:DescribeCertificateAuthorityAuditReportResponse' :: Maybe Text
s3BucketName = Maybe Text
a} :: DescribeCertificateAuthorityAuditReportResponse)

-- | S3 __key__ that uniquely identifies the report file in your S3 bucket.
describeCertificateAuthorityAuditReportResponse_s3Key :: Lens.Lens' DescribeCertificateAuthorityAuditReportResponse (Prelude.Maybe Prelude.Text)
describeCertificateAuthorityAuditReportResponse_s3Key :: Lens' DescribeCertificateAuthorityAuditReportResponse (Maybe Text)
describeCertificateAuthorityAuditReportResponse_s3Key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCertificateAuthorityAuditReportResponse' {Maybe Text
s3Key :: Maybe Text
$sel:s3Key:DescribeCertificateAuthorityAuditReportResponse' :: DescribeCertificateAuthorityAuditReportResponse -> Maybe Text
s3Key} -> Maybe Text
s3Key) (\s :: DescribeCertificateAuthorityAuditReportResponse
s@DescribeCertificateAuthorityAuditReportResponse' {} Maybe Text
a -> DescribeCertificateAuthorityAuditReportResponse
s {$sel:s3Key:DescribeCertificateAuthorityAuditReportResponse' :: Maybe Text
s3Key = Maybe Text
a} :: DescribeCertificateAuthorityAuditReportResponse)

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

instance
  Prelude.NFData
    DescribeCertificateAuthorityAuditReportResponse
  where
  rnf :: DescribeCertificateAuthorityAuditReportResponse -> ()
rnf
    DescribeCertificateAuthorityAuditReportResponse' {Int
Maybe Text
Maybe POSIX
Maybe AuditReportStatus
httpStatus :: Int
s3Key :: Maybe Text
s3BucketName :: Maybe Text
createdAt :: Maybe POSIX
auditReportStatus :: Maybe AuditReportStatus
$sel:httpStatus:DescribeCertificateAuthorityAuditReportResponse' :: DescribeCertificateAuthorityAuditReportResponse -> Int
$sel:s3Key:DescribeCertificateAuthorityAuditReportResponse' :: DescribeCertificateAuthorityAuditReportResponse -> Maybe Text
$sel:s3BucketName:DescribeCertificateAuthorityAuditReportResponse' :: DescribeCertificateAuthorityAuditReportResponse -> Maybe Text
$sel:createdAt:DescribeCertificateAuthorityAuditReportResponse' :: DescribeCertificateAuthorityAuditReportResponse -> Maybe POSIX
$sel:auditReportStatus:DescribeCertificateAuthorityAuditReportResponse' :: DescribeCertificateAuthorityAuditReportResponse
-> Maybe AuditReportStatus
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe AuditReportStatus
auditReportStatus
        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
s3BucketName
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3Key
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus