{-# 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.Inspector.ListFindings
-- 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 findings that are generated by the assessment runs that are
-- specified by the ARNs of the assessment runs.
--
-- This operation returns paginated results.
module Amazonka.Inspector.ListFindings
  ( -- * Creating a Request
    ListFindings (..),
    newListFindings,

    -- * Request Lenses
    listFindings_assessmentRunArns,
    listFindings_filter,
    listFindings_maxResults,
    listFindings_nextToken,

    -- * Destructuring the Response
    ListFindingsResponse (..),
    newListFindingsResponse,

    -- * Response Lenses
    listFindingsResponse_nextToken,
    listFindingsResponse_httpStatus,
    listFindingsResponse_findingArns,
  )
where

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

-- | /See:/ 'newListFindings' smart constructor.
data ListFindings = ListFindings'
  { -- | The ARNs of the assessment runs that generate the findings that you want
    -- to list.
    ListFindings -> Maybe [Text]
assessmentRunArns :: Prelude.Maybe [Prelude.Text],
    -- | You can use this parameter to specify a subset of data to be included in
    -- the action\'s response.
    --
    -- For a record to match a filter, all specified filter attributes must
    -- match. When multiple values are specified for a filter attribute, any of
    -- the values can match.
    ListFindings -> Maybe FindingFilter
filter' :: Prelude.Maybe FindingFilter,
    -- | You can use this parameter to indicate the maximum number of items you
    -- want in the response. The default value is 10. The maximum value is 500.
    ListFindings -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | You can use this parameter when paginating results. Set the value of
    -- this parameter to null on your first call to the __ListFindings__
    -- action. Subsequent calls to the action fill __nextToken__ in the request
    -- with the value of __NextToken__ from the previous response to continue
    -- listing data.
    ListFindings -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListFindings -> ListFindings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFindings -> ListFindings -> Bool
$c/= :: ListFindings -> ListFindings -> Bool
== :: ListFindings -> ListFindings -> Bool
$c== :: ListFindings -> ListFindings -> Bool
Prelude.Eq, ReadPrec [ListFindings]
ReadPrec ListFindings
Int -> ReadS ListFindings
ReadS [ListFindings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFindings]
$creadListPrec :: ReadPrec [ListFindings]
readPrec :: ReadPrec ListFindings
$creadPrec :: ReadPrec ListFindings
readList :: ReadS [ListFindings]
$creadList :: ReadS [ListFindings]
readsPrec :: Int -> ReadS ListFindings
$creadsPrec :: Int -> ReadS ListFindings
Prelude.Read, Int -> ListFindings -> ShowS
[ListFindings] -> ShowS
ListFindings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFindings] -> ShowS
$cshowList :: [ListFindings] -> ShowS
show :: ListFindings -> String
$cshow :: ListFindings -> String
showsPrec :: Int -> ListFindings -> ShowS
$cshowsPrec :: Int -> ListFindings -> ShowS
Prelude.Show, forall x. Rep ListFindings x -> ListFindings
forall x. ListFindings -> Rep ListFindings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListFindings x -> ListFindings
$cfrom :: forall x. ListFindings -> Rep ListFindings x
Prelude.Generic)

-- |
-- Create a value of 'ListFindings' 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:
--
-- 'assessmentRunArns', 'listFindings_assessmentRunArns' - The ARNs of the assessment runs that generate the findings that you want
-- to list.
--
-- 'filter'', 'listFindings_filter' - You can use this parameter to specify a subset of data to be included in
-- the action\'s response.
--
-- For a record to match a filter, all specified filter attributes must
-- match. When multiple values are specified for a filter attribute, any of
-- the values can match.
--
-- 'maxResults', 'listFindings_maxResults' - You can use this parameter to indicate the maximum number of items you
-- want in the response. The default value is 10. The maximum value is 500.
--
-- 'nextToken', 'listFindings_nextToken' - You can use this parameter when paginating results. Set the value of
-- this parameter to null on your first call to the __ListFindings__
-- action. Subsequent calls to the action fill __nextToken__ in the request
-- with the value of __NextToken__ from the previous response to continue
-- listing data.
newListFindings ::
  ListFindings
newListFindings :: ListFindings
newListFindings =
  ListFindings'
    { $sel:assessmentRunArns:ListFindings' :: Maybe [Text]
assessmentRunArns = forall a. Maybe a
Prelude.Nothing,
      $sel:filter':ListFindings' :: Maybe FindingFilter
filter' = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListFindings' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListFindings' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | The ARNs of the assessment runs that generate the findings that you want
-- to list.
listFindings_assessmentRunArns :: Lens.Lens' ListFindings (Prelude.Maybe [Prelude.Text])
listFindings_assessmentRunArns :: Lens' ListFindings (Maybe [Text])
listFindings_assessmentRunArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFindings' {Maybe [Text]
assessmentRunArns :: Maybe [Text]
$sel:assessmentRunArns:ListFindings' :: ListFindings -> Maybe [Text]
assessmentRunArns} -> Maybe [Text]
assessmentRunArns) (\s :: ListFindings
s@ListFindings' {} Maybe [Text]
a -> ListFindings
s {$sel:assessmentRunArns:ListFindings' :: Maybe [Text]
assessmentRunArns = Maybe [Text]
a} :: ListFindings) 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

-- | You can use this parameter to specify a subset of data to be included in
-- the action\'s response.
--
-- For a record to match a filter, all specified filter attributes must
-- match. When multiple values are specified for a filter attribute, any of
-- the values can match.
listFindings_filter :: Lens.Lens' ListFindings (Prelude.Maybe FindingFilter)
listFindings_filter :: Lens' ListFindings (Maybe FindingFilter)
listFindings_filter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFindings' {Maybe FindingFilter
filter' :: Maybe FindingFilter
$sel:filter':ListFindings' :: ListFindings -> Maybe FindingFilter
filter'} -> Maybe FindingFilter
filter') (\s :: ListFindings
s@ListFindings' {} Maybe FindingFilter
a -> ListFindings
s {$sel:filter':ListFindings' :: Maybe FindingFilter
filter' = Maybe FindingFilter
a} :: ListFindings)

-- | You can use this parameter to indicate the maximum number of items you
-- want in the response. The default value is 10. The maximum value is 500.
listFindings_maxResults :: Lens.Lens' ListFindings (Prelude.Maybe Prelude.Int)
listFindings_maxResults :: Lens' ListFindings (Maybe Int)
listFindings_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFindings' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListFindings' :: ListFindings -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListFindings
s@ListFindings' {} Maybe Int
a -> ListFindings
s {$sel:maxResults:ListFindings' :: Maybe Int
maxResults = Maybe Int
a} :: ListFindings)

-- | You can use this parameter when paginating results. Set the value of
-- this parameter to null on your first call to the __ListFindings__
-- action. Subsequent calls to the action fill __nextToken__ in the request
-- with the value of __NextToken__ from the previous response to continue
-- listing data.
listFindings_nextToken :: Lens.Lens' ListFindings (Prelude.Maybe Prelude.Text)
listFindings_nextToken :: Lens' ListFindings (Maybe Text)
listFindings_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFindings' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFindings' :: ListFindings -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFindings
s@ListFindings' {} Maybe Text
a -> ListFindings
s {$sel:nextToken:ListFindings' :: Maybe Text
nextToken = Maybe Text
a} :: ListFindings)

instance Core.AWSPager ListFindings where
  page :: ListFindings -> AWSResponse ListFindings -> Maybe ListFindings
page ListFindings
rq AWSResponse ListFindings
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListFindings
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListFindingsResponse (Maybe Text)
listFindingsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListFindings
rs forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListFindingsResponse [Text]
listFindingsResponse_findingArns) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListFindings
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListFindings (Maybe Text)
listFindings_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListFindings
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListFindingsResponse (Maybe Text)
listFindingsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListFindings where
  type AWSResponse ListFindings = ListFindingsResponse
  request :: (Service -> Service) -> ListFindings -> Request ListFindings
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 ListFindings
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListFindings)))
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 Text -> Int -> [Text] -> ListFindingsResponse
ListFindingsResponse'
            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
"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))
            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
"findingArns" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ListFindings where
  hashWithSalt :: Int -> ListFindings -> Int
hashWithSalt Int
_salt ListFindings' {Maybe Int
Maybe [Text]
Maybe Text
Maybe FindingFilter
nextToken :: Maybe Text
maxResults :: Maybe Int
filter' :: Maybe FindingFilter
assessmentRunArns :: Maybe [Text]
$sel:nextToken:ListFindings' :: ListFindings -> Maybe Text
$sel:maxResults:ListFindings' :: ListFindings -> Maybe Int
$sel:filter':ListFindings' :: ListFindings -> Maybe FindingFilter
$sel:assessmentRunArns:ListFindings' :: ListFindings -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
assessmentRunArns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FindingFilter
filter'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListFindings where
  rnf :: ListFindings -> ()
rnf ListFindings' {Maybe Int
Maybe [Text]
Maybe Text
Maybe FindingFilter
nextToken :: Maybe Text
maxResults :: Maybe Int
filter' :: Maybe FindingFilter
assessmentRunArns :: Maybe [Text]
$sel:nextToken:ListFindings' :: ListFindings -> Maybe Text
$sel:maxResults:ListFindings' :: ListFindings -> Maybe Int
$sel:filter':ListFindings' :: ListFindings -> Maybe FindingFilter
$sel:assessmentRunArns:ListFindings' :: ListFindings -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
assessmentRunArns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FindingFilter
filter'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders ListFindings where
  toHeaders :: ListFindings -> 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
"InspectorService.ListFindings" ::
                          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 ListFindings where
  toJSON :: ListFindings -> Value
toJSON ListFindings' {Maybe Int
Maybe [Text]
Maybe Text
Maybe FindingFilter
nextToken :: Maybe Text
maxResults :: Maybe Int
filter' :: Maybe FindingFilter
assessmentRunArns :: Maybe [Text]
$sel:nextToken:ListFindings' :: ListFindings -> Maybe Text
$sel:maxResults:ListFindings' :: ListFindings -> Maybe Int
$sel:filter':ListFindings' :: ListFindings -> Maybe FindingFilter
$sel:assessmentRunArns:ListFindings' :: ListFindings -> Maybe [Text]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"assessmentRunArns" 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]
assessmentRunArns,
            (Key
"filter" 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 FindingFilter
filter',
            (Key
"maxResults" 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 Int
maxResults,
            (Key
"nextToken" 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
nextToken
          ]
      )

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

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

-- | /See:/ 'newListFindingsResponse' smart constructor.
data ListFindingsResponse = ListFindingsResponse'
  { -- | When a response is generated, if there is more data to be listed, this
    -- parameter is present in the response and contains the value to use for
    -- the __nextToken__ parameter in a subsequent pagination request. If there
    -- is no more data to be listed, this parameter is set to null.
    ListFindingsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListFindingsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of ARNs that specifies the findings returned by the action.
    ListFindingsResponse -> [Text]
findingArns :: [Prelude.Text]
  }
  deriving (ListFindingsResponse -> ListFindingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFindingsResponse -> ListFindingsResponse -> Bool
$c/= :: ListFindingsResponse -> ListFindingsResponse -> Bool
== :: ListFindingsResponse -> ListFindingsResponse -> Bool
$c== :: ListFindingsResponse -> ListFindingsResponse -> Bool
Prelude.Eq, ReadPrec [ListFindingsResponse]
ReadPrec ListFindingsResponse
Int -> ReadS ListFindingsResponse
ReadS [ListFindingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFindingsResponse]
$creadListPrec :: ReadPrec [ListFindingsResponse]
readPrec :: ReadPrec ListFindingsResponse
$creadPrec :: ReadPrec ListFindingsResponse
readList :: ReadS [ListFindingsResponse]
$creadList :: ReadS [ListFindingsResponse]
readsPrec :: Int -> ReadS ListFindingsResponse
$creadsPrec :: Int -> ReadS ListFindingsResponse
Prelude.Read, Int -> ListFindingsResponse -> ShowS
[ListFindingsResponse] -> ShowS
ListFindingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFindingsResponse] -> ShowS
$cshowList :: [ListFindingsResponse] -> ShowS
show :: ListFindingsResponse -> String
$cshow :: ListFindingsResponse -> String
showsPrec :: Int -> ListFindingsResponse -> ShowS
$cshowsPrec :: Int -> ListFindingsResponse -> ShowS
Prelude.Show, forall x. Rep ListFindingsResponse x -> ListFindingsResponse
forall x. ListFindingsResponse -> Rep ListFindingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListFindingsResponse x -> ListFindingsResponse
$cfrom :: forall x. ListFindingsResponse -> Rep ListFindingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListFindingsResponse' 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:
--
-- 'nextToken', 'listFindingsResponse_nextToken' - When a response is generated, if there is more data to be listed, this
-- parameter is present in the response and contains the value to use for
-- the __nextToken__ parameter in a subsequent pagination request. If there
-- is no more data to be listed, this parameter is set to null.
--
-- 'httpStatus', 'listFindingsResponse_httpStatus' - The response's http status code.
--
-- 'findingArns', 'listFindingsResponse_findingArns' - A list of ARNs that specifies the findings returned by the action.
newListFindingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListFindingsResponse
newListFindingsResponse :: Int -> ListFindingsResponse
newListFindingsResponse Int
pHttpStatus_ =
  ListFindingsResponse'
    { $sel:nextToken:ListFindingsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListFindingsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:findingArns:ListFindingsResponse' :: [Text]
findingArns = forall a. Monoid a => a
Prelude.mempty
    }

-- | When a response is generated, if there is more data to be listed, this
-- parameter is present in the response and contains the value to use for
-- the __nextToken__ parameter in a subsequent pagination request. If there
-- is no more data to be listed, this parameter is set to null.
listFindingsResponse_nextToken :: Lens.Lens' ListFindingsResponse (Prelude.Maybe Prelude.Text)
listFindingsResponse_nextToken :: Lens' ListFindingsResponse (Maybe Text)
listFindingsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFindingsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFindingsResponse' :: ListFindingsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFindingsResponse
s@ListFindingsResponse' {} Maybe Text
a -> ListFindingsResponse
s {$sel:nextToken:ListFindingsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListFindingsResponse)

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

-- | A list of ARNs that specifies the findings returned by the action.
listFindingsResponse_findingArns :: Lens.Lens' ListFindingsResponse [Prelude.Text]
listFindingsResponse_findingArns :: Lens' ListFindingsResponse [Text]
listFindingsResponse_findingArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFindingsResponse' {[Text]
findingArns :: [Text]
$sel:findingArns:ListFindingsResponse' :: ListFindingsResponse -> [Text]
findingArns} -> [Text]
findingArns) (\s :: ListFindingsResponse
s@ListFindingsResponse' {} [Text]
a -> ListFindingsResponse
s {$sel:findingArns:ListFindingsResponse' :: [Text]
findingArns = [Text]
a} :: ListFindingsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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