{-# 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.ListResourceSharePermissions
-- 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 RAM permissions that are associated with a resource share.
module Amazonka.RAM.ListResourceSharePermissions
  ( -- * Creating a Request
    ListResourceSharePermissions (..),
    newListResourceSharePermissions,

    -- * Request Lenses
    listResourceSharePermissions_nextToken,
    listResourceSharePermissions_maxResults,
    listResourceSharePermissions_resourceShareArn,

    -- * Destructuring the Response
    ListResourceSharePermissionsResponse (..),
    newListResourceSharePermissionsResponse,

    -- * Response Lenses
    listResourceSharePermissionsResponse_nextToken,
    listResourceSharePermissionsResponse_permissions,
    listResourceSharePermissionsResponse_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:/ 'newListResourceSharePermissions' smart constructor.
data ListResourceSharePermissions = ListResourceSharePermissions'
  { -- | The token for the next page of results.
    ListResourceSharePermissions -> 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.
    ListResourceSharePermissions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name (ARN) of the resource share.
    ListResourceSharePermissions -> Text
resourceShareArn :: Prelude.Text
  }
  deriving (ListResourceSharePermissions
-> ListResourceSharePermissions -> Bool
(ListResourceSharePermissions
 -> ListResourceSharePermissions -> Bool)
-> (ListResourceSharePermissions
    -> ListResourceSharePermissions -> Bool)
-> Eq ListResourceSharePermissions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResourceSharePermissions
-> ListResourceSharePermissions -> Bool
$c/= :: ListResourceSharePermissions
-> ListResourceSharePermissions -> Bool
== :: ListResourceSharePermissions
-> ListResourceSharePermissions -> Bool
$c== :: ListResourceSharePermissions
-> ListResourceSharePermissions -> Bool
Prelude.Eq, ReadPrec [ListResourceSharePermissions]
ReadPrec ListResourceSharePermissions
Int -> ReadS ListResourceSharePermissions
ReadS [ListResourceSharePermissions]
(Int -> ReadS ListResourceSharePermissions)
-> ReadS [ListResourceSharePermissions]
-> ReadPrec ListResourceSharePermissions
-> ReadPrec [ListResourceSharePermissions]
-> Read ListResourceSharePermissions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResourceSharePermissions]
$creadListPrec :: ReadPrec [ListResourceSharePermissions]
readPrec :: ReadPrec ListResourceSharePermissions
$creadPrec :: ReadPrec ListResourceSharePermissions
readList :: ReadS [ListResourceSharePermissions]
$creadList :: ReadS [ListResourceSharePermissions]
readsPrec :: Int -> ReadS ListResourceSharePermissions
$creadsPrec :: Int -> ReadS ListResourceSharePermissions
Prelude.Read, Int -> ListResourceSharePermissions -> ShowS
[ListResourceSharePermissions] -> ShowS
ListResourceSharePermissions -> String
(Int -> ListResourceSharePermissions -> ShowS)
-> (ListResourceSharePermissions -> String)
-> ([ListResourceSharePermissions] -> ShowS)
-> Show ListResourceSharePermissions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResourceSharePermissions] -> ShowS
$cshowList :: [ListResourceSharePermissions] -> ShowS
show :: ListResourceSharePermissions -> String
$cshow :: ListResourceSharePermissions -> String
showsPrec :: Int -> ListResourceSharePermissions -> ShowS
$cshowsPrec :: Int -> ListResourceSharePermissions -> ShowS
Prelude.Show, (forall x.
 ListResourceSharePermissions -> Rep ListResourceSharePermissions x)
-> (forall x.
    Rep ListResourceSharePermissions x -> ListResourceSharePermissions)
-> Generic ListResourceSharePermissions
forall x.
Rep ListResourceSharePermissions x -> ListResourceSharePermissions
forall x.
ListResourceSharePermissions -> Rep ListResourceSharePermissions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListResourceSharePermissions x -> ListResourceSharePermissions
$cfrom :: forall x.
ListResourceSharePermissions -> Rep ListResourceSharePermissions x
Prelude.Generic)

-- |
-- Create a value of 'ListResourceSharePermissions' 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', 'listResourceSharePermissions_nextToken' - The token for the next page of results.
--
-- 'maxResults', 'listResourceSharePermissions_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.
--
-- 'resourceShareArn', 'listResourceSharePermissions_resourceShareArn' - The Amazon Resource Name (ARN) of the resource share.
newListResourceSharePermissions ::
  -- | 'resourceShareArn'
  Prelude.Text ->
  ListResourceSharePermissions
newListResourceSharePermissions :: Text -> ListResourceSharePermissions
newListResourceSharePermissions Text
pResourceShareArn_ =
  ListResourceSharePermissions' :: Maybe Text -> Maybe Natural -> Text -> ListResourceSharePermissions
ListResourceSharePermissions'
    { $sel:nextToken:ListResourceSharePermissions' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListResourceSharePermissions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceShareArn:ListResourceSharePermissions' :: Text
resourceShareArn = Text
pResourceShareArn_
    }

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

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

-- | The Amazon Resource Name (ARN) of the resource share.
listResourceSharePermissions_resourceShareArn :: Lens.Lens' ListResourceSharePermissions Prelude.Text
listResourceSharePermissions_resourceShareArn :: (Text -> f Text)
-> ListResourceSharePermissions -> f ListResourceSharePermissions
listResourceSharePermissions_resourceShareArn = (ListResourceSharePermissions -> Text)
-> (ListResourceSharePermissions
    -> Text -> ListResourceSharePermissions)
-> Lens
     ListResourceSharePermissions ListResourceSharePermissions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceSharePermissions' {Text
resourceShareArn :: Text
$sel:resourceShareArn:ListResourceSharePermissions' :: ListResourceSharePermissions -> Text
resourceShareArn} -> Text
resourceShareArn) (\s :: ListResourceSharePermissions
s@ListResourceSharePermissions' {} Text
a -> ListResourceSharePermissions
s {$sel:resourceShareArn:ListResourceSharePermissions' :: Text
resourceShareArn = Text
a} :: ListResourceSharePermissions)

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

instance Prelude.NFData ListResourceSharePermissions

instance Core.ToHeaders ListResourceSharePermissions where
  toHeaders :: ListResourceSharePermissions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListResourceSharePermissions -> 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 ListResourceSharePermissions where
  toJSON :: ListResourceSharePermissions -> Value
toJSON ListResourceSharePermissions' {Maybe Natural
Maybe Text
Text
resourceShareArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:resourceShareArn:ListResourceSharePermissions' :: ListResourceSharePermissions -> Text
$sel:maxResults:ListResourceSharePermissions' :: ListResourceSharePermissions -> Maybe Natural
$sel:nextToken:ListResourceSharePermissions' :: ListResourceSharePermissions -> 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
"resourceShareArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceShareArn)
          ]
      )

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

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

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

-- |
-- Create a value of 'ListResourceSharePermissionsResponse' 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', 'listResourceSharePermissionsResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'permissions', 'listResourceSharePermissionsResponse_permissions' - The permissions associated with the resource share.
--
-- 'httpStatus', 'listResourceSharePermissionsResponse_httpStatus' - The response's http status code.
newListResourceSharePermissionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListResourceSharePermissionsResponse
newListResourceSharePermissionsResponse :: Int -> ListResourceSharePermissionsResponse
newListResourceSharePermissionsResponse Int
pHttpStatus_ =
  ListResourceSharePermissionsResponse' :: Maybe Text
-> Maybe [ResourceSharePermissionSummary]
-> Int
-> ListResourceSharePermissionsResponse
ListResourceSharePermissionsResponse'
    { $sel:nextToken:ListResourceSharePermissionsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:permissions:ListResourceSharePermissionsResponse' :: Maybe [ResourceSharePermissionSummary]
permissions = Maybe [ResourceSharePermissionSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListResourceSharePermissionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The permissions associated with the resource share.
listResourceSharePermissionsResponse_permissions :: Lens.Lens' ListResourceSharePermissionsResponse (Prelude.Maybe [ResourceSharePermissionSummary])
listResourceSharePermissionsResponse_permissions :: (Maybe [ResourceSharePermissionSummary]
 -> f (Maybe [ResourceSharePermissionSummary]))
-> ListResourceSharePermissionsResponse
-> f ListResourceSharePermissionsResponse
listResourceSharePermissionsResponse_permissions = (ListResourceSharePermissionsResponse
 -> Maybe [ResourceSharePermissionSummary])
-> (ListResourceSharePermissionsResponse
    -> Maybe [ResourceSharePermissionSummary]
    -> ListResourceSharePermissionsResponse)
-> Lens
     ListResourceSharePermissionsResponse
     ListResourceSharePermissionsResponse
     (Maybe [ResourceSharePermissionSummary])
     (Maybe [ResourceSharePermissionSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceSharePermissionsResponse' {Maybe [ResourceSharePermissionSummary]
permissions :: Maybe [ResourceSharePermissionSummary]
$sel:permissions:ListResourceSharePermissionsResponse' :: ListResourceSharePermissionsResponse
-> Maybe [ResourceSharePermissionSummary]
permissions} -> Maybe [ResourceSharePermissionSummary]
permissions) (\s :: ListResourceSharePermissionsResponse
s@ListResourceSharePermissionsResponse' {} Maybe [ResourceSharePermissionSummary]
a -> ListResourceSharePermissionsResponse
s {$sel:permissions:ListResourceSharePermissionsResponse' :: Maybe [ResourceSharePermissionSummary]
permissions = Maybe [ResourceSharePermissionSummary]
a} :: ListResourceSharePermissionsResponse) ((Maybe [ResourceSharePermissionSummary]
  -> f (Maybe [ResourceSharePermissionSummary]))
 -> ListResourceSharePermissionsResponse
 -> f ListResourceSharePermissionsResponse)
-> ((Maybe [ResourceSharePermissionSummary]
     -> f (Maybe [ResourceSharePermissionSummary]))
    -> Maybe [ResourceSharePermissionSummary]
    -> f (Maybe [ResourceSharePermissionSummary]))
-> (Maybe [ResourceSharePermissionSummary]
    -> f (Maybe [ResourceSharePermissionSummary]))
-> ListResourceSharePermissionsResponse
-> f ListResourceSharePermissionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ResourceSharePermissionSummary]
  [ResourceSharePermissionSummary]
  [ResourceSharePermissionSummary]
  [ResourceSharePermissionSummary]
-> Iso
     (Maybe [ResourceSharePermissionSummary])
     (Maybe [ResourceSharePermissionSummary])
     (Maybe [ResourceSharePermissionSummary])
     (Maybe [ResourceSharePermissionSummary])
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
  [ResourceSharePermissionSummary]
  [ResourceSharePermissionSummary]
  [ResourceSharePermissionSummary]
  [ResourceSharePermissionSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListResourceSharePermissionsResponse