{-# 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.AuditManager.CreateAssessmentReport
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an assessment report for the specified assessment.
module Amazonka.AuditManager.CreateAssessmentReport
  ( -- * Creating a Request
    CreateAssessmentReport (..),
    newCreateAssessmentReport,

    -- * Request Lenses
    createAssessmentReport_description,
    createAssessmentReport_queryStatement,
    createAssessmentReport_name,
    createAssessmentReport_assessmentId,

    -- * Destructuring the Response
    CreateAssessmentReportResponse (..),
    newCreateAssessmentReportResponse,

    -- * Response Lenses
    createAssessmentReportResponse_assessmentReport,
    createAssessmentReportResponse_httpStatus,
  )
where

import Amazonka.AuditManager.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:/ 'newCreateAssessmentReport' smart constructor.
data CreateAssessmentReport = CreateAssessmentReport'
  { -- | The description of the assessment report.
    CreateAssessmentReport -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A SQL statement that represents an evidence finder query.
    --
    -- Provide this parameter when you want to generate an assessment report
    -- from the results of an evidence finder search query. When you use this
    -- parameter, Audit Manager generates a one-time report using only the
    -- evidence from the query output. This report does not include any
    -- assessment evidence that was manually
    -- <https://docs.aws.amazon.com/audit-manager/latest/userguide/generate-assessment-report.html#generate-assessment-report-include-evidence added to a report using the console>,
    -- or
    -- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_BatchAssociateAssessmentReportEvidence.html associated with a report using the API>.
    --
    -- To use this parameter, the
    -- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_EvidenceFinderEnablement.html#auditmanager-Type-EvidenceFinderEnablement-enablementStatus enablementStatus>
    -- of evidence finder must be @ENABLED@.
    --
    -- For examples and help resolving @queryStatement@ validation exceptions,
    -- see
    -- <https://docs.aws.amazon.com/audit-manager/latest/userguide/evidence-finder-issues.html#querystatement-exceptions Troubleshooting evidence finder issues>
    -- in the /Audit Manager User Guide./
    CreateAssessmentReport -> Maybe Text
queryStatement :: Prelude.Maybe Prelude.Text,
    -- | The name of the new assessment report.
    CreateAssessmentReport -> Text
name :: Prelude.Text,
    -- | The identifier for the assessment.
    CreateAssessmentReport -> Text
assessmentId :: Prelude.Text
  }
  deriving (CreateAssessmentReport -> CreateAssessmentReport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAssessmentReport -> CreateAssessmentReport -> Bool
$c/= :: CreateAssessmentReport -> CreateAssessmentReport -> Bool
== :: CreateAssessmentReport -> CreateAssessmentReport -> Bool
$c== :: CreateAssessmentReport -> CreateAssessmentReport -> Bool
Prelude.Eq, ReadPrec [CreateAssessmentReport]
ReadPrec CreateAssessmentReport
Int -> ReadS CreateAssessmentReport
ReadS [CreateAssessmentReport]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAssessmentReport]
$creadListPrec :: ReadPrec [CreateAssessmentReport]
readPrec :: ReadPrec CreateAssessmentReport
$creadPrec :: ReadPrec CreateAssessmentReport
readList :: ReadS [CreateAssessmentReport]
$creadList :: ReadS [CreateAssessmentReport]
readsPrec :: Int -> ReadS CreateAssessmentReport
$creadsPrec :: Int -> ReadS CreateAssessmentReport
Prelude.Read, Int -> CreateAssessmentReport -> ShowS
[CreateAssessmentReport] -> ShowS
CreateAssessmentReport -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAssessmentReport] -> ShowS
$cshowList :: [CreateAssessmentReport] -> ShowS
show :: CreateAssessmentReport -> String
$cshow :: CreateAssessmentReport -> String
showsPrec :: Int -> CreateAssessmentReport -> ShowS
$cshowsPrec :: Int -> CreateAssessmentReport -> ShowS
Prelude.Show, forall x. Rep CreateAssessmentReport x -> CreateAssessmentReport
forall x. CreateAssessmentReport -> Rep CreateAssessmentReport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAssessmentReport x -> CreateAssessmentReport
$cfrom :: forall x. CreateAssessmentReport -> Rep CreateAssessmentReport x
Prelude.Generic)

