{-# 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.Kafka.ListNodes
-- 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 a list of the broker nodes in the cluster.
--
-- This operation returns paginated results.
module Amazonka.Kafka.ListNodes
  ( -- * Creating a Request
    ListNodes (..),
    newListNodes,

    -- * Request Lenses
    listNodes_nextToken,
    listNodes_maxResults,
    listNodes_clusterArn,

    -- * Destructuring the Response
    ListNodesResponse (..),
    newListNodesResponse,

    -- * Response Lenses
    listNodesResponse_nodeInfoList,
    listNodesResponse_nextToken,
    listNodesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Kafka.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:/ 'newListNodes' smart constructor.
data ListNodes = ListNodes'
  { -- | The paginated results marker. When the result of the operation is
    -- truncated, the call returns NextToken in the response. To get the next
    -- batch, provide this token in your next request.
    ListNodes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in the response. If there are
    -- more results, the response includes a NextToken parameter.
    ListNodes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name (ARN) that uniquely identifies the cluster.
    ListNodes -> Text
clusterArn :: Prelude.Text
  }
  deriving (ListNodes -> ListNodes -> Bool
(ListNodes -> ListNodes -> Bool)
-> (ListNodes -> ListNodes -> Bool) -> Eq ListNodes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListNodes -> ListNodes -> Bool
$c/= :: ListNodes -> ListNodes -> Bool
== :: ListNodes -> ListNodes -> Bool
$c== :: ListNodes -> ListNodes -> Bool
Prelude.Eq, ReadPrec [ListNodes]
ReadPrec ListNodes
Int -> ReadS ListNodes
ReadS [ListNodes]
(Int -> ReadS ListNodes)
-> ReadS [ListNodes]
-> ReadPrec ListNodes
-> ReadPrec [ListNodes]
-> Read ListNodes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListNodes]
$creadListPrec :: ReadPrec [ListNodes]
readPrec :: ReadPrec ListNodes
$creadPrec :: ReadPrec ListNodes
readList :: ReadS [ListNodes]
$creadList :: ReadS [ListNodes]
readsPrec :: Int -> ReadS ListNodes
$creadsPrec :: Int -> ReadS ListNodes
Prelude.Read, Int -> ListNodes -> ShowS
[ListNodes] -> ShowS
ListNodes -> String
(Int -> ListNodes -> ShowS)
-> (ListNodes -> String)
-> ([ListNodes] -> ShowS)
-> Show ListNodes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListNodes] -> ShowS
$cshowList :: [ListNodes] -> ShowS
show :: ListNodes -> String
$cshow :: ListNodes -> String
showsPrec :: Int -> ListNodes -> ShowS
$cshowsPrec :: Int -> ListNodes -> ShowS
Prelude.Show, (forall x. ListNodes -> Rep ListNodes x)
-> (forall x. Rep ListNodes x -> ListNodes) -> Generic ListNodes
forall x. Rep ListNodes x -> ListNodes
forall x. ListNodes -> Rep ListNodes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListNodes x -> ListNodes
$cfrom :: forall x. ListNodes -> Rep ListNodes x
Prelude.Generic)

-- |
-- Create a value of 'ListNodes' 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', 'listNodes_nextToken' - The paginated results marker. When the result of the operation is
-- truncated, the call returns NextToken in the response. To get the next
-- batch, provide this token in your next request.
--
-- 'maxResults', 'listNodes_maxResults' - The maximum number of results to return in the response. If there are
-- more results, the response includes a NextToken parameter.
--
-- 'clusterArn', 'listNodes_clusterArn' - The Amazon Resource Name (ARN) that uniquely identifies the cluster.
newListNodes ::
  -- | 'clusterArn'
  Prelude.Text ->
  ListNodes
newListNodes :: Text -> ListNodes
newListNodes Text
pClusterArn_ =
  ListNodes' :: Maybe Text -> Maybe Natural -> Text -> ListNodes
ListNodes'
    { $sel:nextToken:ListNodes' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListNodes' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterArn:ListNodes' :: Text
clusterArn = Text
pClusterArn_
    }

-- | The paginated results marker. When the result of the operation is
-- truncated, the call returns NextToken in the response. To get the next
-- batch, provide this token in your next request.
listNodes_nextToken :: Lens.Lens' ListNodes (Prelude.Maybe Prelude.Text)
listNodes_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListNodes -> f ListNodes
listNodes_nextToken = (ListNodes -> Maybe Text)
-> (ListNodes -> Maybe Text -> ListNodes)
-> Lens ListNodes ListNodes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNodes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListNodes' :: ListNodes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListNodes
s@ListNodes' {} Maybe Text
a -> ListNodes
s {$sel:nextToken:ListNodes' :: Maybe Text
nextToken = Maybe Text
a} :: ListNodes)

-- | The maximum number of results to return in the response. If there are
-- more results, the response includes a NextToken parameter.
listNodes_maxResults :: Lens.Lens' ListNodes (Prelude.Maybe Prelude.Natural)
listNodes_maxResults :: (Maybe Natural -> f (Maybe Natural)) -> ListNodes -> f ListNodes
listNodes_maxResults = (ListNodes -> Maybe Natural)
-> (ListNodes -> Maybe Natural -> ListNodes)
-> Lens ListNodes ListNodes (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNodes' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListNodes' :: ListNodes -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListNodes
s@ListNodes' {} Maybe Natural
a -> ListNodes
s {$sel:maxResults:ListNodes' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListNodes)

-- | The Amazon Resource Name (ARN) that uniquely identifies the cluster.
listNodes_clusterArn :: Lens.Lens' ListNodes Prelude.Text
listNodes_clusterArn :: (Text -> f Text) -> ListNodes -> f ListNodes
listNodes_clusterArn = (ListNodes -> Text)
-> (ListNodes -> Text -> ListNodes)
-> Lens ListNodes ListNodes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNodes' {Text
clusterArn :: Text
$sel:clusterArn:ListNodes' :: ListNodes -> Text
clusterArn} -> Text
clusterArn) (\s :: ListNodes
s@ListNodes' {} Text
a -> ListNodes
s {$sel:clusterArn:ListNodes' :: Text
clusterArn = Text
a} :: ListNodes)

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

instance Prelude.NFData ListNodes

instance Core.ToHeaders ListNodes where
  toHeaders :: ListNodes -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListNodes -> 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 ListNodes where
  toPath :: ListNodes -> ByteString
toPath ListNodes' {Maybe Natural
Maybe Text
Text
clusterArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:clusterArn:ListNodes' :: ListNodes -> Text
$sel:maxResults:ListNodes' :: ListNodes -> Maybe Natural
$sel:nextToken:ListNodes' :: ListNodes -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v1/clusters/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
clusterArn, ByteString
"/nodes"]

instance Core.ToQuery ListNodes where
  toQuery :: ListNodes -> QueryString
toQuery ListNodes' {Maybe Natural
Maybe Text
Text
clusterArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:clusterArn:ListNodes' :: ListNodes -> Text
$sel:maxResults:ListNodes' :: ListNodes -> Maybe Natural
$sel:nextToken:ListNodes' :: ListNodes -> 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:/ 'newListNodesResponse' smart constructor.
data ListNodesResponse = ListNodesResponse'
  { -- | List containing a NodeInfo object.
    ListNodesResponse -> Maybe [NodeInfo]
nodeInfoList :: Prelude.Maybe [NodeInfo],
    -- | The paginated results marker. When the result of a ListNodes operation
    -- is truncated, the call returns NextToken in the response. To get another
    -- batch of nodes, provide this token in your next request.
    ListNodesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListNodesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListNodesResponse -> ListNodesResponse -> Bool
(ListNodesResponse -> ListNodesResponse -> Bool)
-> (ListNodesResponse -> ListNodesResponse -> Bool)
-> Eq ListNodesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListNodesResponse -> ListNodesResponse -> Bool
$c/= :: ListNodesResponse -> ListNodesResponse -> Bool
== :: ListNodesResponse -> ListNodesResponse -> Bool
$c== :: ListNodesResponse -> ListNodesResponse -> Bool
Prelude.Eq, ReadPrec [ListNodesResponse]
ReadPrec ListNodesResponse
Int -> ReadS ListNodesResponse
ReadS [ListNodesResponse]
(Int -> ReadS ListNodesResponse)
-> ReadS [ListNodesResponse]
-> ReadPrec ListNodesResponse
-> ReadPrec [ListNodesResponse]
-> Read ListNodesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListNodesResponse]
$creadListPrec :: ReadPrec [ListNodesResponse]
readPrec :: ReadPrec ListNodesResponse
$creadPrec :: ReadPrec ListNodesResponse
readList :: ReadS [ListNodesResponse]
$creadList :: ReadS [ListNodesResponse]
readsPrec :: Int -> ReadS ListNodesResponse
$creadsPrec :: Int -> ReadS ListNodesResponse
Prelude.Read, Int -> ListNodesResponse -> ShowS
[ListNodesResponse] -> ShowS
ListNodesResponse -> String
(Int -> ListNodesResponse -> ShowS)
-> (ListNodesResponse -> String)
-> ([ListNodesResponse] -> ShowS)
-> Show ListNodesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListNodesResponse] -> ShowS
$cshowList :: [ListNodesResponse] -> ShowS
show :: ListNodesResponse -> String
$cshow :: ListNodesResponse -> String
showsPrec :: Int -> ListNodesResponse -> ShowS
$cshowsPrec :: Int -> ListNodesResponse -> ShowS
Prelude.Show, (forall x. ListNodesResponse -> Rep ListNodesResponse x)
-> (forall x. Rep ListNodesResponse x -> ListNodesResponse)
-> Generic ListNodesResponse
forall x. Rep ListNodesResponse x -> ListNodesResponse
forall x. ListNodesResponse -> Rep ListNodesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListNodesResponse x -> ListNodesResponse
$cfrom :: forall x. ListNodesResponse -> Rep ListNodesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListNodesResponse' 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:
--
-- 'nodeInfoList', 'listNodesResponse_nodeInfoList' - List containing a NodeInfo object.
--
-- 'nextToken', 'listNodesResponse_nextToken' - The paginated results marker. When the result of a ListNodes operation
-- is truncated, the call returns NextToken in the response. To get another
-- batch of nodes, provide this token in your next request.
--
-- 'httpStatus', 'listNodesResponse_httpStatus' - The response's http status code.
newListNodesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListNodesResponse
newListNodesResponse :: Int -> ListNodesResponse
newListNodesResponse Int
pHttpStatus_ =
  ListNodesResponse' :: Maybe [NodeInfo] -> Maybe Text -> Int -> ListNodesResponse
ListNodesResponse'
    { $sel:nodeInfoList:ListNodesResponse' :: Maybe [NodeInfo]
nodeInfoList = Maybe [NodeInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListNodesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListNodesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | List containing a NodeInfo object.
listNodesResponse_nodeInfoList :: Lens.Lens' ListNodesResponse (Prelude.Maybe [NodeInfo])
listNodesResponse_nodeInfoList :: (Maybe [NodeInfo] -> f (Maybe [NodeInfo]))
-> ListNodesResponse -> f ListNodesResponse
listNodesResponse_nodeInfoList = (ListNodesResponse -> Maybe [NodeInfo])
-> (ListNodesResponse -> Maybe [NodeInfo] -> ListNodesResponse)
-> Lens' ListNodesResponse (Maybe [NodeInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNodesResponse' {Maybe [NodeInfo]
nodeInfoList :: Maybe [NodeInfo]
$sel:nodeInfoList:ListNodesResponse' :: ListNodesResponse -> Maybe [NodeInfo]
nodeInfoList} -> Maybe [NodeInfo]
nodeInfoList) (\s :: ListNodesResponse
s@ListNodesResponse' {} Maybe [NodeInfo]
a -> ListNodesResponse
s {$sel:nodeInfoList:ListNodesResponse' :: Maybe [NodeInfo]
nodeInfoList = Maybe [NodeInfo]
a} :: ListNodesResponse) ((Maybe [NodeInfo] -> f (Maybe [NodeInfo]))
 -> ListNodesResponse -> f ListNodesResponse)
-> ((Maybe [NodeInfo] -> f (Maybe [NodeInfo]))
    -> Maybe [NodeInfo] -> f (Maybe [NodeInfo]))
-> (Maybe [NodeInfo] -> f (Maybe [NodeInfo]))
-> ListNodesResponse
-> f ListNodesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [NodeInfo] [NodeInfo] [NodeInfo] [NodeInfo]
-> Iso
     (Maybe [NodeInfo])
     (Maybe [NodeInfo])
     (Maybe [NodeInfo])
     (Maybe [NodeInfo])
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 [NodeInfo] [NodeInfo] [NodeInfo] [NodeInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The paginated results marker. When the result of a ListNodes operation
-- is truncated, the call returns NextToken in the response. To get another
-- batch of nodes, provide this token in your next request.
listNodesResponse_nextToken :: Lens.Lens' ListNodesResponse (Prelude.Maybe Prelude.Text)
listNodesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListNodesResponse -> f ListNodesResponse
listNodesResponse_nextToken = (ListNodesResponse -> Maybe Text)
-> (ListNodesResponse -> Maybe Text -> ListNodesResponse)
-> Lens' ListNodesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNodesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListNodesResponse' :: ListNodesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListNodesResponse
s@ListNodesResponse' {} Maybe Text
a -> ListNodesResponse
s {$sel:nextToken:ListNodesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListNodesResponse)

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

instance Prelude.NFData ListNodesResponse