{-# 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.ListExclusions
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- List exclusions that are generated by the assessment run.
--
-- This operation returns paginated results.
module Amazonka.Inspector.ListExclusions
  ( -- * Creating a Request
    ListExclusions (..),
    newListExclusions,

    -- * Request Lenses
    listExclusions_nextToken,
    listExclusions_maxResults,
    listExclusions_assessmentRunArn,

    -- * Destructuring the Response
    ListExclusionsResponse (..),
    newListExclusionsResponse,

    -- * Response Lenses
    listExclusionsResponse_nextToken,
    listExclusionsResponse_httpStatus,
    listExclusionsResponse_exclusionArns,
  )
where

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

-- | /See:/ 'newListExclusions' smart constructor.
data ListExclusions = ListExclusions'
  { -- | You can use this parameter when paginating results. Set the value of
    -- this parameter to null on your first call to the ListExclusionsRequest
    -- action. Subsequent calls to the action fill nextToken in the request
    -- with the value of nextToken from the previous response to continue
    -- listing data.
    ListExclusions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | You can use this parameter to indicate the maximum number of items you
    -- want in the response. The default value is 100. The maximum value is
    -- 500.
    ListExclusions -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The ARN of the assessment run that generated the exclusions that you
    -- want to list.
    ListExclusions -> Text
assessmentRunArn :: Prelude.Text
  }
  deriving (ListExclusions -> ListExclusions -> Bool
(ListExclusions -> ListExclusions -> Bool)
-> (ListExclusions -> ListExclusions -> Bool) -> Eq ListExclusions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListExclusions -> ListExclusions -> Bool
$c/= :: ListExclusions -> ListExclusions -> Bool
== :: ListExclusions -> ListExclusions -> Bool
$c== :: ListExclusions -> ListExclusions -> Bool
Prelude.Eq, ReadPrec [ListExclusions]
ReadPrec ListExclusions
Int -> ReadS ListExclusions
ReadS [ListExclusions]
(Int -> ReadS ListExclusions)
-> ReadS [ListExclusions]
-> ReadPrec ListExclusions
-> ReadPrec [ListExclusions]
-> Read ListExclusions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListExclusions]
$creadListPrec :: ReadPrec [ListExclusions]
readPrec :: ReadPrec ListExclusions
$creadPrec :: ReadPrec ListExclusions
readList :: ReadS [ListExclusions]
$creadList :: ReadS [ListExclusions]
readsPrec :: Int -> ReadS ListExclusions
$creadsPrec :: Int -> ReadS ListExclusions
Prelude.Read, Int -> ListExclusions -> ShowS
[ListExclusions] -> ShowS
ListExclusions -> String
(Int -> ListExclusions -> ShowS)
-> (ListExclusions -> String)
-> ([ListExclusions] -> ShowS)
-> Show ListExclusions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListExclusions] -> ShowS
$cshowList :: [ListExclusions] -> ShowS
show :: ListExclusions -> String
$cshow :: ListExclusions -> String
showsPrec :: Int -> ListExclusions -> ShowS
$cshowsPrec :: Int -> ListExclusions -> ShowS
Prelude.Show, (forall x. ListExclusions -> Rep ListExclusions x)
-> (forall x. Rep ListExclusions x -> ListExclusions)
-> Generic ListExclusions
forall x. Rep ListExclusions x -> ListExclusions
forall x. ListExclusions -> Rep ListExclusions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListExclusions x -> ListExclusions
$cfrom :: forall x. ListExclusions -> Rep ListExclusions x
Prelude.Generic)

-- |
-- Create a value of 'ListExclusions' 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', 'listExclusions_nextToken' - You can use this parameter when paginating results. Set the value of
-- this parameter to null on your first call to the ListExclusionsRequest
-- action. Subsequent calls to the action fill nextToken in the request
-- with the value of nextToken from the previous response to continue
-- listing data.
--
-- 'maxResults', 'listExclusions_maxResults' - You can use this parameter to indicate the maximum number of items you
-- want in the response. The default value is 100. The maximum value is
-- 500.
--
-- 'assessmentRunArn', 'listExclusions_assessmentRunArn' - The ARN of the assessment run that generated the exclusions that you
-- want to list.
newListExclusions ::
  -- | 'assessmentRunArn'
  Prelude.Text ->
  ListExclusions
newListExclusions :: Text -> ListExclusions
newListExclusions Text
pAssessmentRunArn_ =
  ListExclusions' :: Maybe Text -> Maybe Int -> Text -> ListExclusions
ListExclusions'
    { $sel:nextToken:ListExclusions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListExclusions' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:assessmentRunArn:ListExclusions' :: Text
assessmentRunArn = Text
pAssessmentRunArn_
    }

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

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

-- | The ARN of the assessment run that generated the exclusions that you
-- want to list.
listExclusions_assessmentRunArn :: Lens.Lens' ListExclusions Prelude.Text
listExclusions_assessmentRunArn :: (Text -> f Text) -> ListExclusions -> f ListExclusions
listExclusions_assessmentRunArn = (ListExclusions -> Text)
-> (ListExclusions -> Text -> ListExclusions)
-> Lens ListExclusions ListExclusions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListExclusions' {Text
assessmentRunArn :: Text
$sel:assessmentRunArn:ListExclusions' :: ListExclusions -> Text
assessmentRunArn} -> Text
assessmentRunArn) (\s :: ListExclusions
s@ListExclusions' {} Text
a -> ListExclusions
s {$sel:assessmentRunArn:ListExclusions' :: Text
assessmentRunArn = Text
a} :: ListExclusions)

instance Core.AWSPager ListExclusions where
  page :: ListExclusions
-> AWSResponse ListExclusions -> Maybe ListExclusions
page ListExclusions
rq AWSResponse ListExclusions
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListExclusions
ListExclusionsResponse
rs
            ListExclusionsResponse
-> Getting (First Text) ListExclusionsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListExclusionsResponse
-> Const (First Text) ListExclusionsResponse
Lens' ListExclusionsResponse (Maybe Text)
listExclusionsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListExclusionsResponse
 -> Const (First Text) ListExclusionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListExclusionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListExclusions
forall a. Maybe a
Prelude.Nothing
    | [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListExclusions
ListExclusionsResponse
rs ListExclusionsResponse
-> Getting [Text] ListExclusionsResponse [Text] -> [Text]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [Text] ListExclusionsResponse [Text]
Lens' ListExclusionsResponse [Text]
listExclusionsResponse_exclusionArns) =
      Maybe ListExclusions
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListExclusions -> Maybe ListExclusions
forall a. a -> Maybe a
Prelude.Just (ListExclusions -> Maybe ListExclusions)
-> ListExclusions -> Maybe ListExclusions
forall a b. (a -> b) -> a -> b
Prelude.$
        ListExclusions
rq
          ListExclusions
-> (ListExclusions -> ListExclusions) -> ListExclusions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListExclusions -> Identity ListExclusions
Lens ListExclusions ListExclusions (Maybe Text) (Maybe Text)
listExclusions_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListExclusions -> Identity ListExclusions)
-> Maybe Text -> ListExclusions -> ListExclusions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListExclusions
ListExclusionsResponse
rs
          ListExclusionsResponse
-> Getting (First Text) ListExclusionsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListExclusionsResponse
-> Const (First Text) ListExclusionsResponse
Lens' ListExclusionsResponse (Maybe Text)
listExclusionsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListExclusionsResponse
 -> Const (First Text) ListExclusionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListExclusionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListExclusions where
  type
    AWSResponse ListExclusions =
      ListExclusionsResponse
  request :: ListExclusions -> Request ListExclusions
request = Service -> ListExclusions -> Request ListExclusions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListExclusions
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListExclusions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListExclusions))
-> Logger
-> Service
-> Proxy ListExclusions
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListExclusions)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> [Text] -> ListExclusionsResponse
ListExclusionsResponse'
            (Maybe Text -> Int -> [Text] -> ListExclusionsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [Text] -> ListExclusionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
            Either String (Int -> [Text] -> ListExclusionsResponse)
-> Either String Int
-> Either String ([Text] -> ListExclusionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either String ([Text] -> ListExclusionsResponse)
-> Either String [Text] -> Either String ListExclusionsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [Text])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"exclusionArns" Either String (Maybe [Text]) -> [Text] -> Either String [Text]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Text]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ListExclusions

instance Prelude.NFData ListExclusions

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

instance Core.ToJSON ListExclusions where
  toJSON :: ListExclusions -> Value
toJSON ListExclusions' {Maybe Int
Maybe Text
Text
assessmentRunArn :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:assessmentRunArn:ListExclusions' :: ListExclusions -> Text
$sel:maxResults:ListExclusions' :: ListExclusions -> Maybe Int
$sel:nextToken:ListExclusions' :: ListExclusions -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"maxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"assessmentRunArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
assessmentRunArn)
          ]
      )

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

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

-- | /See:/ 'newListExclusionsResponse' smart constructor.
data ListExclusionsResponse = ListExclusionsResponse'
  { -- | When a response is generated, if there is more data to be listed, this
    -- parameters 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.
    ListExclusionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListExclusionsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of exclusions\' ARNs returned by the action.
    ListExclusionsResponse -> [Text]
exclusionArns :: [Prelude.Text]
  }
  deriving (ListExclusionsResponse -> ListExclusionsResponse -> Bool
(ListExclusionsResponse -> ListExclusionsResponse -> Bool)
-> (ListExclusionsResponse -> ListExclusionsResponse -> Bool)
-> Eq ListExclusionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListExclusionsResponse -> ListExclusionsResponse -> Bool
$c/= :: ListExclusionsResponse -> ListExclusionsResponse -> Bool
== :: ListExclusionsResponse -> ListExclusionsResponse -> Bool
$c== :: ListExclusionsResponse -> ListExclusionsResponse -> Bool
Prelude.Eq, ReadPrec [ListExclusionsResponse]
ReadPrec ListExclusionsResponse
Int -> ReadS ListExclusionsResponse
ReadS [ListExclusionsResponse]
(Int -> ReadS ListExclusionsResponse)
-> ReadS [ListExclusionsResponse]
-> ReadPrec ListExclusionsResponse
-> ReadPrec [ListExclusionsResponse]
-> Read ListExclusionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListExclusionsResponse]
$creadListPrec :: ReadPrec [ListExclusionsResponse]
readPrec :: ReadPrec ListExclusionsResponse
$creadPrec :: ReadPrec ListExclusionsResponse
readList :: ReadS [ListExclusionsResponse]
$creadList :: ReadS [ListExclusionsResponse]
readsPrec :: Int -> ReadS ListExclusionsResponse
$creadsPrec :: Int -> ReadS ListExclusionsResponse
Prelude.Read, Int -> ListExclusionsResponse -> ShowS
[ListExclusionsResponse] -> ShowS
ListExclusionsResponse -> String
(Int -> ListExclusionsResponse -> ShowS)
-> (ListExclusionsResponse -> String)
-> ([ListExclusionsResponse] -> ShowS)
-> Show ListExclusionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListExclusionsResponse] -> ShowS
$cshowList :: [ListExclusionsResponse] -> ShowS
show :: ListExclusionsResponse -> String
$cshow :: ListExclusionsResponse -> String
showsPrec :: Int -> ListExclusionsResponse -> ShowS
$cshowsPrec :: Int -> ListExclusionsResponse -> ShowS
Prelude.Show, (forall x. ListExclusionsResponse -> Rep ListExclusionsResponse x)
-> (forall x.
    Rep ListExclusionsResponse x -> ListExclusionsResponse)
-> Generic ListExclusionsResponse
forall x. Rep ListExclusionsResponse x -> ListExclusionsResponse
forall x. ListExclusionsResponse -> Rep ListExclusionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListExclusionsResponse x -> ListExclusionsResponse
$cfrom :: forall x. ListExclusionsResponse -> Rep ListExclusionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListExclusionsResponse' 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', 'listExclusionsResponse_nextToken' - When a response is generated, if there is more data to be listed, this
-- parameters 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', 'listExclusionsResponse_httpStatus' - The response's http status code.
--
-- 'exclusionArns', 'listExclusionsResponse_exclusionArns' - A list of exclusions\' ARNs returned by the action.
newListExclusionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListExclusionsResponse
newListExclusionsResponse :: Int -> ListExclusionsResponse
newListExclusionsResponse Int
pHttpStatus_ =
  ListExclusionsResponse' :: Maybe Text -> Int -> [Text] -> ListExclusionsResponse
ListExclusionsResponse'
    { $sel:nextToken:ListExclusionsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListExclusionsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:exclusionArns:ListExclusionsResponse' :: [Text]
exclusionArns = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | When a response is generated, if there is more data to be listed, this
-- parameters 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.
listExclusionsResponse_nextToken :: Lens.Lens' ListExclusionsResponse (Prelude.Maybe Prelude.Text)
listExclusionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListExclusionsResponse -> f ListExclusionsResponse
listExclusionsResponse_nextToken = (ListExclusionsResponse -> Maybe Text)
-> (ListExclusionsResponse -> Maybe Text -> ListExclusionsResponse)
-> Lens' ListExclusionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListExclusionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListExclusionsResponse' :: ListExclusionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListExclusionsResponse
s@ListExclusionsResponse' {} Maybe Text
a -> ListExclusionsResponse
s {$sel:nextToken:ListExclusionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListExclusionsResponse)

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

-- | A list of exclusions\' ARNs returned by the action.
listExclusionsResponse_exclusionArns :: Lens.Lens' ListExclusionsResponse [Prelude.Text]
listExclusionsResponse_exclusionArns :: ([Text] -> f [Text])
-> ListExclusionsResponse -> f ListExclusionsResponse
listExclusionsResponse_exclusionArns = (ListExclusionsResponse -> [Text])
-> (ListExclusionsResponse -> [Text] -> ListExclusionsResponse)
-> Lens' ListExclusionsResponse [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListExclusionsResponse' {[Text]
exclusionArns :: [Text]
$sel:exclusionArns:ListExclusionsResponse' :: ListExclusionsResponse -> [Text]
exclusionArns} -> [Text]
exclusionArns) (\s :: ListExclusionsResponse
s@ListExclusionsResponse' {} [Text]
a -> ListExclusionsResponse
s {$sel:exclusionArns:ListExclusionsResponse' :: [Text]
exclusionArns = [Text]
a} :: ListExclusionsResponse) (([Text] -> f [Text])
 -> ListExclusionsResponse -> f ListExclusionsResponse)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ListExclusionsResponse
-> f ListExclusionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListExclusionsResponse