{-# 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.RedshiftServerLess.ListEndpointAccess
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns an array of @EndpointAccess@ objects and relevant information.
--
-- This operation returns paginated results.
module Amazonka.RedshiftServerLess.ListEndpointAccess
  ( -- * Creating a Request
    ListEndpointAccess (..),
    newListEndpointAccess,

    -- * Request Lenses
    listEndpointAccess_maxResults,
    listEndpointAccess_nextToken,
    listEndpointAccess_vpcId,
    listEndpointAccess_workgroupName,

    -- * Destructuring the Response
    ListEndpointAccessResponse (..),
    newListEndpointAccessResponse,

    -- * Response Lenses
    listEndpointAccessResponse_nextToken,
    listEndpointAccessResponse_httpStatus,
    listEndpointAccessResponse_endpoints,
  )
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 Amazonka.RedshiftServerLess.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListEndpointAccess' smart constructor.
data ListEndpointAccess = ListEndpointAccess'
  { -- | An optional parameter that specifies the maximum number of results to
    -- return. You can use @nextToken@ to display the next page of results.
    ListEndpointAccess -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If your initial @ListEndpointAccess@ operation returns a @nextToken@,
    -- you can include the returned @nextToken@ in following
    -- @ListEndpointAccess@ operations, which returns results in the next page.
    ListEndpointAccess -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the virtual private cloud with access to Amazon
    -- Redshift Serverless.
    ListEndpointAccess -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
    -- | The name of the workgroup associated with the VPC endpoint to return.
    ListEndpointAccess -> Maybe Text
workgroupName :: Prelude.Maybe Prelude.Text
  }
  deriving (ListEndpointAccess -> ListEndpointAccess -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEndpointAccess -> ListEndpointAccess -> Bool
$c/= :: ListEndpointAccess -> ListEndpointAccess -> Bool
== :: ListEndpointAccess -> ListEndpointAccess -> Bool
$c== :: ListEndpointAccess -> ListEndpointAccess -> Bool
Prelude.Eq, ReadPrec [ListEndpointAccess]
ReadPrec ListEndpointAccess
Int -> ReadS ListEndpointAccess
ReadS [ListEndpointAccess]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEndpointAccess]
$creadListPrec :: ReadPrec [ListEndpointAccess]
readPrec :: ReadPrec ListEndpointAccess
$creadPrec :: ReadPrec ListEndpointAccess
readList :: ReadS [ListEndpointAccess]
$creadList :: ReadS [ListEndpointAccess]
readsPrec :: Int -> ReadS ListEndpointAccess
$creadsPrec :: Int -> ReadS ListEndpointAccess
Prelude.Read, Int -> ListEndpointAccess -> ShowS
[ListEndpointAccess] -> ShowS
ListEndpointAccess -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEndpointAccess] -> ShowS
$cshowList :: [ListEndpointAccess] -> ShowS
show :: ListEndpointAccess -> String
$cshow :: ListEndpointAccess -> String
showsPrec :: Int -> ListEndpointAccess -> ShowS
$cshowsPrec :: Int -> ListEndpointAccess -> ShowS
Prelude.Show, forall x. Rep ListEndpointAccess x -> ListEndpointAccess
forall x. ListEndpointAccess -> Rep ListEndpointAccess x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEndpointAccess x -> ListEndpointAccess
$cfrom :: forall x. ListEndpointAccess -> Rep ListEndpointAccess x
Prelude.Generic)

-- |
-- Create a value of 'ListEndpointAccess' 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', 'listEndpointAccess_maxResults' - An optional parameter that specifies the maximum number of results to
-- return. You can use @nextToken@ to display the next page of results.
--
-- 'nextToken', 'listEndpointAccess_nextToken' - If your initial @ListEndpointAccess@ operation returns a @nextToken@,
-- you can include the returned @nextToken@ in following
-- @ListEndpointAccess@ operations, which returns results in the next page.
--
-- 'vpcId', 'listEndpointAccess_vpcId' - The unique identifier of the virtual private cloud with access to Amazon
-- Redshift Serverless.
--
-- 'workgroupName', 'listEndpointAccess_workgroupName' - The name of the workgroup associated with the VPC endpoint to return.
newListEndpointAccess ::
  ListEndpointAccess
newListEndpointAccess :: ListEndpointAccess
newListEndpointAccess =
  ListEndpointAccess'
    { $sel:maxResults:ListEndpointAccess' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListEndpointAccess' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:ListEndpointAccess' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing,
      $sel:workgroupName:ListEndpointAccess' :: Maybe Text
workgroupName = forall a. Maybe a
Prelude.Nothing
    }

-- | An optional parameter that specifies the maximum number of results to
-- return. You can use @nextToken@ to display the next page of results.
listEndpointAccess_maxResults :: Lens.Lens' ListEndpointAccess (Prelude.Maybe Prelude.Natural)
listEndpointAccess_maxResults :: Lens' ListEndpointAccess (Maybe Natural)
listEndpointAccess_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointAccess' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListEndpointAccess' :: ListEndpointAccess -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListEndpointAccess
s@ListEndpointAccess' {} Maybe Natural
a -> ListEndpointAccess
s {$sel:maxResults:ListEndpointAccess' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListEndpointAccess)

-- | If your initial @ListEndpointAccess@ operation returns a @nextToken@,
-- you can include the returned @nextToken@ in following
-- @ListEndpointAccess@ operations, which returns results in the next page.
listEndpointAccess_nextToken :: Lens.Lens' ListEndpointAccess (Prelude.Maybe Prelude.Text)
listEndpointAccess_nextToken :: Lens' ListEndpointAccess (Maybe Text)
listEndpointAccess_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointAccess' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEndpointAccess
s@ListEndpointAccess' {} Maybe Text
a -> ListEndpointAccess
s {$sel:nextToken:ListEndpointAccess' :: Maybe Text
nextToken = Maybe Text
a} :: ListEndpointAccess)

-- | The unique identifier of the virtual private cloud with access to Amazon
-- Redshift Serverless.
listEndpointAccess_vpcId :: Lens.Lens' ListEndpointAccess (Prelude.Maybe Prelude.Text)
listEndpointAccess_vpcId :: Lens' ListEndpointAccess (Maybe Text)
listEndpointAccess_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointAccess' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: ListEndpointAccess
s@ListEndpointAccess' {} Maybe Text
a -> ListEndpointAccess
s {$sel:vpcId:ListEndpointAccess' :: Maybe Text
vpcId = Maybe Text
a} :: ListEndpointAccess)

-- | The name of the workgroup associated with the VPC endpoint to return.
listEndpointAccess_workgroupName :: Lens.Lens' ListEndpointAccess (Prelude.Maybe Prelude.Text)
listEndpointAccess_workgroupName :: Lens' ListEndpointAccess (Maybe Text)
listEndpointAccess_workgroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointAccess' {Maybe Text
workgroupName :: Maybe Text
$sel:workgroupName:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
workgroupName} -> Maybe Text
workgroupName) (\s :: ListEndpointAccess
s@ListEndpointAccess' {} Maybe Text
a -> ListEndpointAccess
s {$sel:workgroupName:ListEndpointAccess' :: Maybe Text
workgroupName = Maybe Text
a} :: ListEndpointAccess)

instance Core.AWSPager ListEndpointAccess where
  page :: ListEndpointAccess
-> AWSResponse ListEndpointAccess -> Maybe ListEndpointAccess
page ListEndpointAccess
rq AWSResponse ListEndpointAccess
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListEndpointAccess
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListEndpointAccessResponse (Maybe Text)
listEndpointAccessResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListEndpointAccess
rs forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListEndpointAccessResponse [EndpointAccess]
listEndpointAccessResponse_endpoints) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListEndpointAccess
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListEndpointAccess (Maybe Text)
listEndpointAccess_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListEndpointAccess
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListEndpointAccessResponse (Maybe Text)
listEndpointAccessResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.Hashable ListEndpointAccess where
  hashWithSalt :: Int -> ListEndpointAccess -> Int
hashWithSalt Int
_salt ListEndpointAccess' {Maybe Natural
Maybe Text
workgroupName :: Maybe Text
vpcId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:workgroupName:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
$sel:vpcId:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
$sel:nextToken:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
$sel:maxResults:ListEndpointAccess' :: ListEndpointAccess -> 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` Maybe Text
vpcId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workgroupName

instance Prelude.NFData ListEndpointAccess where
  rnf :: ListEndpointAccess -> ()
rnf ListEndpointAccess' {Maybe Natural
Maybe Text
workgroupName :: Maybe Text
vpcId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:workgroupName:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
$sel:vpcId:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
$sel:nextToken:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
$sel:maxResults:ListEndpointAccess' :: ListEndpointAccess -> 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 Maybe Text
vpcId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workgroupName

instance Data.ToHeaders ListEndpointAccess where
  toHeaders :: ListEndpointAccess -> 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
"RedshiftServerless.ListEndpointAccess" ::
                          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 ListEndpointAccess where
  toJSON :: ListEndpointAccess -> Value
toJSON ListEndpointAccess' {Maybe Natural
Maybe Text
workgroupName :: Maybe Text
vpcId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:workgroupName:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
$sel:vpcId:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
$sel:nextToken:ListEndpointAccess' :: ListEndpointAccess -> Maybe Text
$sel:maxResults:ListEndpointAccess' :: ListEndpointAccess -> 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,
            (Key
"vpcId" 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
vpcId,
            (Key
"workgroupName" 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
workgroupName
          ]
      )

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

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

-- | /See:/ 'newListEndpointAccessResponse' smart constructor.
data ListEndpointAccessResponse = ListEndpointAccessResponse'
  { -- | When @nextToken@ is returned, there are more results available. The
    -- value of @nextToken@ is a unique pagination token for each page. Make
    -- the call again using the returned token to retrieve the next page.
    ListEndpointAccessResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListEndpointAccessResponse -> Int
httpStatus :: Prelude.Int,
    -- | The returned VPC endpoints.
    ListEndpointAccessResponse -> [EndpointAccess]
endpoints :: [EndpointAccess]
  }
  deriving (ListEndpointAccessResponse -> ListEndpointAccessResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEndpointAccessResponse -> ListEndpointAccessResponse -> Bool
$c/= :: ListEndpointAccessResponse -> ListEndpointAccessResponse -> Bool
== :: ListEndpointAccessResponse -> ListEndpointAccessResponse -> Bool
$c== :: ListEndpointAccessResponse -> ListEndpointAccessResponse -> Bool
Prelude.Eq, ReadPrec [ListEndpointAccessResponse]
ReadPrec ListEndpointAccessResponse
Int -> ReadS ListEndpointAccessResponse
ReadS [ListEndpointAccessResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEndpointAccessResponse]
$creadListPrec :: ReadPrec [ListEndpointAccessResponse]
readPrec :: ReadPrec ListEndpointAccessResponse
$creadPrec :: ReadPrec ListEndpointAccessResponse
readList :: ReadS [ListEndpointAccessResponse]
$creadList :: ReadS [ListEndpointAccessResponse]
readsPrec :: Int -> ReadS ListEndpointAccessResponse
$creadsPrec :: Int -> ReadS ListEndpointAccessResponse
Prelude.Read, Int -> ListEndpointAccessResponse -> ShowS
[ListEndpointAccessResponse] -> ShowS
ListEndpointAccessResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEndpointAccessResponse] -> ShowS
$cshowList :: [ListEndpointAccessResponse] -> ShowS
show :: ListEndpointAccessResponse -> String
$cshow :: ListEndpointAccessResponse -> String
showsPrec :: Int -> ListEndpointAccessResponse -> ShowS
$cshowsPrec :: Int -> ListEndpointAccessResponse -> ShowS
Prelude.Show, forall x.
Rep ListEndpointAccessResponse x -> ListEndpointAccessResponse
forall x.
ListEndpointAccessResponse -> Rep ListEndpointAccessResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListEndpointAccessResponse x -> ListEndpointAccessResponse
$cfrom :: forall x.
ListEndpointAccessResponse -> Rep ListEndpointAccessResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListEndpointAccessResponse' 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', 'listEndpointAccessResponse_nextToken' - When @nextToken@ is returned, there are more results available. The
-- value of @nextToken@ is a unique pagination token for each page. Make
-- the call again using the returned token to retrieve the next page.
--
-- 'httpStatus', 'listEndpointAccessResponse_httpStatus' - The response's http status code.
--
-- 'endpoints', 'listEndpointAccessResponse_endpoints' - The returned VPC endpoints.
newListEndpointAccessResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListEndpointAccessResponse
newListEndpointAccessResponse :: Int -> ListEndpointAccessResponse
newListEndpointAccessResponse Int
pHttpStatus_ =
  ListEndpointAccessResponse'
    { $sel:nextToken:ListEndpointAccessResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListEndpointAccessResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:endpoints:ListEndpointAccessResponse' :: [EndpointAccess]
endpoints = forall a. Monoid a => a
Prelude.mempty
    }

-- | When @nextToken@ is returned, there are more results available. The
-- value of @nextToken@ is a unique pagination token for each page. Make
-- the call again using the returned token to retrieve the next page.
listEndpointAccessResponse_nextToken :: Lens.Lens' ListEndpointAccessResponse (Prelude.Maybe Prelude.Text)
listEndpointAccessResponse_nextToken :: Lens' ListEndpointAccessResponse (Maybe Text)
listEndpointAccessResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointAccessResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEndpointAccessResponse' :: ListEndpointAccessResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEndpointAccessResponse
s@ListEndpointAccessResponse' {} Maybe Text
a -> ListEndpointAccessResponse
s {$sel:nextToken:ListEndpointAccessResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListEndpointAccessResponse)

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

-- | The returned VPC endpoints.
listEndpointAccessResponse_endpoints :: Lens.Lens' ListEndpointAccessResponse [EndpointAccess]
listEndpointAccessResponse_endpoints :: Lens' ListEndpointAccessResponse [EndpointAccess]
listEndpointAccessResponse_endpoints = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointAccessResponse' {[EndpointAccess]
endpoints :: [EndpointAccess]
$sel:endpoints:ListEndpointAccessResponse' :: ListEndpointAccessResponse -> [EndpointAccess]
endpoints} -> [EndpointAccess]
endpoints) (\s :: ListEndpointAccessResponse
s@ListEndpointAccessResponse' {} [EndpointAccess]
a -> ListEndpointAccessResponse
s {$sel:endpoints:ListEndpointAccessResponse' :: [EndpointAccess]
endpoints = [EndpointAccess]
a} :: ListEndpointAccessResponse) 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 ListEndpointAccessResponse where
  rnf :: ListEndpointAccessResponse -> ()
rnf ListEndpointAccessResponse' {Int
[EndpointAccess]
Maybe Text
endpoints :: [EndpointAccess]
httpStatus :: Int
nextToken :: Maybe Text
$sel:endpoints:ListEndpointAccessResponse' :: ListEndpointAccessResponse -> [EndpointAccess]
$sel:httpStatus:ListEndpointAccessResponse' :: ListEndpointAccessResponse -> Int
$sel:nextToken:ListEndpointAccessResponse' :: ListEndpointAccessResponse -> 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 [EndpointAccess]
endpoints