{-# 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.EFS.DescribeAccessPoints
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the description of a specific Amazon EFS access point if the
-- @AccessPointId@ is provided. If you provide an EFS @FileSystemId@, it
-- returns descriptions of all access points for that file system. You can
-- provide either an @AccessPointId@ or a @FileSystemId@ in the request,
-- but not both.
--
-- This operation requires permissions for the
-- @elasticfilesystem:DescribeAccessPoints@ action.
module Amazonka.EFS.DescribeAccessPoints
  ( -- * Creating a Request
    DescribeAccessPoints (..),
    newDescribeAccessPoints,

    -- * Request Lenses
    describeAccessPoints_accessPointId,
    describeAccessPoints_fileSystemId,
    describeAccessPoints_nextToken,
    describeAccessPoints_maxResults,

    -- * Destructuring the Response
    DescribeAccessPointsResponse (..),
    newDescribeAccessPointsResponse,

    -- * Response Lenses
    describeAccessPointsResponse_accessPoints,
    describeAccessPointsResponse_nextToken,
    describeAccessPointsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeAccessPoints' smart constructor.
data DescribeAccessPoints = DescribeAccessPoints'
  { -- | (Optional) Specifies an EFS access point to describe in the response;
    -- mutually exclusive with @FileSystemId@.
    DescribeAccessPoints -> Maybe Text
accessPointId :: Prelude.Maybe Prelude.Text,
    -- | (Optional) If you provide a @FileSystemId@, EFS returns all access
    -- points for that file system; mutually exclusive with @AccessPointId@.
    DescribeAccessPoints -> Maybe Text
fileSystemId :: Prelude.Maybe Prelude.Text,
    -- | @NextToken@ is present if the response is paginated. You can use
    -- @NextMarker@ in the subsequent request to fetch the next page of access
    -- point descriptions.
    DescribeAccessPoints -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | (Optional) When retrieving all access points for a file system, you can
    -- optionally specify the @MaxItems@ parameter to limit the number of
    -- objects returned in a response. The default value is 100.
    DescribeAccessPoints -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (DescribeAccessPoints -> DescribeAccessPoints -> Bool
(DescribeAccessPoints -> DescribeAccessPoints -> Bool)
-> (DescribeAccessPoints -> DescribeAccessPoints -> Bool)
-> Eq DescribeAccessPoints
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAccessPoints -> DescribeAccessPoints -> Bool
$c/= :: DescribeAccessPoints -> DescribeAccessPoints -> Bool
== :: DescribeAccessPoints -> DescribeAccessPoints -> Bool
$c== :: DescribeAccessPoints -> DescribeAccessPoints -> Bool
Prelude.Eq, ReadPrec [DescribeAccessPoints]
ReadPrec DescribeAccessPoints
Int -> ReadS DescribeAccessPoints
ReadS [DescribeAccessPoints]
(Int -> ReadS DescribeAccessPoints)
-> ReadS [DescribeAccessPoints]
-> ReadPrec DescribeAccessPoints
-> ReadPrec [DescribeAccessPoints]
-> Read DescribeAccessPoints
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAccessPoints]
$creadListPrec :: ReadPrec [DescribeAccessPoints]
readPrec :: ReadPrec DescribeAccessPoints
$creadPrec :: ReadPrec DescribeAccessPoints
readList :: ReadS [DescribeAccessPoints]
$creadList :: ReadS [DescribeAccessPoints]
readsPrec :: Int -> ReadS DescribeAccessPoints
$creadsPrec :: Int -> ReadS DescribeAccessPoints
Prelude.Read, Int -> DescribeAccessPoints -> ShowS
[DescribeAccessPoints] -> ShowS
DescribeAccessPoints -> String
(Int -> DescribeAccessPoints -> ShowS)
-> (DescribeAccessPoints -> String)
-> ([DescribeAccessPoints] -> ShowS)
-> Show DescribeAccessPoints
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAccessPoints] -> ShowS
$cshowList :: [DescribeAccessPoints] -> ShowS
show :: DescribeAccessPoints -> String
$cshow :: DescribeAccessPoints -> String
showsPrec :: Int -> DescribeAccessPoints -> ShowS
$cshowsPrec :: Int -> DescribeAccessPoints -> ShowS
Prelude.Show, (forall x. DescribeAccessPoints -> Rep DescribeAccessPoints x)
-> (forall x. Rep DescribeAccessPoints x -> DescribeAccessPoints)
-> Generic DescribeAccessPoints
forall x. Rep DescribeAccessPoints x -> DescribeAccessPoints
forall x. DescribeAccessPoints -> Rep DescribeAccessPoints x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeAccessPoints x -> DescribeAccessPoints
$cfrom :: forall x. DescribeAccessPoints -> Rep DescribeAccessPoints x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAccessPoints' 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:
--
-- 'accessPointId', 'describeAccessPoints_accessPointId' - (Optional) Specifies an EFS access point to describe in the response;
-- mutually exclusive with @FileSystemId@.
--
-- 'fileSystemId', 'describeAccessPoints_fileSystemId' - (Optional) If you provide a @FileSystemId@, EFS returns all access
-- points for that file system; mutually exclusive with @AccessPointId@.
--
-- 'nextToken', 'describeAccessPoints_nextToken' - @NextToken@ is present if the response is paginated. You can use
-- @NextMarker@ in the subsequent request to fetch the next page of access
-- point descriptions.
--
-- 'maxResults', 'describeAccessPoints_maxResults' - (Optional) When retrieving all access points for a file system, you can
-- optionally specify the @MaxItems@ parameter to limit the number of
-- objects returned in a response. The default value is 100.
newDescribeAccessPoints ::
  DescribeAccessPoints
newDescribeAccessPoints :: DescribeAccessPoints
newDescribeAccessPoints =
  DescribeAccessPoints' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> DescribeAccessPoints
DescribeAccessPoints'
    { $sel:accessPointId:DescribeAccessPoints' :: Maybe Text
accessPointId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fileSystemId:DescribeAccessPoints' :: Maybe Text
fileSystemId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeAccessPoints' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeAccessPoints' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | (Optional) Specifies an EFS access point to describe in the response;
-- mutually exclusive with @FileSystemId@.
describeAccessPoints_accessPointId :: Lens.Lens' DescribeAccessPoints (Prelude.Maybe Prelude.Text)
describeAccessPoints_accessPointId :: (Maybe Text -> f (Maybe Text))
-> DescribeAccessPoints -> f DescribeAccessPoints
describeAccessPoints_accessPointId = (DescribeAccessPoints -> Maybe Text)
-> (DescribeAccessPoints -> Maybe Text -> DescribeAccessPoints)
-> Lens
     DescribeAccessPoints DescribeAccessPoints (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccessPoints' {Maybe Text
accessPointId :: Maybe Text
$sel:accessPointId:DescribeAccessPoints' :: DescribeAccessPoints -> Maybe Text
accessPointId} -> Maybe Text
accessPointId) (\s :: DescribeAccessPoints
s@DescribeAccessPoints' {} Maybe Text
a -> DescribeAccessPoints
s {$sel:accessPointId:DescribeAccessPoints' :: Maybe Text
accessPointId = Maybe Text
a} :: DescribeAccessPoints)

-- | (Optional) If you provide a @FileSystemId@, EFS returns all access
-- points for that file system; mutually exclusive with @AccessPointId@.
describeAccessPoints_fileSystemId :: Lens.Lens' DescribeAccessPoints (Prelude.Maybe Prelude.Text)
describeAccessPoints_fileSystemId :: (Maybe Text -> f (Maybe Text))
-> DescribeAccessPoints -> f DescribeAccessPoints
describeAccessPoints_fileSystemId = (DescribeAccessPoints -> Maybe Text)
-> (DescribeAccessPoints -> Maybe Text -> DescribeAccessPoints)
-> Lens
     DescribeAccessPoints DescribeAccessPoints (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccessPoints' {Maybe Text
fileSystemId :: Maybe Text
$sel:fileSystemId:DescribeAccessPoints' :: DescribeAccessPoints -> Maybe Text
fileSystemId} -> Maybe Text
fileSystemId) (\s :: DescribeAccessPoints
s@DescribeAccessPoints' {} Maybe Text
a -> DescribeAccessPoints
s {$sel:fileSystemId:DescribeAccessPoints' :: Maybe Text
fileSystemId = Maybe Text
a} :: DescribeAccessPoints)

-- | @NextToken@ is present if the response is paginated. You can use
-- @NextMarker@ in the subsequent request to fetch the next page of access
-- point descriptions.
describeAccessPoints_nextToken :: Lens.Lens' DescribeAccessPoints (Prelude.Maybe Prelude.Text)
describeAccessPoints_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAccessPoints -> f DescribeAccessPoints
describeAccessPoints_nextToken = (DescribeAccessPoints -> Maybe Text)
-> (DescribeAccessPoints -> Maybe Text -> DescribeAccessPoints)
-> Lens
     DescribeAccessPoints DescribeAccessPoints (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccessPoints' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAccessPoints' :: DescribeAccessPoints -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAccessPoints
s@DescribeAccessPoints' {} Maybe Text
a -> DescribeAccessPoints
s {$sel:nextToken:DescribeAccessPoints' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAccessPoints)

-- | (Optional) When retrieving all access points for a file system, you can
-- optionally specify the @MaxItems@ parameter to limit the number of
-- objects returned in a response. The default value is 100.
describeAccessPoints_maxResults :: Lens.Lens' DescribeAccessPoints (Prelude.Maybe Prelude.Natural)
describeAccessPoints_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeAccessPoints -> f DescribeAccessPoints
describeAccessPoints_maxResults = (DescribeAccessPoints -> Maybe Natural)
-> (DescribeAccessPoints -> Maybe Natural -> DescribeAccessPoints)
-> Lens
     DescribeAccessPoints
     DescribeAccessPoints
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccessPoints' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeAccessPoints' :: DescribeAccessPoints -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeAccessPoints
s@DescribeAccessPoints' {} Maybe Natural
a -> DescribeAccessPoints
s {$sel:maxResults:DescribeAccessPoints' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeAccessPoints)

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

instance Prelude.NFData DescribeAccessPoints

instance Core.ToHeaders DescribeAccessPoints where
  toHeaders :: DescribeAccessPoints -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeAccessPoints -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DescribeAccessPoints where
  toPath :: DescribeAccessPoints -> ByteString
toPath = ByteString -> DescribeAccessPoints -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2015-02-01/access-points"

instance Core.ToQuery DescribeAccessPoints where
  toQuery :: DescribeAccessPoints -> QueryString
toQuery DescribeAccessPoints' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
fileSystemId :: Maybe Text
accessPointId :: Maybe Text
$sel:maxResults:DescribeAccessPoints' :: DescribeAccessPoints -> Maybe Natural
$sel:nextToken:DescribeAccessPoints' :: DescribeAccessPoints -> Maybe Text
$sel:fileSystemId:DescribeAccessPoints' :: DescribeAccessPoints -> Maybe Text
$sel:accessPointId:DescribeAccessPoints' :: DescribeAccessPoints -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"AccessPointId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
accessPointId,
        ByteString
"FileSystemId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
fileSystemId,
        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:/ 'newDescribeAccessPointsResponse' smart constructor.
data DescribeAccessPointsResponse = DescribeAccessPointsResponse'
  { -- | An array of access point descriptions.
    DescribeAccessPointsResponse -> Maybe [AccessPointDescription]
accessPoints :: Prelude.Maybe [AccessPointDescription],
    -- | Present if there are more access points than returned in the response.
    -- You can use the NextMarker in the subsequent request to fetch the
    -- additional descriptions.
    DescribeAccessPointsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeAccessPointsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeAccessPointsResponse
-> DescribeAccessPointsResponse -> Bool
(DescribeAccessPointsResponse
 -> DescribeAccessPointsResponse -> Bool)
-> (DescribeAccessPointsResponse
    -> DescribeAccessPointsResponse -> Bool)
-> Eq DescribeAccessPointsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAccessPointsResponse
-> DescribeAccessPointsResponse -> Bool
$c/= :: DescribeAccessPointsResponse
-> DescribeAccessPointsResponse -> Bool
== :: DescribeAccessPointsResponse
-> DescribeAccessPointsResponse -> Bool
$c== :: DescribeAccessPointsResponse
-> DescribeAccessPointsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAccessPointsResponse]
ReadPrec DescribeAccessPointsResponse
Int -> ReadS DescribeAccessPointsResponse
ReadS [DescribeAccessPointsResponse]
(Int -> ReadS DescribeAccessPointsResponse)
-> ReadS [DescribeAccessPointsResponse]
-> ReadPrec DescribeAccessPointsResponse
-> ReadPrec [DescribeAccessPointsResponse]
-> Read DescribeAccessPointsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAccessPointsResponse]
$creadListPrec :: ReadPrec [DescribeAccessPointsResponse]
readPrec :: ReadPrec DescribeAccessPointsResponse
$creadPrec :: ReadPrec DescribeAccessPointsResponse
readList :: ReadS [DescribeAccessPointsResponse]
$creadList :: ReadS [DescribeAccessPointsResponse]
readsPrec :: Int -> ReadS DescribeAccessPointsResponse
$creadsPrec :: Int -> ReadS DescribeAccessPointsResponse
Prelude.Read, Int -> DescribeAccessPointsResponse -> ShowS
[DescribeAccessPointsResponse] -> ShowS
DescribeAccessPointsResponse -> String
(Int -> DescribeAccessPointsResponse -> ShowS)
-> (DescribeAccessPointsResponse -> String)
-> ([DescribeAccessPointsResponse] -> ShowS)
-> Show DescribeAccessPointsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAccessPointsResponse] -> ShowS
$cshowList :: [DescribeAccessPointsResponse] -> ShowS
show :: DescribeAccessPointsResponse -> String
$cshow :: DescribeAccessPointsResponse -> String
showsPrec :: Int -> DescribeAccessPointsResponse -> ShowS
$cshowsPrec :: Int -> DescribeAccessPointsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeAccessPointsResponse -> Rep DescribeAccessPointsResponse x)
-> (forall x.
    Rep DescribeAccessPointsResponse x -> DescribeAccessPointsResponse)
-> Generic DescribeAccessPointsResponse
forall x.
Rep DescribeAccessPointsResponse x -> DescribeAccessPointsResponse
forall x.
DescribeAccessPointsResponse -> Rep DescribeAccessPointsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAccessPointsResponse x -> DescribeAccessPointsResponse
$cfrom :: forall x.
DescribeAccessPointsResponse -> Rep DescribeAccessPointsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAccessPointsResponse' 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:
--
-- 'accessPoints', 'describeAccessPointsResponse_accessPoints' - An array of access point descriptions.
--
-- 'nextToken', 'describeAccessPointsResponse_nextToken' - Present if there are more access points than returned in the response.
-- You can use the NextMarker in the subsequent request to fetch the
-- additional descriptions.
--
-- 'httpStatus', 'describeAccessPointsResponse_httpStatus' - The response's http status code.
newDescribeAccessPointsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeAccessPointsResponse
newDescribeAccessPointsResponse :: Int -> DescribeAccessPointsResponse
newDescribeAccessPointsResponse Int
pHttpStatus_ =
  DescribeAccessPointsResponse' :: Maybe [AccessPointDescription]
-> Maybe Text -> Int -> DescribeAccessPointsResponse
DescribeAccessPointsResponse'
    { $sel:accessPoints:DescribeAccessPointsResponse' :: Maybe [AccessPointDescription]
accessPoints =
        Maybe [AccessPointDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeAccessPointsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeAccessPointsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of access point descriptions.
describeAccessPointsResponse_accessPoints :: Lens.Lens' DescribeAccessPointsResponse (Prelude.Maybe [AccessPointDescription])
describeAccessPointsResponse_accessPoints :: (Maybe [AccessPointDescription]
 -> f (Maybe [AccessPointDescription]))
-> DescribeAccessPointsResponse -> f DescribeAccessPointsResponse
describeAccessPointsResponse_accessPoints = (DescribeAccessPointsResponse -> Maybe [AccessPointDescription])
-> (DescribeAccessPointsResponse
    -> Maybe [AccessPointDescription] -> DescribeAccessPointsResponse)
-> Lens
     DescribeAccessPointsResponse
     DescribeAccessPointsResponse
     (Maybe [AccessPointDescription])
     (Maybe [AccessPointDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccessPointsResponse' {Maybe [AccessPointDescription]
accessPoints :: Maybe [AccessPointDescription]
$sel:accessPoints:DescribeAccessPointsResponse' :: DescribeAccessPointsResponse -> Maybe [AccessPointDescription]
accessPoints} -> Maybe [AccessPointDescription]
accessPoints) (\s :: DescribeAccessPointsResponse
s@DescribeAccessPointsResponse' {} Maybe [AccessPointDescription]
a -> DescribeAccessPointsResponse
s {$sel:accessPoints:DescribeAccessPointsResponse' :: Maybe [AccessPointDescription]
accessPoints = Maybe [AccessPointDescription]
a} :: DescribeAccessPointsResponse) ((Maybe [AccessPointDescription]
  -> f (Maybe [AccessPointDescription]))
 -> DescribeAccessPointsResponse -> f DescribeAccessPointsResponse)
-> ((Maybe [AccessPointDescription]
     -> f (Maybe [AccessPointDescription]))
    -> Maybe [AccessPointDescription]
    -> f (Maybe [AccessPointDescription]))
-> (Maybe [AccessPointDescription]
    -> f (Maybe [AccessPointDescription]))
-> DescribeAccessPointsResponse
-> f DescribeAccessPointsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AccessPointDescription]
  [AccessPointDescription]
  [AccessPointDescription]
  [AccessPointDescription]
-> Iso
     (Maybe [AccessPointDescription])
     (Maybe [AccessPointDescription])
     (Maybe [AccessPointDescription])
     (Maybe [AccessPointDescription])
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
  [AccessPointDescription]
  [AccessPointDescription]
  [AccessPointDescription]
  [AccessPointDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Present if there are more access points than returned in the response.
-- You can use the NextMarker in the subsequent request to fetch the
-- additional descriptions.
describeAccessPointsResponse_nextToken :: Lens.Lens' DescribeAccessPointsResponse (Prelude.Maybe Prelude.Text)
describeAccessPointsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAccessPointsResponse -> f DescribeAccessPointsResponse
describeAccessPointsResponse_nextToken = (DescribeAccessPointsResponse -> Maybe Text)
-> (DescribeAccessPointsResponse
    -> Maybe Text -> DescribeAccessPointsResponse)
-> Lens
     DescribeAccessPointsResponse
     DescribeAccessPointsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccessPointsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAccessPointsResponse' :: DescribeAccessPointsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAccessPointsResponse
s@DescribeAccessPointsResponse' {} Maybe Text
a -> DescribeAccessPointsResponse
s {$sel:nextToken:DescribeAccessPointsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAccessPointsResponse)

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

instance Prelude.NFData DescribeAccessPointsResponse