{-# 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.DescribeBrokerInstanceOptions
-- 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)
--
-- Describe available broker instance options.
module Amazonka.MQ.DescribeBrokerInstanceOptions
  ( -- * Creating a Request
    DescribeBrokerInstanceOptions (..),
    newDescribeBrokerInstanceOptions,

    -- * Request Lenses
    describeBrokerInstanceOptions_nextToken,
    describeBrokerInstanceOptions_engineType,
    describeBrokerInstanceOptions_maxResults,
    describeBrokerInstanceOptions_hostInstanceType,
    describeBrokerInstanceOptions_storageType,

    -- * Destructuring the Response
    DescribeBrokerInstanceOptionsResponse (..),
    newDescribeBrokerInstanceOptionsResponse,

    -- * Response Lenses
    describeBrokerInstanceOptionsResponse_nextToken,
    describeBrokerInstanceOptionsResponse_brokerInstanceOptions,
    describeBrokerInstanceOptionsResponse_maxResults,
    describeBrokerInstanceOptionsResponse_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:/ 'newDescribeBrokerInstanceOptions' smart constructor.
data DescribeBrokerInstanceOptions = DescribeBrokerInstanceOptions'
  { -- | The token that specifies the next page of results Amazon MQ should
    -- return. To request the first page, leave nextToken empty.
    DescribeBrokerInstanceOptions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Filter response by engine type.
    DescribeBrokerInstanceOptions -> Maybe Text
engineType :: 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.
    DescribeBrokerInstanceOptions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Filter response by host instance type.
    DescribeBrokerInstanceOptions -> Maybe Text
hostInstanceType :: Prelude.Maybe Prelude.Text,
    -- | Filter response by storage type.
    DescribeBrokerInstanceOptions -> Maybe Text
storageType :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeBrokerInstanceOptions
-> DescribeBrokerInstanceOptions -> Bool
(DescribeBrokerInstanceOptions
 -> DescribeBrokerInstanceOptions -> Bool)
-> (DescribeBrokerInstanceOptions
    -> DescribeBrokerInstanceOptions -> Bool)
-> Eq DescribeBrokerInstanceOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeBrokerInstanceOptions
-> DescribeBrokerInstanceOptions -> Bool
$c/= :: DescribeBrokerInstanceOptions
-> DescribeBrokerInstanceOptions -> Bool
== :: DescribeBrokerInstanceOptions
-> DescribeBrokerInstanceOptions -> Bool
$c== :: DescribeBrokerInstanceOptions
-> DescribeBrokerInstanceOptions -> Bool
Prelude.Eq, ReadPrec [DescribeBrokerInstanceOptions]
ReadPrec DescribeBrokerInstanceOptions
Int -> ReadS DescribeBrokerInstanceOptions
ReadS [DescribeBrokerInstanceOptions]
(Int -> ReadS DescribeBrokerInstanceOptions)
-> ReadS [DescribeBrokerInstanceOptions]
-> ReadPrec DescribeBrokerInstanceOptions
-> ReadPrec [DescribeBrokerInstanceOptions]
-> Read DescribeBrokerInstanceOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeBrokerInstanceOptions]
$creadListPrec :: ReadPrec [DescribeBrokerInstanceOptions]
readPrec :: ReadPrec DescribeBrokerInstanceOptions
$creadPrec :: ReadPrec DescribeBrokerInstanceOptions
readList :: ReadS [DescribeBrokerInstanceOptions]
$creadList :: ReadS [DescribeBrokerInstanceOptions]
readsPrec :: Int -> ReadS DescribeBrokerInstanceOptions
$creadsPrec :: Int -> ReadS DescribeBrokerInstanceOptions
Prelude.Read, Int -> DescribeBrokerInstanceOptions -> ShowS
[DescribeBrokerInstanceOptions] -> ShowS
DescribeBrokerInstanceOptions -> String
(Int -> DescribeBrokerInstanceOptions -> ShowS)
-> (DescribeBrokerInstanceOptions -> String)
-> ([DescribeBrokerInstanceOptions] -> ShowS)
-> Show DescribeBrokerInstanceOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeBrokerInstanceOptions] -> ShowS
$cshowList :: [DescribeBrokerInstanceOptions] -> ShowS
show :: DescribeBrokerInstanceOptions -> String
$cshow :: DescribeBrokerInstanceOptions -> String
showsPrec :: Int -> DescribeBrokerInstanceOptions -> ShowS
$cshowsPrec :: Int -> DescribeBrokerInstanceOptions -> ShowS
Prelude.Show, (forall x.
 DescribeBrokerInstanceOptions
 -> Rep DescribeBrokerInstanceOptions x)
-> (forall x.
    Rep DescribeBrokerInstanceOptions x
    -> DescribeBrokerInstanceOptions)
-> Generic DescribeBrokerInstanceOptions
forall x.
Rep DescribeBrokerInstanceOptions x
-> DescribeBrokerInstanceOptions
forall x.
DescribeBrokerInstanceOptions
-> Rep DescribeBrokerInstanceOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeBrokerInstanceOptions x
-> DescribeBrokerInstanceOptions
$cfrom :: forall x.
DescribeBrokerInstanceOptions
-> Rep DescribeBrokerInstanceOptions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeBrokerInstanceOptions' 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', 'describeBrokerInstanceOptions_nextToken' - The token that specifies the next page of results Amazon MQ should
-- return. To request the first page, leave nextToken empty.
--
-- 'engineType', 'describeBrokerInstanceOptions_engineType' - Filter response by engine type.
--
-- 'maxResults', 'describeBrokerInstanceOptions_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.
--
-- 'hostInstanceType', 'describeBrokerInstanceOptions_hostInstanceType' - Filter response by host instance type.
--
-- 'storageType', 'describeBrokerInstanceOptions_storageType' - Filter response by storage type.
newDescribeBrokerInstanceOptions ::
  DescribeBrokerInstanceOptions
newDescribeBrokerInstanceOptions :: DescribeBrokerInstanceOptions
newDescribeBrokerInstanceOptions =
  DescribeBrokerInstanceOptions' :: Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> DescribeBrokerInstanceOptions
DescribeBrokerInstanceOptions'
    { $sel:nextToken:DescribeBrokerInstanceOptions' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engineType:DescribeBrokerInstanceOptions' :: Maybe Text
engineType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeBrokerInstanceOptions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:hostInstanceType:DescribeBrokerInstanceOptions' :: Maybe Text
hostInstanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:storageType:DescribeBrokerInstanceOptions' :: Maybe Text
storageType = Maybe Text
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.
describeBrokerInstanceOptions_nextToken :: Lens.Lens' DescribeBrokerInstanceOptions (Prelude.Maybe Prelude.Text)
describeBrokerInstanceOptions_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeBrokerInstanceOptions -> f DescribeBrokerInstanceOptions
describeBrokerInstanceOptions_nextToken = (DescribeBrokerInstanceOptions -> Maybe Text)
-> (DescribeBrokerInstanceOptions
    -> Maybe Text -> DescribeBrokerInstanceOptions)
-> Lens
     DescribeBrokerInstanceOptions
     DescribeBrokerInstanceOptions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBrokerInstanceOptions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeBrokerInstanceOptions' :: DescribeBrokerInstanceOptions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeBrokerInstanceOptions
s@DescribeBrokerInstanceOptions' {} Maybe Text
a -> DescribeBrokerInstanceOptions
s {$sel:nextToken:DescribeBrokerInstanceOptions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeBrokerInstanceOptions)

-- | Filter response by engine type.
describeBrokerInstanceOptions_engineType :: Lens.Lens' DescribeBrokerInstanceOptions (Prelude.Maybe Prelude.Text)
describeBrokerInstanceOptions_engineType :: (Maybe Text -> f (Maybe Text))
-> DescribeBrokerInstanceOptions -> f DescribeBrokerInstanceOptions
describeBrokerInstanceOptions_engineType = (DescribeBrokerInstanceOptions -> Maybe Text)
-> (DescribeBrokerInstanceOptions
    -> Maybe Text -> DescribeBrokerInstanceOptions)
-> Lens
     DescribeBrokerInstanceOptions
     DescribeBrokerInstanceOptions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBrokerInstanceOptions' {Maybe Text
engineType :: Maybe Text
$sel:engineType:DescribeBrokerInstanceOptions' :: DescribeBrokerInstanceOptions -> Maybe Text
engineType} -> Maybe Text
engineType) (\s :: DescribeBrokerInstanceOptions
s@DescribeBrokerInstanceOptions' {} Maybe Text
a -> DescribeBrokerInstanceOptions
s {$sel:engineType:DescribeBrokerInstanceOptions' :: Maybe Text
engineType = Maybe Text
a} :: DescribeBrokerInstanceOptions)

-- | 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.
describeBrokerInstanceOptions_maxResults :: Lens.Lens' DescribeBrokerInstanceOptions (Prelude.Maybe Prelude.Natural)
describeBrokerInstanceOptions_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeBrokerInstanceOptions -> f DescribeBrokerInstanceOptions
describeBrokerInstanceOptions_maxResults = (DescribeBrokerInstanceOptions -> Maybe Natural)
-> (DescribeBrokerInstanceOptions
    -> Maybe Natural -> DescribeBrokerInstanceOptions)
-> Lens
     DescribeBrokerInstanceOptions
     DescribeBrokerInstanceOptions
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBrokerInstanceOptions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeBrokerInstanceOptions' :: DescribeBrokerInstanceOptions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeBrokerInstanceOptions
s@DescribeBrokerInstanceOptions' {} Maybe Natural
a -> DescribeBrokerInstanceOptions
s {$sel:maxResults:DescribeBrokerInstanceOptions' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeBrokerInstanceOptions)

-- | Filter response by host instance type.
describeBrokerInstanceOptions_hostInstanceType :: Lens.Lens' DescribeBrokerInstanceOptions (Prelude.Maybe Prelude.Text)
describeBrokerInstanceOptions_hostInstanceType :: (Maybe Text -> f (Maybe Text))
-> DescribeBrokerInstanceOptions -> f DescribeBrokerInstanceOptions
describeBrokerInstanceOptions_hostInstanceType = (DescribeBrokerInstanceOptions -> Maybe Text)
-> (DescribeBrokerInstanceOptions
    -> Maybe Text -> DescribeBrokerInstanceOptions)
-> Lens
     DescribeBrokerInstanceOptions
     DescribeBrokerInstanceOptions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBrokerInstanceOptions' {Maybe Text
hostInstanceType :: Maybe Text
$sel:hostInstanceType:DescribeBrokerInstanceOptions' :: DescribeBrokerInstanceOptions -> Maybe Text
hostInstanceType} -> Maybe Text
hostInstanceType) (\s :: DescribeBrokerInstanceOptions
s@DescribeBrokerInstanceOptions' {} Maybe Text
a -> DescribeBrokerInstanceOptions
s {$sel:hostInstanceType:DescribeBrokerInstanceOptions' :: Maybe Text
hostInstanceType = Maybe Text
a} :: DescribeBrokerInstanceOptions)

-- | Filter response by storage type.
describeBrokerInstanceOptions_storageType :: Lens.Lens' DescribeBrokerInstanceOptions (Prelude.Maybe Prelude.Text)
describeBrokerInstanceOptions_storageType :: (Maybe Text -> f (Maybe Text))
-> DescribeBrokerInstanceOptions -> f DescribeBrokerInstanceOptions
describeBrokerInstanceOptions_storageType = (DescribeBrokerInstanceOptions -> Maybe Text)
-> (DescribeBrokerInstanceOptions
    -> Maybe Text -> DescribeBrokerInstanceOptions)
-> Lens
     DescribeBrokerInstanceOptions
     DescribeBrokerInstanceOptions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBrokerInstanceOptions' {Maybe Text
storageType :: Maybe Text
$sel:storageType:DescribeBrokerInstanceOptions' :: DescribeBrokerInstanceOptions -> Maybe Text
storageType} -> Maybe Text
storageType) (\s :: DescribeBrokerInstanceOptions
s@DescribeBrokerInstanceOptions' {} Maybe Text
a -> DescribeBrokerInstanceOptions
s {$sel:storageType:DescribeBrokerInstanceOptions' :: Maybe Text
storageType = Maybe Text
a} :: DescribeBrokerInstanceOptions)

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

instance Prelude.NFData DescribeBrokerInstanceOptions

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

instance Core.ToQuery DescribeBrokerInstanceOptions where
  toQuery :: DescribeBrokerInstanceOptions -> QueryString
toQuery DescribeBrokerInstanceOptions' {Maybe Natural
Maybe Text
storageType :: Maybe Text
hostInstanceType :: Maybe Text
maxResults :: Maybe Natural
engineType :: Maybe Text
nextToken :: Maybe Text
$sel:storageType:DescribeBrokerInstanceOptions' :: DescribeBrokerInstanceOptions -> Maybe Text
$sel:hostInstanceType:DescribeBrokerInstanceOptions' :: DescribeBrokerInstanceOptions -> Maybe Text
$sel:maxResults:DescribeBrokerInstanceOptions' :: DescribeBrokerInstanceOptions -> Maybe Natural
$sel:engineType:DescribeBrokerInstanceOptions' :: DescribeBrokerInstanceOptions -> Maybe Text
$sel:nextToken:DescribeBrokerInstanceOptions' :: DescribeBrokerInstanceOptions -> 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
"engineType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
engineType,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults,
        ByteString
"hostInstanceType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
hostInstanceType,
        ByteString
"storageType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
storageType
      ]

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

-- |
-- Create a value of 'DescribeBrokerInstanceOptionsResponse' 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', 'describeBrokerInstanceOptionsResponse_nextToken' - The token that specifies the next page of results Amazon MQ should
-- return. To request the first page, leave nextToken empty.
--
-- 'brokerInstanceOptions', 'describeBrokerInstanceOptionsResponse_brokerInstanceOptions' - List of available broker instance options.
--
-- 'maxResults', 'describeBrokerInstanceOptionsResponse_maxResults' - Required. The maximum number of instance options that can be returned
-- per page (20 by default). This value must be an integer from 5 to 100.
--
-- 'httpStatus', 'describeBrokerInstanceOptionsResponse_httpStatus' - The response's http status code.
newDescribeBrokerInstanceOptionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeBrokerInstanceOptionsResponse
newDescribeBrokerInstanceOptionsResponse :: Int -> DescribeBrokerInstanceOptionsResponse
newDescribeBrokerInstanceOptionsResponse Int
pHttpStatus_ =
  DescribeBrokerInstanceOptionsResponse' :: Maybe Text
-> Maybe [BrokerInstanceOption]
-> Maybe Natural
-> Int
-> DescribeBrokerInstanceOptionsResponse
DescribeBrokerInstanceOptionsResponse'
    { $sel:nextToken:DescribeBrokerInstanceOptionsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:brokerInstanceOptions:DescribeBrokerInstanceOptionsResponse' :: Maybe [BrokerInstanceOption]
brokerInstanceOptions =
        Maybe [BrokerInstanceOption]
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeBrokerInstanceOptionsResponse' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeBrokerInstanceOptionsResponse' :: 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.
describeBrokerInstanceOptionsResponse_nextToken :: Lens.Lens' DescribeBrokerInstanceOptionsResponse (Prelude.Maybe Prelude.Text)
describeBrokerInstanceOptionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeBrokerInstanceOptionsResponse
-> f DescribeBrokerInstanceOptionsResponse
describeBrokerInstanceOptionsResponse_nextToken = (DescribeBrokerInstanceOptionsResponse -> Maybe Text)
-> (DescribeBrokerInstanceOptionsResponse
    -> Maybe Text -> DescribeBrokerInstanceOptionsResponse)
-> Lens
     DescribeBrokerInstanceOptionsResponse
     DescribeBrokerInstanceOptionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBrokerInstanceOptionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeBrokerInstanceOptionsResponse' :: DescribeBrokerInstanceOptionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeBrokerInstanceOptionsResponse
s@DescribeBrokerInstanceOptionsResponse' {} Maybe Text
a -> DescribeBrokerInstanceOptionsResponse
s {$sel:nextToken:DescribeBrokerInstanceOptionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeBrokerInstanceOptionsResponse)

-- | List of available broker instance options.
describeBrokerInstanceOptionsResponse_brokerInstanceOptions :: Lens.Lens' DescribeBrokerInstanceOptionsResponse (Prelude.Maybe [BrokerInstanceOption])
describeBrokerInstanceOptionsResponse_brokerInstanceOptions :: (Maybe [BrokerInstanceOption] -> f (Maybe [BrokerInstanceOption]))
-> DescribeBrokerInstanceOptionsResponse
-> f DescribeBrokerInstanceOptionsResponse
describeBrokerInstanceOptionsResponse_brokerInstanceOptions = (DescribeBrokerInstanceOptionsResponse
 -> Maybe [BrokerInstanceOption])
-> (DescribeBrokerInstanceOptionsResponse
    -> Maybe [BrokerInstanceOption]
    -> DescribeBrokerInstanceOptionsResponse)
-> Lens
     DescribeBrokerInstanceOptionsResponse
     DescribeBrokerInstanceOptionsResponse
     (Maybe [BrokerInstanceOption])
     (Maybe [BrokerInstanceOption])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBrokerInstanceOptionsResponse' {Maybe [BrokerInstanceOption]
brokerInstanceOptions :: Maybe [BrokerInstanceOption]
$sel:brokerInstanceOptions:DescribeBrokerInstanceOptionsResponse' :: DescribeBrokerInstanceOptionsResponse
-> Maybe [BrokerInstanceOption]
brokerInstanceOptions} -> Maybe [BrokerInstanceOption]
brokerInstanceOptions) (\s :: DescribeBrokerInstanceOptionsResponse
s@DescribeBrokerInstanceOptionsResponse' {} Maybe [BrokerInstanceOption]
a -> DescribeBrokerInstanceOptionsResponse
s {$sel:brokerInstanceOptions:DescribeBrokerInstanceOptionsResponse' :: Maybe [BrokerInstanceOption]
brokerInstanceOptions = Maybe [BrokerInstanceOption]
a} :: DescribeBrokerInstanceOptionsResponse) ((Maybe [BrokerInstanceOption] -> f (Maybe [BrokerInstanceOption]))
 -> DescribeBrokerInstanceOptionsResponse
 -> f DescribeBrokerInstanceOptionsResponse)
-> ((Maybe [BrokerInstanceOption]
     -> f (Maybe [BrokerInstanceOption]))
    -> Maybe [BrokerInstanceOption]
    -> f (Maybe [BrokerInstanceOption]))
-> (Maybe [BrokerInstanceOption]
    -> f (Maybe [BrokerInstanceOption]))
-> DescribeBrokerInstanceOptionsResponse
-> f DescribeBrokerInstanceOptionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BrokerInstanceOption]
  [BrokerInstanceOption]
  [BrokerInstanceOption]
  [BrokerInstanceOption]
-> Iso
     (Maybe [BrokerInstanceOption])
     (Maybe [BrokerInstanceOption])
     (Maybe [BrokerInstanceOption])
     (Maybe [BrokerInstanceOption])
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
  [BrokerInstanceOption]
  [BrokerInstanceOption]
  [BrokerInstanceOption]
  [BrokerInstanceOption]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

instance
  Prelude.NFData
    DescribeBrokerInstanceOptionsResponse