{-# 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.Shield.ListResourcesInProtectionGroup
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the resources that are included in the protection group.
module Amazonka.Shield.ListResourcesInProtectionGroup
  ( -- * Creating a Request
    ListResourcesInProtectionGroup (..),
    newListResourcesInProtectionGroup,

    -- * Request Lenses
    listResourcesInProtectionGroup_maxResults,
    listResourcesInProtectionGroup_nextToken,
    listResourcesInProtectionGroup_protectionGroupId,

    -- * Destructuring the Response
    ListResourcesInProtectionGroupResponse (..),
    newListResourcesInProtectionGroupResponse,

    -- * Response Lenses
    listResourcesInProtectionGroupResponse_nextToken,
    listResourcesInProtectionGroupResponse_httpStatus,
    listResourcesInProtectionGroupResponse_resourceArns,
  )
where

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
import Amazonka.Shield.Types

-- | /See:/ 'newListResourcesInProtectionGroup' smart constructor.
data ListResourcesInProtectionGroup = ListResourcesInProtectionGroup'
  { -- | The greatest number of objects that you want Shield Advanced to return
    -- to the list request. Shield Advanced might return fewer objects than you
    -- indicate in this setting, even if more objects are available. If there
    -- are more objects remaining, Shield Advanced will always also return a
    -- @NextToken@ value in the response.
    --
    -- The default setting is 20.
    ListResourcesInProtectionGroup -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | When you request a list of objects from Shield Advanced, if the response
    -- does not include all of the remaining available objects, Shield Advanced
    -- includes a @NextToken@ value in the response. You can retrieve the next
    -- batch of objects by requesting the list again and providing the token
    -- that was returned by the prior call in your request.
    --
    -- You can indicate the maximum number of objects that you want Shield
    -- Advanced to return for a single call with the @MaxResults@ setting.
    -- Shield Advanced will not return more than @MaxResults@ objects, but may
    -- return fewer, even if more objects are still available.
    --
    -- Whenever more objects remain that Shield Advanced has not yet returned
    -- to you, the response will include a @NextToken@ value.
    --
    -- On your first call to a list operation, leave this setting empty.
    ListResourcesInProtectionGroup -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the protection group. You use this to identify the
    -- protection group in lists and to manage the protection group, for
    -- example to update, delete, or describe it.
    ListResourcesInProtectionGroup -> Text
protectionGroupId :: Prelude.Text
  }
  deriving (ListResourcesInProtectionGroup
-> ListResourcesInProtectionGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResourcesInProtectionGroup
-> ListResourcesInProtectionGroup -> Bool
$c/= :: ListResourcesInProtectionGroup
-> ListResourcesInProtectionGroup -> Bool
== :: ListResourcesInProtectionGroup
-> ListResourcesInProtectionGroup -> Bool
$c== :: ListResourcesInProtectionGroup
-> ListResourcesInProtectionGroup -> Bool
Prelude.Eq, ReadPrec [ListResourcesInProtectionGroup]
ReadPrec ListResourcesInProtectionGroup
Int -> ReadS ListResourcesInProtectionGroup
ReadS [ListResourcesInProtectionGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResourcesInProtectionGroup]
$creadListPrec :: ReadPrec [ListResourcesInProtectionGroup]
readPrec :: ReadPrec ListResourcesInProtectionGroup
$creadPrec :: ReadPrec ListResourcesInProtectionGroup
readList :: ReadS [ListResourcesInProtectionGroup]
$creadList :: ReadS [ListResourcesInProtectionGroup]
readsPrec :: Int -> ReadS ListResourcesInProtectionGroup
$creadsPrec :: Int -> ReadS ListResourcesInProtectionGroup
Prelude.Read, Int -> ListResourcesInProtectionGroup -> ShowS
[ListResourcesInProtectionGroup] -> ShowS
ListResourcesInProtectionGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResourcesInProtectionGroup] -> ShowS
$cshowList :: [ListResourcesInProtectionGroup] -> ShowS
show :: ListResourcesInProtectionGroup -> String
$cshow :: ListResourcesInProtectionGroup -> String
showsPrec :: Int -> ListResourcesInProtectionGroup -> ShowS
$cshowsPrec :: Int -> ListResourcesInProtectionGroup -> ShowS
Prelude.Show, forall x.
Rep ListResourcesInProtectionGroup x
-> ListResourcesInProtectionGroup
forall x.
ListResourcesInProtectionGroup
-> Rep ListResourcesInProtectionGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListResourcesInProtectionGroup x
-> ListResourcesInProtectionGroup
$cfrom :: forall x.
ListResourcesInProtectionGroup
-> Rep ListResourcesInProtectionGroup x
Prelude.Generic)

