{-# 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.DescribeBrokerEngineTypes
-- 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 engine types and versions.
module Amazonka.MQ.DescribeBrokerEngineTypes
  ( -- * Creating a Request
    DescribeBrokerEngineTypes (..),
    newDescribeBrokerEngineTypes,

    -- * Request Lenses
    describeBrokerEngineTypes_nextToken,
    describeBrokerEngineTypes_engineType,
    describeBrokerEngineTypes_maxResults,

    -- * Destructuring the Response
    DescribeBrokerEngineTypesResponse (..),
    newDescribeBrokerEngineTypesResponse,

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

-- |
-- Create a value of 'DescribeBrokerEngineTypes' 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', 'describeBrokerEngineTypes_nextToken' - The token that specifies the next page of results Amazon MQ should
-- return. To request the first page, leave nextToken empty.
--
-- 'engineType', 'describeBrokerEngineTypes_engineType' - Filter response by engine type.
--
-- 'maxResults', 'describeBrokerEngineTypes_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.
newDescribeBrokerEngineTypes ::
  DescribeBrokerEngineTypes
newDescribeBrokerEngineTypes :: DescribeBrokerEngineTypes
newDescribeBrokerEngineTypes =
  DescribeBrokerEngineTypes' :: Maybe Text
-> Maybe Text -> Maybe Natural -> DescribeBrokerEngineTypes
DescribeBrokerEngineTypes'
    { $sel:nextToken:DescribeBrokerEngineTypes' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engineType:DescribeBrokerEngineTypes' :: Maybe Text
engineType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeBrokerEngineTypes' :: 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.
describeBrokerEngineTypes_nextToken :: Lens.Lens' DescribeBrokerEngineTypes (Prelude.Maybe Prelude.Text)
describeBrokerEngineTypes_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeBrokerEngineTypes -> f DescribeBrokerEngineTypes
describeBrokerEngineTypes_nextToken = (DescribeBrokerEngineTypes -> Maybe Text)
-> (DescribeBrokerEngineTypes
    -> Maybe Text -> DescribeBrokerEngineTypes)
-> Lens
     DescribeBrokerEngineTypes
     DescribeBrokerEngineTypes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBrokerEngineTypes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeBrokerEngineTypes' :: DescribeBrokerEngineTypes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeBrokerEngineTypes
s@DescribeBrokerEngineTypes' {} Maybe Text
a -> DescribeBrokerEngineTypes
s {$sel:nextToken:DescribeBrokerEngineTypes' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeBrokerEngineTypes)

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

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

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

instance Prelude.NFData DescribeBrokerEngineTypes

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

instance Core.ToQuery DescribeBrokerEngineTypes where
  toQuery :: DescribeBrokerEngineTypes -> QueryString
toQuery DescribeBrokerEngineTypes' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
engineType :: Maybe Text
nextToken :: Maybe Text
$sel:maxResults:DescribeBrokerEngineTypes' :: DescribeBrokerEngineTypes -> Maybe Natural
$sel:engineType:DescribeBrokerEngineTypes' :: DescribeBrokerEngineTypes -> Maybe Text
$sel:nextToken:DescribeBrokerEngineTypes' :: DescribeBrokerEngineTypes -> 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
      ]

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

-- |
-- Create a value of 'DescribeBrokerEngineTypesResponse' 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:
--
-- 'brokerEngineTypes', 'describeBrokerEngineTypesResponse_brokerEngineTypes' - List of available engine types and versions.
--
-- 'nextToken', 'describeBrokerEngineTypesResponse_nextToken' - The token that specifies the next page of results Amazon MQ should
-- return. To request the first page, leave nextToken empty.
--
-- 'maxResults', 'describeBrokerEngineTypesResponse_maxResults' - Required. The maximum number of engine types that can be returned per
-- page (20 by default). This value must be an integer from 5 to 100.
--
-- 'httpStatus', 'describeBrokerEngineTypesResponse_httpStatus' - The response's http status code.
newDescribeBrokerEngineTypesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeBrokerEngineTypesResponse
newDescribeBrokerEngineTypesResponse :: Int -> DescribeBrokerEngineTypesResponse
newDescribeBrokerEngineTypesResponse Int
pHttpStatus_ =
  DescribeBrokerEngineTypesResponse' :: Maybe [BrokerEngineType]
-> Maybe Text
-> Maybe Natural
-> Int
-> DescribeBrokerEngineTypesResponse
DescribeBrokerEngineTypesResponse'
    { $sel:brokerEngineTypes:DescribeBrokerEngineTypesResponse' :: Maybe [BrokerEngineType]
brokerEngineTypes =
        Maybe [BrokerEngineType]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeBrokerEngineTypesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeBrokerEngineTypesResponse' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeBrokerEngineTypesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | List of available engine types and versions.
describeBrokerEngineTypesResponse_brokerEngineTypes :: Lens.Lens' DescribeBrokerEngineTypesResponse (Prelude.Maybe [BrokerEngineType])
describeBrokerEngineTypesResponse_brokerEngineTypes :: (Maybe [BrokerEngineType] -> f (Maybe [BrokerEngineType]))
-> DescribeBrokerEngineTypesResponse
-> f DescribeBrokerEngineTypesResponse
describeBrokerEngineTypesResponse_brokerEngineTypes = (DescribeBrokerEngineTypesResponse -> Maybe [BrokerEngineType])
-> (DescribeBrokerEngineTypesResponse
    -> Maybe [BrokerEngineType] -> DescribeBrokerEngineTypesResponse)
-> Lens
     DescribeBrokerEngineTypesResponse
     DescribeBrokerEngineTypesResponse
     (Maybe [BrokerEngineType])
     (Maybe [BrokerEngineType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBrokerEngineTypesResponse' {Maybe [BrokerEngineType]
brokerEngineTypes :: Maybe [BrokerEngineType]
$sel:brokerEngineTypes:DescribeBrokerEngineTypesResponse' :: DescribeBrokerEngineTypesResponse -> Maybe [BrokerEngineType]
brokerEngineTypes} -> Maybe [BrokerEngineType]
brokerEngineTypes) (\s :: DescribeBrokerEngineTypesResponse
s@DescribeBrokerEngineTypesResponse' {} Maybe [BrokerEngineType]
a -> DescribeBrokerEngineTypesResponse
s {$sel:brokerEngineTypes:DescribeBrokerEngineTypesResponse' :: Maybe [BrokerEngineType]
brokerEngineTypes = Maybe [BrokerEngineType]
a} :: DescribeBrokerEngineTypesResponse) ((Maybe [BrokerEngineType] -> f (Maybe [BrokerEngineType]))
 -> DescribeBrokerEngineTypesResponse
 -> f DescribeBrokerEngineTypesResponse)
-> ((Maybe [BrokerEngineType] -> f (Maybe [BrokerEngineType]))
    -> Maybe [BrokerEngineType] -> f (Maybe [BrokerEngineType]))
-> (Maybe [BrokerEngineType] -> f (Maybe [BrokerEngineType]))
-> DescribeBrokerEngineTypesResponse
-> f DescribeBrokerEngineTypesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BrokerEngineType]
  [BrokerEngineType]
  [BrokerEngineType]
  [BrokerEngineType]
-> Iso
     (Maybe [BrokerEngineType])
     (Maybe [BrokerEngineType])
     (Maybe [BrokerEngineType])
     (Maybe [BrokerEngineType])
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
  [BrokerEngineType]
  [BrokerEngineType]
  [BrokerEngineType]
  [BrokerEngineType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

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

instance
  Prelude.NFData
    DescribeBrokerEngineTypesResponse