{-# 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.UpdateClusterKafkaVersion
-- 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)
--
-- Updates the Apache Kafka version for the cluster.
module Amazonka.Kafka.UpdateClusterKafkaVersion
  ( -- * Creating a Request
    UpdateClusterKafkaVersion (..),
    newUpdateClusterKafkaVersion,

    -- * Request Lenses
    updateClusterKafkaVersion_configurationInfo,
    updateClusterKafkaVersion_clusterArn,
    updateClusterKafkaVersion_targetKafkaVersion,
    updateClusterKafkaVersion_currentVersion,

    -- * Destructuring the Response
    UpdateClusterKafkaVersionResponse (..),
    newUpdateClusterKafkaVersionResponse,

    -- * Response Lenses
    updateClusterKafkaVersionResponse_clusterArn,
    updateClusterKafkaVersionResponse_clusterOperationArn,
    updateClusterKafkaVersionResponse_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:/ 'newUpdateClusterKafkaVersion' smart constructor.
data UpdateClusterKafkaVersion = UpdateClusterKafkaVersion'
  { -- | The custom configuration that should be applied on the new version of
    -- cluster.
    UpdateClusterKafkaVersion -> Maybe ConfigurationInfo
configurationInfo :: Prelude.Maybe ConfigurationInfo,
    -- | The Amazon Resource Name (ARN) of the cluster to be updated.
    UpdateClusterKafkaVersion -> Text
clusterArn :: Prelude.Text,
    -- | Target Kafka version.
    UpdateClusterKafkaVersion -> Text
targetKafkaVersion :: Prelude.Text,
    -- | Current cluster version.
    UpdateClusterKafkaVersion -> Text
currentVersion :: Prelude.Text
  }
  deriving (UpdateClusterKafkaVersion -> UpdateClusterKafkaVersion -> Bool
(UpdateClusterKafkaVersion -> UpdateClusterKafkaVersion -> Bool)
-> (UpdateClusterKafkaVersion -> UpdateClusterKafkaVersion -> Bool)
-> Eq UpdateClusterKafkaVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateClusterKafkaVersion -> UpdateClusterKafkaVersion -> Bool
$c/= :: UpdateClusterKafkaVersion -> UpdateClusterKafkaVersion -> Bool
== :: UpdateClusterKafkaVersion -> UpdateClusterKafkaVersion -> Bool
$c== :: UpdateClusterKafkaVersion -> UpdateClusterKafkaVersion -> Bool
Prelude.Eq, ReadPrec [UpdateClusterKafkaVersion]
ReadPrec UpdateClusterKafkaVersion
Int -> ReadS UpdateClusterKafkaVersion
ReadS [UpdateClusterKafkaVersion]
(Int -> ReadS UpdateClusterKafkaVersion)
-> ReadS [UpdateClusterKafkaVersion]
-> ReadPrec UpdateClusterKafkaVersion
-> ReadPrec [UpdateClusterKafkaVersion]
-> Read UpdateClusterKafkaVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateClusterKafkaVersion]
$creadListPrec :: ReadPrec [UpdateClusterKafkaVersion]
readPrec :: ReadPrec UpdateClusterKafkaVersion
$creadPrec :: ReadPrec UpdateClusterKafkaVersion
readList :: ReadS [UpdateClusterKafkaVersion]
$creadList :: ReadS [UpdateClusterKafkaVersion]
readsPrec :: Int -> ReadS UpdateClusterKafkaVersion
$creadsPrec :: Int -> ReadS UpdateClusterKafkaVersion
Prelude.Read, Int -> UpdateClusterKafkaVersion -> ShowS
[UpdateClusterKafkaVersion] -> ShowS
UpdateClusterKafkaVersion -> String
(Int -> UpdateClusterKafkaVersion -> ShowS)
-> (UpdateClusterKafkaVersion -> String)
-> ([UpdateClusterKafkaVersion] -> ShowS)
-> Show UpdateClusterKafkaVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateClusterKafkaVersion] -> ShowS
$cshowList :: [UpdateClusterKafkaVersion] -> ShowS
show :: UpdateClusterKafkaVersion -> String
$cshow :: UpdateClusterKafkaVersion -> String
showsPrec :: Int -> UpdateClusterKafkaVersion -> ShowS
$cshowsPrec :: Int -> UpdateClusterKafkaVersion -> ShowS
Prelude.Show, (forall x.
 UpdateClusterKafkaVersion -> Rep UpdateClusterKafkaVersion x)
-> (forall x.
    Rep UpdateClusterKafkaVersion x -> UpdateClusterKafkaVersion)
-> Generic UpdateClusterKafkaVersion
forall x.
Rep UpdateClusterKafkaVersion x -> UpdateClusterKafkaVersion
forall x.
UpdateClusterKafkaVersion -> Rep UpdateClusterKafkaVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateClusterKafkaVersion x -> UpdateClusterKafkaVersion
$cfrom :: forall x.
UpdateClusterKafkaVersion -> Rep UpdateClusterKafkaVersion x
Prelude.Generic)

-- |
-- Create a value of 'UpdateClusterKafkaVersion' 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:
--
-- 'configurationInfo', 'updateClusterKafkaVersion_configurationInfo' - The custom configuration that should be applied on the new version of
-- cluster.
--
-- 'clusterArn', 'updateClusterKafkaVersion_clusterArn' - The Amazon Resource Name (ARN) of the cluster to be updated.
--
-- 'targetKafkaVersion', 'updateClusterKafkaVersion_targetKafkaVersion' - Target Kafka version.
--
-- 'currentVersion', 'updateClusterKafkaVersion_currentVersion' - Current cluster version.
newUpdateClusterKafkaVersion ::
  -- | 'clusterArn'
  Prelude.Text ->
  -- | 'targetKafkaVersion'
  Prelude.Text ->
  -- | 'currentVersion'
  Prelude.Text ->
  UpdateClusterKafkaVersion
newUpdateClusterKafkaVersion :: Text -> Text -> Text -> UpdateClusterKafkaVersion
newUpdateClusterKafkaVersion
  Text
pClusterArn_
  Text
pTargetKafkaVersion_
  Text
pCurrentVersion_ =
    UpdateClusterKafkaVersion' :: Maybe ConfigurationInfo
-> Text -> Text -> Text -> UpdateClusterKafkaVersion
UpdateClusterKafkaVersion'
      { $sel:configurationInfo:UpdateClusterKafkaVersion' :: Maybe ConfigurationInfo
configurationInfo =
          Maybe ConfigurationInfo
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterArn:UpdateClusterKafkaVersion' :: Text
clusterArn = Text
pClusterArn_,
        $sel:targetKafkaVersion:UpdateClusterKafkaVersion' :: Text
targetKafkaVersion = Text
pTargetKafkaVersion_,
        $sel:currentVersion:UpdateClusterKafkaVersion' :: Text
currentVersion = Text
pCurrentVersion_
      }

-- | The custom configuration that should be applied on the new version of
-- cluster.
updateClusterKafkaVersion_configurationInfo :: Lens.Lens' UpdateClusterKafkaVersion (Prelude.Maybe ConfigurationInfo)
updateClusterKafkaVersion_configurationInfo :: (Maybe ConfigurationInfo -> f (Maybe ConfigurationInfo))
-> UpdateClusterKafkaVersion -> f UpdateClusterKafkaVersion
updateClusterKafkaVersion_configurationInfo = (UpdateClusterKafkaVersion -> Maybe ConfigurationInfo)
-> (UpdateClusterKafkaVersion
    -> Maybe ConfigurationInfo -> UpdateClusterKafkaVersion)
-> Lens
     UpdateClusterKafkaVersion
     UpdateClusterKafkaVersion
     (Maybe ConfigurationInfo)
     (Maybe ConfigurationInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateClusterKafkaVersion' {Maybe ConfigurationInfo
configurationInfo :: Maybe ConfigurationInfo
$sel:configurationInfo:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Maybe ConfigurationInfo
configurationInfo} -> Maybe ConfigurationInfo
configurationInfo) (\s :: UpdateClusterKafkaVersion
s@UpdateClusterKafkaVersion' {} Maybe ConfigurationInfo
a -> UpdateClusterKafkaVersion
s {$sel:configurationInfo:UpdateClusterKafkaVersion' :: Maybe ConfigurationInfo
configurationInfo = Maybe ConfigurationInfo
a} :: UpdateClusterKafkaVersion)

-- | The Amazon Resource Name (ARN) of the cluster to be updated.
updateClusterKafkaVersion_clusterArn :: Lens.Lens' UpdateClusterKafkaVersion Prelude.Text
updateClusterKafkaVersion_clusterArn :: (Text -> f Text)
-> UpdateClusterKafkaVersion -> f UpdateClusterKafkaVersion
updateClusterKafkaVersion_clusterArn = (UpdateClusterKafkaVersion -> Text)
-> (UpdateClusterKafkaVersion -> Text -> UpdateClusterKafkaVersion)
-> Lens
     UpdateClusterKafkaVersion UpdateClusterKafkaVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateClusterKafkaVersion' {Text
clusterArn :: Text
$sel:clusterArn:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Text
clusterArn} -> Text
clusterArn) (\s :: UpdateClusterKafkaVersion
s@UpdateClusterKafkaVersion' {} Text
a -> UpdateClusterKafkaVersion
s {$sel:clusterArn:UpdateClusterKafkaVersion' :: Text
clusterArn = Text
a} :: UpdateClusterKafkaVersion)

-- | Target Kafka version.
updateClusterKafkaVersion_targetKafkaVersion :: Lens.Lens' UpdateClusterKafkaVersion Prelude.Text
updateClusterKafkaVersion_targetKafkaVersion :: (Text -> f Text)
-> UpdateClusterKafkaVersion -> f UpdateClusterKafkaVersion
updateClusterKafkaVersion_targetKafkaVersion = (UpdateClusterKafkaVersion -> Text)
-> (UpdateClusterKafkaVersion -> Text -> UpdateClusterKafkaVersion)
-> Lens
     UpdateClusterKafkaVersion UpdateClusterKafkaVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateClusterKafkaVersion' {Text
targetKafkaVersion :: Text
$sel:targetKafkaVersion:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Text
targetKafkaVersion} -> Text
targetKafkaVersion) (\s :: UpdateClusterKafkaVersion
s@UpdateClusterKafkaVersion' {} Text
a -> UpdateClusterKafkaVersion
s {$sel:targetKafkaVersion:UpdateClusterKafkaVersion' :: Text
targetKafkaVersion = Text
a} :: UpdateClusterKafkaVersion)

-- | Current cluster version.
updateClusterKafkaVersion_currentVersion :: Lens.Lens' UpdateClusterKafkaVersion Prelude.Text
updateClusterKafkaVersion_currentVersion :: (Text -> f Text)
-> UpdateClusterKafkaVersion -> f UpdateClusterKafkaVersion
updateClusterKafkaVersion_currentVersion = (UpdateClusterKafkaVersion -> Text)
-> (UpdateClusterKafkaVersion -> Text -> UpdateClusterKafkaVersion)
-> Lens
     UpdateClusterKafkaVersion UpdateClusterKafkaVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateClusterKafkaVersion' {Text
currentVersion :: Text
$sel:currentVersion:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Text
currentVersion} -> Text
currentVersion) (\s :: UpdateClusterKafkaVersion
s@UpdateClusterKafkaVersion' {} Text
a -> UpdateClusterKafkaVersion
s {$sel:currentVersion:UpdateClusterKafkaVersion' :: Text
currentVersion = Text
a} :: UpdateClusterKafkaVersion)

instance Core.AWSRequest UpdateClusterKafkaVersion where
  type
    AWSResponse UpdateClusterKafkaVersion =
      UpdateClusterKafkaVersionResponse
  request :: UpdateClusterKafkaVersion -> Request UpdateClusterKafkaVersion
request = Service
-> UpdateClusterKafkaVersion -> Request UpdateClusterKafkaVersion
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateClusterKafkaVersion
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateClusterKafkaVersion)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateClusterKafkaVersion))
-> Logger
-> Service
-> Proxy UpdateClusterKafkaVersion
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateClusterKafkaVersion)))
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 -> Int -> UpdateClusterKafkaVersionResponse
UpdateClusterKafkaVersionResponse'
            (Maybe Text
 -> Maybe Text -> Int -> UpdateClusterKafkaVersionResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> UpdateClusterKafkaVersionResponse)
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
"clusterArn")
            Either
  String (Maybe Text -> Int -> UpdateClusterKafkaVersionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateClusterKafkaVersionResponse)
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
"clusterOperationArn")
            Either String (Int -> UpdateClusterKafkaVersionResponse)
-> Either String Int
-> Either String UpdateClusterKafkaVersionResponse
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 UpdateClusterKafkaVersion

instance Prelude.NFData UpdateClusterKafkaVersion

instance Core.ToHeaders UpdateClusterKafkaVersion where
  toHeaders :: UpdateClusterKafkaVersion -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateClusterKafkaVersion -> 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.ToJSON UpdateClusterKafkaVersion where
  toJSON :: UpdateClusterKafkaVersion -> Value
toJSON UpdateClusterKafkaVersion' {Maybe ConfigurationInfo
Text
currentVersion :: Text
targetKafkaVersion :: Text
clusterArn :: Text
configurationInfo :: Maybe ConfigurationInfo
$sel:currentVersion:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Text
$sel:targetKafkaVersion:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Text
$sel:clusterArn:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Text
$sel:configurationInfo:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Maybe ConfigurationInfo
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"configurationInfo" Text -> ConfigurationInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ConfigurationInfo -> Pair)
-> Maybe ConfigurationInfo -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConfigurationInfo
configurationInfo,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"targetKafkaVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
targetKafkaVersion),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"currentVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
currentVersion)
          ]
      )

instance Core.ToPath UpdateClusterKafkaVersion where
  toPath :: UpdateClusterKafkaVersion -> ByteString
toPath UpdateClusterKafkaVersion' {Maybe ConfigurationInfo
Text
currentVersion :: Text
targetKafkaVersion :: Text
clusterArn :: Text
configurationInfo :: Maybe ConfigurationInfo
$sel:currentVersion:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Text
$sel:targetKafkaVersion:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Text
$sel:clusterArn:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Text
$sel:configurationInfo:UpdateClusterKafkaVersion' :: UpdateClusterKafkaVersion -> Maybe ConfigurationInfo
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v1/clusters/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
clusterArn, ByteString
"/version"]

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

-- | /See:/ 'newUpdateClusterKafkaVersionResponse' smart constructor.
data UpdateClusterKafkaVersionResponse = UpdateClusterKafkaVersionResponse'
  { -- | The Amazon Resource Name (ARN) of the cluster.
    UpdateClusterKafkaVersionResponse -> Maybe Text
clusterArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the cluster operation.
    UpdateClusterKafkaVersionResponse -> Maybe Text
clusterOperationArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateClusterKafkaVersionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateClusterKafkaVersionResponse
-> UpdateClusterKafkaVersionResponse -> Bool
(UpdateClusterKafkaVersionResponse
 -> UpdateClusterKafkaVersionResponse -> Bool)
-> (UpdateClusterKafkaVersionResponse
    -> UpdateClusterKafkaVersionResponse -> Bool)
-> Eq UpdateClusterKafkaVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateClusterKafkaVersionResponse
-> UpdateClusterKafkaVersionResponse -> Bool
$c/= :: UpdateClusterKafkaVersionResponse
-> UpdateClusterKafkaVersionResponse -> Bool
== :: UpdateClusterKafkaVersionResponse
-> UpdateClusterKafkaVersionResponse -> Bool
$c== :: UpdateClusterKafkaVersionResponse
-> UpdateClusterKafkaVersionResponse -> Bool
Prelude.Eq, ReadPrec [UpdateClusterKafkaVersionResponse]
ReadPrec UpdateClusterKafkaVersionResponse
Int -> ReadS UpdateClusterKafkaVersionResponse
ReadS [UpdateClusterKafkaVersionResponse]
(Int -> ReadS UpdateClusterKafkaVersionResponse)
-> ReadS [UpdateClusterKafkaVersionResponse]
-> ReadPrec UpdateClusterKafkaVersionResponse
-> ReadPrec [UpdateClusterKafkaVersionResponse]
-> Read UpdateClusterKafkaVersionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateClusterKafkaVersionResponse]
$creadListPrec :: ReadPrec [UpdateClusterKafkaVersionResponse]
readPrec :: ReadPrec UpdateClusterKafkaVersionResponse
$creadPrec :: ReadPrec UpdateClusterKafkaVersionResponse
readList :: ReadS [UpdateClusterKafkaVersionResponse]
$creadList :: ReadS [UpdateClusterKafkaVersionResponse]
readsPrec :: Int -> ReadS UpdateClusterKafkaVersionResponse
$creadsPrec :: Int -> ReadS UpdateClusterKafkaVersionResponse
Prelude.Read, Int -> UpdateClusterKafkaVersionResponse -> ShowS
[UpdateClusterKafkaVersionResponse] -> ShowS
UpdateClusterKafkaVersionResponse -> String
(Int -> UpdateClusterKafkaVersionResponse -> ShowS)
-> (UpdateClusterKafkaVersionResponse -> String)
-> ([UpdateClusterKafkaVersionResponse] -> ShowS)
-> Show UpdateClusterKafkaVersionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateClusterKafkaVersionResponse] -> ShowS
$cshowList :: [UpdateClusterKafkaVersionResponse] -> ShowS
show :: UpdateClusterKafkaVersionResponse -> String
$cshow :: UpdateClusterKafkaVersionResponse -> String
showsPrec :: Int -> UpdateClusterKafkaVersionResponse -> ShowS
$cshowsPrec :: Int -> UpdateClusterKafkaVersionResponse -> ShowS
Prelude.Show, (forall x.
 UpdateClusterKafkaVersionResponse
 -> Rep UpdateClusterKafkaVersionResponse x)
-> (forall x.
    Rep UpdateClusterKafkaVersionResponse x
    -> UpdateClusterKafkaVersionResponse)
-> Generic UpdateClusterKafkaVersionResponse
forall x.
Rep UpdateClusterKafkaVersionResponse x
-> UpdateClusterKafkaVersionResponse
forall x.
UpdateClusterKafkaVersionResponse
-> Rep UpdateClusterKafkaVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateClusterKafkaVersionResponse x
-> UpdateClusterKafkaVersionResponse
$cfrom :: forall x.
UpdateClusterKafkaVersionResponse
-> Rep UpdateClusterKafkaVersionResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateClusterKafkaVersionResponse' 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:
--
-- 'clusterArn', 'updateClusterKafkaVersionResponse_clusterArn' - The Amazon Resource Name (ARN) of the cluster.
--
-- 'clusterOperationArn', 'updateClusterKafkaVersionResponse_clusterOperationArn' - The Amazon Resource Name (ARN) of the cluster operation.
--
-- 'httpStatus', 'updateClusterKafkaVersionResponse_httpStatus' - The response's http status code.
newUpdateClusterKafkaVersionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateClusterKafkaVersionResponse
newUpdateClusterKafkaVersionResponse :: Int -> UpdateClusterKafkaVersionResponse
newUpdateClusterKafkaVersionResponse Int
pHttpStatus_ =
  UpdateClusterKafkaVersionResponse' :: Maybe Text
-> Maybe Text -> Int -> UpdateClusterKafkaVersionResponse
UpdateClusterKafkaVersionResponse'
    { $sel:clusterArn:UpdateClusterKafkaVersionResponse' :: Maybe Text
clusterArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterOperationArn:UpdateClusterKafkaVersionResponse' :: Maybe Text
clusterOperationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateClusterKafkaVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the cluster.
updateClusterKafkaVersionResponse_clusterArn :: Lens.Lens' UpdateClusterKafkaVersionResponse (Prelude.Maybe Prelude.Text)
updateClusterKafkaVersionResponse_clusterArn :: (Maybe Text -> f (Maybe Text))
-> UpdateClusterKafkaVersionResponse
-> f UpdateClusterKafkaVersionResponse
updateClusterKafkaVersionResponse_clusterArn = (UpdateClusterKafkaVersionResponse -> Maybe Text)
-> (UpdateClusterKafkaVersionResponse
    -> Maybe Text -> UpdateClusterKafkaVersionResponse)
-> Lens
     UpdateClusterKafkaVersionResponse
     UpdateClusterKafkaVersionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateClusterKafkaVersionResponse' {Maybe Text
clusterArn :: Maybe Text
$sel:clusterArn:UpdateClusterKafkaVersionResponse' :: UpdateClusterKafkaVersionResponse -> Maybe Text
clusterArn} -> Maybe Text
clusterArn) (\s :: UpdateClusterKafkaVersionResponse
s@UpdateClusterKafkaVersionResponse' {} Maybe Text
a -> UpdateClusterKafkaVersionResponse
s {$sel:clusterArn:UpdateClusterKafkaVersionResponse' :: Maybe Text
clusterArn = Maybe Text
a} :: UpdateClusterKafkaVersionResponse)

-- | The Amazon Resource Name (ARN) of the cluster operation.
updateClusterKafkaVersionResponse_clusterOperationArn :: Lens.Lens' UpdateClusterKafkaVersionResponse (Prelude.Maybe Prelude.Text)
updateClusterKafkaVersionResponse_clusterOperationArn :: (Maybe Text -> f (Maybe Text))
-> UpdateClusterKafkaVersionResponse
-> f UpdateClusterKafkaVersionResponse
updateClusterKafkaVersionResponse_clusterOperationArn = (UpdateClusterKafkaVersionResponse -> Maybe Text)
-> (UpdateClusterKafkaVersionResponse
    -> Maybe Text -> UpdateClusterKafkaVersionResponse)
-> Lens
     UpdateClusterKafkaVersionResponse
     UpdateClusterKafkaVersionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateClusterKafkaVersionResponse' {Maybe Text
clusterOperationArn :: Maybe Text
$sel:clusterOperationArn:UpdateClusterKafkaVersionResponse' :: UpdateClusterKafkaVersionResponse -> Maybe Text
clusterOperationArn} -> Maybe Text
clusterOperationArn) (\s :: UpdateClusterKafkaVersionResponse
s@UpdateClusterKafkaVersionResponse' {} Maybe Text
a -> UpdateClusterKafkaVersionResponse
s {$sel:clusterOperationArn:UpdateClusterKafkaVersionResponse' :: Maybe Text
clusterOperationArn = Maybe Text
a} :: UpdateClusterKafkaVersionResponse)

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

instance
  Prelude.NFData
    UpdateClusterKafkaVersionResponse