-- |
-- Create a value of 'ListResourcesInProtectionGroup' 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', 'listResourcesInProtectionGroup_maxResults' - The greatest number of objects that you want Shield Advanced to return
-- to the list request. Shield Advanced might return fewer objects than you
-- indicate in this setting, even if more objects are available. If there
-- are more objects remaining, Shield Advanced will always also return a
-- @NextToken@ value in the response.
--
-- The default setting is 20.
--
-- 'nextToken', 'listResourcesInProtectionGroup_nextToken' - When you request a list of objects from Shield Advanced, if the response
-- does not include all of the remaining available objects, Shield Advanced
-- includes a @NextToken@ value in the response. You can retrieve the next
-- batch of objects by requesting the list again and providing the token
-- that was returned by the prior call in your request.
--
-- You can indicate the maximum number of objects that you want Shield
-- Advanced to return for a single call with the @MaxResults@ setting.
-- Shield Advanced will not return more than @MaxResults@ objects, but may
-- return fewer, even if more objects are still available.
--
-- Whenever more objects remain that Shield Advanced has not yet returned
-- to you, the response will include a @NextToken@ value.
--
-- On your first call to a list operation, leave this setting empty.
--
-- 'protectionGroupId', 'listResourcesInProtectionGroup_protectionGroupId' - The name of the protection group. You use this to identify the
-- protection group in lists and to manage the protection group, for
-- example to update, delete, or describe it.
newListResourcesInProtectionGroup ::
  -- | 'protectionGroupId'
  Prelude.Text ->
  ListResourcesInProtectionGroup
newListResourcesInProtectionGroup :: Text -> ListResourcesInProtectionGroup
newListResourcesInProtectionGroup Text
pProtectionGroupId_ =
  ListResourcesInProtectionGroup'
    { $sel:maxResults:ListResourcesInProtectionGroup' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListResourcesInProtectionGroup' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:protectionGroupId:ListResourcesInProtectionGroup' :: Text
protectionGroupId = Text
pProtectionGroupId_
    }

-- | The greatest number of objects that you want Shield Advanced to return
-- to the list request. Shield Advanced might return fewer objects than you
-- indicate in this setting, even if more objects are available. If there
-- are more objects remaining, Shield Advanced will always also return a
-- @NextToken@ value in the response.
--
-- The default setting is 20.
listResourcesInProtectionGroup_maxResults :: Lens.Lens' ListResourcesInProtectionGroup (Prelude.Maybe Prelude.Natural)
listResourcesInProtectionGroup_maxResults :: Lens' ListResourcesInProtectionGroup (Maybe Natural)
listResourcesInProtectionGroup_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourcesInProtectionGroup' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListResourcesInProtectionGroup' :: ListResourcesInProtectionGroup -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListResourcesInProtectionGroup
s@ListResourcesInProtectionGroup' {} Maybe Natural
a -> ListResourcesInProtectionGroup
s {$sel:maxResults:ListResourcesInProtectionGroup' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListResourcesInProtectionGroup)

-- | When you request a list of objects from Shield Advanced, if the response
-- does not include all of the remaining available objects, Shield Advanced
-- includes a @NextToken@ value in the response. You can retrieve the next
-- batch of objects by requesting the list again and providing the token
-- that was returned by the prior call in your request.
--
-- You can indicate the maximum number of objects that you want Shield
-- Advanced to return for a single call with the @MaxResults@ setting.
-- Shield Advanced will not return more than @MaxResults@ objects, but may
-- return fewer, even if more objects are still available.
--
-- Whenever more objects remain that Shield Advanced has not yet returned
-- to you, the response will include a @NextToken@ value.
--
-- On your first call to a list operation, leave this setting empty.
listResourcesInProtectionGroup_nextToken :: Lens.Lens' ListResourcesInProtectionGroup (Prelude.Maybe Prelude.Text)
listResourcesInProtectionGroup_nextToken :: Lens' ListResourcesInProtectionGroup (Maybe Text)
listResourcesInProtectionGroup_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourcesInProtectionGroup' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListResourcesInProtectionGroup' :: ListResourcesInProtectionGroup -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListResourcesInProtectionGroup
s@ListResourcesInProtectionGroup' {} Maybe Text
a -> ListResourcesInProtectionGroup
s {$sel:nextToken:ListResourcesInProtectionGroup' :: Maybe Text
nextToken = Maybe Text
a} :: ListResourcesInProtectionGroup)

-- | The name of the protection group. You use this to identify the
-- protection group in lists and to manage the protection group, for
-- example to update, delete, or describe it.
listResourcesInProtectionGroup_protectionGroupId :: Lens.Lens' ListResourcesInProtectionGroup Prelude.Text
listResourcesInProtectionGroup_protectionGroupId :: Lens' ListResourcesInProtectionGroup Text
listResourcesInProtectionGroup_protectionGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourcesInProtectionGroup' {Text
protectionGroupId :: Text
$sel:protectionGroupId:ListResourcesInProtectionGroup' :: ListResourcesInProtectionGroup -> Text
protectionGroupId} -> Text
protectionGroupId) (\s :: ListResourcesInProtectionGroup
s@ListResourcesInProtectionGroup' {} Text
a -> ListResourcesInProtectionGroup
s {$sel:protectionGroupId:ListResourcesInProtectionGroup' :: Text
protectionGroupId = Text
a} :: ListResourcesInProtectionGroup)

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

instance
  Prelude.Hashable
    ListResourcesInProtectionGroup
  where
  hashWithSalt :: Int -> ListResourcesInProtectionGroup -> Int
hashWithSalt
    Int
_salt
    ListResourcesInProtectionGroup' {Maybe Natural
Maybe Text
Text
protectionGroupId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:protectionGroupId:ListResourcesInProtectionGroup' :: ListResourcesInProtectionGroup -> Text
$sel:nextToken:ListResourcesInProtectionGroup' :: ListResourcesInProtectionGroup -> Maybe Text
$sel:maxResults:ListResourcesInProtectionGroup' :: ListResourcesInProtectionGroup -> 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
protectionGroupId

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

instance
  Data.ToHeaders
    ListResourcesInProtectionGroup
  where
  toHeaders :: ListResourcesInProtectionGroup -> 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
"AWSShield_20160616.ListResourcesInProtectionGroup" ::
                          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 ListResourcesInProtectionGroup where
  toJSON :: ListResourcesInProtectionGroup -> Value
toJSON ListResourcesInProtectionGroup' {Maybe Natural
Maybe Text
Text
protectionGroupId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:protectionGroupId:ListResourcesInProtectionGroup' :: ListResourcesInProtectionGroup -> Text
$sel:nextToken:ListResourcesInProtectionGroup' :: ListResourcesInProtectionGroup -> Maybe Text
$sel:maxResults:ListResourcesInProtectionGroup' :: ListResourcesInProtectionGroup -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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 Natural
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,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"ProtectionGroupId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
protectionGroupId)
          ]
      )

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

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

-- | /See:/ 'newListResourcesInProtectionGroupResponse' smart constructor.
data ListResourcesInProtectionGroupResponse = ListResourcesInProtectionGroupResponse'
  { -- | When you request a list of objects from Shield Advanced, if the response
    -- does not include all of the remaining available objects, Shield Advanced
    -- includes a @NextToken@ value in the response. You can retrieve the next
    -- batch of objects by requesting the list again and providing the token
    -- that was returned by the prior call in your request.
    --
    -- You can indicate the maximum number of objects that you want Shield
    -- Advanced to return for a single call with the @MaxResults@ setting.
    -- Shield Advanced will not return more than @MaxResults@ objects, but may
    -- return fewer, even if more objects are still available.
    --
    -- Whenever more objects remain that Shield Advanced has not yet returned
    -- to you, the response will include a @NextToken@ value.
    ListResourcesInProtectionGroupResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListResourcesInProtectionGroupResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Names (ARNs) of the resources that are included in
    -- the protection group.
    ListResourcesInProtectionGroupResponse -> [Text]
resourceArns :: [Prelude.Text]
  }
  deriving (ListResourcesInProtectionGroupResponse
-> ListResourcesInProtectionGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResourcesInProtectionGroupResponse
-> ListResourcesInProtectionGroupResponse -> Bool
$c/= :: ListResourcesInProtectionGroupResponse
-> ListResourcesInProtectionGroupResponse -> Bool
== :: ListResourcesInProtectionGroupResponse
-> ListResourcesInProtectionGroupResponse -> Bool
$c== :: ListResourcesInProtectionGroupResponse
-> ListResourcesInProtectionGroupResponse -> Bool
Prelude.Eq, ReadPrec [ListResourcesInProtectionGroupResponse]
ReadPrec ListResourcesInProtectionGroupResponse
Int -> ReadS ListResourcesInProtectionGroupResponse
ReadS [ListResourcesInProtectionGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResourcesInProtectionGroupResponse]
$creadListPrec :: ReadPrec [ListResourcesInProtectionGroupResponse]
readPrec :: ReadPrec ListResourcesInProtectionGroupResponse
$creadPrec :: ReadPrec ListResourcesInProtectionGroupResponse
readList :: ReadS [ListResourcesInProtectionGroupResponse]
$creadList :: ReadS [ListResourcesInProtectionGroupResponse]
readsPrec :: Int -> ReadS ListResourcesInProtectionGroupResponse
$creadsPrec :: Int -> ReadS ListResourcesInProtectionGroupResponse
Prelude.Read, Int -> ListResourcesInProtectionGroupResponse -> ShowS
[ListResourcesInProtectionGroupResponse] -> ShowS
ListResourcesInProtectionGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResourcesInProtectionGroupResponse] -> ShowS
$cshowList :: [ListResourcesInProtectionGroupResponse] -> ShowS
show :: ListResourcesInProtectionGroupResponse -> String
$cshow :: ListResourcesInProtectionGroupResponse -> String
showsPrec :: Int -> ListResourcesInProtectionGroupResponse -> ShowS
$cshowsPrec :: Int -> ListResourcesInProtectionGroupResponse -> ShowS
Prelude.Show, forall x.
Rep ListResourcesInProtectionGroupResponse x
-> ListResourcesInProtectionGroupResponse
forall x.
ListResourcesInProtectionGroupResponse
-> Rep ListResourcesInProtectionGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListResourcesInProtectionGroupResponse x
-> ListResourcesInProtectionGroupResponse
$cfrom :: forall x.
ListResourcesInProtectionGroupResponse
-> Rep ListResourcesInProtectionGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListResourcesInProtectionGroupResponse' 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', 'listResourcesInProtectionGroupResponse_nextToken' - When you request a list of objects from Shield Advanced, if the response
-- does not include all of the remaining available objects, Shield Advanced
-- includes a @NextToken@ value in the response. You can retrieve the next
-- batch of objects by requesting the list again and providing the token
-- that was returned by the prior call in your request.
--
-- You can indicate the maximum number of objects that you want Shield
-- Advanced to return for a single call with the @MaxResults@ setting.
-- Shield Advanced will not return more than @MaxResults@ objects, but may
-- return fewer, even if more objects are still available.
--
-- Whenever more objects remain that Shield Advanced has not yet returned
-- to you, the response will include a @NextToken@ value.
--
-- 'httpStatus', 'listResourcesInProtectionGroupResponse_httpStatus' - The response's http status code.
--
-- 'resourceArns', 'listResourcesInProtectionGroupResponse_resourceArns' - The Amazon Resource Names (ARNs) of the resources that are included in
-- the protection group.
newListResourcesInProtectionGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListResourcesInProtectionGroupResponse
newListResourcesInProtectionGroupResponse :: Int -> ListResourcesInProtectionGroupResponse
newListResourcesInProtectionGroupResponse
  Int
