{-# 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.UpdateBrokerStorage
-- 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 EBS storage associated with MSK brokers.
module Amazonka.Kafka.UpdateBrokerStorage
  ( -- * Creating a Request
    UpdateBrokerStorage (..),
    newUpdateBrokerStorage,

    -- * Request Lenses
    updateBrokerStorage_clusterArn,
    updateBrokerStorage_targetBrokerEBSVolumeInfo,
    updateBrokerStorage_currentVersion,

    -- * Destructuring the Response
    UpdateBrokerStorageResponse (..),
    newUpdateBrokerStorageResponse,

    -- * Response Lenses
    updateBrokerStorageResponse_clusterArn,
    updateBrokerStorageResponse_clusterOperationArn,
    updateBrokerStorageResponse_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:/ 'newUpdateBrokerStorage' smart constructor.
data UpdateBrokerStorage = UpdateBrokerStorage'
  { -- | The Amazon Resource Name (ARN) that uniquely identifies the cluster.
    UpdateBrokerStorage -> Text
clusterArn :: Prelude.Text,
    -- | Describes the target volume size and the ID of the broker to apply the
    -- update to.
    UpdateBrokerStorage -> [BrokerEBSVolumeInfo]
targetBrokerEBSVolumeInfo :: [BrokerEBSVolumeInfo],
    -- | The version of cluster to update from. A successful operation will then
    -- generate a new version.
    UpdateBrokerStorage -> Text
currentVersion :: Prelude.Text
  }
  deriving (UpdateBrokerStorage -> UpdateBrokerStorage -> Bool
(UpdateBrokerStorage -> UpdateBrokerStorage -> Bool)
-> (UpdateBrokerStorage -> UpdateBrokerStorage -> Bool)
-> Eq UpdateBrokerStorage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBrokerStorage -> UpdateBrokerStorage -> Bool
$c/= :: UpdateBrokerStorage -> UpdateBrokerStorage -> Bool
== :: UpdateBrokerStorage -> UpdateBrokerStorage -> Bool
$c== :: UpdateBrokerStorage -> UpdateBrokerStorage -> Bool
Prelude.Eq, ReadPrec [UpdateBrokerStorage]
ReadPrec UpdateBrokerStorage
Int -> ReadS UpdateBrokerStorage
ReadS [UpdateBrokerStorage]
(Int -> ReadS UpdateBrokerStorage)
-> ReadS [UpdateBrokerStorage]
-> ReadPrec UpdateBrokerStorage
-> ReadPrec [UpdateBrokerStorage]
-> Read UpdateBrokerStorage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateBrokerStorage]
$creadListPrec :: ReadPrec [UpdateBrokerStorage]
readPrec :: ReadPrec UpdateBrokerStorage
$creadPrec :: ReadPrec UpdateBrokerStorage
readList :: ReadS [UpdateBrokerStorage]
$creadList :: ReadS [UpdateBrokerStorage]
readsPrec :: Int -> ReadS UpdateBrokerStorage
$creadsPrec :: Int -> ReadS UpdateBrokerStorage
Prelude.Read, Int -> UpdateBrokerStorage -> ShowS
[UpdateBrokerStorage] -> ShowS
UpdateBrokerStorage -> String
(Int -> UpdateBrokerStorage -> ShowS)
-> (UpdateBrokerStorage -> String)
-> ([UpdateBrokerStorage] -> ShowS)
-> Show UpdateBrokerStorage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBrokerStorage] -> ShowS
$cshowList :: [UpdateBrokerStorage] -> ShowS
show :: UpdateBrokerStorage -> String
$cshow :: UpdateBrokerStorage -> String
showsPrec :: Int -> UpdateBrokerStorage -> ShowS
$cshowsPrec :: Int -> UpdateBrokerStorage -> ShowS
Prelude.Show, (forall x. UpdateBrokerStorage -> Rep UpdateBrokerStorage x)
-> (forall x. Rep UpdateBrokerStorage x -> UpdateBrokerStorage)
-> Generic UpdateBrokerStorage
forall x. Rep UpdateBrokerStorage x -> UpdateBrokerStorage
forall x. UpdateBrokerStorage -> Rep UpdateBrokerStorage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateBrokerStorage x -> UpdateBrokerStorage
$cfrom :: forall x. UpdateBrokerStorage -> Rep UpdateBrokerStorage x
Prelude.Generic)

-- |
-- Create a value of 'UpdateBrokerStorage' 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', 'updateBrokerStorage_clusterArn' - The Amazon Resource Name (ARN) that uniquely identifies the cluster.
--
-- 'targetBrokerEBSVolumeInfo', 'updateBrokerStorage_targetBrokerEBSVolumeInfo' - Describes the target volume size and the ID of the broker to apply the
-- update to.
--
-- 'currentVersion', 'updateBrokerStorage_currentVersion' - The version of cluster to update from. A successful operation will then
-- generate a new version.
newUpdateBrokerStorage ::
  -- | 'clusterArn'
  Prelude.Text ->
  -- | 'currentVersion'
  Prelude.Text ->
  UpdateBrokerStorage
newUpdateBrokerStorage :: Text -> Text -> UpdateBrokerStorage
newUpdateBrokerStorage Text
pClusterArn_ Text
pCurrentVersion_ =
  UpdateBrokerStorage' :: Text -> [BrokerEBSVolumeInfo] -> Text -> UpdateBrokerStorage
UpdateBrokerStorage'
    { $sel:clusterArn:UpdateBrokerStorage' :: Text
clusterArn = Text
pClusterArn_,
      $sel:targetBrokerEBSVolumeInfo:UpdateBrokerStorage' :: [BrokerEBSVolumeInfo]
targetBrokerEBSVolumeInfo = [BrokerEBSVolumeInfo]
forall a. Monoid a => a
Prelude.mempty,
      $sel:currentVersion:UpdateBrokerStorage' :: Text
currentVersion = Text
pCurrentVersion_
    }

-- | The Amazon Resource Name (ARN) that uniquely identifies the cluster.
updateBrokerStorage_clusterArn :: Lens.Lens' UpdateBrokerStorage Prelude.Text
updateBrokerStorage_clusterArn :: (Text -> f Text) -> UpdateBrokerStorage -> f UpdateBrokerStorage
updateBrokerStorage_clusterArn = (UpdateBrokerStorage -> Text)
-> (UpdateBrokerStorage -> Text -> UpdateBrokerStorage)
-> Lens UpdateBrokerStorage UpdateBrokerStorage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBrokerStorage' {Text
clusterArn :: Text
$sel:clusterArn:UpdateBrokerStorage' :: UpdateBrokerStorage -> Text
clusterArn} -> Text
clusterArn) (\s :: UpdateBrokerStorage
s@UpdateBrokerStorage' {} Text
a -> UpdateBrokerStorage
s {$sel:clusterArn:UpdateBrokerStorage' :: Text
clusterArn = Text
a} :: UpdateBrokerStorage)

-- | Describes the target volume size and the ID of the broker to apply the
-- update to.
updateBrokerStorage_targetBrokerEBSVolumeInfo :: Lens.Lens' UpdateBrokerStorage [BrokerEBSVolumeInfo]
updateBrokerStorage_targetBrokerEBSVolumeInfo :: ([BrokerEBSVolumeInfo] -> f [BrokerEBSVolumeInfo])
-> UpdateBrokerStorage -> f UpdateBrokerStorage
updateBrokerStorage_targetBrokerEBSVolumeInfo = (UpdateBrokerStorage -> [BrokerEBSVolumeInfo])
-> (UpdateBrokerStorage
    -> [BrokerEBSVolumeInfo] -> UpdateBrokerStorage)
-> Lens
     UpdateBrokerStorage
     UpdateBrokerStorage
     [BrokerEBSVolumeInfo]
     [BrokerEBSVolumeInfo]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBrokerStorage' {[BrokerEBSVolumeInfo]
targetBrokerEBSVolumeInfo :: [BrokerEBSVolumeInfo]
$sel:targetBrokerEBSVolumeInfo:UpdateBrokerStorage' :: UpdateBrokerStorage -> [BrokerEBSVolumeInfo]
targetBrokerEBSVolumeInfo} -> [BrokerEBSVolumeInfo]
targetBrokerEBSVolumeInfo) (\s :: UpdateBrokerStorage
s@UpdateBrokerStorage' {} [BrokerEBSVolumeInfo]
a -> UpdateBrokerStorage
s {$sel:targetBrokerEBSVolumeInfo:UpdateBrokerStorage' :: [BrokerEBSVolumeInfo]
targetBrokerEBSVolumeInfo = [BrokerEBSVolumeInfo]
a} :: UpdateBrokerStorage) (([BrokerEBSVolumeInfo] -> f [BrokerEBSVolumeInfo])
 -> UpdateBrokerStorage -> f UpdateBrokerStorage)
-> (([BrokerEBSVolumeInfo] -> f [BrokerEBSVolumeInfo])
    -> [BrokerEBSVolumeInfo] -> f [BrokerEBSVolumeInfo])
-> ([BrokerEBSVolumeInfo] -> f [BrokerEBSVolumeInfo])
-> UpdateBrokerStorage
-> f UpdateBrokerStorage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BrokerEBSVolumeInfo] -> f [BrokerEBSVolumeInfo])
-> [BrokerEBSVolumeInfo] -> f [BrokerEBSVolumeInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The version of cluster to update from. A successful operation will then
-- generate a new version.
updateBrokerStorage_currentVersion :: Lens.Lens' UpdateBrokerStorage Prelude.Text
updateBrokerStorage_currentVersion :: (Text -> f Text) -> UpdateBrokerStorage -> f UpdateBrokerStorage
updateBrokerStorage_currentVersion = (UpdateBrokerStorage -> Text)
-> (UpdateBrokerStorage -> Text -> UpdateBrokerStorage)
-> Lens UpdateBrokerStorage UpdateBrokerStorage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBrokerStorage' {Text
currentVersion :: Text
$sel:currentVersion:UpdateBrokerStorage' :: UpdateBrokerStorage -> Text
currentVersion} -> Text
currentVersion) (\s :: UpdateBrokerStorage
s@UpdateBrokerStorage' {} Text
a -> UpdateBrokerStorage
s {$sel:currentVersion:UpdateBrokerStorage' :: Text
currentVersion = Text
a} :: UpdateBrokerStorage)

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

instance Prelude.NFData UpdateBrokerStorage

instance Core.ToHeaders UpdateBrokerStorage where
  toHeaders :: UpdateBrokerStorage -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateBrokerStorage -> 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 UpdateBrokerStorage where
  toJSON :: UpdateBrokerStorage -> Value
toJSON UpdateBrokerStorage' {[BrokerEBSVolumeInfo]
Text
currentVersion :: Text
targetBrokerEBSVolumeInfo :: [BrokerEBSVolumeInfo]
clusterArn :: Text
$sel:currentVersion:UpdateBrokerStorage' :: UpdateBrokerStorage -> Text
$sel:targetBrokerEBSVolumeInfo:UpdateBrokerStorage' :: UpdateBrokerStorage -> [BrokerEBSVolumeInfo]
$sel:clusterArn:UpdateBrokerStorage' :: UpdateBrokerStorage -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"targetBrokerEBSVolumeInfo"
                  Text -> [BrokerEBSVolumeInfo] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [BrokerEBSVolumeInfo]
targetBrokerEBSVolumeInfo
              ),
            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 UpdateBrokerStorage where
  toPath :: UpdateBrokerStorage -> ByteString
toPath UpdateBrokerStorage' {[BrokerEBSVolumeInfo]
Text
currentVersion :: Text
targetBrokerEBSVolumeInfo :: [BrokerEBSVolumeInfo]
clusterArn :: Text
$sel:currentVersion:UpdateBrokerStorage' :: UpdateBrokerStorage -> Text
$sel:targetBrokerEBSVolumeInfo:UpdateBrokerStorage' :: UpdateBrokerStorage -> [BrokerEBSVolumeInfo]
$sel:clusterArn:UpdateBrokerStorage' :: UpdateBrokerStorage -> Text
..} =
    [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
"/nodes/storage"
      ]

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

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

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

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

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

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

instance Prelude.NFData UpdateBrokerStorageResponse