{-# 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.MQ.ListBrokers
-- 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 all brokers.
--
-- This operation returns paginated results.
module Amazonka.MQ.ListBrokers
  ( -- * Creating a Request
    ListBrokers (..),
    newListBrokers,

    -- * Request Lenses
    listBrokers_nextToken,
    listBrokers_maxResults,

    -- * Destructuring the Response
    ListBrokersResponse (..),
    newListBrokersResponse,

    -- * Response Lenses
    listBrokersResponse_nextToken,
    listBrokersResponse_brokerSummaries,
    listBrokersResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListBrokers' smart constructor.
data ListBrokers = ListBrokers'
  { -- | The token that specifies the next page of results Amazon MQ should
    -- return. To request the first page, leave nextToken empty.
    ListBrokers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of brokers that Amazon MQ can return per page (20 by
    -- default). This value must be an integer from 5 to 100.
    ListBrokers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListBrokers -> ListBrokers -> Bool
(ListBrokers -> ListBrokers -> Bool)
-> (ListBrokers -> ListBrokers -> Bool) -> Eq ListBrokers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBrokers -> ListBrokers -> Bool
$c/= :: ListBrokers -> ListBrokers -> Bool
== :: ListBrokers -> ListBrokers -> Bool
$c== :: ListBrokers -> ListBrokers -> Bool
Prelude.Eq, ReadPrec [ListBrokers]
ReadPrec ListBrokers
Int -> ReadS ListBrokers
ReadS [ListBrokers]
(Int -> ReadS ListBrokers)
-> ReadS [ListBrokers]
-> ReadPrec ListBrokers
-> ReadPrec [ListBrokers]
-> Read ListBrokers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBrokers]
$creadListPrec :: ReadPrec [ListBrokers]
readPrec :: ReadPrec ListBrokers
$creadPrec :: ReadPrec ListBrokers
readList :: ReadS [ListBrokers]
$creadList :: ReadS [ListBrokers]
readsPrec :: Int -> ReadS ListBrokers
$creadsPrec :: Int -> ReadS ListBrokers
Prelude.Read, Int -> ListBrokers -> ShowS
[ListBrokers] -> ShowS
ListBrokers -> String
(Int -> ListBrokers -> ShowS)
-> (ListBrokers -> String)
-> ([ListBrokers] -> ShowS)
-> Show ListBrokers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBrokers] -> ShowS
$cshowList :: [ListBrokers] -> ShowS
show :: ListBrokers -> String
$cshow :: ListBrokers -> String
showsPrec :: Int -> ListBrokers -> ShowS
$cshowsPrec :: Int -> ListBrokers -> ShowS
Prelude.Show, (forall x. ListBrokers -> Rep ListBrokers x)
-> (forall x. Rep ListBrokers x -> ListBrokers)
-> Generic ListBrokers
forall x. Rep ListBrokers x -> ListBrokers
forall x. ListBrokers -> Rep ListBrokers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBrokers x -> ListBrokers
$cfrom :: forall x. ListBrokers -> Rep ListBrokers x
Prelude.Generic)

-- |
-- Create a value of 'ListBrokers' 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', 'listBrokers_nextToken' - The token that specifies the next page of results Amazon MQ should
-- return. To request the first page, leave nextToken empty.
--
-- 'maxResults', 'listBrokers_maxResults' - The maximum number of brokers that Amazon MQ can return per page (20 by
-- default). This value must be an integer from 5 to 100.
newListBrokers ::
  ListBrokers
newListBrokers :: ListBrokers
newListBrokers =
  ListBrokers' :: Maybe Text -> Maybe Natural -> ListBrokers
ListBrokers'
    { $sel:nextToken:ListBrokers' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListBrokers' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The token that specifies the next page of results Amazon MQ should
-- return. To request the first page, leave nextToken empty.
listBrokers_nextToken :: Lens.Lens' ListBrokers (Prelude.Maybe Prelude.Text)
listBrokers_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListBrokers -> f ListBrokers
listBrokers_nextToken = (ListBrokers -> Maybe Text)
-> (ListBrokers -> Maybe Text -> ListBrokers)
-> Lens ListBrokers ListBrokers (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBrokers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBrokers' :: ListBrokers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBrokers
s@ListBrokers' {} Maybe Text
a -> ListBrokers
s {$sel:nextToken:ListBrokers' :: Maybe Text
nextToken = Maybe Text
a} :: ListBrokers)

-- | The maximum number of brokers that Amazon MQ can return per page (20 by
-- default). This value must be an integer from 5 to 100.
listBrokers_maxResults :: Lens.Lens' ListBrokers (Prelude.Maybe Prelude.Natural)
listBrokers_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListBrokers -> f ListBrokers
listBrokers_maxResults = (ListBrokers -> Maybe Natural)
-> (ListBrokers -> Maybe Natural -> ListBrokers)
-> Lens ListBrokers ListBrokers (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBrokers' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListBrokers' :: ListBrokers -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListBrokers
s@ListBrokers' {} Maybe Natural
a -> ListBrokers
s {$sel:maxResults:ListBrokers' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListBrokers)

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

instance Prelude.NFData ListBrokers

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

instance Core.ToQuery ListBrokers where
  toQuery :: ListBrokers -> QueryString
toQuery ListBrokers' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListBrokers' :: ListBrokers -> Maybe Natural
$sel:nextToken:ListBrokers' :: ListBrokers -> 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:/ 'newListBrokersResponse' smart constructor.
data ListBrokersResponse = ListBrokersResponse'
  { -- | The token that specifies the next page of results Amazon MQ should
    -- return. To request the first page, leave nextToken empty.
    ListBrokersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of information about all brokers.
    ListBrokersResponse -> Maybe [BrokerSummary]
brokerSummaries :: Prelude.Maybe [BrokerSummary],
    -- | The response's http status code.
    ListBrokersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBrokersResponse -> ListBrokersResponse -> Bool
(ListBrokersResponse -> ListBrokersResponse -> Bool)
-> (ListBrokersResponse -> ListBrokersResponse -> Bool)
-> Eq ListBrokersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBrokersResponse -> ListBrokersResponse -> Bool
$c/= :: ListBrokersResponse -> ListBrokersResponse -> Bool
== :: ListBrokersResponse -> ListBrokersResponse -> Bool
$c== :: ListBrokersResponse -> ListBrokersResponse -> Bool
Prelude.Eq, ReadPrec [ListBrokersResponse]
ReadPrec ListBrokersResponse
Int -> ReadS ListBrokersResponse
ReadS [ListBrokersResponse]
(Int -> ReadS ListBrokersResponse)
-> ReadS [ListBrokersResponse]
-> ReadPrec ListBrokersResponse
-> ReadPrec [ListBrokersResponse]
-> Read ListBrokersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBrokersResponse]
$creadListPrec :: ReadPrec [ListBrokersResponse]
readPrec :: ReadPrec ListBrokersResponse
$creadPrec :: ReadPrec ListBrokersResponse
readList :: ReadS [ListBrokersResponse]
$creadList :: ReadS [ListBrokersResponse]
readsPrec :: Int -> ReadS ListBrokersResponse
$creadsPrec :: Int -> ReadS ListBrokersResponse
Prelude.Read, Int -> ListBrokersResponse -> ShowS
[ListBrokersResponse] -> ShowS
ListBrokersResponse -> String
(Int -> ListBrokersResponse -> ShowS)
-> (ListBrokersResponse -> String)
-> ([ListBrokersResponse] -> ShowS)
-> Show ListBrokersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBrokersResponse] -> ShowS
$cshowList :: [ListBrokersResponse] -> ShowS
show :: ListBrokersResponse -> String
$cshow :: ListBrokersResponse -> String
showsPrec :: Int -> ListBrokersResponse -> ShowS
$cshowsPrec :: Int -> ListBrokersResponse -> ShowS
Prelude.Show, (forall x. ListBrokersResponse -> Rep ListBrokersResponse x)
-> (forall x. Rep ListBrokersResponse x -> ListBrokersResponse)
-> Generic ListBrokersResponse
forall x. Rep ListBrokersResponse x -> ListBrokersResponse
forall x. ListBrokersResponse -> Rep ListBrokersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBrokersResponse x -> ListBrokersResponse
$cfrom :: forall x. ListBrokersResponse -> Rep ListBrokersResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBrokersResponse' 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', 'listBrokersResponse_nextToken' - The token that specifies the next page of results Amazon MQ should
-- return. To request the first page, leave nextToken empty.
--
-- 'brokerSummaries', 'listBrokersResponse_brokerSummaries' - A list of information about all brokers.
--
-- 'httpStatus', 'listBrokersResponse_httpStatus' - The response's http status code.
newListBrokersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBrokersResponse
newListBrokersResponse :: Int -> ListBrokersResponse
newListBrokersResponse Int
pHttpStatus_ =
  ListBrokersResponse' :: Maybe Text -> Maybe [BrokerSummary] -> Int -> ListBrokersResponse
ListBrokersResponse'
    { $sel:nextToken:ListBrokersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:brokerSummaries:ListBrokersResponse' :: Maybe [BrokerSummary]
brokerSummaries = Maybe [BrokerSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListBrokersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token that specifies the next page of results Amazon MQ should
-- return. To request the first page, leave nextToken empty.
listBrokersResponse_nextToken :: Lens.Lens' ListBrokersResponse (Prelude.Maybe Prelude.Text)
listBrokersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListBrokersResponse -> f ListBrokersResponse
listBrokersResponse_nextToken = (ListBrokersResponse -> Maybe Text)
-> (ListBrokersResponse -> Maybe Text -> ListBrokersResponse)
-> Lens' ListBrokersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBrokersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBrokersResponse' :: ListBrokersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBrokersResponse
s@ListBrokersResponse' {} Maybe Text
a -> ListBrokersResponse
s {$sel:nextToken:ListBrokersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListBrokersResponse)

-- | A list of information about all brokers.
listBrokersResponse_brokerSummaries :: Lens.Lens' ListBrokersResponse (Prelude.Maybe [BrokerSummary])
listBrokersResponse_brokerSummaries :: (Maybe [BrokerSummary] -> f (Maybe [BrokerSummary]))
-> ListBrokersResponse -> f ListBrokersResponse
listBrokersResponse_brokerSummaries = (ListBrokersResponse -> Maybe [BrokerSummary])
-> (ListBrokersResponse
    -> Maybe [BrokerSummary] -> ListBrokersResponse)
-> Lens' ListBrokersResponse (Maybe [BrokerSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBrokersResponse' {Maybe [BrokerSummary]
brokerSummaries :: Maybe [BrokerSummary]
$sel:brokerSummaries:ListBrokersResponse' :: ListBrokersResponse -> Maybe [BrokerSummary]
brokerSummaries} -> Maybe [BrokerSummary]
brokerSummaries) (\s :: ListBrokersResponse
s@ListBrokersResponse' {} Maybe [BrokerSummary]
a -> ListBrokersResponse
s {$sel:brokerSummaries:ListBrokersResponse' :: Maybe [BrokerSummary]
brokerSummaries = Maybe [BrokerSummary]
a} :: ListBrokersResponse) ((Maybe [BrokerSummary] -> f (Maybe [BrokerSummary]))
 -> ListBrokersResponse -> f ListBrokersResponse)
-> ((Maybe [BrokerSummary] -> f (Maybe [BrokerSummary]))
    -> Maybe [BrokerSummary] -> f (Maybe [BrokerSummary]))
-> (Maybe [BrokerSummary] -> f (Maybe [BrokerSummary]))
-> ListBrokersResponse
-> f ListBrokersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BrokerSummary] [BrokerSummary] [BrokerSummary] [BrokerSummary]
-> Iso
     (Maybe [BrokerSummary])
     (Maybe [BrokerSummary])
     (Maybe [BrokerSummary])
     (Maybe [BrokerSummary])
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
  [BrokerSummary] [BrokerSummary] [BrokerSummary] [BrokerSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListBrokersResponse