{-# 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.Panorama.ListApplicationInstanceNodeInstances
-- 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 application node instances.
module Amazonka.Panorama.ListApplicationInstanceNodeInstances
  ( -- * Creating a Request
    ListApplicationInstanceNodeInstances (..),
    newListApplicationInstanceNodeInstances,

    -- * Request Lenses
    listApplicationInstanceNodeInstances_nextToken,
    listApplicationInstanceNodeInstances_maxResults,
    listApplicationInstanceNodeInstances_applicationInstanceId,

    -- * Destructuring the Response
    ListApplicationInstanceNodeInstancesResponse (..),
    newListApplicationInstanceNodeInstancesResponse,

    -- * Response Lenses
    listApplicationInstanceNodeInstancesResponse_nextToken,
    listApplicationInstanceNodeInstancesResponse_nodeInstances,
    listApplicationInstanceNodeInstancesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListApplicationInstanceNodeInstances' smart constructor.
data ListApplicationInstanceNodeInstances = ListApplicationInstanceNodeInstances'
  { -- | Specify the pagination token from a previous request to retrieve the
    -- next page of results.
    ListApplicationInstanceNodeInstances -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of node instances to return in one page of results.
    ListApplicationInstanceNodeInstances -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The node instances\' application instance ID.
    ListApplicationInstanceNodeInstances -> Text
applicationInstanceId :: Prelude.Text
  }
  deriving (ListApplicationInstanceNodeInstances
-> ListApplicationInstanceNodeInstances -> Bool
(ListApplicationInstanceNodeInstances
 -> ListApplicationInstanceNodeInstances -> Bool)
-> (ListApplicationInstanceNodeInstances
    -> ListApplicationInstanceNodeInstances -> Bool)
-> Eq ListApplicationInstanceNodeInstances
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplicationInstanceNodeInstances
-> ListApplicationInstanceNodeInstances -> Bool
$c/= :: ListApplicationInstanceNodeInstances
-> ListApplicationInstanceNodeInstances -> Bool
== :: ListApplicationInstanceNodeInstances
-> ListApplicationInstanceNodeInstances -> Bool
$c== :: ListApplicationInstanceNodeInstances
-> ListApplicationInstanceNodeInstances -> Bool
Prelude.Eq, ReadPrec [ListApplicationInstanceNodeInstances]
ReadPrec ListApplicationInstanceNodeInstances
Int -> ReadS ListApplicationInstanceNodeInstances
ReadS [ListApplicationInstanceNodeInstances]
(Int -> ReadS ListApplicationInstanceNodeInstances)
-> ReadS [ListApplicationInstanceNodeInstances]
-> ReadPrec ListApplicationInstanceNodeInstances
-> ReadPrec [ListApplicationInstanceNodeInstances]
-> Read ListApplicationInstanceNodeInstances
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplicationInstanceNodeInstances]
$creadListPrec :: ReadPrec [ListApplicationInstanceNodeInstances]
readPrec :: ReadPrec ListApplicationInstanceNodeInstances
$creadPrec :: ReadPrec ListApplicationInstanceNodeInstances
readList :: ReadS [ListApplicationInstanceNodeInstances]
$creadList :: ReadS [ListApplicationInstanceNodeInstances]
readsPrec :: Int -> ReadS ListApplicationInstanceNodeInstances
$creadsPrec :: Int -> ReadS ListApplicationInstanceNodeInstances
Prelude.Read, Int -> ListApplicationInstanceNodeInstances -> ShowS
[ListApplicationInstanceNodeInstances] -> ShowS
ListApplicationInstanceNodeInstances -> String
(Int -> ListApplicationInstanceNodeInstances -> ShowS)
-> (ListApplicationInstanceNodeInstances -> String)
-> ([ListApplicationInstanceNodeInstances] -> ShowS)
-> Show ListApplicationInstanceNodeInstances
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplicationInstanceNodeInstances] -> ShowS
$cshowList :: [ListApplicationInstanceNodeInstances] -> ShowS
show :: ListApplicationInstanceNodeInstances -> String
$cshow :: ListApplicationInstanceNodeInstances -> String
showsPrec :: Int -> ListApplicationInstanceNodeInstances -> ShowS
$cshowsPrec :: Int -> ListApplicationInstanceNodeInstances -> ShowS
Prelude.Show, (forall x.
 ListApplicationInstanceNodeInstances
 -> Rep ListApplicationInstanceNodeInstances x)
-> (forall x.
    Rep ListApplicationInstanceNodeInstances x
    -> ListApplicationInstanceNodeInstances)
-> Generic ListApplicationInstanceNodeInstances
forall x.
Rep ListApplicationInstanceNodeInstances x
-> ListApplicationInstanceNodeInstances
forall x.
ListApplicationInstanceNodeInstances
-> Rep ListApplicationInstanceNodeInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListApplicationInstanceNodeInstances x
-> ListApplicationInstanceNodeInstances
$cfrom :: forall x.
ListApplicationInstanceNodeInstances
-> Rep ListApplicationInstanceNodeInstances x
Prelude.Generic)

-- |
-- Create a value of 'ListApplicationInstanceNodeInstances' 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', 'listApplicationInstanceNodeInstances_nextToken' - Specify the pagination token from a previous request to retrieve the
-- next page of results.
--
-- 'maxResults', 'listApplicationInstanceNodeInstances_maxResults' - The maximum number of node instances to return in one page of results.
--
-- 'applicationInstanceId', 'listApplicationInstanceNodeInstances_applicationInstanceId' - The node instances\' application instance ID.
newListApplicationInstanceNodeInstances ::
  -- | 'applicationInstanceId'
  Prelude.Text ->
  ListApplicationInstanceNodeInstances
newListApplicationInstanceNodeInstances :: Text -> ListApplicationInstanceNodeInstances
newListApplicationInstanceNodeInstances
  Text
pApplicationInstanceId_ =
    ListApplicationInstanceNodeInstances' :: Maybe Text
-> Maybe Natural -> Text -> ListApplicationInstanceNodeInstances
ListApplicationInstanceNodeInstances'
      { $sel:nextToken:ListApplicationInstanceNodeInstances' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:ListApplicationInstanceNodeInstances' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:applicationInstanceId:ListApplicationInstanceNodeInstances' :: Text
applicationInstanceId =
          Text
pApplicationInstanceId_
      }

-- | Specify the pagination token from a previous request to retrieve the
-- next page of results.
listApplicationInstanceNodeInstances_nextToken :: Lens.Lens' ListApplicationInstanceNodeInstances (Prelude.Maybe Prelude.Text)
listApplicationInstanceNodeInstances_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListApplicationInstanceNodeInstances
-> f ListApplicationInstanceNodeInstances
listApplicationInstanceNodeInstances_nextToken = (ListApplicationInstanceNodeInstances -> Maybe Text)
-> (ListApplicationInstanceNodeInstances
    -> Maybe Text -> ListApplicationInstanceNodeInstances)
-> Lens
     ListApplicationInstanceNodeInstances
     ListApplicationInstanceNodeInstances
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationInstanceNodeInstances' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplicationInstanceNodeInstances' :: ListApplicationInstanceNodeInstances -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplicationInstanceNodeInstances
s@ListApplicationInstanceNodeInstances' {} Maybe Text
a -> ListApplicationInstanceNodeInstances
s {$sel:nextToken:ListApplicationInstanceNodeInstances' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplicationInstanceNodeInstances)

-- | The maximum number of node instances to return in one page of results.
listApplicationInstanceNodeInstances_maxResults :: Lens.Lens' ListApplicationInstanceNodeInstances (Prelude.Maybe Prelude.Natural)
listApplicationInstanceNodeInstances_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListApplicationInstanceNodeInstances
-> f ListApplicationInstanceNodeInstances
listApplicationInstanceNodeInstances_maxResults = (ListApplicationInstanceNodeInstances -> Maybe Natural)
-> (ListApplicationInstanceNodeInstances
    -> Maybe Natural -> ListApplicationInstanceNodeInstances)
-> Lens
     ListApplicationInstanceNodeInstances
     ListApplicationInstanceNodeInstances
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationInstanceNodeInstances' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListApplicationInstanceNodeInstances' :: ListApplicationInstanceNodeInstances -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListApplicationInstanceNodeInstances
s@ListApplicationInstanceNodeInstances' {} Maybe Natural
a -> ListApplicationInstanceNodeInstances
s {$sel:maxResults:ListApplicationInstanceNodeInstances' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListApplicationInstanceNodeInstances)

-- | The node instances\' application instance ID.
listApplicationInstanceNodeInstances_applicationInstanceId :: Lens.Lens' ListApplicationInstanceNodeInstances Prelude.Text
listApplicationInstanceNodeInstances_applicationInstanceId :: (Text -> f Text)
-> ListApplicationInstanceNodeInstances
-> f ListApplicationInstanceNodeInstances
listApplicationInstanceNodeInstances_applicationInstanceId = (ListApplicationInstanceNodeInstances -> Text)
-> (ListApplicationInstanceNodeInstances
    -> Text -> ListApplicationInstanceNodeInstances)
-> Lens
     ListApplicationInstanceNodeInstances
     ListApplicationInstanceNodeInstances
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationInstanceNodeInstances' {Text
applicationInstanceId :: Text
$sel:applicationInstanceId:ListApplicationInstanceNodeInstances' :: ListApplicationInstanceNodeInstances -> Text
applicationInstanceId} -> Text
applicationInstanceId) (\s :: ListApplicationInstanceNodeInstances
s@ListApplicationInstanceNodeInstances' {} Text
a -> ListApplicationInstanceNodeInstances
s {$sel:applicationInstanceId:ListApplicationInstanceNodeInstances' :: Text
applicationInstanceId = Text
a} :: ListApplicationInstanceNodeInstances)

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

instance
  Prelude.NFData
    ListApplicationInstanceNodeInstances

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

instance
  Core.ToQuery
    ListApplicationInstanceNodeInstances
  where
  toQuery :: ListApplicationInstanceNodeInstances -> QueryString
toQuery ListApplicationInstanceNodeInstances' {Maybe Natural
Maybe Text
Text
applicationInstanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:applicationInstanceId:ListApplicationInstanceNodeInstances' :: ListApplicationInstanceNodeInstances -> Text
$sel:maxResults:ListApplicationInstanceNodeInstances' :: ListApplicationInstanceNodeInstances -> Maybe Natural
$sel:nextToken:ListApplicationInstanceNodeInstances' :: ListApplicationInstanceNodeInstances -> 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:/ 'newListApplicationInstanceNodeInstancesResponse' smart constructor.
data ListApplicationInstanceNodeInstancesResponse = ListApplicationInstanceNodeInstancesResponse'
  { -- | A pagination token that\'s included if more results are available.
    ListApplicationInstanceNodeInstancesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of node instances.
    ListApplicationInstanceNodeInstancesResponse
-> Maybe [NodeInstance]
nodeInstances :: Prelude.Maybe [NodeInstance],
    -- | The response's http status code.
    ListApplicationInstanceNodeInstancesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListApplicationInstanceNodeInstancesResponse
-> ListApplicationInstanceNodeInstancesResponse -> Bool
(ListApplicationInstanceNodeInstancesResponse
 -> ListApplicationInstanceNodeInstancesResponse -> Bool)
-> (ListApplicationInstanceNodeInstancesResponse
    -> ListApplicationInstanceNodeInstancesResponse -> Bool)
-> Eq ListApplicationInstanceNodeInstancesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplicationInstanceNodeInstancesResponse
-> ListApplicationInstanceNodeInstancesResponse -> Bool
$c/= :: ListApplicationInstanceNodeInstancesResponse
-> ListApplicationInstanceNodeInstancesResponse -> Bool
== :: ListApplicationInstanceNodeInstancesResponse
-> ListApplicationInstanceNodeInstancesResponse -> Bool
$c== :: ListApplicationInstanceNodeInstancesResponse
-> ListApplicationInstanceNodeInstancesResponse -> Bool
Prelude.Eq, ReadPrec [ListApplicationInstanceNodeInstancesResponse]
ReadPrec ListApplicationInstanceNodeInstancesResponse
Int -> ReadS ListApplicationInstanceNodeInstancesResponse
ReadS [ListApplicationInstanceNodeInstancesResponse]
(Int -> ReadS ListApplicationInstanceNodeInstancesResponse)
-> ReadS [ListApplicationInstanceNodeInstancesResponse]
-> ReadPrec ListApplicationInstanceNodeInstancesResponse
-> ReadPrec [ListApplicationInstanceNodeInstancesResponse]
-> Read ListApplicationInstanceNodeInstancesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplicationInstanceNodeInstancesResponse]
$creadListPrec :: ReadPrec [ListApplicationInstanceNodeInstancesResponse]
readPrec :: ReadPrec ListApplicationInstanceNodeInstancesResponse
$creadPrec :: ReadPrec ListApplicationInstanceNodeInstancesResponse
readList :: ReadS [ListApplicationInstanceNodeInstancesResponse]
$creadList :: ReadS [ListApplicationInstanceNodeInstancesResponse]
readsPrec :: Int -> ReadS ListApplicationInstanceNodeInstancesResponse
$creadsPrec :: Int -> ReadS ListApplicationInstanceNodeInstancesResponse
Prelude.Read, Int -> ListApplicationInstanceNodeInstancesResponse -> ShowS
[ListApplicationInstanceNodeInstancesResponse] -> ShowS
ListApplicationInstanceNodeInstancesResponse -> String
(Int -> ListApplicationInstanceNodeInstancesResponse -> ShowS)
-> (ListApplicationInstanceNodeInstancesResponse -> String)
-> ([ListApplicationInstanceNodeInstancesResponse] -> ShowS)
-> Show ListApplicationInstanceNodeInstancesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplicationInstanceNodeInstancesResponse] -> ShowS
$cshowList :: [ListApplicationInstanceNodeInstancesResponse] -> ShowS
show :: ListApplicationInstanceNodeInstancesResponse -> String
$cshow :: ListApplicationInstanceNodeInstancesResponse -> String
showsPrec :: Int -> ListApplicationInstanceNodeInstancesResponse -> ShowS
$cshowsPrec :: Int -> ListApplicationInstanceNodeInstancesResponse -> ShowS
Prelude.Show, (forall x.
 ListApplicationInstanceNodeInstancesResponse
 -> Rep ListApplicationInstanceNodeInstancesResponse x)
-> (forall x.
    Rep ListApplicationInstanceNodeInstancesResponse x
    -> ListApplicationInstanceNodeInstancesResponse)
-> Generic ListApplicationInstanceNodeInstancesResponse
forall x.
Rep ListApplicationInstanceNodeInstancesResponse x
-> ListApplicationInstanceNodeInstancesResponse
forall x.
ListApplicationInstanceNodeInstancesResponse
-> Rep ListApplicationInstanceNodeInstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListApplicationInstanceNodeInstancesResponse x
-> ListApplicationInstanceNodeInstancesResponse
$cfrom :: forall x.
ListApplicationInstanceNodeInstancesResponse
-> Rep ListApplicationInstanceNodeInstancesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListApplicationInstanceNodeInstancesResponse' 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', 'listApplicationInstanceNodeInstancesResponse_nextToken' - A pagination token that\'s included if more results are available.
--
-- 'nodeInstances', 'listApplicationInstanceNodeInstancesResponse_nodeInstances' - A list of node instances.
--
-- 'httpStatus', 'listApplicationInstanceNodeInstancesResponse_httpStatus' - The response's http status code.
newListApplicationInstanceNodeInstancesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListApplicationInstanceNodeInstancesResponse
newListApplicationInstanceNodeInstancesResponse :: Int -> ListApplicationInstanceNodeInstancesResponse
newListApplicationInstanceNodeInstancesResponse
  Int
pHttpStatus_ =
    ListApplicationInstanceNodeInstancesResponse' :: Maybe Text
-> Maybe [NodeInstance]
-> Int
-> ListApplicationInstanceNodeInstancesResponse
ListApplicationInstanceNodeInstancesResponse'
      { $sel:nextToken:ListApplicationInstanceNodeInstancesResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:nodeInstances:ListApplicationInstanceNodeInstancesResponse' :: Maybe [NodeInstance]
nodeInstances =
          Maybe [NodeInstance]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListApplicationInstanceNodeInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | A pagination token that\'s included if more results are available.
listApplicationInstanceNodeInstancesResponse_nextToken :: Lens.Lens' ListApplicationInstanceNodeInstancesResponse (Prelude.Maybe Prelude.Text)
listApplicationInstanceNodeInstancesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListApplicationInstanceNodeInstancesResponse
-> f ListApplicationInstanceNodeInstancesResponse
listApplicationInstanceNodeInstancesResponse_nextToken = (ListApplicationInstanceNodeInstancesResponse -> Maybe Text)
-> (ListApplicationInstanceNodeInstancesResponse
    -> Maybe Text -> ListApplicationInstanceNodeInstancesResponse)
-> Lens
     ListApplicationInstanceNodeInstancesResponse
     ListApplicationInstanceNodeInstancesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationInstanceNodeInstancesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplicationInstanceNodeInstancesResponse' :: ListApplicationInstanceNodeInstancesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplicationInstanceNodeInstancesResponse
s@ListApplicationInstanceNodeInstancesResponse' {} Maybe Text
a -> ListApplicationInstanceNodeInstancesResponse
s {$sel:nextToken:ListApplicationInstanceNodeInstancesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplicationInstanceNodeInstancesResponse)

-- | A list of node instances.
listApplicationInstanceNodeInstancesResponse_nodeInstances :: Lens.Lens' ListApplicationInstanceNodeInstancesResponse (Prelude.Maybe [NodeInstance])
listApplicationInstanceNodeInstancesResponse_nodeInstances :: (Maybe [NodeInstance] -> f (Maybe [NodeInstance]))
-> ListApplicationInstanceNodeInstancesResponse
-> f ListApplicationInstanceNodeInstancesResponse
listApplicationInstanceNodeInstancesResponse_nodeInstances = (ListApplicationInstanceNodeInstancesResponse
 -> Maybe [NodeInstance])
-> (ListApplicationInstanceNodeInstancesResponse
    -> Maybe [NodeInstance]
    -> ListApplicationInstanceNodeInstancesResponse)
-> Lens
     ListApplicationInstanceNodeInstancesResponse
     ListApplicationInstanceNodeInstancesResponse
     (Maybe [NodeInstance])
     (Maybe [NodeInstance])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationInstanceNodeInstancesResponse' {Maybe [NodeInstance]
nodeInstances :: Maybe [NodeInstance]
$sel:nodeInstances:ListApplicationInstanceNodeInstancesResponse' :: ListApplicationInstanceNodeInstancesResponse
-> Maybe [NodeInstance]
nodeInstances} -> Maybe [NodeInstance]
nodeInstances) (\s :: ListApplicationInstanceNodeInstancesResponse
s@ListApplicationInstanceNodeInstancesResponse' {} Maybe [NodeInstance]
a -> ListApplicationInstanceNodeInstancesResponse
s {$sel:nodeInstances:ListApplicationInstanceNodeInstancesResponse' :: Maybe [NodeInstance]
nodeInstances = Maybe [NodeInstance]
a} :: ListApplicationInstanceNodeInstancesResponse) ((Maybe [NodeInstance] -> f (Maybe [NodeInstance]))
 -> ListApplicationInstanceNodeInstancesResponse
 -> f ListApplicationInstanceNodeInstancesResponse)
-> ((Maybe [NodeInstance] -> f (Maybe [NodeInstance]))
    -> Maybe [NodeInstance] -> f (Maybe [NodeInstance]))
-> (Maybe [NodeInstance] -> f (Maybe [NodeInstance]))
-> ListApplicationInstanceNodeInstancesResponse
-> f ListApplicationInstanceNodeInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [NodeInstance] [NodeInstance] [NodeInstance] [NodeInstance]
-> Iso
     (Maybe [NodeInstance])
     (Maybe [NodeInstance])
     (Maybe [NodeInstance])
     (Maybe [NodeInstance])
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 [NodeInstance] [NodeInstance] [NodeInstance] [NodeInstance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListApplicationInstanceNodeInstancesResponse