{-# 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.CloudControl.ListResourceRequests
-- 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)
--
-- Returns existing resource operation requests. This includes requests of
-- all status types. For more information, see
-- <https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html#resource-operations-manage-requests-list Listing active resource operation requests>
-- in the /Amazon Web Services Cloud Control API User Guide/.
--
-- Resource operation requests expire after seven days.
module Amazonka.CloudControl.ListResourceRequests
  ( -- * Creating a Request
    ListResourceRequests (..),
    newListResourceRequests,

    -- * Request Lenses
    listResourceRequests_nextToken,
    listResourceRequests_resourceRequestStatusFilter,
    listResourceRequests_maxResults,

    -- * Destructuring the Response
    ListResourceRequestsResponse (..),
    newListResourceRequestsResponse,

    -- * Response Lenses
    listResourceRequestsResponse_resourceRequestStatusSummaries,
    listResourceRequestsResponse_nextToken,
    listResourceRequestsResponse_httpStatus,
  )
where

import Amazonka.CloudControl.Types
import qualified Amazonka.Core as Core
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:/ 'newListResourceRequests' smart constructor.
data ListResourceRequests = ListResourceRequests'
  { -- | If the previous paginated request didn\'t return all of the remaining
    -- results, the response object\'s @NextToken@ parameter value is set to a
    -- token. To retrieve the next set of results, call this action again and
    -- assign that token to the request object\'s @NextToken@ parameter. If
    -- there are no remaining results, the previous response object\'s
    -- @NextToken@ parameter is set to @null@.
    ListResourceRequests -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The filter criteria to apply to the requests returned.
    ListResourceRequests -> Maybe ResourceRequestStatusFilter
resourceRequestStatusFilter :: Prelude.Maybe ResourceRequestStatusFilter,
    -- | The maximum number of results to be returned with a single call. If the
    -- number of available results exceeds this maximum, the response includes
    -- a @NextToken@ value that you can assign to the @NextToken@ request
    -- parameter to get the next set of results.
    --
    -- The default is @20@.
    ListResourceRequests -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListResourceRequests -> ListResourceRequests -> Bool
(ListResourceRequests -> ListResourceRequests -> Bool)
-> (ListResourceRequests -> ListResourceRequests -> Bool)
-> Eq ListResourceRequests
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResourceRequests -> ListResourceRequests -> Bool
$c/= :: ListResourceRequests -> ListResourceRequests -> Bool
== :: ListResourceRequests -> ListResourceRequests -> Bool
$c== :: ListResourceRequests -> ListResourceRequests -> Bool
Prelude.Eq, ReadPrec [ListResourceRequests]
ReadPrec ListResourceRequests
Int -> ReadS ListResourceRequests
ReadS [ListResourceRequests]
(Int -> ReadS ListResourceRequests)
-> ReadS [ListResourceRequests]
-> ReadPrec ListResourceRequests
-> ReadPrec [ListResourceRequests]
-> Read ListResourceRequests
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResourceRequests]
$creadListPrec :: ReadPrec [ListResourceRequests]
readPrec :: ReadPrec ListResourceRequests
$creadPrec :: ReadPrec ListResourceRequests
readList :: ReadS [ListResourceRequests]
$creadList :: ReadS [ListResourceRequests]
readsPrec :: Int -> ReadS ListResourceRequests
$creadsPrec :: Int -> ReadS ListResourceRequests
Prelude.Read, Int -> ListResourceRequests -> ShowS
[ListResourceRequests] -> ShowS
ListResourceRequests -> String
(Int -> ListResourceRequests -> ShowS)
-> (ListResourceRequests -> String)
-> ([ListResourceRequests] -> ShowS)
-> Show ListResourceRequests
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResourceRequests] -> ShowS
$cshowList :: [ListResourceRequests] -> ShowS
show :: ListResourceRequests -> String
$cshow :: ListResourceRequests -> String
showsPrec :: Int -> ListResourceRequests -> ShowS
$cshowsPrec :: Int -> ListResourceRequests -> ShowS
Prelude.Show, (forall x. ListResourceRequests -> Rep ListResourceRequests x)
-> (forall x. Rep ListResourceRequests x -> ListResourceRequests)
-> Generic ListResourceRequests
forall x. Rep ListResourceRequests x -> ListResourceRequests
forall x. ListResourceRequests -> Rep ListResourceRequests x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListResourceRequests x -> ListResourceRequests
$cfrom :: forall x. ListResourceRequests -> Rep ListResourceRequests x
Prelude.Generic)

-- |
-- Create a value of 'ListResourceRequests' 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', 'listResourceRequests_nextToken' - If the previous paginated request didn\'t return all of the remaining
-- results, the response object\'s @NextToken@ parameter value is set to a
-- token. To retrieve the next set of results, call this action again and
-- assign that token to the request object\'s @NextToken@ parameter. If
-- there are no remaining results, the previous response object\'s
-- @NextToken@ parameter is set to @null@.
--
-- 'resourceRequestStatusFilter', 'listResourceRequests_resourceRequestStatusFilter' - The filter criteria to apply to the requests returned.
--
-- 'maxResults', 'listResourceRequests_maxResults' - The maximum number of results to be returned with a single call. If the
-- number of available results exceeds this maximum, the response includes
-- a @NextToken@ value that you can assign to the @NextToken@ request
-- parameter to get the next set of results.
--
-- The default is @20@.
newListResourceRequests ::
  ListResourceRequests
newListResourceRequests :: ListResourceRequests
newListResourceRequests =
  ListResourceRequests' :: Maybe Text
-> Maybe ResourceRequestStatusFilter
-> Maybe Natural
-> ListResourceRequests
ListResourceRequests'
    { $sel:nextToken:ListResourceRequests' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceRequestStatusFilter:ListResourceRequests' :: Maybe ResourceRequestStatusFilter
resourceRequestStatusFilter = Maybe ResourceRequestStatusFilter
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListResourceRequests' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | If the previous paginated request didn\'t return all of the remaining
-- results, the response object\'s @NextToken@ parameter value is set to a
-- token. To retrieve the next set of results, call this action again and
-- assign that token to the request object\'s @NextToken@ parameter. If
-- there are no remaining results, the previous response object\'s
-- @NextToken@ parameter is set to @null@.
listResourceRequests_nextToken :: Lens.Lens' ListResourceRequests (Prelude.Maybe Prelude.Text)
listResourceRequests_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListResourceRequests -> f ListResourceRequests
listResourceRequests_nextToken = (ListResourceRequests -> Maybe Text)
-> (ListResourceRequests -> Maybe Text -> ListResourceRequests)
-> Lens
     ListResourceRequests ListResourceRequests (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRequests' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListResourceRequests' :: ListResourceRequests -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListResourceRequests
s@ListResourceRequests' {} Maybe Text
a -> ListResourceRequests
s {$sel:nextToken:ListResourceRequests' :: Maybe Text
nextToken = Maybe Text
a} :: ListResourceRequests)

-- | The filter criteria to apply to the requests returned.
listResourceRequests_resourceRequestStatusFilter :: Lens.Lens' ListResourceRequests (Prelude.Maybe ResourceRequestStatusFilter)
listResourceRequests_resourceRequestStatusFilter :: (Maybe ResourceRequestStatusFilter
 -> f (Maybe ResourceRequestStatusFilter))
-> ListResourceRequests -> f ListResourceRequests
listResourceRequests_resourceRequestStatusFilter = (ListResourceRequests -> Maybe ResourceRequestStatusFilter)
-> (ListResourceRequests
    -> Maybe ResourceRequestStatusFilter -> ListResourceRequests)
-> Lens
     ListResourceRequests
     ListResourceRequests
     (Maybe ResourceRequestStatusFilter)
     (Maybe ResourceRequestStatusFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRequests' {Maybe ResourceRequestStatusFilter
resourceRequestStatusFilter :: Maybe ResourceRequestStatusFilter
$sel:resourceRequestStatusFilter:ListResourceRequests' :: ListResourceRequests -> Maybe ResourceRequestStatusFilter
resourceRequestStatusFilter} -> Maybe ResourceRequestStatusFilter
resourceRequestStatusFilter) (\s :: ListResourceRequests
s@ListResourceRequests' {} Maybe ResourceRequestStatusFilter
a -> ListResourceRequests
s {$sel:resourceRequestStatusFilter:ListResourceRequests' :: Maybe ResourceRequestStatusFilter
resourceRequestStatusFilter = Maybe ResourceRequestStatusFilter
a} :: ListResourceRequests)

-- | The maximum number of results to be returned with a single call. If the
-- number of available results exceeds this maximum, the response includes
-- a @NextToken@ value that you can assign to the @NextToken@ request
-- parameter to get the next set of results.
--
-- The default is @20@.
listResourceRequests_maxResults :: Lens.Lens' ListResourceRequests (Prelude.Maybe Prelude.Natural)
listResourceRequests_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListResourceRequests -> f ListResourceRequests
listResourceRequests_maxResults = (ListResourceRequests -> Maybe Natural)
-> (ListResourceRequests -> Maybe Natural -> ListResourceRequests)
-> Lens
     ListResourceRequests
     ListResourceRequests
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRequests' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListResourceRequests' :: ListResourceRequests -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListResourceRequests
s@ListResourceRequests' {} Maybe Natural
a -> ListResourceRequests
s {$sel:maxResults:ListResourceRequests' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListResourceRequests)

instance Core.AWSRequest ListResourceRequests where
  type
    AWSResponse ListResourceRequests =
      ListResourceRequestsResponse
  request :: ListResourceRequests -> Request ListResourceRequests
request = Service -> ListResourceRequests -> Request ListResourceRequests
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListResourceRequests
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListResourceRequests)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListResourceRequests))
-> Logger
-> Service
-> Proxy ListResourceRequests
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListResourceRequests)))
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 [ProgressEvent]
-> Maybe Text -> Int -> ListResourceRequestsResponse
ListResourceRequestsResponse'
            (Maybe [ProgressEvent]
 -> Maybe Text -> Int -> ListResourceRequestsResponse)
-> Either String (Maybe [ProgressEvent])
-> Either
     String (Maybe Text -> Int -> ListResourceRequestsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [ProgressEvent]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResourceRequestStatusSummaries"
                            Either String (Maybe (Maybe [ProgressEvent]))
-> Maybe [ProgressEvent] -> Either String (Maybe [ProgressEvent])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ProgressEvent]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListResourceRequestsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListResourceRequestsResponse)
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
"NextToken")
            Either String (Int -> ListResourceRequestsResponse)
-> Either String Int -> Either String ListResourceRequestsResponse
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))
      )

instance Prelude.Hashable ListResourceRequests

instance Prelude.NFData ListResourceRequests

instance Core.ToHeaders ListResourceRequests where
  toHeaders :: ListResourceRequests -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListResourceRequests -> 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
"CloudApiService.ListResourceRequests" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON ListResourceRequests where
  toJSON :: ListResourceRequests -> Value
toJSON ListResourceRequests' {Maybe Natural
Maybe Text
Maybe ResourceRequestStatusFilter
maxResults :: Maybe Natural
resourceRequestStatusFilter :: Maybe ResourceRequestStatusFilter
nextToken :: Maybe Text
$sel:maxResults:ListResourceRequests' :: ListResourceRequests -> Maybe Natural
$sel:resourceRequestStatusFilter:ListResourceRequests' :: ListResourceRequests -> Maybe ResourceRequestStatusFilter
$sel:nextToken:ListResourceRequests' :: ListResourceRequests -> 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
"ResourceRequestStatusFilter" Text -> ResourceRequestStatusFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ResourceRequestStatusFilter -> Pair)
-> Maybe ResourceRequestStatusFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResourceRequestStatusFilter
resourceRequestStatusFilter,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

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

-- | /See:/ 'newListResourceRequestsResponse' smart constructor.
data ListResourceRequestsResponse = ListResourceRequestsResponse'
  { -- | The requests that match the specified filter criteria.
    ListResourceRequestsResponse -> Maybe [ProgressEvent]
resourceRequestStatusSummaries :: Prelude.Maybe [ProgressEvent],
    -- | If the request doesn\'t return all of the remaining results, @NextToken@
    -- is set to a token. To retrieve the next set of results, call
    -- @ListResources@ again and assign that token to the request object\'s
    -- @NextToken@ parameter. If the request returns all results, @NextToken@
    -- is set to null.
    ListResourceRequestsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListResourceRequestsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListResourceRequestsResponse
-> ListResourceRequestsResponse -> Bool
(ListResourceRequestsResponse
 -> ListResourceRequestsResponse -> Bool)
-> (ListResourceRequestsResponse
    -> ListResourceRequestsResponse -> Bool)
-> Eq ListResourceRequestsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResourceRequestsResponse
-> ListResourceRequestsResponse -> Bool
$c/= :: ListResourceRequestsResponse
-> ListResourceRequestsResponse -> Bool
== :: ListResourceRequestsResponse
-> ListResourceRequestsResponse -> Bool
$c== :: ListResourceRequestsResponse
-> ListResourceRequestsResponse -> Bool
Prelude.Eq, Int -> ListResourceRequestsResponse -> ShowS
[ListResourceRequestsResponse] -> ShowS
ListResourceRequestsResponse -> String
(Int -> ListResourceRequestsResponse -> ShowS)
-> (ListResourceRequestsResponse -> String)
-> ([ListResourceRequestsResponse] -> ShowS)
-> Show ListResourceRequestsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResourceRequestsResponse] -> ShowS
$cshowList :: [ListResourceRequestsResponse] -> ShowS
show :: ListResourceRequestsResponse -> String
$cshow :: ListResourceRequestsResponse -> String
showsPrec :: Int -> ListResourceRequestsResponse -> ShowS
$cshowsPrec :: Int -> ListResourceRequestsResponse -> ShowS
Prelude.Show, (forall x.
 ListResourceRequestsResponse -> Rep ListResourceRequestsResponse x)
-> (forall x.
    Rep ListResourceRequestsResponse x -> ListResourceRequestsResponse)
-> Generic ListResourceRequestsResponse
forall x.
Rep ListResourceRequestsResponse x -> ListResourceRequestsResponse
forall x.
ListResourceRequestsResponse -> Rep ListResourceRequestsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListResourceRequestsResponse x -> ListResourceRequestsResponse
$cfrom :: forall x.
ListResourceRequestsResponse -> Rep ListResourceRequestsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListResourceRequestsResponse' 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:
--
-- 'resourceRequestStatusSummaries', 'listResourceRequestsResponse_resourceRequestStatusSummaries' - The requests that match the specified filter criteria.
--
-- 'nextToken', 'listResourceRequestsResponse_nextToken' - If the request doesn\'t return all of the remaining results, @NextToken@
-- is set to a token. To retrieve the next set of results, call
-- @ListResources@ again and assign that token to the request object\'s
-- @NextToken@ parameter. If the request returns all results, @NextToken@
-- is set to null.
--
-- 'httpStatus', 'listResourceRequestsResponse_httpStatus' - The response's http status code.
newListResourceRequestsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListResourceRequestsResponse
newListResourceRequestsResponse :: Int -> ListResourceRequestsResponse
newListResourceRequestsResponse Int
pHttpStatus_ =
  ListResourceRequestsResponse' :: Maybe [ProgressEvent]
-> Maybe Text -> Int -> ListResourceRequestsResponse
ListResourceRequestsResponse'
    { $sel:resourceRequestStatusSummaries:ListResourceRequestsResponse' :: Maybe [ProgressEvent]
resourceRequestStatusSummaries =
        Maybe [ProgressEvent]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListResourceRequestsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListResourceRequestsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The requests that match the specified filter criteria.
listResourceRequestsResponse_resourceRequestStatusSummaries :: Lens.Lens' ListResourceRequestsResponse (Prelude.Maybe [ProgressEvent])
listResourceRequestsResponse_resourceRequestStatusSummaries :: (Maybe [ProgressEvent] -> f (Maybe [ProgressEvent]))
-> ListResourceRequestsResponse -> f ListResourceRequestsResponse
listResourceRequestsResponse_resourceRequestStatusSummaries = (ListResourceRequestsResponse -> Maybe [ProgressEvent])
-> (ListResourceRequestsResponse
    -> Maybe [ProgressEvent] -> ListResourceRequestsResponse)
-> Lens
     ListResourceRequestsResponse
     ListResourceRequestsResponse
     (Maybe [ProgressEvent])
     (Maybe [ProgressEvent])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRequestsResponse' {Maybe [ProgressEvent]
resourceRequestStatusSummaries :: Maybe [ProgressEvent]
$sel:resourceRequestStatusSummaries:ListResourceRequestsResponse' :: ListResourceRequestsResponse -> Maybe [ProgressEvent]
resourceRequestStatusSummaries} -> Maybe [ProgressEvent]
resourceRequestStatusSummaries) (\s :: ListResourceRequestsResponse
s@ListResourceRequestsResponse' {} Maybe [ProgressEvent]
a -> ListResourceRequestsResponse
s {$sel:resourceRequestStatusSummaries:ListResourceRequestsResponse' :: Maybe [ProgressEvent]
resourceRequestStatusSummaries = Maybe [ProgressEvent]
a} :: ListResourceRequestsResponse) ((Maybe [ProgressEvent] -> f (Maybe [ProgressEvent]))
 -> ListResourceRequestsResponse -> f ListResourceRequestsResponse)
-> ((Maybe [ProgressEvent] -> f (Maybe [ProgressEvent]))
    -> Maybe [ProgressEvent] -> f (Maybe [ProgressEvent]))
-> (Maybe [ProgressEvent] -> f (Maybe [ProgressEvent]))
-> ListResourceRequestsResponse
-> f ListResourceRequestsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ProgressEvent] [ProgressEvent] [ProgressEvent] [ProgressEvent]
-> Iso
     (Maybe [ProgressEvent])
     (Maybe [ProgressEvent])
     (Maybe [ProgressEvent])
     (Maybe [ProgressEvent])
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 AnIso
  [ProgressEvent] [ProgressEvent] [ProgressEvent] [ProgressEvent]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the request doesn\'t return all of the remaining results, @NextToken@
-- is set to a token. To retrieve the next set of results, call
-- @ListResources@ again and assign that token to the request object\'s
-- @NextToken@ parameter. If the request returns all results, @NextToken@
-- is set to null.
listResourceRequestsResponse_nextToken :: Lens.Lens' ListResourceRequestsResponse (Prelude.Maybe Prelude.Text)
listResourceRequestsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListResourceRequestsResponse -> f ListResourceRequestsResponse
listResourceRequestsResponse_nextToken = (ListResourceRequestsResponse -> Maybe Text)
-> (ListResourceRequestsResponse
    -> Maybe Text -> ListResourceRequestsResponse)
-> Lens
     ListResourceRequestsResponse
     ListResourceRequestsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceRequestsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListResourceRequestsResponse' :: ListResourceRequestsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListResourceRequestsResponse
s@ListResourceRequestsResponse' {} Maybe Text
a -> ListResourceRequestsResponse
s {$sel:nextToken:ListResourceRequestsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListResourceRequestsResponse)

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

instance Prelude.NFData ListResourceRequestsResponse