-- |
-- Create a value of 'CreateAssessmentReport' 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:
--
-- 'description', 'createAssessmentReport_description' - The description of the assessment report.
--
-- 'queryStatement', 'createAssessmentReport_queryStatement' - A SQL statement that represents an evidence finder query.
--
-- Provide this parameter when you want to generate an assessment report
-- from the results of an evidence finder search query. When you use this
-- parameter, Audit Manager generates a one-time report using only the
-- evidence from the query output. This report does not include any
-- assessment evidence that was manually
-- <https://docs.aws.amazon.com/audit-manager/latest/userguide/generate-assessment-report.html#generate-assessment-report-include-evidence added to a report using the console>,
-- or
-- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_BatchAssociateAssessmentReportEvidence.html associated with a report using the API>.
--
-- To use this parameter, the
-- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_EvidenceFinderEnablement.html#auditmanager-Type-EvidenceFinderEnablement-enablementStatus enablementStatus>
-- of evidence finder must be @ENABLED@.
--
-- For examples and help resolving @queryStatement@ validation exceptions,
-- see
-- <https://docs.aws.amazon.com/audit-manager/latest/userguide/evidence-finder-issues.html#querystatement-exceptions Troubleshooting evidence finder issues>
-- in the /Audit Manager User Guide./
--
-- 'name', 'createAssessmentReport_name' - The name of the new assessment report.
--
-- 'assessmentId', 'createAssessmentReport_assessmentId' - The identifier for the assessment.
newCreateAssessmentReport ::
  -- | 'name'
  Prelude.Text ->
  -- | 'assessmentId'
  Prelude.Text ->
  CreateAssessmentReport
newCreateAssessmentReport :: Text -> Text -> CreateAssessmentReport
newCreateAssessmentReport Text
pName_ Text
pAssessmentId_ =
  CreateAssessmentReport'
    { $sel:description:CreateAssessmentReport' :: Maybe Text
description =
        forall a. Maybe a
Prelude.Nothing,
      $sel:queryStatement:CreateAssessmentReport' :: Maybe Text
queryStatement = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateAssessmentReport' :: Text
name = Text
pName_,
      $sel:assessmentId:CreateAssessmentReport' :: Text
assessmentId = Text
pAssessmentId_
    }

-- | The description of the assessment report.
createAssessmentReport_description :: Lens.Lens' CreateAssessmentReport (Prelude.Maybe Prelude.Text)
createAssessmentReport_description :: Lens' CreateAssessmentReport (Maybe Text)
createAssessmentReport_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssessmentReport' {Maybe Text
description :: Maybe Text
$sel:description:CreateAssessmentReport' :: CreateAssessmentReport -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateAssessmentReport
s@CreateAssessmentReport' {} Maybe Text
a -> CreateAssessmentReport
s {$sel:description:CreateAssessmentReport' :: Maybe Text
description = Maybe Text
a} :: CreateAssessmentReport)

-- | A SQL statement that represents an evidence finder query.
--
-- Provide this parameter when you want to generate an assessment report
-- from the results of an evidence finder search query. When you use this
-- parameter, Audit Manager generates a one-time report using only the
-- evidence from the query output. This report does not include any
-- assessment evidence that was manually
-- <https://docs.aws.amazon.com/audit-manager/latest/userguide/generate-assessment-report.html#generate-assessment-report-include-evidence added to a report using the console>,
-- or
-- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_BatchAssociateAssessmentReportEvidence.html associated with a report using the API>.
--
-- To use this parameter, the
-- <https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_EvidenceFinderEnablement.html#auditmanager-Type-EvidenceFinderEnablement-enablementStatus enablementStatus>
-- of evidence finder must be @ENABLED@.
--
-- For examples and help resolving @queryStatement@ validation exceptions,
-- see
-- <https://docs.aws.amazon.com/audit-manager/latest/userguide/evidence-finder-issues.html#querystatement-exceptions Troubleshooting evidence finder issues>
-- in the /Audit Manager User Guide./
createAssessmentReport_queryStatement :: Lens.Lens' CreateAssessmentReport (Prelude.Maybe Prelude.Text)
createAssessmentReport_queryStatement :: Lens' CreateAssessmentReport (Maybe Text)
createAssessmentReport_queryStatement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssessmentReport' {Maybe Text
queryStatement :: Maybe Text
$sel:queryStatement:CreateAssessmentReport' :: CreateAssessmentReport -> Maybe Text
queryStatement} -> Maybe Text
queryStatement) (\s :: CreateAssessmentReport
s@CreateAssessmentReport' {} Maybe Text
a -> CreateAssessmentReport
s {$sel:queryStatement:CreateAssessmentReport' :: Maybe Text
queryStatement = Maybe Text
a} :: CreateAssessmentReport)

-- | The name of the new assessment report.
createAssessmentReport_name :: Lens.Lens' CreateAssessmentReport Prelude.Text
createAssessmentReport_name :: Lens' CreateAssessmentReport Text
createAssessmentReport_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssessmentReport' {Text
name :: Text
$sel:name:CreateAssessmentReport' :: CreateAssessmentReport -> Text
name} -> Text
name) (\s :: CreateAssessmentReport
s@CreateAssessmentReport' {} Text
a -> CreateAssessmentReport
s {$sel:name:CreateAssessmentReport' :: Text
name = Text
a} :: CreateAssessmentReport)

-- | The identifier for the assessment.
createAssessmentReport_assessmentId :: Lens.Lens' CreateAssessmentReport Prelude.Text
createAssessmentReport_assessmentId :: Lens' CreateAssessmentReport Text
createAssessmentReport_assessmentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssessmentReport' {Text
assessmentId :: Text
$sel:assessmentId:CreateAssessmentReport' :: CreateAssessmentReport -> Text
assessmentId} -> Text
assessmentId) (\s :: CreateAssessmentReport
s@CreateAssessmentReport' {} Text
a -> CreateAssessmentReport
s {$sel:assessmentId:CreateAssessmentReport' :: Text
assessmentId = Text
a} :: CreateAssessmentReport)

instance Core.AWSRequest CreateAssessmentReport where
  type
    AWSResponse CreateAssessmentReport =
      CreateAssessmentReportResponse
  request :: (Service -> Service)
-> CreateAssessmentReport -> Request CreateAssessmentReport
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 CreateAssessmentReport
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateAssessmentReport)))
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 AssessmentReport -> Int -> CreateAssessmentReportResponse
CreateAssessmentReportResponse'
            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
"assessmentReport")
            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 CreateAssessmentReport where
  hashWithSalt :: Int -> CreateAssessmentReport -> Int
hashWithSalt Int
_salt CreateAssessmentReport' {Maybe Text
Text
assessmentId :: Text
name :: Text
queryStatement :: Maybe Text
description :: Maybe Text
$sel:assessmentId:CreateAssessmentReport' :: CreateAssessmentReport -> Text
$sel:name:CreateAssessmentReport' :: CreateAssessmentReport -> Text
$sel:queryStatement:CreateAssessmentReport' :: CreateAssessmentReport -> Maybe Text
$sel:description:CreateAssessmentReport' :: CreateAssessmentReport -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
queryStatement
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
assessmentId

instance Prelude.NFData CreateAssessmentReport where
  rnf :: CreateAssessmentReport -> ()
rnf CreateAssessmentReport' {Maybe Text
Text
assessmentId :: Text
name :: Text
queryStatement :: Maybe Text
description :: Maybe Text
$sel:assessmentId:CreateAssessmentReport' :: CreateAssessmentReport -> Text
$sel:name:CreateAssessmentReport' :: CreateAssessmentReport -> Text
$sel:queryStatement:CreateAssessmentReport' :: CreateAssessmentReport -> Maybe Text
$sel:description:CreateAssessmentReport' :: CreateAssessmentReport -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
queryStatement
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
assessmentId

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

instance Data.ToJSON CreateAssessmentReport where
  toJSON :: CreateAssessmentReport -> Value
toJSON CreateAssessmentReport' {Maybe Text
Text
assessmentId :: Text
name :: Text
queryStatement :: Maybe Text
description :: Maybe Text
$sel:assessmentId:CreateAssessmentReport' :: CreateAssessmentReport -> Text
$sel:name:CreateAssessmentReport' :: CreateAssessmentReport -> Text
$sel:queryStatement:CreateAssessmentReport' :: CreateAssessmentReport -> Maybe Text
$sel:description:CreateAssessmentReport' :: CreateAssessmentReport -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"queryStatement" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
queryStatement,
            forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
          ]
      )

instance Data.ToPath CreateAssessmentReport where
  toPath :: CreateAssessmentReport -> ByteString
toPath CreateAssessmentReport' {Maybe Text
Text
assessmentId :: Text
name :: Text
queryStatement :: Maybe Text
description :: Maybe Text
$sel:assessmentId:CreateAssessmentReport' :: CreateAssessmentReport -> Text
$sel:name:CreateAssessmentReport' :: CreateAssessmentReport -> Text
$sel:queryStatement:CreateAssessmentReport' :: CreateAssessmentReport -> Maybe Text
$sel:description:CreateAssessmentReport' :: CreateAssessmentReport -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/assessments/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
assessmentId, ByteString
"/reports"]

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

-- | /See:/ 'newCreateAssessmentReportResponse' smart constructor.
data CreateAssessmentReportResponse = CreateAssessmentReportResponse'
  { -- | The new assessment report that the @CreateAssessmentReport@ API
    -- returned.
    CreateAssessmentReportResponse -> Maybe AssessmentReport
assessmentReport :: Prelude.Maybe AssessmentReport,
    -- | The response's http status code.
    CreateAssessmentReportResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateAssessmentReportResponse
-> CreateAssessmentReportResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAssessmentReportResponse
-> CreateAssessmentReportResponse -> Bool
$c/= :: CreateAssessmentReportResponse
-> CreateAssessmentReportResponse -> Bool
== :: CreateAssessmentReportResponse
-> CreateAssessmentReportResponse -> Bool
$c== :: CreateAssessmentReportResponse
-> CreateAssessmentReportResponse -> Bool
Prelude.Eq, ReadPrec [CreateAssessmentReportResponse]
ReadPrec CreateAssessmentReportResponse
Int -> ReadS CreateAssessmentReportResponse
ReadS [CreateAssessmentReportResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAssessmentReportResponse]
$creadListPrec :: ReadPrec [CreateAssessmentReportResponse]
readPrec :: ReadPrec CreateAssessmentReportResponse
$creadPrec :: ReadPrec CreateAssessmentReportResponse
readList :: ReadS [CreateAssessmentReportResponse]
$creadList :: ReadS [CreateAssessmentReportResponse]
readsPrec :: Int -> ReadS CreateAssessmentReportResponse
$creadsPrec :: Int -> ReadS CreateAssessmentReportResponse
Prelude.Read, Int -> CreateAssessmentReportResponse -> ShowS
[CreateAssessmentReportResponse] -> ShowS
CreateAssessmentReportResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAssessmentReportResponse] -> ShowS
$cshowList :: [CreateAssessmentReportResponse] -> ShowS
show :: CreateAssessmentReportResponse -> String
$cshow :: CreateAssessmentReportResponse -> String
showsPrec :: Int -> CreateAssessmentReportResponse -> ShowS
$cshowsPrec :: Int -> CreateAssessmentReportResponse -> ShowS
Prelude.Show, forall x.
Rep CreateAssessmentReportResponse x
-> CreateAssessmentReportResponse
forall x.
CreateAssessmentReportResponse
-> Rep CreateAssessmentReportResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAssessmentReportResponse x
-> CreateAssessmentReportResponse
$cfrom :: forall x.
CreateAssessmentReportResponse
-> Rep CreateAssessmentReportResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateAssessmentReportResponse' 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:
--
-- 'assessmentReport', 'createAssessmentReportResponse_assessmentReport' - The new assessment report that the @CreateAssessmentReport@ API
-- returned.
--
-- 'httpStatus', 'createAssessmentReportResponse_httpStatus' - The response's http status code.
newCreateAssessmentReportResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateAssessmentReportResponse
newCreateAssessmentReportResponse :: Int -> CreateAssessmentReportResponse
newCreateAssessmentReportResponse Int
pHttpStatus_ =
  CreateAssessmentReportResponse'
    { $sel:assessmentReport:CreateAssessmentReportResponse' :: Maybe AssessmentReport
assessmentReport =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateAssessmentReportResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The new assessment report that the @CreateAssessmentReport@ API
-- returned.
createAssessmentReportResponse_assessmentReport :: Lens.Lens' CreateAssessmentReportResponse (Prelude.Maybe AssessmentReport)
createAssessmentReportResponse_assessmentReport :: Lens' CreateAssessmentReportResponse (Maybe AssessmentReport)
createAssessmentReportResponse_assessmentReport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssessmentReportResponse' {Maybe AssessmentReport
assessmentReport :: Maybe AssessmentReport
$sel:assessmentReport:CreateAssessmentReportResponse' :: CreateAssessmentReportResponse -> Maybe AssessmentReport
assessmentReport} -> Maybe AssessmentReport
assessmentReport) (\s :: CreateAssessmentReportResponse
s@CreateAssessmentReportResponse' {} Maybe AssessmentReport
a -> CreateAssessmentReportResponse
s {$sel:assessmentReport:CreateAssessmentReportResponse' :: Maybe AssessmentReport
assessmentReport = Maybe AssessmentReport
a} :: CreateAssessmentReportResponse)

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

instance
  Prelude.NFData
    CreateAssessmentReportResponse
  where
  rnf :: CreateAssessmentReportResponse -> ()
rnf CreateAssessmentReportResponse' {Int
Maybe AssessmentReport
httpStatus :: Int
assessmentReport :: Maybe AssessmentReport
$sel:httpStatus:CreateAssessmentReportResponse' :: CreateAssessmentReportResponse -> Int
$sel:assessmentReport:CreateAssessmentReportResponse' :: CreateAssessmentReportResponse -> Maybe AssessmentReport
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AssessmentReport
assessmentReport
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus