{-# 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.DescribeConfiguration
-- 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 specified configuration.
module Amazonka.MQ.DescribeConfiguration
  ( -- * Creating a Request
    DescribeConfiguration (..),
    newDescribeConfiguration,

    -- * Request Lenses
    describeConfiguration_configurationId,

    -- * Destructuring the Response
    DescribeConfigurationResponse (..),
    newDescribeConfigurationResponse,

    -- * Response Lenses
    describeConfigurationResponse_engineVersion,
    describeConfigurationResponse_arn,
    describeConfigurationResponse_latestRevision,
    describeConfigurationResponse_created,
    describeConfigurationResponse_authenticationStrategy,
    describeConfigurationResponse_name,
    describeConfigurationResponse_id,
    describeConfigurationResponse_description,
    describeConfigurationResponse_engineType,
    describeConfigurationResponse_tags,
    describeConfigurationResponse_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:/ 'newDescribeConfiguration' smart constructor.
data DescribeConfiguration = DescribeConfiguration'
  { -- | The unique ID that Amazon MQ generates for the configuration.
    DescribeConfiguration -> Text
configurationId :: Prelude.Text
  }
  deriving (DescribeConfiguration -> DescribeConfiguration -> Bool
(DescribeConfiguration -> DescribeConfiguration -> Bool)
-> (DescribeConfiguration -> DescribeConfiguration -> Bool)
-> Eq DescribeConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConfiguration -> DescribeConfiguration -> Bool
$c/= :: DescribeConfiguration -> DescribeConfiguration -> Bool
== :: DescribeConfiguration -> DescribeConfiguration -> Bool
$c== :: DescribeConfiguration -> DescribeConfiguration -> Bool
Prelude.Eq, ReadPrec [DescribeConfiguration]
ReadPrec DescribeConfiguration
Int -> ReadS DescribeConfiguration
ReadS [DescribeConfiguration]
(Int -> ReadS DescribeConfiguration)
-> ReadS [DescribeConfiguration]
-> ReadPrec DescribeConfiguration
-> ReadPrec [DescribeConfiguration]
-> Read DescribeConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConfiguration]
$creadListPrec :: ReadPrec [DescribeConfiguration]
readPrec :: ReadPrec DescribeConfiguration
$creadPrec :: ReadPrec DescribeConfiguration
readList :: ReadS [DescribeConfiguration]
$creadList :: ReadS [DescribeConfiguration]
readsPrec :: Int -> ReadS DescribeConfiguration
$creadsPrec :: Int -> ReadS DescribeConfiguration
Prelude.Read, Int -> DescribeConfiguration -> ShowS
[DescribeConfiguration] -> ShowS
DescribeConfiguration -> String
(Int -> DescribeConfiguration -> ShowS)
-> (DescribeConfiguration -> String)
-> ([DescribeConfiguration] -> ShowS)
-> Show DescribeConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConfiguration] -> ShowS
$cshowList :: [DescribeConfiguration] -> ShowS
show :: DescribeConfiguration -> String
$cshow :: DescribeConfiguration -> String
showsPrec :: Int -> DescribeConfiguration -> ShowS
$cshowsPrec :: Int -> DescribeConfiguration -> ShowS
Prelude.Show, (forall x. DescribeConfiguration -> Rep DescribeConfiguration x)
-> (forall x. Rep DescribeConfiguration x -> DescribeConfiguration)
-> Generic DescribeConfiguration
forall x. Rep DescribeConfiguration x -> DescribeConfiguration
forall x. DescribeConfiguration -> Rep DescribeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeConfiguration x -> DescribeConfiguration
$cfrom :: forall x. DescribeConfiguration -> Rep DescribeConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConfiguration' 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:
--
-- 'configurationId', 'describeConfiguration_configurationId' - The unique ID that Amazon MQ generates for the configuration.
newDescribeConfiguration ::
  -- | 'configurationId'
  Prelude.Text ->
  DescribeConfiguration
newDescribeConfiguration :: Text -> DescribeConfiguration
newDescribeConfiguration Text
pConfigurationId_ =
  DescribeConfiguration' :: Text -> DescribeConfiguration
DescribeConfiguration'
    { $sel:configurationId:DescribeConfiguration' :: Text
configurationId =
        Text
pConfigurationId_
    }

-- | The unique ID that Amazon MQ generates for the configuration.
describeConfiguration_configurationId :: Lens.Lens' DescribeConfiguration Prelude.Text
describeConfiguration_configurationId :: (Text -> f Text)
-> DescribeConfiguration -> f DescribeConfiguration
describeConfiguration_configurationId = (DescribeConfiguration -> Text)
-> (DescribeConfiguration -> Text -> DescribeConfiguration)
-> Lens DescribeConfiguration DescribeConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfiguration' {Text
configurationId :: Text
$sel:configurationId:DescribeConfiguration' :: DescribeConfiguration -> Text
configurationId} -> Text
configurationId) (\s :: DescribeConfiguration
s@DescribeConfiguration' {} Text
a -> DescribeConfiguration
s {$sel:configurationId:DescribeConfiguration' :: Text
configurationId = Text
a} :: DescribeConfiguration)

instance Core.AWSRequest DescribeConfiguration where
  type
    AWSResponse DescribeConfiguration =
      DescribeConfigurationResponse
  request :: DescribeConfiguration -> Request DescribeConfiguration
request = Service -> DescribeConfiguration -> Request DescribeConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeConfiguration))
-> Logger
-> Service
-> Proxy DescribeConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConfiguration)))
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 Text
-> Maybe ConfigurationRevision
-> Maybe POSIX
-> Maybe AuthenticationStrategy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EngineType
-> Maybe (HashMap Text Text)
-> Int
-> DescribeConfigurationResponse
DescribeConfigurationResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe ConfigurationRevision
 -> Maybe POSIX
 -> Maybe AuthenticationStrategy
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe EngineType
 -> Maybe (HashMap Text Text)
 -> Int
 -> DescribeConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ConfigurationRevision
      -> Maybe POSIX
      -> Maybe AuthenticationStrategy
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe EngineType
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeConfigurationResponse)
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
"engineVersion")
            Either
  String
  (Maybe Text
   -> Maybe ConfigurationRevision
   -> Maybe POSIX
   -> Maybe AuthenticationStrategy
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe EngineType
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ConfigurationRevision
      -> Maybe POSIX
      -> Maybe AuthenticationStrategy
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe EngineType
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeConfigurationResponse)
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
"arn")
            Either
  String
  (Maybe ConfigurationRevision
   -> Maybe POSIX
   -> Maybe AuthenticationStrategy
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe EngineType
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe ConfigurationRevision)
-> Either
     String
     (Maybe POSIX
      -> Maybe AuthenticationStrategy
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe EngineType
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ConfigurationRevision)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"latestRevision")
            Either
  String
  (Maybe POSIX
   -> Maybe AuthenticationStrategy
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe EngineType
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe AuthenticationStrategy
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe EngineType
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"created")
            Either
  String
  (Maybe AuthenticationStrategy
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe EngineType
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe AuthenticationStrategy)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe EngineType
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe AuthenticationStrategy)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"authenticationStrategy")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe EngineType
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe EngineType
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeConfigurationResponse)
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
"name")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe EngineType
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe EngineType
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeConfigurationResponse)
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
"id")
            Either
  String
  (Maybe Text
   -> Maybe EngineType
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe EngineType
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeConfigurationResponse)
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
"description")
            Either
  String
  (Maybe EngineType
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe EngineType)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> DescribeConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe EngineType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"engineType")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> DescribeConfigurationResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeConfigurationResponse)
-> Either String Int -> Either String DescribeConfigurationResponse
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 DescribeConfiguration

instance Prelude.NFData DescribeConfiguration

instance Core.ToHeaders DescribeConfiguration where
  toHeaders :: DescribeConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeConfiguration -> 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 DescribeConfiguration where
  toPath :: DescribeConfiguration -> ByteString
toPath DescribeConfiguration' {Text
configurationId :: Text
$sel:configurationId:DescribeConfiguration' :: DescribeConfiguration -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v1/configurations/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
configurationId]

instance Core.ToQuery DescribeConfiguration where
  toQuery :: DescribeConfiguration -> QueryString
toQuery = QueryString -> DescribeConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeConfigurationResponse' smart constructor.
data DescribeConfigurationResponse = DescribeConfigurationResponse'
  { -- | Required. The broker engine\'s version. For a list of supported engine
    -- versions, see,
    -- <https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker-engine.html Supported engines>.
    DescribeConfigurationResponse -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | Required. The ARN of the configuration.
    DescribeConfigurationResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Required. The latest revision of the configuration.
    DescribeConfigurationResponse -> Maybe ConfigurationRevision
latestRevision :: Prelude.Maybe ConfigurationRevision,
    -- | Required. The date and time of the configuration revision.
    DescribeConfigurationResponse -> Maybe POSIX
created :: Prelude.Maybe Core.POSIX,
    -- | Optional. The authentication strategy associated with the configuration.
    -- The default is SIMPLE.
    DescribeConfigurationResponse -> Maybe AuthenticationStrategy
authenticationStrategy :: Prelude.Maybe AuthenticationStrategy,
    -- | Required. The name of the configuration. This value can contain only
    -- alphanumeric characters, dashes, periods, underscores, and tildes (- . _
    -- ~). This value must be 1-150 characters long.
    DescribeConfigurationResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Required. The unique ID that Amazon MQ generates for the configuration.
    DescribeConfigurationResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | Required. The description of the configuration.
    DescribeConfigurationResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Required. The type of broker engine. Currently, Amazon MQ supports
    -- ACTIVEMQ and RABBITMQ.
    DescribeConfigurationResponse -> Maybe EngineType
engineType :: Prelude.Maybe EngineType,
    -- | The list of all tags associated with this configuration.
    DescribeConfigurationResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeConfigurationResponse
-> DescribeConfigurationResponse -> Bool
(DescribeConfigurationResponse
 -> DescribeConfigurationResponse -> Bool)
-> (DescribeConfigurationResponse
    -> DescribeConfigurationResponse -> Bool)
-> Eq DescribeConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConfigurationResponse
-> DescribeConfigurationResponse -> Bool
$c/= :: DescribeConfigurationResponse
-> DescribeConfigurationResponse -> Bool
== :: DescribeConfigurationResponse
-> DescribeConfigurationResponse -> Bool
$c== :: DescribeConfigurationResponse
-> DescribeConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeConfigurationResponse]
ReadPrec DescribeConfigurationResponse
Int -> ReadS DescribeConfigurationResponse
ReadS [DescribeConfigurationResponse]
(Int -> ReadS DescribeConfigurationResponse)
-> ReadS [DescribeConfigurationResponse]
-> ReadPrec DescribeConfigurationResponse
-> ReadPrec [DescribeConfigurationResponse]
-> Read DescribeConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConfigurationResponse]
$creadListPrec :: ReadPrec [DescribeConfigurationResponse]
readPrec :: ReadPrec DescribeConfigurationResponse
$creadPrec :: ReadPrec DescribeConfigurationResponse
readList :: ReadS [DescribeConfigurationResponse]
$creadList :: ReadS [DescribeConfigurationResponse]
readsPrec :: Int -> ReadS DescribeConfigurationResponse
$creadsPrec :: Int -> ReadS DescribeConfigurationResponse
Prelude.Read, Int -> DescribeConfigurationResponse -> ShowS
[DescribeConfigurationResponse] -> ShowS
DescribeConfigurationResponse -> String
(Int -> DescribeConfigurationResponse -> ShowS)
-> (DescribeConfigurationResponse -> String)
-> ([DescribeConfigurationResponse] -> ShowS)
-> Show DescribeConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConfigurationResponse] -> ShowS
$cshowList :: [DescribeConfigurationResponse] -> ShowS
show :: DescribeConfigurationResponse -> String
$cshow :: DescribeConfigurationResponse -> String
showsPrec :: Int -> DescribeConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DescribeConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 DescribeConfigurationResponse
 -> Rep DescribeConfigurationResponse x)
-> (forall x.
    Rep DescribeConfigurationResponse x
    -> DescribeConfigurationResponse)
-> Generic DescribeConfigurationResponse
forall x.
Rep DescribeConfigurationResponse x
-> DescribeConfigurationResponse
forall x.
DescribeConfigurationResponse
-> Rep DescribeConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConfigurationResponse x
-> DescribeConfigurationResponse
$cfrom :: forall x.
DescribeConfigurationResponse
-> Rep DescribeConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConfigurationResponse' 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:
--
-- 'engineVersion', 'describeConfigurationResponse_engineVersion' - Required. The broker engine\'s version. For a list of supported engine
-- versions, see,
-- <https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker-engine.html Supported engines>.
--
-- 'arn', 'describeConfigurationResponse_arn' - Required. The ARN of the configuration.
--
-- 'latestRevision', 'describeConfigurationResponse_latestRevision' - Required. The latest revision of the configuration.
--
-- 'created', 'describeConfigurationResponse_created' - Required. The date and time of the configuration revision.
--
-- 'authenticationStrategy', 'describeConfigurationResponse_authenticationStrategy' - Optional. The authentication strategy associated with the configuration.
-- The default is SIMPLE.
--
-- 'name', 'describeConfigurationResponse_name' - Required. The name of the configuration. This value can contain only
-- alphanumeric characters, dashes, periods, underscores, and tildes (- . _
-- ~). This value must be 1-150 characters long.
--
-- 'id', 'describeConfigurationResponse_id' - Required. The unique ID that Amazon MQ generates for the configuration.
--
-- 'description', 'describeConfigurationResponse_description' - Required. The description of the configuration.
--
-- 'engineType', 'describeConfigurationResponse_engineType' - Required. The type of broker engine. Currently, Amazon MQ supports
-- ACTIVEMQ and RABBITMQ.
--
-- 'tags', 'describeConfigurationResponse_tags' - The list of all tags associated with this configuration.
--
-- 'httpStatus', 'describeConfigurationResponse_httpStatus' - The response's http status code.
newDescribeConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeConfigurationResponse
newDescribeConfigurationResponse :: Int -> DescribeConfigurationResponse
newDescribeConfigurationResponse Int
pHttpStatus_ =
  DescribeConfigurationResponse' :: Maybe Text
-> Maybe Text
-> Maybe ConfigurationRevision
-> Maybe POSIX
-> Maybe AuthenticationStrategy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EngineType
-> Maybe (HashMap Text Text)
-> Int
-> DescribeConfigurationResponse
DescribeConfigurationResponse'
    { $sel:engineVersion:DescribeConfigurationResponse' :: Maybe Text
engineVersion =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeConfigurationResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:latestRevision:DescribeConfigurationResponse' :: Maybe ConfigurationRevision
latestRevision = Maybe ConfigurationRevision
forall a. Maybe a
Prelude.Nothing,
      $sel:created:DescribeConfigurationResponse' :: Maybe POSIX
created = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:authenticationStrategy:DescribeConfigurationResponse' :: Maybe AuthenticationStrategy
authenticationStrategy = Maybe AuthenticationStrategy
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeConfigurationResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:DescribeConfigurationResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeConfigurationResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engineType:DescribeConfigurationResponse' :: Maybe EngineType
engineType = Maybe EngineType
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeConfigurationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Required. The broker engine\'s version. For a list of supported engine
-- versions, see,
-- <https://docs.aws.amazon.com//amazon-mq/latest/developer-guide/broker-engine.html Supported engines>.
describeConfigurationResponse_engineVersion :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe Prelude.Text)
describeConfigurationResponse_engineVersion :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_engineVersion = (DescribeConfigurationResponse -> Maybe Text)
-> (DescribeConfigurationResponse
    -> Maybe Text -> DescribeConfigurationResponse)
-> Lens
     DescribeConfigurationResponse
     DescribeConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationResponse' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe Text
a -> DescribeConfigurationResponse
s {$sel:engineVersion:DescribeConfigurationResponse' :: Maybe Text
engineVersion = Maybe Text
a} :: DescribeConfigurationResponse)

-- | Required. The ARN of the configuration.
describeConfigurationResponse_arn :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe Prelude.Text)
describeConfigurationResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_arn = (DescribeConfigurationResponse -> Maybe Text)
-> (DescribeConfigurationResponse
    -> Maybe Text -> DescribeConfigurationResponse)
-> Lens
     DescribeConfigurationResponse
     DescribeConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe Text
a -> DescribeConfigurationResponse
s {$sel:arn:DescribeConfigurationResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeConfigurationResponse)

-- | Required. The latest revision of the configuration.
describeConfigurationResponse_latestRevision :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe ConfigurationRevision)
describeConfigurationResponse_latestRevision :: (Maybe ConfigurationRevision -> f (Maybe ConfigurationRevision))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_latestRevision = (DescribeConfigurationResponse -> Maybe ConfigurationRevision)
-> (DescribeConfigurationResponse
    -> Maybe ConfigurationRevision -> DescribeConfigurationResponse)
-> Lens
     DescribeConfigurationResponse
     DescribeConfigurationResponse
     (Maybe ConfigurationRevision)
     (Maybe ConfigurationRevision)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationResponse' {Maybe ConfigurationRevision
latestRevision :: Maybe ConfigurationRevision
$sel:latestRevision:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe ConfigurationRevision
latestRevision} -> Maybe ConfigurationRevision
latestRevision) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe ConfigurationRevision
a -> DescribeConfigurationResponse
s {$sel:latestRevision:DescribeConfigurationResponse' :: Maybe ConfigurationRevision
latestRevision = Maybe ConfigurationRevision
a} :: DescribeConfigurationResponse)

-- | Required. The date and time of the configuration revision.
describeConfigurationResponse_created :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe Prelude.UTCTime)
describeConfigurationResponse_created :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_created = (DescribeConfigurationResponse -> Maybe POSIX)
-> (DescribeConfigurationResponse
    -> Maybe POSIX -> DescribeConfigurationResponse)
-> Lens
     DescribeConfigurationResponse
     DescribeConfigurationResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationResponse' {Maybe POSIX
created :: Maybe POSIX
$sel:created:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe POSIX
created} -> Maybe POSIX
created) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe POSIX
a -> DescribeConfigurationResponse
s {$sel:created:DescribeConfigurationResponse' :: Maybe POSIX
created = Maybe POSIX
a} :: DescribeConfigurationResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeConfigurationResponse
 -> f DescribeConfigurationResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeConfigurationResponse
-> f DescribeConfigurationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Optional. The authentication strategy associated with the configuration.
-- The default is SIMPLE.
describeConfigurationResponse_authenticationStrategy :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe AuthenticationStrategy)
describeConfigurationResponse_authenticationStrategy :: (Maybe AuthenticationStrategy -> f (Maybe AuthenticationStrategy))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_authenticationStrategy = (DescribeConfigurationResponse -> Maybe AuthenticationStrategy)
-> (DescribeConfigurationResponse
    -> Maybe AuthenticationStrategy -> DescribeConfigurationResponse)
-> Lens
     DescribeConfigurationResponse
     DescribeConfigurationResponse
     (Maybe AuthenticationStrategy)
     (Maybe AuthenticationStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationResponse' {Maybe AuthenticationStrategy
authenticationStrategy :: Maybe AuthenticationStrategy
$sel:authenticationStrategy:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe AuthenticationStrategy
authenticationStrategy} -> Maybe AuthenticationStrategy
authenticationStrategy) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe AuthenticationStrategy
a -> DescribeConfigurationResponse
s {$sel:authenticationStrategy:DescribeConfigurationResponse' :: Maybe AuthenticationStrategy
authenticationStrategy = Maybe AuthenticationStrategy
a} :: DescribeConfigurationResponse)

-- | Required. The name of the configuration. This value can contain only
-- alphanumeric characters, dashes, periods, underscores, and tildes (- . _
-- ~). This value must be 1-150 characters long.
describeConfigurationResponse_name :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe Prelude.Text)
describeConfigurationResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_name = (DescribeConfigurationResponse -> Maybe Text)
-> (DescribeConfigurationResponse
    -> Maybe Text -> DescribeConfigurationResponse)
-> Lens
     DescribeConfigurationResponse
     DescribeConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe Text
a -> DescribeConfigurationResponse
s {$sel:name:DescribeConfigurationResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeConfigurationResponse)

-- | Required. The unique ID that Amazon MQ generates for the configuration.
describeConfigurationResponse_id :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe Prelude.Text)
describeConfigurationResponse_id :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_id = (DescribeConfigurationResponse -> Maybe Text)
-> (DescribeConfigurationResponse
    -> Maybe Text -> DescribeConfigurationResponse)
-> Lens
     DescribeConfigurationResponse
     DescribeConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationResponse' {Maybe Text
id :: Maybe Text
$sel:id:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe Text
a -> DescribeConfigurationResponse
s {$sel:id:DescribeConfigurationResponse' :: Maybe Text
id = Maybe Text
a} :: DescribeConfigurationResponse)

-- | Required. The description of the configuration.
describeConfigurationResponse_description :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe Prelude.Text)
describeConfigurationResponse_description :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_description = (DescribeConfigurationResponse -> Maybe Text)
-> (DescribeConfigurationResponse
    -> Maybe Text -> DescribeConfigurationResponse)
-> Lens
     DescribeConfigurationResponse
     DescribeConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationResponse' {Maybe Text
description :: Maybe Text
$sel:description:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe Text
a -> DescribeConfigurationResponse
s {$sel:description:DescribeConfigurationResponse' :: Maybe Text
description = Maybe Text
a} :: DescribeConfigurationResponse)

-- | Required. The type of broker engine. Currently, Amazon MQ supports
-- ACTIVEMQ and RABBITMQ.
describeConfigurationResponse_engineType :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe EngineType)
describeConfigurationResponse_engineType :: (Maybe EngineType -> f (Maybe EngineType))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_engineType = (DescribeConfigurationResponse -> Maybe EngineType)
-> (DescribeConfigurationResponse
    -> Maybe EngineType -> DescribeConfigurationResponse)
-> Lens
     DescribeConfigurationResponse
     DescribeConfigurationResponse
     (Maybe EngineType)
     (Maybe EngineType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationResponse' {Maybe EngineType
engineType :: Maybe EngineType
$sel:engineType:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe EngineType
engineType} -> Maybe EngineType
engineType) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe EngineType
a -> DescribeConfigurationResponse
s {$sel:engineType:DescribeConfigurationResponse' :: Maybe EngineType
engineType = Maybe EngineType
a} :: DescribeConfigurationResponse)

-- | The list of all tags associated with this configuration.
describeConfigurationResponse_tags :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeConfigurationResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_tags = (DescribeConfigurationResponse -> Maybe (HashMap Text Text))
-> (DescribeConfigurationResponse
    -> Maybe (HashMap Text Text) -> DescribeConfigurationResponse)
-> Lens
     DescribeConfigurationResponse
     DescribeConfigurationResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe (HashMap Text Text)
a -> DescribeConfigurationResponse
s {$sel:tags:DescribeConfigurationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeConfigurationResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeConfigurationResponse
 -> f DescribeConfigurationResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeConfigurationResponse
-> f DescribeConfigurationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeConfigurationResponse