{-# 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.UpdateSecurity
-- 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 security settings for the cluster. You can use this
-- operation to specify encryption and authentication on existing clusters.
module Amazonka.Kafka.UpdateSecurity
  ( -- * Creating a Request
    UpdateSecurity (..),
    newUpdateSecurity,

    -- * Request Lenses
    updateSecurity_clientAuthentication,
    updateSecurity_encryptionInfo,
    updateSecurity_clusterArn,
    updateSecurity_currentVersion,

    -- * Destructuring the Response
    UpdateSecurityResponse (..),
    newUpdateSecurityResponse,

    -- * Response Lenses
    updateSecurityResponse_clusterArn,
    updateSecurityResponse_clusterOperationArn,
    updateSecurityResponse_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:/ 'newUpdateSecurity' smart constructor.
data UpdateSecurity = UpdateSecurity'
  { -- | Includes all client authentication related information.
    UpdateSecurity -> Maybe ClientAuthentication
clientAuthentication :: Prelude.Maybe ClientAuthentication,
    -- | Includes all encryption-related information.
    UpdateSecurity -> Maybe EncryptionInfo
encryptionInfo :: Prelude.Maybe EncryptionInfo,
    -- | The Amazon Resource Name (ARN) that uniquely identifies the cluster.
    UpdateSecurity -> Text
clusterArn :: Prelude.Text,
    -- | The version of the MSK cluster to update. Cluster versions aren\'t
    -- simple numbers. You can describe an MSK cluster to find its version.
    -- When this update operation is successful, it generates a new cluster
    -- version.
    UpdateSecurity -> Text
currentVersion :: Prelude.Text
  }
  deriving (UpdateSecurity -> UpdateSecurity -> Bool
(UpdateSecurity -> UpdateSecurity -> Bool)
-> (UpdateSecurity -> UpdateSecurity -> Bool) -> Eq UpdateSecurity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSecurity -> UpdateSecurity -> Bool
$c/= :: UpdateSecurity -> UpdateSecurity -> Bool
== :: UpdateSecurity -> UpdateSecurity -> Bool
$c== :: UpdateSecurity -> UpdateSecurity -> Bool
Prelude.Eq, ReadPrec [UpdateSecurity]
ReadPrec UpdateSecurity
Int -> ReadS UpdateSecurity
ReadS [UpdateSecurity]
(Int -> ReadS UpdateSecurity)
-> ReadS [UpdateSecurity]
-> ReadPrec UpdateSecurity
-> ReadPrec [UpdateSecurity]
-> Read UpdateSecurity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSecurity]
$creadListPrec :: ReadPrec [UpdateSecurity]
readPrec :: ReadPrec UpdateSecurity
$creadPrec :: ReadPrec UpdateSecurity
readList :: ReadS [UpdateSecurity]
$creadList :: ReadS [UpdateSecurity]
readsPrec :: Int -> ReadS UpdateSecurity
$creadsPrec :: Int -> ReadS UpdateSecurity
Prelude.Read, Int -> UpdateSecurity -> ShowS
[UpdateSecurity] -> ShowS
UpdateSecurity -> String
(Int -> UpdateSecurity -> ShowS)
-> (UpdateSecurity -> String)
-> ([UpdateSecurity] -> ShowS)
-> Show UpdateSecurity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSecurity] -> ShowS
$cshowList :: [UpdateSecurity] -> ShowS
show :: UpdateSecurity -> String
$cshow :: UpdateSecurity -> String
showsPrec :: Int -> UpdateSecurity -> ShowS
$cshowsPrec :: Int -> UpdateSecurity -> ShowS
Prelude.Show, (forall x. UpdateSecurity -> Rep UpdateSecurity x)
-> (forall x. Rep UpdateSecurity x -> UpdateSecurity)
-> Generic UpdateSecurity
forall x. Rep UpdateSecurity x -> UpdateSecurity
forall x. UpdateSecurity -> Rep UpdateSecurity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateSecurity x -> UpdateSecurity
$cfrom :: forall x. UpdateSecurity -> Rep UpdateSecurity x
Prelude.Generic)

-- |
-- Create a value of 'UpdateSecurity' 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:
--
-- 'clientAuthentication', 'updateSecurity_clientAuthentication' - Includes all client authentication related information.
--
-- 'encryptionInfo', 'updateSecurity_encryptionInfo' - Includes all encryption-related information.
--
-- 'clusterArn', 'updateSecurity_clusterArn' - The Amazon Resource Name (ARN) that uniquely identifies the cluster.
--
-- 'currentVersion', 'updateSecurity_currentVersion' - The version of the MSK cluster to update. Cluster versions aren\'t
-- simple numbers. You can describe an MSK cluster to find its version.
-- When this update operation is successful, it generates a new cluster
-- version.
newUpdateSecurity ::
  -- | 'clusterArn'
  Prelude.Text ->
  -- | 'currentVersion'
  Prelude.Text ->
  UpdateSecurity
newUpdateSecurity :: Text -> Text -> UpdateSecurity
newUpdateSecurity Text
pClusterArn_ Text
pCurrentVersion_ =
  UpdateSecurity' :: Maybe ClientAuthentication
-> Maybe EncryptionInfo -> Text -> Text -> UpdateSecurity
UpdateSecurity'
    { $sel:clientAuthentication:UpdateSecurity' :: Maybe ClientAuthentication
clientAuthentication =
        Maybe ClientAuthentication
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionInfo:UpdateSecurity' :: Maybe EncryptionInfo
encryptionInfo = Maybe EncryptionInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterArn:UpdateSecurity' :: Text
clusterArn = Text
pClusterArn_,
      $sel:currentVersion:UpdateSecurity' :: Text
currentVersion = Text
pCurrentVersion_
    }

-- | Includes all client authentication related information.
updateSecurity_clientAuthentication :: Lens.Lens' UpdateSecurity (Prelude.Maybe ClientAuthentication)
updateSecurity_clientAuthentication :: (Maybe ClientAuthentication -> f (Maybe ClientAuthentication))
-> UpdateSecurity -> f UpdateSecurity
updateSecurity_clientAuthentication = (UpdateSecurity -> Maybe ClientAuthentication)
-> (UpdateSecurity -> Maybe ClientAuthentication -> UpdateSecurity)
-> Lens
     UpdateSecurity
     UpdateSecurity
     (Maybe ClientAuthentication)
     (Maybe ClientAuthentication)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSecurity' {Maybe ClientAuthentication
clientAuthentication :: Maybe ClientAuthentication
$sel:clientAuthentication:UpdateSecurity' :: UpdateSecurity -> Maybe ClientAuthentication
clientAuthentication} -> Maybe ClientAuthentication
clientAuthentication) (\s :: UpdateSecurity
s@UpdateSecurity' {} Maybe ClientAuthentication
a -> UpdateSecurity
s {$sel:clientAuthentication:UpdateSecurity' :: Maybe ClientAuthentication
clientAuthentication = Maybe ClientAuthentication
a} :: UpdateSecurity)

-- | Includes all encryption-related information.
updateSecurity_encryptionInfo :: Lens.Lens' UpdateSecurity (Prelude.Maybe EncryptionInfo)
updateSecurity_encryptionInfo :: (Maybe EncryptionInfo -> f (Maybe EncryptionInfo))
-> UpdateSecurity -> f UpdateSecurity
updateSecurity_encryptionInfo = (UpdateSecurity -> Maybe EncryptionInfo)
-> (UpdateSecurity -> Maybe EncryptionInfo -> UpdateSecurity)
-> Lens
     UpdateSecurity
     UpdateSecurity
     (Maybe EncryptionInfo)
     (Maybe EncryptionInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSecurity' {Maybe EncryptionInfo
encryptionInfo :: Maybe EncryptionInfo
$sel:encryptionInfo:UpdateSecurity' :: UpdateSecurity -> Maybe EncryptionInfo
encryptionInfo} -> Maybe EncryptionInfo
encryptionInfo) (\s :: UpdateSecurity
s@UpdateSecurity' {} Maybe EncryptionInfo
a -> UpdateSecurity
s {$sel:encryptionInfo:UpdateSecurity' :: Maybe EncryptionInfo
encryptionInfo = Maybe EncryptionInfo
a} :: UpdateSecurity)

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

-- | The version of the MSK cluster to update. Cluster versions aren\'t
-- simple numbers. You can describe an MSK cluster to find its version.
-- When this update operation is successful, it generates a new cluster
-- version.
updateSecurity_currentVersion :: Lens.Lens' UpdateSecurity Prelude.Text
updateSecurity_currentVersion :: (Text -> f Text) -> UpdateSecurity -> f UpdateSecurity
updateSecurity_currentVersion = (UpdateSecurity -> Text)
-> (UpdateSecurity -> Text -> UpdateSecurity)
-> Lens UpdateSecurity UpdateSecurity Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSecurity' {Text
currentVersion :: Text
$sel:currentVersion:UpdateSecurity' :: UpdateSecurity -> Text
currentVersion} -> Text
currentVersion) (\s :: UpdateSecurity
s@UpdateSecurity' {} Text
a -> UpdateSecurity
s {$sel:currentVersion:UpdateSecurity' :: Text
currentVersion = Text
a} :: UpdateSecurity)

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

instance Prelude.NFData UpdateSecurity

instance Core.ToHeaders UpdateSecurity where
  toHeaders :: UpdateSecurity -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateSecurity -> 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 UpdateSecurity where
  toJSON :: UpdateSecurity -> Value
toJSON UpdateSecurity' {Maybe EncryptionInfo
Maybe ClientAuthentication
Text
currentVersion :: Text
clusterArn :: Text
encryptionInfo :: Maybe EncryptionInfo
clientAuthentication :: Maybe ClientAuthentication
$sel:currentVersion:UpdateSecurity' :: UpdateSecurity -> Text
$sel:clusterArn:UpdateSecurity' :: UpdateSecurity -> Text
$sel:encryptionInfo:UpdateSecurity' :: UpdateSecurity -> Maybe EncryptionInfo
$sel:clientAuthentication:UpdateSecurity' :: UpdateSecurity -> Maybe ClientAuthentication
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"clientAuthentication" Text -> ClientAuthentication -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ClientAuthentication -> Pair)
-> Maybe ClientAuthentication -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ClientAuthentication
clientAuthentication,
            (Text
"encryptionInfo" Text -> EncryptionInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (EncryptionInfo -> Pair) -> Maybe EncryptionInfo -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionInfo
encryptionInfo,
            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 UpdateSecurity where
  toPath :: UpdateSecurity -> ByteString
toPath UpdateSecurity' {Maybe EncryptionInfo
Maybe ClientAuthentication
Text
currentVersion :: Text
clusterArn :: Text
encryptionInfo :: Maybe EncryptionInfo
clientAuthentication :: Maybe ClientAuthentication
$sel:currentVersion:UpdateSecurity' :: UpdateSecurity -> Text
$sel:clusterArn:UpdateSecurity' :: UpdateSecurity -> Text
$sel:encryptionInfo:UpdateSecurity' :: UpdateSecurity -> Maybe EncryptionInfo
$sel:clientAuthentication:UpdateSecurity' :: UpdateSecurity -> Maybe ClientAuthentication
..} =
    [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
"/security"]

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

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

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

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

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

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

instance Prelude.NFData UpdateSecurityResponse