pHttpStatus_ =
    ListResourcesInProtectionGroupResponse'
      { $sel:nextToken:ListResourcesInProtectionGroupResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListResourcesInProtectionGroupResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:resourceArns:ListResourcesInProtectionGroupResponse' :: [Text]
resourceArns = forall a. Monoid a => a
Prelude.mempty
      }

-- | When you request a list of objects from Shield Advanced, if the response
-- does not include all of the remaining available objects, Shield Advanced
-- includes a @NextToken@ value in the response. You can retrieve the next
-- batch of objects by requesting the list again and providing the token
-- that was returned by the prior call in your request.
--
-- You can indicate the maximum number of objects that you want Shield
-- Advanced to return for a single call with the @MaxResults@ setting.
-- Shield Advanced will not return more than @MaxResults@ objects, but may
-- return fewer, even if more objects are still available.
--
-- Whenever more objects remain that Shield Advanced has not yet returned
-- to you, the response will include a @NextToken@ value.
listResourcesInProtectionGroupResponse_nextToken :: Lens.Lens' ListResourcesInProtectionGroupResponse (Prelude.Maybe Prelude.Text)
listResourcesInProtectionGroupResponse_nextToken :: Lens' ListResourcesInProtectionGroupResponse (Maybe Text)
listResourcesInProtectionGroupResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourcesInProtectionGroupResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListResourcesInProtectionGroupResponse' :: ListResourcesInProtectionGroupResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListResourcesInProtectionGroupResponse
s@ListResourcesInProtectionGroupResponse' {} Maybe Text
a -> ListResourcesInProtectionGroupResponse
s {$sel:nextToken:ListResourcesInProtectionGroupResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListResourcesInProtectionGroupResponse)

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

-- | The Amazon Resource Names (ARNs) of the resources that are included in
-- the protection group.
listResourcesInProtectionGroupResponse_resourceArns :: Lens.Lens' ListResourcesInProtectionGroupResponse [Prelude.Text]
listResourcesInProtectionGroupResponse_resourceArns :: Lens' ListResourcesInProtectionGroupResponse [Text]
listResourcesInProtectionGroupResponse_resourceArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourcesInProtectionGroupResponse' {[Text]
resourceArns :: [Text]
$sel:resourceArns:ListResourcesInProtectionGroupResponse' :: ListResourcesInProtectionGroupResponse -> [Text]
resourceArns} -> [Text]
resourceArns) (\s :: ListResourcesInProtectionGroupResponse
s@ListResourcesInProtectionGroupResponse' {} [Text]
a -> ListResourcesInProtectionGroupResponse
s {$sel:resourceArns:ListResourcesInProtectionGroupResponse' :: [Text]
resourceArns = [Text]
a} :: ListResourcesInProtectionGroupResponse) 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
    ListResourcesInProtectionGroupResponse
  where
  rnf :: ListResourcesInProtectionGroupResponse -> ()
rnf ListResourcesInProtectionGroupResponse' {Int
[Text]
Maybe Text
resourceArns :: [Text]
httpStatus :: Int
nextToken :: Maybe Text
$sel:resourceArns:ListResourcesInProtectionGroupResponse' :: ListResourcesInProtectionGroupResponse -> [Text]
$sel:httpStatus:ListResourcesInProtectionGroupResponse' :: ListResourcesInProtectionGroupResponse -> Int
$sel:nextToken:ListResourcesInProtectionGroupResponse' :: ListResourcesInProtectionGroupResponse -> 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]
resourceArns