{-# 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.RAM.ListPendingInvitationResources
-- 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)
--
-- Lists the resources in a resource share that is shared with you but that
-- the invitation is still pending for.
module Amazonka.RAM.ListPendingInvitationResources
  ( -- * Creating a Request
    ListPendingInvitationResources (..),
    newListPendingInvitationResources,

    -- * Request Lenses
    listPendingInvitationResources_nextToken,
    listPendingInvitationResources_maxResults,
    listPendingInvitationResources_resourceShareInvitationArn,

    -- * Destructuring the Response
    ListPendingInvitationResourcesResponse (..),
    newListPendingInvitationResourcesResponse,

    -- * Response Lenses
    listPendingInvitationResourcesResponse_resources,
    listPendingInvitationResourcesResponse_nextToken,
    listPendingInvitationResourcesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListPendingInvitationResources' smart constructor.
data ListPendingInvitationResources = ListPendingInvitationResources'
  { -- | The token for the next page of results.
    ListPendingInvitationResources -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return with a single call. To retrieve
    -- the remaining results, make another call with the returned @nextToken@
    -- value.
    ListPendingInvitationResources -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name (ARN) of the invitation.
    ListPendingInvitationResources -> Text
resourceShareInvitationArn :: Prelude.Text
  }
  deriving (ListPendingInvitationResources
-> ListPendingInvitationResources -> Bool
(ListPendingInvitationResources
 -> ListPendingInvitationResources -> Bool)
-> (ListPendingInvitationResources
    -> ListPendingInvitationResources -> Bool)
-> Eq ListPendingInvitationResources
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPendingInvitationResources
-> ListPendingInvitationResources -> Bool
$c/= :: ListPendingInvitationResources
-> ListPendingInvitationResources -> Bool
== :: ListPendingInvitationResources
-> ListPendingInvitationResources -> Bool
$c== :: ListPendingInvitationResources
-> ListPendingInvitationResources -> Bool
Prelude.Eq, ReadPrec [ListPendingInvitationResources]
ReadPrec ListPendingInvitationResources
Int -> ReadS ListPendingInvitationResources
ReadS [ListPendingInvitationResources]
(Int -> ReadS ListPendingInvitationResources)
-> ReadS [ListPendingInvitationResources]
-> ReadPrec ListPendingInvitationResources
-> ReadPrec [ListPendingInvitationResources]
-> Read ListPendingInvitationResources
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPendingInvitationResources]
$creadListPrec :: ReadPrec [ListPendingInvitationResources]
readPrec :: ReadPrec ListPendingInvitationResources
$creadPrec :: ReadPrec ListPendingInvitationResources
readList :: ReadS [ListPendingInvitationResources]
$creadList :: ReadS [ListPendingInvitationResources]
readsPrec :: Int -> ReadS ListPendingInvitationResources
$creadsPrec :: Int -> ReadS ListPendingInvitationResources
Prelude.Read, Int -> ListPendingInvitationResources -> ShowS
[ListPendingInvitationResources] -> ShowS
ListPendingInvitationResources -> String
(Int -> ListPendingInvitationResources -> ShowS)
-> (ListPendingInvitationResources -> String)
-> ([ListPendingInvitationResources] -> ShowS)
-> Show ListPendingInvitationResources
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPendingInvitationResources] -> ShowS
$cshowList :: [ListPendingInvitationResources] -> ShowS
show :: ListPendingInvitationResources -> String
$cshow :: ListPendingInvitationResources -> String
showsPrec :: Int -> ListPendingInvitationResources -> ShowS
$cshowsPrec :: Int -> ListPendingInvitationResources -> ShowS
Prelude.Show, (forall x.
 ListPendingInvitationResources
 -> Rep ListPendingInvitationResources x)
-> (forall x.
    Rep ListPendingInvitationResources x
    -> ListPendingInvitationResources)
-> Generic ListPendingInvitationResources
forall x.
Rep ListPendingInvitationResources x
-> ListPendingInvitationResources
forall x.
ListPendingInvitationResources
-> Rep ListPendingInvitationResources x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPendingInvitationResources x
-> ListPendingInvitationResources
$cfrom :: forall x.
ListPendingInvitationResources
-> Rep ListPendingInvitationResources x
Prelude.Generic)

-- |
-- Create a value of 'ListPendingInvitationResources' 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', 'listPendingInvitationResources_nextToken' - The token for the next page of results.
--
-- 'maxResults', 'listPendingInvitationResources_maxResults' - The maximum number of results to return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
--
-- 'resourceShareInvitationArn', 'listPendingInvitationResources_resourceShareInvitationArn' - The Amazon Resource Name (ARN) of the invitation.
newListPendingInvitationResources ::
  -- | 'resourceShareInvitationArn'
  Prelude.Text ->
  ListPendingInvitationResources
newListPendingInvitationResources :: Text -> ListPendingInvitationResources
newListPendingInvitationResources
  Text
pResourceShareInvitationArn_ =
    ListPendingInvitationResources' :: Maybe Text
-> Maybe Natural -> Text -> ListPendingInvitationResources
ListPendingInvitationResources'
      { $sel:nextToken:ListPendingInvitationResources' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:ListPendingInvitationResources' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:resourceShareInvitationArn:ListPendingInvitationResources' :: Text
resourceShareInvitationArn =
          Text
pResourceShareInvitationArn_
      }

-- | The token for the next page of results.
listPendingInvitationResources_nextToken :: Lens.Lens' ListPendingInvitationResources (Prelude.Maybe Prelude.Text)
listPendingInvitationResources_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPendingInvitationResources
-> f ListPendingInvitationResources
listPendingInvitationResources_nextToken = (ListPendingInvitationResources -> Maybe Text)
-> (ListPendingInvitationResources
    -> Maybe Text -> ListPendingInvitationResources)
-> Lens
     ListPendingInvitationResources
     ListPendingInvitationResources
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPendingInvitationResources' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPendingInvitationResources' :: ListPendingInvitationResources -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPendingInvitationResources
s@ListPendingInvitationResources' {} Maybe Text
a -> ListPendingInvitationResources
s {$sel:nextToken:ListPendingInvitationResources' :: Maybe Text
nextToken = Maybe Text
a} :: ListPendingInvitationResources)

-- | The maximum number of results to return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
listPendingInvitationResources_maxResults :: Lens.Lens' ListPendingInvitationResources (Prelude.Maybe Prelude.Natural)
listPendingInvitationResources_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListPendingInvitationResources
-> f ListPendingInvitationResources
listPendingInvitationResources_maxResults = (ListPendingInvitationResources -> Maybe Natural)
-> (ListPendingInvitationResources
    -> Maybe Natural -> ListPendingInvitationResources)
-> Lens
     ListPendingInvitationResources
     ListPendingInvitationResources
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPendingInvitationResources' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListPendingInvitationResources' :: ListPendingInvitationResources -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListPendingInvitationResources
s@ListPendingInvitationResources' {} Maybe Natural
a -> ListPendingInvitationResources
s {$sel:maxResults:ListPendingInvitationResources' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListPendingInvitationResources)

-- | The Amazon Resource Name (ARN) of the invitation.
listPendingInvitationResources_resourceShareInvitationArn :: Lens.Lens' ListPendingInvitationResources Prelude.Text
listPendingInvitationResources_resourceShareInvitationArn :: (Text -> f Text)
-> ListPendingInvitationResources
-> f ListPendingInvitationResources
listPendingInvitationResources_resourceShareInvitationArn = (ListPendingInvitationResources -> Text)
-> (ListPendingInvitationResources
    -> Text -> ListPendingInvitationResources)
-> Lens
     ListPendingInvitationResources
     ListPendingInvitationResources
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPendingInvitationResources' {Text
resourceShareInvitationArn :: Text
$sel:resourceShareInvitationArn:ListPendingInvitationResources' :: ListPendingInvitationResources -> Text
resourceShareInvitationArn} -> Text
resourceShareInvitationArn) (\s :: ListPendingInvitationResources
s@ListPendingInvitationResources' {} Text
a -> ListPendingInvitationResources
s {$sel:resourceShareInvitationArn:ListPendingInvitationResources' :: Text
resourceShareInvitationArn = Text
a} :: ListPendingInvitationResources)

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

instance
  Prelude.NFData
    ListPendingInvitationResources

instance
  Core.ToHeaders
    ListPendingInvitationResources
  where
  toHeaders :: ListPendingInvitationResources -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> ListPendingInvitationResources -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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 ListPendingInvitationResources where
  toJSON :: ListPendingInvitationResources -> Value
