{-# 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.ListControlDomainInsightsByAssessment
-- 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 analytics data for control domains within a specified active
-- assessment.
--
-- A control domain is listed only if at least one of the controls within
-- that domain collected evidence on the @lastUpdated@ date of
-- @controlDomainInsights@. If this condition isn’t met, no data is listed
-- for that domain.
module Amazonka.AuditManager.ListControlDomainInsightsByAssessment
  ( -- * Creating a Request
    ListControlDomainInsightsByAssessment (..),
    newListControlDomainInsightsByAssessment,

    -- * Request Lenses
    listControlDomainInsightsByAssessment_maxResults,
    listControlDomainInsightsByAssessment_nextToken,
    listControlDomainInsightsByAssessment_assessmentId,

    -- * Destructuring the Response
    ListControlDomainInsightsByAssessmentResponse (..),
    newListControlDomainInsightsByAssessmentResponse,

    -- * Response Lenses
    listControlDomainInsightsByAssessmentResponse_controlDomainInsights,
    listControlDomainInsightsByAssessmentResponse_nextToken,
    listControlDomainInsightsByAssessmentResponse_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:/ 'newListControlDomainInsightsByAssessment' smart constructor.
data ListControlDomainInsightsByAssessment = ListControlDomainInsightsByAssessment'
  { -- | Represents the maximum number of results on a page or for an API request
    -- call.
    ListControlDomainInsightsByAssessment -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The pagination token that\'s used to fetch the next set of results.
    ListControlDomainInsightsByAssessment -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the active assessment.
    ListControlDomainInsightsByAssessment -> Text
assessmentId :: Prelude.Text
  }
  deriving (ListControlDomainInsightsByAssessment
-> ListControlDomainInsightsByAssessment -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListControlDomainInsightsByAssessment
-> ListControlDomainInsightsByAssessment -> Bool
$c/= :: ListControlDomainInsightsByAssessment
-> ListControlDomainInsightsByAssessment -> Bool
== :: ListControlDomainInsightsByAssessment
-> ListControlDomainInsightsByAssessment -> Bool
$c== :: ListControlDomainInsightsByAssessment
-> ListControlDomainInsightsByAssessment -> Bool
Prelude.Eq, ReadPrec [ListControlDomainInsightsByAssessment]
ReadPrec ListControlDomainInsightsByAssessment
Int -> ReadS ListControlDomainInsightsByAssessment
ReadS [ListControlDomainInsightsByAssessment]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListControlDomainInsightsByAssessment]
$creadListPrec :: ReadPrec [ListControlDomainInsightsByAssessment]
readPrec :: ReadPrec ListControlDomainInsightsByAssessment
$creadPrec :: ReadPrec ListControlDomainInsightsByAssessment
readList :: ReadS [ListControlDomainInsightsByAssessment]
$creadList :: ReadS [ListControlDomainInsightsByAssessment]
readsPrec :: Int -> ReadS ListControlDomainInsightsByAssessment
$creadsPrec :: Int -> ReadS ListControlDomainInsightsByAssessment
Prelude.Read, Int -> ListControlDomainInsightsByAssessment -> ShowS
[ListControlDomainInsightsByAssessment] -> ShowS
ListControlDomainInsightsByAssessment -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListControlDomainInsightsByAssessment] -> ShowS
$cshowList :: [ListControlDomainInsightsByAssessment] -> ShowS
show :: ListControlDomainInsightsByAssessment -> String
$cshow :: ListControlDomainInsightsByAssessment -> String
showsPrec :: Int -> ListControlDomainInsightsByAssessment -> ShowS
$cshowsPrec :: Int -> ListControlDomainInsightsByAssessment -> ShowS
Prelude.Show, forall x.
Rep ListControlDomainInsightsByAssessment x
-> ListControlDomainInsightsByAssessment
forall x.
ListControlDomainInsightsByAssessment
-> Rep ListControlDomainInsightsByAssessment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListControlDomainInsightsByAssessment x
-> ListControlDomainInsightsByAssessment
$cfrom :: forall x.
ListControlDomainInsightsByAssessment
-> Rep ListControlDomainInsightsByAssessment x
Prelude.Generic)

-- |
-- Create a value of 'ListControlDomainInsightsByAssessment' 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:
--
-- 'maxResults', 'listControlDomainInsightsByAssessment_maxResults' - Represents the maximum number of results on a page or for an API request
-- call.
--
-- 'nextToken', 'listControlDomainInsightsByAssessment_nextToken' - The pagination token that\'s used to fetch the next set of results.
--
-- 'assessmentId', 'listControlDomainInsightsByAssessment_assessmentId' - The unique identifier for the active assessment.
newListControlDomainInsightsByAssessment ::
  -- | 'assessmentId'
  Prelude.Text ->
  ListControlDomainInsightsByAssessment
