{-# 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.Kafka.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 a description of this MSK configuration.
module Amazonka.Kafka.DescribeConfiguration
  ( -- * Creating a Request
    DescribeConfiguration (..),
    newDescribeConfiguration,

    -- * Request Lenses
    describeConfiguration_arn,

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

    -- * Response Lenses
    describeConfigurationResponse_creationTime,
    describeConfigurationResponse_state,
    describeConfigurationResponse_kafkaVersions,
    describeConfigurationResponse_arn,
    describeConfigurationResponse_latestRevision,
    describeConfigurationResponse_name,
    describeConfigurationResponse_description,
    describeConfigurationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Kafka.Types
import qualified Amazonka.Lens as Lens
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 Amazon Resource Name (ARN) that uniquely identifies an MSK
    -- configuration and all of its revisions.
    DescribeConfiguration -> Text
arn :: 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:
--
-- 'arn', 'describeConfiguration_arn' - The Amazon Resource Name (ARN) that uniquely identifies an MSK
-- configuration and all of its revisions.
newDescribeConfiguration ::
  -- | 'arn'
  Prelude.Text ->
  DescribeConfiguration
newDescribeConfiguration :: Text -> DescribeConfiguration
newDescribeConfiguration Text
pArn_ =
  DescribeConfiguration' :: Text -> DescribeConfiguration
DescribeConfiguration' {$sel:arn:DescribeConfiguration' :: Text
arn = Text
pArn_}

-- | The Amazon Resource Name (ARN) that uniquely identifies an MSK
-- configuration and all of its revisions.
describeConfiguration_arn :: Lens.Lens' DescribeConfiguration Prelude.Text
describeConfiguration_arn :: (Text -> f Text)
-> DescribeConfiguration -> f DescribeConfiguration
describeConfiguration_arn = (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
arn :: Text
$sel:arn:DescribeConfiguration' :: DescribeConfiguration -> Text
arn} -> Text
arn) (\s :: DescribeConfiguration
s@DescribeConfiguration' {} Text
a -> DescribeConfiguration
s {$sel:arn:DescribeConfiguration' :: Text
arn = 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 POSIX
-> Maybe ConfigurationState
-> Maybe [Text]
-> Maybe Text
-> Maybe ConfigurationRevision
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeConfigurationResponse
DescribeConfigurationResponse'
            (Maybe POSIX
 -> Maybe ConfigurationState
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe ConfigurationRevision
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeConfigurationResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe ConfigurationState
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe ConfigurationRevision
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeConfigurationResponse)
forall (f :: * -> *) a b. Functor 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
"creationTime")
            Either
  String
  (Maybe ConfigurationState
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe ConfigurationRevision
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe ConfigurationState)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe ConfigurationRevision
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ConfigurationState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"state")
            Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe ConfigurationRevision
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe ConfigurationRevision
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"kafkaVersions" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe ConfigurationRevision
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ConfigurationRevision
      -> Maybe Text
      -> Maybe 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 Text
   -> Maybe Text
   -> Int
   -> DescribeConfigurationResponse)
-> Either String (Maybe ConfigurationRevision)
-> Either
     String
     (Maybe Text -> Maybe 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 Text -> Maybe Text -> Int -> DescribeConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe 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 -> Int -> DescribeConfigurationResponse)
-> Either String (Maybe 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 Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"description")
            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
arn :: Text
$sel:arn: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
arn]

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'
  { -- | The time when the configuration was created.
    DescribeConfigurationResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The state of the configuration. The possible states are ACTIVE,
    -- DELETING, and DELETE_FAILED.
    DescribeConfigurationResponse -> Maybe ConfigurationState
state :: Prelude.Maybe ConfigurationState,
    -- | The versions of Apache Kafka with which you can use this MSK
    -- configuration.
    DescribeConfigurationResponse -> Maybe [Text]
kafkaVersions :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Name (ARN) of the configuration.
    DescribeConfigurationResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Latest revision of the configuration.
    DescribeConfigurationResponse -> Maybe ConfigurationRevision
latestRevision :: Prelude.Maybe ConfigurationRevision,
    -- | The name of the configuration.
    DescribeConfigurationResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The description of the configuration.
    DescribeConfigurationResponse -> Maybe Text
description :: Prelude.Maybe 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:
--
-- 'creationTime', 'describeConfigurationResponse_creationTime' - The time when the configuration was created.
--
-- 'state', 'describeConfigurationResponse_state' - The state of the configuration. The possible states are ACTIVE,
-- DELETING, and DELETE_FAILED.
--
-- 'kafkaVersions', 'describeConfigurationResponse_kafkaVersions' - The versions of Apache Kafka with which you can use this MSK
-- configuration.
--
-- 'arn', 'describeConfigurationResponse_arn' - The Amazon Resource Name (ARN) of the configuration.
--
-- 'latestRevision', 'describeConfigurationResponse_latestRevision' - Latest revision of the configuration.
--
-- 'name', 'describeConfigurationResponse_name' - The name of the configuration.
--
-- 'description', 'describeConfigurationResponse_description' - The description of the configuration.
--
-- 'httpStatus', 'describeConfigurationResponse_httpStatus' - The response's http status code.
newDescribeConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeConfigurationResponse
newDescribeConfigurationResponse :: Int -> DescribeConfigurationResponse
newDescribeConfigurationResponse Int
pHttpStatus_ =
  DescribeConfigurationResponse' :: Maybe POSIX
-> Maybe ConfigurationState
-> Maybe [Text]
-> Maybe Text
-> Maybe ConfigurationRevision
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeConfigurationResponse
DescribeConfigurationResponse'
    { $sel:creationTime:DescribeConfigurationResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:state:DescribeConfigurationResponse' :: Maybe ConfigurationState
state = Maybe ConfigurationState
forall a. Maybe a
Prelude.Nothing,
      $sel:kafkaVersions:DescribeConfigurationResponse' :: Maybe [Text]
kafkaVersions = 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:name:DescribeConfigurationResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeConfigurationResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The time when the configuration was created.
describeConfigurationResponse_creationTime :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe Prelude.UTCTime)
describeConfigurationResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_creationTime = (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
creationTime :: Maybe POSIX
$sel:creationTime:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe POSIX
a -> DescribeConfigurationResponse
s {$sel:creationTime:DescribeConfigurationResponse' :: Maybe POSIX
creationTime = 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

-- | The state of the configuration. The possible states are ACTIVE,
-- DELETING, and DELETE_FAILED.
describeConfigurationResponse_state :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe ConfigurationState)
describeConfigurationResponse_state :: (Maybe ConfigurationState -> f (Maybe ConfigurationState))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_state = (DescribeConfigurationResponse -> Maybe ConfigurationState)
-> (DescribeConfigurationResponse
    -> Maybe ConfigurationState -> DescribeConfigurationResponse)
-> Lens
     DescribeConfigurationResponse
     DescribeConfigurationResponse
     (Maybe ConfigurationState)
     (Maybe ConfigurationState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationResponse' {Maybe ConfigurationState
state :: Maybe ConfigurationState
$sel:state:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe ConfigurationState
state} -> Maybe ConfigurationState
state) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe ConfigurationState
a -> DescribeConfigurationResponse
s {$sel:state:DescribeConfigurationResponse' :: Maybe ConfigurationState
state = Maybe ConfigurationState
a} :: DescribeConfigurationResponse)

-- | The versions of Apache Kafka with which you can use this MSK
-- configuration.
describeConfigurationResponse_kafkaVersions :: Lens.Lens' DescribeConfigurationResponse (Prelude.Maybe [Prelude.Text])
describeConfigurationResponse_kafkaVersions :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeConfigurationResponse -> f DescribeConfigurationResponse
describeConfigurationResponse_kafkaVersions = (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]
kafkaVersions :: Maybe [Text]
$sel:kafkaVersions:DescribeConfigurationResponse' :: DescribeConfigurationResponse -> Maybe [Text]
kafkaVersions} -> Maybe [Text]
kafkaVersions) (\s :: DescribeConfigurationResponse
s@DescribeConfigurationResponse' {} Maybe [Text]
a -> DescribeConfigurationResponse
s {$sel:kafkaVersions:DescribeConfigurationResponse' :: Maybe [Text]
kafkaVersions = Maybe [Text]
a} :: DescribeConfigurationResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeConfigurationResponse
 -> f DescribeConfigurationResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeConfigurationResponse
-> f DescribeConfigurationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (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)

-- | 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)

-- | The name of the configuration.
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)

-- | 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)

-- | 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