toJSON ListPendingInvitationResources' {Maybe Natural
Maybe Text
Text
resourceShareInvitationArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:resourceShareInvitationArn:ListPendingInvitationResources' :: ListPendingInvitationResources -> Text
$sel:maxResults:ListPendingInvitationResources' :: ListPendingInvitationResources -> Maybe Natural
$sel:nextToken:ListPendingInvitationResources' :: ListPendingInvitationResources -> 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 -> 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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"resourceShareInvitationArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceShareInvitationArn
              )
          ]
      )

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

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

-- | /See:/ 'newListPendingInvitationResourcesResponse' smart constructor.
data ListPendingInvitationResourcesResponse = ListPendingInvitationResourcesResponse'
  { -- | Information about the resources included the resource share.
    ListPendingInvitationResourcesResponse -> Maybe [Resource]
resources :: Prelude.Maybe [Resource],
    -- | The token to use to retrieve the next page of results. This value is
    -- @null@ when there are no more results to return.
    ListPendingInvitationResourcesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListPendingInvitationResourcesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPendingInvitationResourcesResponse
-> ListPendingInvitationResourcesResponse -> Bool
(ListPendingInvitationResourcesResponse
 -> ListPendingInvitationResourcesResponse -> Bool)
-> (ListPendingInvitationResourcesResponse
    -> ListPendingInvitationResourcesResponse -> Bool)
-> Eq ListPendingInvitationResourcesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPendingInvitationResourcesResponse
-> ListPendingInvitationResourcesResponse -> Bool
$c/= :: ListPendingInvitationResourcesResponse
-> ListPendingInvitationResourcesResponse -> Bool
== :: ListPendingInvitationResourcesResponse
-> ListPendingInvitationResourcesResponse -> Bool
$c== :: ListPendingInvitationResourcesResponse
-> ListPendingInvitationResourcesResponse -> Bool
Prelude.Eq, ReadPrec [ListPendingInvitationResourcesResponse]
ReadPrec ListPendingInvitationResourcesResponse
Int -> ReadS ListPendingInvitationResourcesResponse
ReadS [ListPendingInvitationResourcesResponse]
(Int -> ReadS ListPendingInvitationResourcesResponse)
-> ReadS [ListPendingInvitationResourcesResponse]
-> ReadPrec ListPendingInvitationResourcesResponse
-> ReadPrec [ListPendingInvitationResourcesResponse]
-> Read ListPendingInvitationResourcesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPendingInvitationResourcesResponse]
$creadListPrec :: ReadPrec [ListPendingInvitationResourcesResponse]
readPrec :: ReadPrec ListPendingInvitationResourcesResponse
$creadPrec :: ReadPrec ListPendingInvitationResourcesResponse
readList :: ReadS [ListPendingInvitationResourcesResponse]
$creadList :: ReadS [ListPendingInvitationResourcesResponse]
readsPrec :: Int -> ReadS ListPendingInvitationResourcesResponse
$creadsPrec :: Int -> ReadS ListPendingInvitationResourcesResponse
Prelude.Read, Int -> ListPendingInvitationResourcesResponse -> ShowS
[ListPendingInvitationResourcesResponse] -> ShowS
ListPendingInvitationResourcesResponse -> String
(Int -> ListPendingInvitationResourcesResponse -> ShowS)
-> (ListPendingInvitationResourcesResponse -> String)
-> ([ListPendingInvitationResourcesResponse] -> ShowS)
-> Show ListPendingInvitationResourcesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPendingInvitationResourcesResponse] -> ShowS
$cshowList :: [ListPendingInvitationResourcesResponse] -> ShowS
show :: ListPendingInvitationResourcesResponse -> String
$cshow :: ListPendingInvitationResourcesResponse -> String
showsPrec :: Int -> ListPendingInvitationResourcesResponse -> ShowS
$cshowsPrec :: Int -> ListPendingInvitationResourcesResponse -> ShowS
Prelude.Show, (forall x.
 ListPendingInvitationResourcesResponse
 -> Rep ListPendingInvitationResourcesResponse x)
-> (forall x.
    Rep ListPendingInvitationResourcesResponse x
    -> ListPendingInvitationResourcesResponse)
-> Generic ListPendingInvitationResourcesResponse
forall x.
Rep ListPendingInvitationResourcesResponse x
-> ListPendingInvitationResourcesResponse
forall x.
ListPendingInvitationResourcesResponse
-> Rep ListPendingInvitationResourcesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPendingInvitationResourcesResponse x
-> ListPendingInvitationResourcesResponse
$cfrom :: forall x.
ListPendingInvitationResourcesResponse
-> Rep ListPendingInvitationResourcesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPendingInvitationResourcesResponse' 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:
--
-- 'resources', 'listPendingInvitationResourcesResponse_resources' - Information about the resources included the resource share.
--
-- 'nextToken', 'listPendingInvitationResourcesResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'httpStatus', 'listPendingInvitationResourcesResponse_httpStatus' - The response's http status code.
newListPendingInvitationResourcesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPendingInvitationResourcesResponse
newListPendingInvitationResourcesResponse :: Int -> ListPendingInvitationResourcesResponse
newListPendingInvitationResourcesResponse
  Int
pHttpStatus_ =
    ListPendingInvitationResourcesResponse' :: Maybe [Resource]
-> Maybe Text -> Int -> ListPendingInvitationResourcesResponse
ListPendingInvitationResourcesResponse'
      { $sel:resources:ListPendingInvitationResourcesResponse' :: Maybe [Resource]
resources =
          Maybe [Resource]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListPendingInvitationResourcesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListPendingInvitationResourcesResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Information about the resources included the resource share.
listPendingInvitationResourcesResponse_resources :: Lens.Lens' ListPendingInvitationResourcesResponse (Prelude.Maybe [Resource])
listPendingInvitationResourcesResponse_resources :: (Maybe [Resource] -> f (Maybe [Resource]))
-> ListPendingInvitationResourcesResponse
-> f ListPendingInvitationResourcesResponse
listPendingInvitationResourcesResponse_resources = (ListPendingInvitationResourcesResponse -> Maybe [Resource])
-> (ListPendingInvitationResourcesResponse
    -> Maybe [Resource] -> ListPendingInvitationResourcesResponse)
-> Lens
     ListPendingInvitationResourcesResponse
     ListPendingInvitationResourcesResponse
     (Maybe [Resource])
     (Maybe [Resource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPendingInvitationResourcesResponse' {Maybe [Resource]
resources :: Maybe [Resource]
$sel:resources:ListPendingInvitationResourcesResponse' :: ListPendingInvitationResourcesResponse -> Maybe [Resource]
resources} -> Maybe [Resource]
resources) (\s :: ListPendingInvitationResourcesResponse
s@ListPendingInvitationResourcesResponse' {} Maybe [Resource]
a -> ListPendingInvitationResourcesResponse
s {$sel:resources:ListPendingInvitationResourcesResponse' :: Maybe [Resource]
resources = Maybe [Resource]
a} :: ListPendingInvitationResourcesResponse) ((Maybe [Resource] -> f (Maybe [Resource]))
 -> ListPendingInvitationResourcesResponse
 -> f ListPendingInvitationResourcesResponse)
-> ((Maybe [Resource] -> f (Maybe [Resource]))
    -> Maybe [Resource] -> f (Maybe [Resource]))
-> (Maybe [Resource] -> f (Maybe [Resource]))
-> ListPendingInvitationResourcesResponse
-> f ListPendingInvitationResourcesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Resource] [Resource] [Resource] [Resource]
-> Iso
     (Maybe [Resource])
     (Maybe [Resource])
     (Maybe [Resource])
     (Maybe [Resource])
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 [Resource] [Resource] [Resource] [Resource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
listPendingInvitationResourcesResponse_nextToken :: Lens.Lens' ListPendingInvitationResourcesResponse (Prelude.Maybe Prelude.Text)
listPendingInvitationResourcesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPendingInvitationResourcesResponse
-> f ListPendingInvitationResourcesResponse
listPendingInvitationResourcesResponse_nextToken = (ListPendingInvitationResourcesResponse -> Maybe Text)
-> (ListPendingInvitationResourcesResponse
    -> Maybe Text -> ListPendingInvitationResourcesResponse)
-> Lens
     ListPendingInvitationResourcesResponse
     ListPendingInvitationResourcesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPendingInvitationResourcesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPendingInvitationResourcesResponse' :: ListPendingInvitationResourcesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPendingInvitationResourcesResponse
s@ListPendingInvitationResourcesResponse' {} Maybe Text
a -> ListPendingInvitationResourcesResponse
s {$sel:nextToken:ListPendingInvitationResourcesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPendingInvitationResourcesResponse)

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

instance
  Prelude.NFData
    ListPendingInvitationResourcesResponse