{-# 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.Glue.GetDevEndpoints
-- 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)
--
-- Retrieves all the development endpoints in this AWS account.
--
-- When you create a development endpoint in a virtual private cloud (VPC),
-- Glue returns only a private IP address and the public IP address field
-- is not populated. When you create a non-VPC development endpoint, Glue
-- returns only a public IP address.
--
-- This operation returns paginated results.
module Amazonka.Glue.GetDevEndpoints
  ( -- * Creating a Request
    GetDevEndpoints (..),
    newGetDevEndpoints,

    -- * Request Lenses
    getDevEndpoints_nextToken,
    getDevEndpoints_maxResults,

    -- * Destructuring the Response
    GetDevEndpointsResponse (..),
    newGetDevEndpointsResponse,

    -- * Response Lenses
    getDevEndpointsResponse_nextToken,
    getDevEndpointsResponse_devEndpoints,
    getDevEndpointsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Glue.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:/ 'newGetDevEndpoints' smart constructor.
data GetDevEndpoints = GetDevEndpoints'
  { -- | A continuation token, if this is a continuation call.
    GetDevEndpoints -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum size of information to return.
    GetDevEndpoints -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (GetDevEndpoints -> GetDevEndpoints -> Bool
(GetDevEndpoints -> GetDevEndpoints -> Bool)
-> (GetDevEndpoints -> GetDevEndpoints -> Bool)
-> Eq GetDevEndpoints
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDevEndpoints -> GetDevEndpoints -> Bool
$c/= :: GetDevEndpoints -> GetDevEndpoints -> Bool
== :: GetDevEndpoints -> GetDevEndpoints -> Bool
$c== :: GetDevEndpoints -> GetDevEndpoints -> Bool
Prelude.Eq, ReadPrec [GetDevEndpoints]
ReadPrec GetDevEndpoints
Int -> ReadS GetDevEndpoints
ReadS [GetDevEndpoints]
(Int -> ReadS GetDevEndpoints)
-> ReadS [GetDevEndpoints]
-> ReadPrec GetDevEndpoints
-> ReadPrec [GetDevEndpoints]
-> Read GetDevEndpoints
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDevEndpoints]
$creadListPrec :: ReadPrec [GetDevEndpoints]
readPrec :: ReadPrec GetDevEndpoints
$creadPrec :: ReadPrec GetDevEndpoints
readList :: ReadS [GetDevEndpoints]
$creadList :: ReadS [GetDevEndpoints]
readsPrec :: Int -> ReadS GetDevEndpoints
$creadsPrec :: Int -> ReadS GetDevEndpoints
Prelude.Read, Int -> GetDevEndpoints -> ShowS
[GetDevEndpoints] -> ShowS
GetDevEndpoints -> String
(Int -> GetDevEndpoints -> ShowS)
-> (GetDevEndpoints -> String)
-> ([GetDevEndpoints] -> ShowS)
-> Show GetDevEndpoints
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDevEndpoints] -> ShowS
$cshowList :: [GetDevEndpoints] -> ShowS
show :: GetDevEndpoints -> String
$cshow :: GetDevEndpoints -> String
showsPrec :: Int -> GetDevEndpoints -> ShowS
$cshowsPrec :: Int -> GetDevEndpoints -> ShowS
Prelude.Show, (forall x. GetDevEndpoints -> Rep GetDevEndpoints x)
-> (forall x. Rep GetDevEndpoints x -> GetDevEndpoints)
-> Generic GetDevEndpoints
forall x. Rep GetDevEndpoints x -> GetDevEndpoints
forall x. GetDevEndpoints -> Rep GetDevEndpoints x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDevEndpoints x -> GetDevEndpoints
$cfrom :: forall x. GetDevEndpoints -> Rep GetDevEndpoints x
Prelude.Generic)

-- |
-- Create a value of 'GetDevEndpoints' 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', 'getDevEndpoints_nextToken' - A continuation token, if this is a continuation call.
--
-- 'maxResults', 'getDevEndpoints_maxResults' - The maximum size of information to return.
newGetDevEndpoints ::
  GetDevEndpoints
newGetDevEndpoints :: GetDevEndpoints
newGetDevEndpoints =
  GetDevEndpoints' :: Maybe Text -> Maybe Natural -> GetDevEndpoints
GetDevEndpoints'
    { $sel:nextToken:GetDevEndpoints' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetDevEndpoints' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | A continuation token, if this is a continuation call.
getDevEndpoints_nextToken :: Lens.Lens' GetDevEndpoints (Prelude.Maybe Prelude.Text)
getDevEndpoints_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetDevEndpoints -> f GetDevEndpoints
getDevEndpoints_nextToken = (GetDevEndpoints -> Maybe Text)
-> (GetDevEndpoints -> Maybe Text -> GetDevEndpoints)
-> Lens GetDevEndpoints GetDevEndpoints (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevEndpoints' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetDevEndpoints' :: GetDevEndpoints -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetDevEndpoints
s@GetDevEndpoints' {} Maybe Text
a -> GetDevEndpoints
s {$sel:nextToken:GetDevEndpoints' :: Maybe Text
nextToken = Maybe Text
a} :: GetDevEndpoints)

-- | The maximum size of information to return.
getDevEndpoints_maxResults :: Lens.Lens' GetDevEndpoints (Prelude.Maybe Prelude.Natural)
getDevEndpoints_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetDevEndpoints -> f GetDevEndpoints
getDevEndpoints_maxResults = (GetDevEndpoints -> Maybe Natural)
-> (GetDevEndpoints -> Maybe Natural -> GetDevEndpoints)
-> Lens
     GetDevEndpoints GetDevEndpoints (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevEndpoints' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetDevEndpoints' :: GetDevEndpoints -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetDevEndpoints
s@GetDevEndpoints' {} Maybe Natural
a -> GetDevEndpoints
s {$sel:maxResults:GetDevEndpoints' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetDevEndpoints)

instance Core.AWSPager GetDevEndpoints where
  page :: GetDevEndpoints
-> AWSResponse GetDevEndpoints -> Maybe GetDevEndpoints
page GetDevEndpoints
rq AWSResponse GetDevEndpoints
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetDevEndpoints
GetDevEndpointsResponse
rs
            GetDevEndpointsResponse
-> Getting (First Text) GetDevEndpointsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetDevEndpointsResponse
-> Const (First Text) GetDevEndpointsResponse
Lens' GetDevEndpointsResponse (Maybe Text)
getDevEndpointsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetDevEndpointsResponse
 -> Const (First Text) GetDevEndpointsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetDevEndpointsResponse 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 GetDevEndpoints
forall a. Maybe a
Prelude.Nothing
    | Maybe [DevEndpoint] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetDevEndpoints
GetDevEndpointsResponse
rs
            GetDevEndpointsResponse
-> Getting
     (First [DevEndpoint]) GetDevEndpointsResponse [DevEndpoint]
-> Maybe [DevEndpoint]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DevEndpoint]
 -> Const (First [DevEndpoint]) (Maybe [DevEndpoint]))
-> GetDevEndpointsResponse
-> Const (First [DevEndpoint]) GetDevEndpointsResponse
Lens' GetDevEndpointsResponse (Maybe [DevEndpoint])
getDevEndpointsResponse_devEndpoints
              ((Maybe [DevEndpoint]
  -> Const (First [DevEndpoint]) (Maybe [DevEndpoint]))
 -> GetDevEndpointsResponse
 -> Const (First [DevEndpoint]) GetDevEndpointsResponse)
-> (([DevEndpoint] -> Const (First [DevEndpoint]) [DevEndpoint])
    -> Maybe [DevEndpoint]
    -> Const (First [DevEndpoint]) (Maybe [DevEndpoint]))
-> Getting
     (First [DevEndpoint]) GetDevEndpointsResponse [DevEndpoint]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DevEndpoint] -> Const (First [DevEndpoint]) [DevEndpoint])
-> Maybe [DevEndpoint]
-> Const (First [DevEndpoint]) (Maybe [DevEndpoint])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe GetDevEndpoints
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      GetDevEndpoints -> Maybe GetDevEndpoints
forall a. a -> Maybe a
Prelude.Just (GetDevEndpoints -> Maybe GetDevEndpoints)
-> GetDevEndpoints -> Maybe GetDevEndpoints
forall a b. (a -> b) -> a -> b
Prelude.$
        GetDevEndpoints
rq
          GetDevEndpoints
-> (GetDevEndpoints -> GetDevEndpoints) -> GetDevEndpoints
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetDevEndpoints -> Identity GetDevEndpoints
Lens GetDevEndpoints GetDevEndpoints (Maybe Text) (Maybe Text)
getDevEndpoints_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> GetDevEndpoints -> Identity GetDevEndpoints)
-> Maybe Text -> GetDevEndpoints -> GetDevEndpoints
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetDevEndpoints
GetDevEndpointsResponse
rs
          GetDevEndpointsResponse
-> Getting (First Text) GetDevEndpointsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetDevEndpointsResponse
-> Const (First Text) GetDevEndpointsResponse
Lens' GetDevEndpointsResponse (Maybe Text)
getDevEndpointsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetDevEndpointsResponse
 -> Const (First Text) GetDevEndpointsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetDevEndpointsResponse 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 GetDevEndpoints where
  type
    AWSResponse GetDevEndpoints =
      GetDevEndpointsResponse
  request :: GetDevEndpoints -> Request GetDevEndpoints
request = Service -> GetDevEndpoints -> Request GetDevEndpoints
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDevEndpoints
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDevEndpoints)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDevEndpoints))
-> Logger
-> Service
-> Proxy GetDevEndpoints
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDevEndpoints)))
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 [DevEndpoint] -> Int -> GetDevEndpointsResponse
GetDevEndpointsResponse'
            (Maybe Text
 -> Maybe [DevEndpoint] -> Int -> GetDevEndpointsResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [DevEndpoint] -> Int -> GetDevEndpointsResponse)
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 [DevEndpoint] -> Int -> GetDevEndpointsResponse)
-> Either String (Maybe [DevEndpoint])
-> Either String (Int -> GetDevEndpointsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [DevEndpoint]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DevEndpoints" Either String (Maybe (Maybe [DevEndpoint]))
-> Maybe [DevEndpoint] -> Either String (Maybe [DevEndpoint])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DevEndpoint]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetDevEndpointsResponse)
-> Either String Int -> Either String GetDevEndpointsResponse
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 GetDevEndpoints

instance Prelude.NFData GetDevEndpoints

instance Core.ToHeaders GetDevEndpoints where
  toHeaders :: GetDevEndpoints -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetDevEndpoints -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"AWSGlue.GetDevEndpoints" :: Prelude.ByteString),
            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 GetDevEndpoints where
  toJSON :: GetDevEndpoints -> Value
toJSON GetDevEndpoints' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:GetDevEndpoints' :: GetDevEndpoints -> Maybe Natural
$sel:nextToken:GetDevEndpoints' :: GetDevEndpoints -> 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
          ]
      )

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

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

-- | /See:/ 'newGetDevEndpointsResponse' smart constructor.
data GetDevEndpointsResponse = GetDevEndpointsResponse'
  { -- | A continuation token, if not all @DevEndpoint@ definitions have yet been
    -- returned.
    GetDevEndpointsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of @DevEndpoint@ definitions.
    GetDevEndpointsResponse -> Maybe [DevEndpoint]
devEndpoints :: Prelude.Maybe [DevEndpoint],
    -- | The response's http status code.
    GetDevEndpointsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDevEndpointsResponse -> GetDevEndpointsResponse -> Bool
(GetDevEndpointsResponse -> GetDevEndpointsResponse -> Bool)
-> (GetDevEndpointsResponse -> GetDevEndpointsResponse -> Bool)
-> Eq GetDevEndpointsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDevEndpointsResponse -> GetDevEndpointsResponse -> Bool
$c/= :: GetDevEndpointsResponse -> GetDevEndpointsResponse -> Bool
== :: GetDevEndpointsResponse -> GetDevEndpointsResponse -> Bool
$c== :: GetDevEndpointsResponse -> GetDevEndpointsResponse -> Bool
Prelude.Eq, ReadPrec [GetDevEndpointsResponse]
ReadPrec GetDevEndpointsResponse
Int -> ReadS GetDevEndpointsResponse
ReadS [GetDevEndpointsResponse]
(Int -> ReadS GetDevEndpointsResponse)
-> ReadS [GetDevEndpointsResponse]
-> ReadPrec GetDevEndpointsResponse
-> ReadPrec [GetDevEndpointsResponse]
-> Read GetDevEndpointsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDevEndpointsResponse]
$creadListPrec :: ReadPrec [GetDevEndpointsResponse]
readPrec :: ReadPrec GetDevEndpointsResponse
$creadPrec :: ReadPrec GetDevEndpointsResponse
readList :: ReadS [GetDevEndpointsResponse]
$creadList :: ReadS [GetDevEndpointsResponse]
readsPrec :: Int -> ReadS GetDevEndpointsResponse
$creadsPrec :: Int -> ReadS GetDevEndpointsResponse
Prelude.Read, Int -> GetDevEndpointsResponse -> ShowS
[GetDevEndpointsResponse] -> ShowS
GetDevEndpointsResponse -> String
(Int -> GetDevEndpointsResponse -> ShowS)
-> (GetDevEndpointsResponse -> String)
-> ([GetDevEndpointsResponse] -> ShowS)
-> Show GetDevEndpointsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDevEndpointsResponse] -> ShowS
$cshowList :: [GetDevEndpointsResponse] -> ShowS
show :: GetDevEndpointsResponse -> String
$cshow :: GetDevEndpointsResponse -> String
showsPrec :: Int -> GetDevEndpointsResponse -> ShowS
$cshowsPrec :: Int -> GetDevEndpointsResponse -> ShowS
Prelude.Show, (forall x.
 GetDevEndpointsResponse -> Rep GetDevEndpointsResponse x)
-> (forall x.
    Rep GetDevEndpointsResponse x -> GetDevEndpointsResponse)
-> Generic GetDevEndpointsResponse
forall x. Rep GetDevEndpointsResponse x -> GetDevEndpointsResponse
forall x. GetDevEndpointsResponse -> Rep GetDevEndpointsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDevEndpointsResponse x -> GetDevEndpointsResponse
$cfrom :: forall x. GetDevEndpointsResponse -> Rep GetDevEndpointsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDevEndpointsResponse' 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', 'getDevEndpointsResponse_nextToken' - A continuation token, if not all @DevEndpoint@ definitions have yet been
-- returned.
--
-- 'devEndpoints', 'getDevEndpointsResponse_devEndpoints' - A list of @DevEndpoint@ definitions.
--
-- 'httpStatus', 'getDevEndpointsResponse_httpStatus' - The response's http status code.
newGetDevEndpointsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDevEndpointsResponse
newGetDevEndpointsResponse :: Int -> GetDevEndpointsResponse
newGetDevEndpointsResponse Int
pHttpStatus_ =
  GetDevEndpointsResponse' :: Maybe Text -> Maybe [DevEndpoint] -> Int -> GetDevEndpointsResponse
GetDevEndpointsResponse'
    { $sel:nextToken:GetDevEndpointsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:devEndpoints:GetDevEndpointsResponse' :: Maybe [DevEndpoint]
devEndpoints = Maybe [DevEndpoint]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDevEndpointsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A continuation token, if not all @DevEndpoint@ definitions have yet been
-- returned.
getDevEndpointsResponse_nextToken :: Lens.Lens' GetDevEndpointsResponse (Prelude.Maybe Prelude.Text)
getDevEndpointsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetDevEndpointsResponse -> f GetDevEndpointsResponse
getDevEndpointsResponse_nextToken = (GetDevEndpointsResponse -> Maybe Text)
-> (GetDevEndpointsResponse
    -> Maybe Text -> GetDevEndpointsResponse)
-> Lens' GetDevEndpointsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevEndpointsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetDevEndpointsResponse' :: GetDevEndpointsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetDevEndpointsResponse
s@GetDevEndpointsResponse' {} Maybe Text
a -> GetDevEndpointsResponse
s {$sel:nextToken:GetDevEndpointsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetDevEndpointsResponse)

-- | A list of @DevEndpoint@ definitions.
getDevEndpointsResponse_devEndpoints :: Lens.Lens' GetDevEndpointsResponse (Prelude.Maybe [DevEndpoint])
getDevEndpointsResponse_devEndpoints :: (Maybe [DevEndpoint] -> f (Maybe [DevEndpoint]))
-> GetDevEndpointsResponse -> f GetDevEndpointsResponse
getDevEndpointsResponse_devEndpoints = (GetDevEndpointsResponse -> Maybe [DevEndpoint])
-> (GetDevEndpointsResponse
    -> Maybe [DevEndpoint] -> GetDevEndpointsResponse)
-> Lens' GetDevEndpointsResponse (Maybe [DevEndpoint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevEndpointsResponse' {Maybe [DevEndpoint]
devEndpoints :: Maybe [DevEndpoint]
$sel:devEndpoints:GetDevEndpointsResponse' :: GetDevEndpointsResponse -> Maybe [DevEndpoint]
devEndpoints} -> Maybe [DevEndpoint]
devEndpoints) (\s :: GetDevEndpointsResponse
s@GetDevEndpointsResponse' {} Maybe [DevEndpoint]
a -> GetDevEndpointsResponse
s {$sel:devEndpoints:GetDevEndpointsResponse' :: Maybe [DevEndpoint]
devEndpoints = Maybe [DevEndpoint]
a} :: GetDevEndpointsResponse) ((Maybe [DevEndpoint] -> f (Maybe [DevEndpoint]))
 -> GetDevEndpointsResponse -> f GetDevEndpointsResponse)
-> ((Maybe [DevEndpoint] -> f (Maybe [DevEndpoint]))
    -> Maybe [DevEndpoint] -> f (Maybe [DevEndpoint]))
-> (Maybe [DevEndpoint] -> f (Maybe [DevEndpoint]))
-> GetDevEndpointsResponse
-> f GetDevEndpointsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [DevEndpoint] [DevEndpoint] [DevEndpoint] [DevEndpoint]
-> Iso
     (Maybe [DevEndpoint])
     (Maybe [DevEndpoint])
     (Maybe [DevEndpoint])
     (Maybe [DevEndpoint])
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 [DevEndpoint] [DevEndpoint] [DevEndpoint] [DevEndpoint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetDevEndpointsResponse