{-# 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.ManagedBlockChain.ListNetworks
-- 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 information about the networks in which the current AWS account
-- participates.
--
-- Applies to Hyperledger Fabric and Ethereum.
module Amazonka.ManagedBlockChain.ListNetworks
  ( -- * Creating a Request
    ListNetworks (..),
    newListNetworks,

    -- * Request Lenses
    listNetworks_status,
    listNetworks_framework,
    listNetworks_nextToken,
    listNetworks_name,
    listNetworks_maxResults,

    -- * Destructuring the Response
    ListNetworksResponse (..),
    newListNetworksResponse,

    -- * Response Lenses
    listNetworksResponse_networks,
    listNetworksResponse_nextToken,
    listNetworksResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListNetworks' smart constructor.
data ListNetworks = ListNetworks'
  { -- | An optional status specifier. If provided, only networks currently in
    -- this status are listed.
    --
    -- Applies only to Hyperledger Fabric.
    ListNetworks -> Maybe NetworkStatus
status :: Prelude.Maybe NetworkStatus,
    -- | An optional framework specifier. If provided, only networks of this
    -- framework type are listed.
    ListNetworks -> Maybe Framework
framework :: Prelude.Maybe Framework,
    -- | The pagination token that indicates the next set of results to retrieve.
    ListNetworks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the network.
    ListNetworks -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of networks to list.
    ListNetworks -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListNetworks -> ListNetworks -> Bool
(ListNetworks -> ListNetworks -> Bool)
-> (ListNetworks -> ListNetworks -> Bool) -> Eq ListNetworks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListNetworks -> ListNetworks -> Bool
$c/= :: ListNetworks -> ListNetworks -> Bool
== :: ListNetworks -> ListNetworks -> Bool
$c== :: ListNetworks -> ListNetworks -> Bool
Prelude.Eq, ReadPrec [ListNetworks]
ReadPrec ListNetworks
Int -> ReadS ListNetworks
ReadS [ListNetworks]
(Int -> ReadS ListNetworks)
-> ReadS [ListNetworks]
-> ReadPrec ListNetworks
-> ReadPrec [ListNetworks]
-> Read ListNetworks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListNetworks]
$creadListPrec :: ReadPrec [ListNetworks]
readPrec :: ReadPrec ListNetworks
$creadPrec :: ReadPrec ListNetworks
readList :: ReadS [ListNetworks]
$creadList :: ReadS [ListNetworks]
readsPrec :: Int -> ReadS ListNetworks
$creadsPrec :: Int -> ReadS ListNetworks
Prelude.Read, Int -> ListNetworks -> ShowS
[ListNetworks] -> ShowS
ListNetworks -> String
(Int -> ListNetworks -> ShowS)
-> (ListNetworks -> String)
-> ([ListNetworks] -> ShowS)
-> Show ListNetworks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListNetworks] -> ShowS
$cshowList :: [ListNetworks] -> ShowS
show :: ListNetworks -> String
$cshow :: ListNetworks -> String
showsPrec :: Int -> ListNetworks -> ShowS
$cshowsPrec :: Int -> ListNetworks -> ShowS
Prelude.Show, (forall x. ListNetworks -> Rep ListNetworks x)
-> (forall x. Rep ListNetworks x -> ListNetworks)
-> Generic ListNetworks
forall x. Rep ListNetworks x -> ListNetworks
forall x. ListNetworks -> Rep ListNetworks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListNetworks x -> ListNetworks
$cfrom :: forall x. ListNetworks -> Rep ListNetworks x
Prelude.Generic)

-- |
-- Create a value of 'ListNetworks' 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:
--
-- 'status', 'listNetworks_status' - An optional status specifier. If provided, only networks currently in
-- this status are listed.
--
-- Applies only to Hyperledger Fabric.
--
-- 'framework', 'listNetworks_framework' - An optional framework specifier. If provided, only networks of this
-- framework type are listed.
--
-- 'nextToken', 'listNetworks_nextToken' - The pagination token that indicates the next set of results to retrieve.
--
-- 'name', 'listNetworks_name' - The name of the network.
--
-- 'maxResults', 'listNetworks_maxResults' - The maximum number of networks to list.
newListNetworks ::
  ListNetworks
newListNetworks :: ListNetworks
newListNetworks =
  ListNetworks' :: Maybe NetworkStatus
-> Maybe Framework
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> ListNetworks
ListNetworks'
    { $sel:status:ListNetworks' :: Maybe NetworkStatus
status = Maybe NetworkStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:framework:ListNetworks' :: Maybe Framework
framework = Maybe Framework
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListNetworks' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ListNetworks' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListNetworks' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | An optional status specifier. If provided, only networks currently in
-- this status are listed.
--
-- Applies only to Hyperledger Fabric.
listNetworks_status :: Lens.Lens' ListNetworks (Prelude.Maybe NetworkStatus)
listNetworks_status :: (Maybe NetworkStatus -> f (Maybe NetworkStatus))
-> ListNetworks -> f ListNetworks
listNetworks_status = (ListNetworks -> Maybe NetworkStatus)
-> (ListNetworks -> Maybe NetworkStatus -> ListNetworks)
-> Lens
     ListNetworks
     ListNetworks
     (Maybe NetworkStatus)
     (Maybe NetworkStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworks' {Maybe NetworkStatus
status :: Maybe NetworkStatus
$sel:status:ListNetworks' :: ListNetworks -> Maybe NetworkStatus
status} -> Maybe NetworkStatus
status) (\s :: ListNetworks
s@ListNetworks' {} Maybe NetworkStatus
a -> ListNetworks
s {$sel:status:ListNetworks' :: Maybe NetworkStatus
status = Maybe NetworkStatus
a} :: ListNetworks)

-- | An optional framework specifier. If provided, only networks of this
-- framework type are listed.
listNetworks_framework :: Lens.Lens' ListNetworks (Prelude.Maybe Framework)
listNetworks_framework :: (Maybe Framework -> f (Maybe Framework))
-> ListNetworks -> f ListNetworks
listNetworks_framework = (ListNetworks -> Maybe Framework)
-> (ListNetworks -> Maybe Framework -> ListNetworks)
-> Lens
     ListNetworks ListNetworks (Maybe Framework) (Maybe Framework)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworks' {Maybe Framework
framework :: Maybe Framework
$sel:framework:ListNetworks' :: ListNetworks -> Maybe Framework
framework} -> Maybe Framework
framework) (\s :: ListNetworks
s@ListNetworks' {} Maybe Framework
a -> ListNetworks
s {$sel:framework:ListNetworks' :: Maybe Framework
framework = Maybe Framework
a} :: ListNetworks)

-- | The pagination token that indicates the next set of results to retrieve.
listNetworks_nextToken :: Lens.Lens' ListNetworks (Prelude.Maybe Prelude.Text)
listNetworks_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListNetworks -> f ListNetworks
listNetworks_nextToken = (ListNetworks -> Maybe Text)
-> (ListNetworks -> Maybe Text -> ListNetworks)
-> Lens ListNetworks ListNetworks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListNetworks' :: ListNetworks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListNetworks
s@ListNetworks' {} Maybe Text
a -> ListNetworks
s {$sel:nextToken:ListNetworks' :: Maybe Text
nextToken = Maybe Text
a} :: ListNetworks)

-- | The name of the network.
listNetworks_name :: Lens.Lens' ListNetworks (Prelude.Maybe Prelude.Text)
listNetworks_name :: (Maybe Text -> f (Maybe Text)) -> ListNetworks -> f ListNetworks
listNetworks_name = (ListNetworks -> Maybe Text)
-> (ListNetworks -> Maybe Text -> ListNetworks)
-> Lens ListNetworks ListNetworks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworks' {Maybe Text
name :: Maybe Text
$sel:name:ListNetworks' :: ListNetworks -> Maybe Text
name} -> Maybe Text
name) (\s :: ListNetworks
s@ListNetworks' {} Maybe Text
a -> ListNetworks
s {$sel:name:ListNetworks' :: Maybe Text
name = Maybe Text
a} :: ListNetworks)

-- | The maximum number of networks to list.
listNetworks_maxResults :: Lens.Lens' ListNetworks (Prelude.Maybe Prelude.Natural)
listNetworks_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListNetworks -> f ListNetworks
listNetworks_maxResults = (ListNetworks -> Maybe Natural)
-> (ListNetworks -> Maybe Natural -> ListNetworks)
-> Lens ListNetworks ListNetworks (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworks' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListNetworks' :: ListNetworks -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListNetworks
s@ListNetworks' {} Maybe Natural
a -> ListNetworks
s {$sel:maxResults:ListNetworks' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListNetworks)

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

instance Prelude.NFData ListNetworks

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

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

-- | /See:/ 'newListNetworksResponse' smart constructor.
data ListNetworksResponse = ListNetworksResponse'
  { -- | An array of @NetworkSummary@ objects that contain configuration
    -- properties for each network.
    ListNetworksResponse -> Maybe [NetworkSummary]
networks :: Prelude.Maybe [NetworkSummary],
    -- | The pagination token that indicates the next set of results to retrieve.
    ListNetworksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListNetworksResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListNetworksResponse -> ListNetworksResponse -> Bool
(ListNetworksResponse -> ListNetworksResponse -> Bool)
-> (ListNetworksResponse -> ListNetworksResponse -> Bool)
-> Eq ListNetworksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListNetworksResponse -> ListNetworksResponse -> Bool
$c/= :: ListNetworksResponse -> ListNetworksResponse -> Bool
== :: ListNetworksResponse -> ListNetworksResponse -> Bool
$c== :: ListNetworksResponse -> ListNetworksResponse -> Bool
Prelude.Eq, ReadPrec [ListNetworksResponse]
ReadPrec ListNetworksResponse
Int -> ReadS ListNetworksResponse
ReadS [ListNetworksResponse]
(Int -> ReadS ListNetworksResponse)
-> ReadS [ListNetworksResponse]
-> ReadPrec ListNetworksResponse
-> ReadPrec [ListNetworksResponse]
-> Read ListNetworksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListNetworksResponse]
$creadListPrec :: ReadPrec [ListNetworksResponse]
readPrec :: ReadPrec ListNetworksResponse
$creadPrec :: ReadPrec ListNetworksResponse
readList :: ReadS [ListNetworksResponse]
$creadList :: ReadS [ListNetworksResponse]
readsPrec :: Int -> ReadS ListNetworksResponse
$creadsPrec :: Int -> ReadS ListNetworksResponse
Prelude.Read, Int -> ListNetworksResponse -> ShowS
[ListNetworksResponse] -> ShowS
ListNetworksResponse -> String
(Int -> ListNetworksResponse -> ShowS)
-> (ListNetworksResponse -> String)
-> ([ListNetworksResponse] -> ShowS)
-> Show ListNetworksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListNetworksResponse] -> ShowS
$cshowList :: [ListNetworksResponse] -> ShowS
show :: ListNetworksResponse -> String
$cshow :: ListNetworksResponse -> String
showsPrec :: Int -> ListNetworksResponse -> ShowS
$cshowsPrec :: Int -> ListNetworksResponse -> ShowS
Prelude.Show, (forall x. ListNetworksResponse -> Rep ListNetworksResponse x)
-> (forall x. Rep ListNetworksResponse x -> ListNetworksResponse)
-> Generic ListNetworksResponse
forall x. Rep ListNetworksResponse x -> ListNetworksResponse
forall x. ListNetworksResponse -> Rep ListNetworksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListNetworksResponse x -> ListNetworksResponse
$cfrom :: forall x. ListNetworksResponse -> Rep ListNetworksResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListNetworksResponse' 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:
--
-- 'networks', 'listNetworksResponse_networks' - An array of @NetworkSummary@ objects that contain configuration
-- properties for each network.
--
-- 'nextToken', 'listNetworksResponse_nextToken' - The pagination token that indicates the next set of results to retrieve.
--
-- 'httpStatus', 'listNetworksResponse_httpStatus' - The response's http status code.
newListNetworksResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListNetworksResponse
newListNetworksResponse :: Int -> ListNetworksResponse
newListNetworksResponse Int
pHttpStatus_ =
  ListNetworksResponse' :: Maybe [NetworkSummary] -> Maybe Text -> Int -> ListNetworksResponse
ListNetworksResponse'
    { $sel:networks:ListNetworksResponse' :: Maybe [NetworkSummary]
networks = Maybe [NetworkSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListNetworksResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListNetworksResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of @NetworkSummary@ objects that contain configuration
-- properties for each network.
listNetworksResponse_networks :: Lens.Lens' ListNetworksResponse (Prelude.Maybe [NetworkSummary])
listNetworksResponse_networks :: (Maybe [NetworkSummary] -> f (Maybe [NetworkSummary]))
-> ListNetworksResponse -> f ListNetworksResponse
listNetworksResponse_networks = (ListNetworksResponse -> Maybe [NetworkSummary])
-> (ListNetworksResponse
    -> Maybe [NetworkSummary] -> ListNetworksResponse)
-> Lens
     ListNetworksResponse
     ListNetworksResponse
     (Maybe [NetworkSummary])
     (Maybe [NetworkSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworksResponse' {Maybe [NetworkSummary]
networks :: Maybe [NetworkSummary]
$sel:networks:ListNetworksResponse' :: ListNetworksResponse -> Maybe [NetworkSummary]
networks} -> Maybe [NetworkSummary]
networks) (\s :: ListNetworksResponse
s@ListNetworksResponse' {} Maybe [NetworkSummary]
a -> ListNetworksResponse
s {$sel:networks:ListNetworksResponse' :: Maybe [NetworkSummary]
networks = Maybe [NetworkSummary]
a} :: ListNetworksResponse) ((Maybe [NetworkSummary] -> f (Maybe [NetworkSummary]))
 -> ListNetworksResponse -> f ListNetworksResponse)
-> ((Maybe [NetworkSummary] -> f (Maybe [NetworkSummary]))
    -> Maybe [NetworkSummary] -> f (Maybe [NetworkSummary]))
-> (Maybe [NetworkSummary] -> f (Maybe [NetworkSummary]))
-> ListNetworksResponse
-> f ListNetworksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [NetworkSummary] [NetworkSummary] [NetworkSummary] [NetworkSummary]
-> Iso
     (Maybe [NetworkSummary])
     (Maybe [NetworkSummary])
     (Maybe [NetworkSummary])
     (Maybe [NetworkSummary])
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
  [NetworkSummary] [NetworkSummary] [NetworkSummary] [NetworkSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token that indicates the next set of results to retrieve.
listNetworksResponse_nextToken :: Lens.Lens' ListNetworksResponse (Prelude.Maybe Prelude.Text)
listNetworksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListNetworksResponse -> f ListNetworksResponse
listNetworksResponse_nextToken = (ListNetworksResponse -> Maybe Text)
-> (ListNetworksResponse -> Maybe Text -> ListNetworksResponse)
-> Lens
     ListNetworksResponse ListNetworksResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListNetworksResponse' :: ListNetworksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListNetworksResponse
s@ListNetworksResponse' {} Maybe Text
a -> ListNetworksResponse
s {$sel:nextToken:ListNetworksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListNetworksResponse)

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

instance Prelude.NFData ListNetworksResponse