{-# 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.S3Outposts.ListEndpoints
-- 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)
--
-- Amazon S3 on Outposts Access Points simplify managing data access at
-- scale for shared datasets in S3 on Outposts. S3 on Outposts uses
-- endpoints to connect to Outposts buckets so that you can perform actions
-- within your virtual private cloud (VPC). For more information, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/userguide/AccessingS3Outposts.html Accessing S3 on Outposts using VPC only access points>.
--
-- This action lists endpoints associated with the Outposts.
--
-- Related actions include:
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_CreateEndpoint.html CreateEndpoint>
--
-- -   <https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_DeleteEndpoint.html DeleteEndpoint>
--
-- This operation returns paginated results.
module Amazonka.S3Outposts.ListEndpoints
  ( -- * Creating a Request
    ListEndpoints (..),
    newListEndpoints,

    -- * Request Lenses
    listEndpoints_nextToken,
    listEndpoints_maxResults,

    -- * Destructuring the Response
    ListEndpointsResponse (..),
    newListEndpointsResponse,

    -- * Response Lenses
    listEndpointsResponse_nextToken,
    listEndpointsResponse_endpoints,
    listEndpointsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListEndpoints' smart constructor.
data ListEndpoints = ListEndpoints'
  { -- | The next endpoint requested in the list.
    ListEndpoints -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The max number of endpoints that can be returned on the request.
    ListEndpoints -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListEndpoints -> ListEndpoints -> Bool
(ListEndpoints -> ListEndpoints -> Bool)
-> (ListEndpoints -> ListEndpoints -> Bool) -> Eq ListEndpoints
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEndpoints -> ListEndpoints -> Bool
$c/= :: ListEndpoints -> ListEndpoints -> Bool
== :: ListEndpoints -> ListEndpoints -> Bool
$c== :: ListEndpoints -> ListEndpoints -> Bool
Prelude.Eq, ReadPrec [ListEndpoints]
ReadPrec ListEndpoints
Int -> ReadS ListEndpoints
ReadS [ListEndpoints]
(Int -> ReadS ListEndpoints)
-> ReadS [ListEndpoints]
-> ReadPrec ListEndpoints
-> ReadPrec [ListEndpoints]
-> Read ListEndpoints
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEndpoints]
$creadListPrec :: ReadPrec [ListEndpoints]
readPrec :: ReadPrec ListEndpoints
$creadPrec :: ReadPrec ListEndpoints
readList :: ReadS [ListEndpoints]
$creadList :: ReadS [ListEndpoints]
readsPrec :: Int -> ReadS ListEndpoints
$creadsPrec :: Int -> ReadS ListEndpoints
Prelude.Read, Int -> ListEndpoints -> ShowS
[ListEndpoints] -> ShowS
ListEndpoints -> String
(Int -> ListEndpoints -> ShowS)
-> (ListEndpoints -> String)
-> ([ListEndpoints] -> ShowS)
-> Show ListEndpoints
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEndpoints] -> ShowS
$cshowList :: [ListEndpoints] -> ShowS
show :: ListEndpoints -> String
$cshow :: ListEndpoints -> String
showsPrec :: Int -> ListEndpoints -> ShowS
$cshowsPrec :: Int -> ListEndpoints -> ShowS
Prelude.Show, (forall x. ListEndpoints -> Rep ListEndpoints x)
-> (forall x. Rep ListEndpoints x -> ListEndpoints)
-> Generic ListEndpoints
forall x. Rep ListEndpoints x -> ListEndpoints
forall x. ListEndpoints -> Rep ListEndpoints x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEndpoints x -> ListEndpoints
$cfrom :: forall x. ListEndpoints -> Rep ListEndpoints x
Prelude.Generic)

-- |
-- Create a value of 'ListEndpoints' 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', 'listEndpoints_nextToken' - The next endpoint requested in the list.
--
-- 'maxResults', 'listEndpoints_maxResults' - The max number of endpoints that can be returned on the request.
newListEndpoints ::
  ListEndpoints
newListEndpoints :: ListEndpoints
newListEndpoints =
  ListEndpoints' :: Maybe Text -> Maybe Natural -> ListEndpoints
ListEndpoints'
    { $sel:nextToken:ListEndpoints' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListEndpoints' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The next endpoint requested in the list.
listEndpoints_nextToken :: Lens.Lens' ListEndpoints (Prelude.Maybe Prelude.Text)
listEndpoints_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListEndpoints -> f ListEndpoints
listEndpoints_nextToken = (ListEndpoints -> Maybe Text)
-> (ListEndpoints -> Maybe Text -> ListEndpoints)
-> Lens ListEndpoints ListEndpoints (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEndpoints' :: ListEndpoints -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe Text
a -> ListEndpoints
s {$sel:nextToken:ListEndpoints' :: Maybe Text
nextToken = Maybe Text
a} :: ListEndpoints)

-- | The max number of endpoints that can be returned on the request.
listEndpoints_maxResults :: Lens.Lens' ListEndpoints (Prelude.Maybe Prelude.Natural)
listEndpoints_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListEndpoints -> f ListEndpoints
listEndpoints_maxResults = (ListEndpoints -> Maybe Natural)
-> (ListEndpoints -> Maybe Natural -> ListEndpoints)
-> Lens ListEndpoints ListEndpoints (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListEndpoints' :: ListEndpoints -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe Natural
a -> ListEndpoints
s {$sel:maxResults:ListEndpoints' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListEndpoints)

instance Core.AWSPager ListEndpoints where
  page :: ListEndpoints -> AWSResponse ListEndpoints -> Maybe ListEndpoints
page ListEndpoints
rq AWSResponse ListEndpoints
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListEndpoints
ListEndpointsResponse
rs
            ListEndpointsResponse
-> Getting (First Text) ListEndpointsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEndpointsResponse
-> Const (First Text) ListEndpointsResponse
Lens' ListEndpointsResponse (Maybe Text)
listEndpointsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListEndpointsResponse
 -> Const (First Text) ListEndpointsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEndpointsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListEndpoints
forall a. Maybe a
Prelude.Nothing
    | Maybe [Endpoint] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListEndpoints
ListEndpointsResponse
rs
            ListEndpointsResponse
-> Getting (First [Endpoint]) ListEndpointsResponse [Endpoint]
-> Maybe [Endpoint]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Endpoint] -> Const (First [Endpoint]) (Maybe [Endpoint]))
-> ListEndpointsResponse
-> Const (First [Endpoint]) ListEndpointsResponse
Lens' ListEndpointsResponse (Maybe [Endpoint])
listEndpointsResponse_endpoints ((Maybe [Endpoint] -> Const (First [Endpoint]) (Maybe [Endpoint]))
 -> ListEndpointsResponse
 -> Const (First [Endpoint]) ListEndpointsResponse)
-> (([Endpoint] -> Const (First [Endpoint]) [Endpoint])
    -> Maybe [Endpoint] -> Const (First [Endpoint]) (Maybe [Endpoint]))
-> Getting (First [Endpoint]) ListEndpointsResponse [Endpoint]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Endpoint] -> Const (First [Endpoint]) [Endpoint])
-> Maybe [Endpoint] -> Const (First [Endpoint]) (Maybe [Endpoint])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListEndpoints
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListEndpoints -> Maybe ListEndpoints
forall a. a -> Maybe a
Prelude.Just (ListEndpoints -> Maybe ListEndpoints)
-> ListEndpoints -> Maybe ListEndpoints
forall a b. (a -> b) -> a -> b
Prelude.$
        ListEndpoints
rq
          ListEndpoints -> (ListEndpoints -> ListEndpoints) -> ListEndpoints
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListEndpoints -> Identity ListEndpoints
Lens ListEndpoints ListEndpoints (Maybe Text) (Maybe Text)
listEndpoints_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListEndpoints -> Identity ListEndpoints)
-> Maybe Text -> ListEndpoints -> ListEndpoints
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListEndpoints
ListEndpointsResponse
rs
          ListEndpointsResponse
-> Getting (First Text) ListEndpointsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEndpointsResponse
-> Const (First Text) ListEndpointsResponse
Lens' ListEndpointsResponse (Maybe Text)
listEndpointsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListEndpointsResponse
 -> Const (First Text) ListEndpointsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEndpointsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.NFData ListEndpoints

instance Core.ToHeaders ListEndpoints where
  toHeaders :: ListEndpoints -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListEndpoints -> 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.ToPath ListEndpoints where
  toPath :: ListEndpoints -> ByteString
toPath = ByteString -> ListEndpoints -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/S3Outposts/ListEndpoints"

instance Core.ToQuery ListEndpoints where
  toQuery :: ListEndpoints -> QueryString
toQuery ListEndpoints' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListEndpoints' :: ListEndpoints -> Maybe Natural
$sel:nextToken:ListEndpoints' :: ListEndpoints -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListEndpointsResponse' smart constructor.
data ListEndpointsResponse = ListEndpointsResponse'
  { -- | The next endpoint returned in the list.
    ListEndpointsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Returns an array of endpoints associated with AWS Outposts.
    ListEndpointsResponse -> Maybe [Endpoint]
endpoints :: Prelude.Maybe [Endpoint],
    -- | The response's http status code.
    ListEndpointsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListEndpointsResponse -> ListEndpointsResponse -> Bool
(ListEndpointsResponse -> ListEndpointsResponse -> Bool)
-> (ListEndpointsResponse -> ListEndpointsResponse -> Bool)
-> Eq ListEndpointsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEndpointsResponse -> ListEndpointsResponse -> Bool
$c/= :: ListEndpointsResponse -> ListEndpointsResponse -> Bool
== :: ListEndpointsResponse -> ListEndpointsResponse -> Bool
$c== :: ListEndpointsResponse -> ListEndpointsResponse -> Bool
Prelude.Eq, ReadPrec [ListEndpointsResponse]
ReadPrec ListEndpointsResponse
Int -> ReadS ListEndpointsResponse
ReadS [ListEndpointsResponse]
(Int -> ReadS ListEndpointsResponse)
-> ReadS [ListEndpointsResponse]
-> ReadPrec ListEndpointsResponse
-> ReadPrec [ListEndpointsResponse]
-> Read ListEndpointsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEndpointsResponse]
$creadListPrec :: ReadPrec [ListEndpointsResponse]
readPrec :: ReadPrec ListEndpointsResponse
$creadPrec :: ReadPrec ListEndpointsResponse
readList :: ReadS [ListEndpointsResponse]
$creadList :: ReadS [ListEndpointsResponse]
readsPrec :: Int -> ReadS ListEndpointsResponse
$creadsPrec :: Int -> ReadS ListEndpointsResponse
Prelude.Read, Int -> ListEndpointsResponse -> ShowS
[ListEndpointsResponse] -> ShowS
ListEndpointsResponse -> String
(Int -> ListEndpointsResponse -> ShowS)
-> (ListEndpointsResponse -> String)
-> ([ListEndpointsResponse] -> ShowS)
-> Show ListEndpointsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEndpointsResponse] -> ShowS
$cshowList :: [ListEndpointsResponse] -> ShowS
show :: ListEndpointsResponse -> String
$cshow :: ListEndpointsResponse -> String
showsPrec :: Int -> ListEndpointsResponse -> ShowS
$cshowsPrec :: Int -> ListEndpointsResponse -> ShowS
Prelude.Show, (forall x. ListEndpointsResponse -> Rep ListEndpointsResponse x)
-> (forall x. Rep ListEndpointsResponse x -> ListEndpointsResponse)
-> Generic ListEndpointsResponse
forall x. Rep ListEndpointsResponse x -> ListEndpointsResponse
forall x. ListEndpointsResponse -> Rep ListEndpointsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEndpointsResponse x -> ListEndpointsResponse
$cfrom :: forall x. ListEndpointsResponse -> Rep ListEndpointsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListEndpointsResponse' 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', 'listEndpointsResponse_nextToken' - The next endpoint returned in the list.
--
-- 'endpoints', 'listEndpointsResponse_endpoints' - Returns an array of endpoints associated with AWS Outposts.
--
-- 'httpStatus', 'listEndpointsResponse_httpStatus' - The response's http status code.
newListEndpointsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListEndpointsResponse
newListEndpointsResponse :: Int -> ListEndpointsResponse
newListEndpointsResponse Int
pHttpStatus_ =
  ListEndpointsResponse' :: Maybe Text -> Maybe [Endpoint] -> Int -> ListEndpointsResponse
ListEndpointsResponse'
    { $sel:nextToken:ListEndpointsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpoints:ListEndpointsResponse' :: Maybe [Endpoint]
endpoints = Maybe [Endpoint]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListEndpointsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The next endpoint returned in the list.
listEndpointsResponse_nextToken :: Lens.Lens' ListEndpointsResponse (Prelude.Maybe Prelude.Text)
listEndpointsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEndpointsResponse -> f ListEndpointsResponse
listEndpointsResponse_nextToken = (ListEndpointsResponse -> Maybe Text)
-> (ListEndpointsResponse -> Maybe Text -> ListEndpointsResponse)
-> Lens' ListEndpointsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEndpointsResponse' :: ListEndpointsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEndpointsResponse
s@ListEndpointsResponse' {} Maybe Text
a -> ListEndpointsResponse
s {$sel:nextToken:ListEndpointsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListEndpointsResponse)

-- | Returns an array of endpoints associated with AWS Outposts.
listEndpointsResponse_endpoints :: Lens.Lens' ListEndpointsResponse (Prelude.Maybe [Endpoint])
listEndpointsResponse_endpoints :: (Maybe [Endpoint] -> f (Maybe [Endpoint]))
-> ListEndpointsResponse -> f ListEndpointsResponse
listEndpointsResponse_endpoints = (ListEndpointsResponse -> Maybe [Endpoint])
-> (ListEndpointsResponse
    -> Maybe [Endpoint] -> ListEndpointsResponse)
-> Lens' ListEndpointsResponse (Maybe [Endpoint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointsResponse' {Maybe [Endpoint]
endpoints :: Maybe [Endpoint]
$sel:endpoints:ListEndpointsResponse' :: ListEndpointsResponse -> Maybe [Endpoint]
endpoints} -> Maybe [Endpoint]
endpoints) (\s :: ListEndpointsResponse
s@ListEndpointsResponse' {} Maybe [Endpoint]
a -> ListEndpointsResponse
s {$sel:endpoints:ListEndpointsResponse' :: Maybe [Endpoint]
endpoints = Maybe [Endpoint]
a} :: ListEndpointsResponse) ((Maybe [Endpoint] -> f (Maybe [Endpoint]))
 -> ListEndpointsResponse -> f ListEndpointsResponse)
-> ((Maybe [Endpoint] -> f (Maybe [Endpoint]))
    -> Maybe [Endpoint] -> f (Maybe [Endpoint]))
-> (Maybe [Endpoint] -> f (Maybe [Endpoint]))
-> ListEndpointsResponse
-> f ListEndpointsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Endpoint] [Endpoint] [Endpoint] [Endpoint]
-> Iso
     (Maybe [Endpoint])
     (Maybe [Endpoint])
     (Maybe [Endpoint])
     (Maybe [Endpoint])
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 [Endpoint] [Endpoint] [Endpoint] [Endpoint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListEndpointsResponse