{-# 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.ListControlInsightsByControlDomain
-- 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 the latest analytics data for controls within a specific control
-- domain across all active assessments.
--
-- Control insights are listed only if the control belongs to the control
-- domain that was specified and the control collected evidence on the
-- @lastUpdated@ date of @controlInsightsMetadata@. If neither of these
-- conditions are met, no data is listed for that control.
module Amazonka.AuditManager.ListControlInsightsByControlDomain
  ( -- * Creating a Request
    ListControlInsightsByControlDomain (..),
    newListControlInsightsByControlDomain,

    -- * Request Lenses
    listControlInsightsByControlDomain_maxResults,
    listControlInsightsByControlDomain_nextToken,
    listControlInsightsByControlDomain_controlDomainId,

    -- * Destructuring the Response
    ListControlInsightsByControlDomainResponse (..),
    newListControlInsightsByControlDomainResponse,

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

-- |
-- Create a value of 'ListControlInsightsByControlDomain' 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', 'listControlInsightsByControlDomain_maxResults' - Represents the maximum number of results on a page or for an API request
-- call.
--
-- 'nextToken', 'listControlInsightsByControlDomain_nextToken' - The pagination token that\'s used to fetch the next set of results.
--
-- 'controlDomainId', 'listControlInsightsByControlDomain_controlDomainId' - The unique identifier for the control domain.
newListControlInsightsByControlDomain ::
  -- | 'controlDomainId'
  Prelude.Text ->
  ListControlInsightsByControlDomain
newListControlInsightsByControlDomain :: Text -> ListControlInsightsByControlDomain
newListControlInsightsByControlDomain
  Text
pControlDomainId_ =
    ListControlInsightsByControlDomain'
      { $sel:maxResults:ListControlInsightsByControlDomain' :: Maybe Natural
maxResults =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListControlInsightsByControlDomain' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:controlDomainId:ListControlInsightsByControlDomain' :: Text
controlDomainId = Text
pControlDomainId_
      }

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

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

-- | The unique identifier for the control domain.
listControlInsightsByControlDomain_controlDomainId :: Lens.Lens' ListControlInsightsByControlDomain Prelude.Text
listControlInsightsByControlDomain_controlDomainId :: Lens' ListControlInsightsByControlDomain Text
listControlInsightsByControlDomain_controlDomainId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListControlInsightsByControlDomain' {Text
controlDomainId :: Text
$sel:controlDomainId:ListControlInsightsByControlDomain' :: ListControlInsightsByControlDomain -> Text
controlDomainId} -> Text
controlDomainId) (\s :: ListControlInsightsByControlDomain
s@ListControlInsightsByControlDomain' {} Text
a -> ListControlInsightsByControlDomain
s {$sel:controlDomainId:ListControlInsightsByControlDomain' :: Text
controlDomainId = Text
a} :: ListControlInsightsByControlDomain)

instance
  Core.AWSRequest
    ListControlInsightsByControlDomain
  where
  type
    AWSResponse ListControlInsightsByControlDomain =
      ListControlInsightsByControlDomainResponse
  request :: (Service -> Service)
-> ListControlInsightsByControlDomain
-> Request ListControlInsightsByControlDomain
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 ListControlInsightsByControlDomain
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListControlInsightsByControlDomain)))
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 [ControlInsightsMetadataItem]
-> Maybe Text -> Int -> ListControlInsightsByControlDomainResponse
ListControlInsightsByControlDomainResponse'
            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
"controlInsightsMetadata"
                            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
    ListControlInsightsByControlDomain
  where
  hashWithSalt :: Int -> ListControlInsightsByControlDomain -> Int
hashWithSalt
    Int
_salt
    ListControlInsightsByControlDomain' {Maybe Natural
Maybe Text
Text
controlDomainId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:controlDomainId:ListControlInsightsByControlDomain' :: ListControlInsightsByControlDomain -> Text
$sel:nextToken:ListControlInsightsByControlDomain' :: ListControlInsightsByControlDomain -> Maybe Text
$sel:maxResults:ListControlInsightsByControlDomain' :: ListControlInsightsByControlDomain -> 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
controlDomainId

instance
  Prelude.NFData
    ListControlInsightsByControlDomain
  where
  rnf :: ListControlInsightsByControlDomain -> ()
rnf ListControlInsightsByControlDomain' {Maybe Natural
Maybe Text
Text
controlDomainId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:controlDomainId:ListControlInsightsByControlDomain' :: ListControlInsightsByControlDomain -> Text
$sel:nextToken:ListControlInsightsByControlDomain' :: ListControlInsightsByControlDomain -> Maybe Text
$sel:maxResults:ListControlInsightsByControlDomain' :: ListControlInsightsByControlDomain -> 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
controlDomainId

instance
  Data.ToHeaders
    ListControlInsightsByControlDomain
  where
  toHeaders :: ListControlInsightsByControlDomain -> 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
    ListControlInsightsByControlDomain
  where
  toPath :: ListControlInsightsByControlDomain -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/insights/controls"

instance
  Data.ToQuery
    ListControlInsightsByControlDomain
  where
  toQuery :: ListControlInsightsByControlDomain -> QueryString
toQuery ListControlInsightsByControlDomain' {Maybe Natural
Maybe Text
Text
controlDomainId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:controlDomainId:ListControlInsightsByControlDomain' :: ListControlInsightsByControlDomain -> Text
$sel:nextToken:ListControlInsightsByControlDomain' :: ListControlInsightsByControlDomain -> Maybe Text
$sel:maxResults:ListControlInsightsByControlDomain' :: ListControlInsightsByControlDomain -> 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
"controlDomainId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
controlDomainId
      ]

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

-- |
-- Create a value of 'ListControlInsightsByControlDomainResponse' 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:
--
-- 'controlInsightsMetadata', 'listControlInsightsByControlDomainResponse_controlInsightsMetadata' - The control analytics data that the @ListControlInsightsByControlDomain@
-- API returned.
--
-- 'nextToken', 'listControlInsightsByControlDomainResponse_nextToken' - The pagination token that\'s used to fetch the next set of results.
--
-- 'httpStatus', 'listControlInsightsByControlDomainResponse_httpStatus' - The response's http status code.
newListControlInsightsByControlDomainResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListControlInsightsByControlDomainResponse
newListControlInsightsByControlDomainResponse :: Int -> ListControlInsightsByControlDomainResponse
newListControlInsightsByControlDomainResponse
  Int
pHttpStatus_ =
    ListControlInsightsByControlDomainResponse'
      { $sel:controlInsightsMetadata:ListControlInsightsByControlDomainResponse' :: Maybe [ControlInsightsMetadataItem]
controlInsightsMetadata =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListControlInsightsByControlDomainResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListControlInsightsByControlDomainResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The control analytics data that the @ListControlInsightsByControlDomain@
-- API returned.
listControlInsightsByControlDomainResponse_controlInsightsMetadata :: Lens.Lens' ListControlInsightsByControlDomainResponse (Prelude.Maybe [ControlInsightsMetadataItem])
listControlInsightsByControlDomainResponse_controlInsightsMetadata :: Lens'
  ListControlInsightsByControlDomainResponse
  (Maybe [ControlInsightsMetadataItem])
listControlInsightsByControlDomainResponse_controlInsightsMetadata = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListControlInsightsByControlDomainResponse' {Maybe [ControlInsightsMetadataItem]
controlInsightsMetadata :: Maybe [ControlInsightsMetadataItem]
$sel:controlInsightsMetadata:ListControlInsightsByControlDomainResponse' :: ListControlInsightsByControlDomainResponse
-> Maybe [ControlInsightsMetadataItem]
controlInsightsMetadata} -> Maybe [ControlInsightsMetadataItem]
controlInsightsMetadata) (\s :: ListControlInsightsByControlDomainResponse
s@ListControlInsightsByControlDomainResponse' {} Maybe [ControlInsightsMetadataItem]
a -> ListControlInsightsByControlDomainResponse
s {$sel:controlInsightsMetadata:ListControlInsightsByControlDomainResponse' :: Maybe [ControlInsightsMetadataItem]
controlInsightsMetadata = Maybe [ControlInsightsMetadataItem]
a} :: ListControlInsightsByControlDomainResponse) 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.
listControlInsightsByControlDomainResponse_nextToken :: Lens.Lens' ListControlInsightsByControlDomainResponse (Prelude.Maybe Prelude.Text)
listControlInsightsByControlDomainResponse_nextToken :: Lens' ListControlInsightsByControlDomainResponse (Maybe Text)
listControlInsightsByControlDomainResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListControlInsightsByControlDomainResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListControlInsightsByControlDomainResponse' :: ListControlInsightsByControlDomainResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListControlInsightsByControlDomainResponse
s@ListControlInsightsByControlDomainResponse' {} Maybe Text
a -> ListControlInsightsByControlDomainResponse
s {$sel:nextToken:ListControlInsightsByControlDomainResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListControlInsightsByControlDomainResponse)

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

instance
  Prelude.NFData
    ListControlInsightsByControlDomainResponse
  where
  rnf :: ListControlInsightsByControlDomainResponse -> ()
rnf ListControlInsightsByControlDomainResponse' {Int
Maybe [ControlInsightsMetadataItem]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
controlInsightsMetadata :: Maybe [ControlInsightsMetadataItem]
$sel:httpStatus:ListControlInsightsByControlDomainResponse' :: ListControlInsightsByControlDomainResponse -> Int
$sel:nextToken:ListControlInsightsByControlDomainResponse' :: ListControlInsightsByControlDomainResponse -> Maybe Text
$sel:controlInsightsMetadata:ListControlInsightsByControlDomainResponse' :: ListControlInsightsByControlDomainResponse
-> Maybe [ControlInsightsMetadataItem]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ControlInsightsMetadataItem]
controlInsightsMetadata
      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