newListControlDomainInsightsByAssessment :: Text -> ListControlDomainInsightsByAssessment
newListControlDomainInsightsByAssessment
  Text
pAssessmentId_ =
    ListControlDomainInsightsByAssessment'
      { $sel:maxResults:ListControlDomainInsightsByAssessment' :: Maybe Natural
maxResults =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListControlDomainInsightsByAssessment' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:assessmentId:ListControlDomainInsightsByAssessment' :: Text
assessmentId = Text
pAssessmentId_
      }

-- | Represents the maximum number of results on a page or for an API request
-- call.
listControlDomainInsightsByAssessment_maxResults :: Lens.Lens' ListControlDomainInsightsByAssessment (Prelude.Maybe Prelude.Natural)
listControlDomainInsightsByAssessment_maxResults :: Lens' ListControlDomainInsightsByAssessment (Maybe Natural)
listControlDomainInsightsByAssessment_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListControlDomainInsightsByAssessment' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListControlDomainInsightsByAssessment' :: ListControlDomainInsightsByAssessment -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListControlDomainInsightsByAssessment
s@ListControlDomainInsightsByAssessment' {} Maybe Natural
a -> ListControlDomainInsightsByAssessment
s {$sel:maxResults:ListControlDomainInsightsByAssessment' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListControlDomainInsightsByAssessment)

-- | The pagination token that\'s used to fetch the next set of results.
listControlDomainInsightsByAssessment_nextToken :: Lens.Lens' ListControlDomainInsightsByAssessment (Prelude.Maybe Prelude.Text)
listControlDomainInsightsByAssessment_nextToken :: Lens' ListControlDomainInsightsByAssessment (Maybe Text)
listControlDomainInsightsByAssessment_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListControlDomainInsightsByAssessment' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListControlDomainInsightsByAssessment' :: ListControlDomainInsightsByAssessment -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListControlDomainInsightsByAssessment
s@ListControlDomainInsightsByAssessment' {} Maybe Text
a -> ListControlDomainInsightsByAssessment
s {$sel:nextToken:ListControlDomainInsightsByAssessment' :: Maybe Text
nextToken = Maybe Text
a} :: ListControlDomainInsightsByAssessment)

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

instance
  Core.AWSRequest
    ListControlDomainInsightsByAssessment
  where
  type
    AWSResponse
      ListControlDomainInsightsByAssessment =
      ListControlDomainInsightsByAssessmentResponse
  request :: (Service -> Service)
-> ListControlDomainInsightsByAssessment
-> Request ListControlDomainInsightsByAssessment
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListControlDomainInsightsByAssessment
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListControlDomainInsightsByAssessment)))
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 [ControlDomainInsights]
-> Maybe Text
-> Int
-> ListControlDomainInsightsByAssessmentResponse
ListControlDomainInsightsByAssessmentResponse'
            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
"controlDomainInsights"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            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
    ListControlDomainInsightsByAssessment
  where
  hashWithSalt :: Int -> ListControlDomainInsightsByAssessment -> Int
hashWithSalt
    Int
_salt
    ListControlDomainInsightsByAssessment' {Maybe Natural
Maybe Text
Text
assessmentId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:assessmentId:ListControlDomainInsightsByAssessment' :: ListControlDomainInsightsByAssessment -> Text
$sel:nextToken:ListControlDomainInsightsByAssessment' :: ListControlDomainInsightsByAssessment -> Maybe Text
$sel:maxResults:ListControlDomainInsightsByAssessment' :: ListControlDomainInsightsByAssessment -> Maybe Natural
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
assessmentId

instance
  Prelude.NFData
    ListControlDomainInsightsByAssessment
  where
  rnf :: ListControlDomainInsightsByAssessment -> ()
rnf ListControlDomainInsightsByAssessment' {Maybe Natural
Maybe Text
Text
assessmentId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:assessmentId:ListControlDomainInsightsByAssessment' :: ListControlDomainInsightsByAssessment -> Text
$sel:nextToken:ListControlDomainInsightsByAssessment' :: ListControlDomainInsightsByAssessment -> Maybe Text
$sel:maxResults:ListControlDomainInsightsByAssessment' :: ListControlDomainInsightsByAssessment -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
assessmentId

instance
  Data.ToHeaders
    ListControlDomainInsightsByAssessment
  where
  toHeaders :: ListControlDomainInsightsByAssessment -> 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.ToPath
    ListControlDomainInsightsByAssessment
  where
  toPath :: ListControlDomainInsightsByAssessment -> ByteString
toPath =
    forall a b. a -> b -> a
Prelude.const
      ByteString
"/insights/control-domains-by-assessment"

instance
  Data.ToQuery
    ListControlDomainInsightsByAssessment
  where
  toQuery :: ListControlDomainInsightsByAssessment -> QueryString
toQuery ListControlDomainInsightsByAssessment' {Maybe Natural
Maybe Text
Text
assessmentId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:assessmentId:ListControlDomainInsightsByAssessment' :: ListControlDomainInsightsByAssessment -> Text
$sel:nextToken:ListControlDomainInsightsByAssessment' :: ListControlDomainInsightsByAssessment -> Maybe Text
$sel:maxResults:ListControlDomainInsightsByAssessment' :: ListControlDomainInsightsByAssessment -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"assessmentId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
assessmentId
      ]

-- | /See:/ 'newListControlDomainInsightsByAssessmentResponse' smart constructor.
data ListControlDomainInsightsByAssessmentResponse = ListControlDomainInsightsByAssessmentResponse'
  { -- | The control domain analytics data that the
    -- @ListControlDomainInsightsByAssessment@ API returned.
    ListControlDomainInsightsByAssessmentResponse
-> Maybe [ControlDomainInsights]
controlDomainInsights :: Prelude.Maybe [ControlDomainInsights],
    -- | The pagination token that\'s used to fetch the next set of results.
    ListControlDomainInsightsByAssessmentResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListControlDomainInsightsByAssessmentResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListControlDomainInsightsByAssessmentResponse
-> ListControlDomainInsightsByAssessmentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListControlDomainInsightsByAssessmentResponse
-> ListControlDomainInsightsByAssessmentResponse -> Bool
$c/= :: ListControlDomainInsightsByAssessmentResponse
-> ListControlDomainInsightsByAssessmentResponse -> Bool
== :: ListControlDomainInsightsByAssessmentResponse
-> ListControlDomainInsightsByAssessmentResponse -> Bool
$c== :: ListControlDomainInsightsByAssessmentResponse
-> ListControlDomainInsightsByAssessmentResponse -> Bool
Prelude.Eq, ReadPrec [ListControlDomainInsightsByAssessmentResponse]
ReadPrec ListControlDomainInsightsByAssessmentResponse
Int -> ReadS ListControlDomainInsightsByAssessmentResponse
ReadS [ListControlDomainInsightsByAssessmentResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListControlDomainInsightsByAssessmentResponse]
$creadListPrec :: ReadPrec [ListControlDomainInsightsByAssessmentResponse]
readPrec :: ReadPrec ListControlDomainInsightsByAssessmentResponse
$creadPrec :: ReadPrec ListControlDomainInsightsByAssessmentResponse
readList :: ReadS [ListControlDomainInsightsByAssessmentResponse]
$creadList :: ReadS [ListControlDomainInsightsByAssessmentResponse]
readsPrec :: Int -> ReadS ListControlDomainInsightsByAssessmentResponse
$creadsPrec :: Int -> ReadS ListControlDomainInsightsByAssessmentResponse
Prelude.Read, Int -> ListControlDomainInsightsByAssessmentResponse -> ShowS
[ListControlDomainInsightsByAssessmentResponse] -> ShowS
ListControlDomainInsightsByAssessmentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListControlDomainInsightsByAssessmentResponse] -> ShowS
$cshowList :: [ListControlDomainInsightsByAssessmentResponse] -> ShowS
show :: ListControlDomainInsightsByAssessmentResponse -> String
$cshow :: ListControlDomainInsightsByAssessmentResponse -> String
showsPrec :: Int -> ListControlDomainInsightsByAssessmentResponse -> ShowS
$cshowsPrec :: Int -> ListControlDomainInsightsByAssessmentResponse -> ShowS
Prelude.Show, forall x.
Rep ListControlDomainInsightsByAssessmentResponse x
-> ListControlDomainInsightsByAssessmentResponse
forall x.
ListControlDomainInsightsByAssessmentResponse
-> Rep ListControlDomainInsightsByAssessmentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListControlDomainInsightsByAssessmentResponse x
-> ListControlDomainInsightsByAssessmentResponse
$cfrom :: forall x.
ListControlDomainInsightsByAssessmentResponse
-> Rep ListControlDomainInsightsByAssessmentResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListControlDomainInsightsByAssessmentResponse' 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:
--
-- 'controlDomainInsights', 'listControlDomainInsightsByAssessmentResponse_controlDomainInsights' - The control domain analytics data that the
-- @ListControlDomainInsightsByAssessment@ API returned.
--
-- 'nextToken', 'listControlDomainInsightsByAssessmentResponse_nextToken' - The pagination token that\'s used to fetch the next set of results.
--
-- 'httpStatus', 'listControlDomainInsightsByAssessmentResponse_httpStatus' - The response's http status code.
newListControlDomainInsightsByAssessmentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListControlDomainInsightsByAssessmentResponse
newListControlDomainInsightsByAssessmentResponse :: Int -> ListControlDomainInsightsByAssessmentResponse
newListControlDomainInsightsByAssessmentResponse
  Int
pHttpStatus_ =
    ListControlDomainInsightsByAssessmentResponse'
      { $sel:controlDomainInsights:ListControlDomainInsightsByAssessmentResponse' :: Maybe [ControlDomainInsights]
controlDomainInsights =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListControlDomainInsightsByAssessmentResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListControlDomainInsightsByAssessmentResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The control domain analytics data that the
-- @ListControlDomainInsightsByAssessment@ API returned.
listControlDomainInsightsByAssessmentResponse_controlDomainInsights :: Lens.Lens' ListControlDomainInsightsByAssessmentResponse (Prelude.Maybe [ControlDomainInsights])
listControlDomainInsightsByAssessmentResponse_controlDomainInsights :: Lens'
  ListControlDomainInsightsByAssessmentResponse
  (Maybe [ControlDomainInsights])
listControlDomainInsightsByAssessmentResponse_controlDomainInsights = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListControlDomainInsightsByAssessmentResponse' {Maybe [ControlDomainInsights]
controlDomainInsights :: Maybe [ControlDomainInsights]
$sel:controlDomainInsights:ListControlDomainInsightsByAssessmentResponse' :: ListControlDomainInsightsByAssessmentResponse
-> Maybe [ControlDomainInsights]
controlDomainInsights} -> Maybe [ControlDomainInsights]
controlDomainInsights) (\s :: ListControlDomainInsightsByAssessmentResponse
s@ListControlDomainInsightsByAssessmentResponse' {} Maybe [ControlDomainInsights]
a -> ListControlDomainInsightsByAssessmentResponse
s {$sel:controlDomainInsights:ListControlDomainInsightsByAssessmentResponse' :: Maybe [ControlDomainInsights]
controlDomainInsights = Maybe [ControlDomainInsights]
a} :: ListControlDomainInsightsByAssessmentResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token that\'s used to fetch the next set of results.
listControlDomainInsightsByAssessmentResponse_nextToken :: Lens.Lens' ListControlDomainInsightsByAssessmentResponse (Prelude.Maybe Prelude.Text)
listControlDomainInsightsByAssessmentResponse_nextToken :: Lens' ListControlDomainInsightsByAssessmentResponse (Maybe Text)
listControlDomainInsightsByAssessmentResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListControlDomainInsightsByAssessmentResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListControlDomainInsightsByAssessmentResponse' :: ListControlDomainInsightsByAssessmentResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListControlDomainInsightsByAssessmentResponse
s@ListControlDomainInsightsByAssessmentResponse' {} Maybe Text
a -> ListControlDomainInsightsByAssessmentResponse
s {$sel:nextToken:ListControlDomainInsightsByAssessmentResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListControlDomainInsightsByAssessmentResponse)

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

instance
  Prelude.NFData
    ListControlDomainInsightsByAssessmentResponse
  where
  rnf :: ListControlDomainInsightsByAssessmentResponse -> ()
rnf
    ListControlDomainInsightsByAssessmentResponse' {Int
Maybe [ControlDomainInsights]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
controlDomainInsights :: Maybe [ControlDomainInsights]
$sel:httpStatus:ListControlDomainInsightsByAssessmentResponse' :: ListControlDomainInsightsByAssessmentResponse -> Int
$sel:nextToken:ListControlDomainInsightsByAssessmentResponse' :: ListControlDomainInsightsByAssessmentResponse -> Maybe Text
$sel:controlDomainInsights:ListControlDomainInsightsByAssessmentResponse' :: ListControlDomainInsightsByAssessmentResponse
-> Maybe [ControlDomainInsights]
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe [ControlDomainInsights]
controlDomainInsights
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus