{-# 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.UpdateMonitoring
-- 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 monitoring settings for the cluster. You can use this
-- operation to specify which Apache Kafka metrics you want Amazon MSK to
-- send to Amazon CloudWatch. You can also specify settings for open
-- monitoring with Prometheus.
module Amazonka.Kafka.UpdateMonitoring
  ( -- * Creating a Request
    UpdateMonitoring (..),
    newUpdateMonitoring,

    -- * Request Lenses
    updateMonitoring_enhancedMonitoring,
    updateMonitoring_openMonitoring,
    updateMonitoring_loggingInfo,
    updateMonitoring_clusterArn,
    updateMonitoring_currentVersion,

    -- * Destructuring the Response
    UpdateMonitoringResponse (..),
    newUpdateMonitoringResponse,

    -- * Response Lenses
    updateMonitoringResponse_clusterArn,
    updateMonitoringResponse_clusterOperationArn,
    updateMonitoringResponse_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

-- | Request body for UpdateMonitoring.
--
-- /See:/ 'newUpdateMonitoring' smart constructor.
data UpdateMonitoring = UpdateMonitoring'
  { -- | Specifies which Apache Kafka metrics Amazon MSK gathers and sends to
    -- Amazon CloudWatch for this cluster.
    UpdateMonitoring -> Maybe EnhancedMonitoring
enhancedMonitoring :: Prelude.Maybe EnhancedMonitoring,
    -- | The settings for open monitoring.
    UpdateMonitoring -> Maybe OpenMonitoringInfo
openMonitoring :: Prelude.Maybe OpenMonitoringInfo,
    UpdateMonitoring -> Maybe LoggingInfo
loggingInfo :: Prelude.Maybe LoggingInfo,
    -- | The Amazon Resource Name (ARN) that uniquely identifies the cluster.
    UpdateMonitoring -> 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.
    UpdateMonitoring -> Text
currentVersion :: Prelude.Text
  }
  deriving (UpdateMonitoring -> UpdateMonitoring -> Bool
(UpdateMonitoring -> UpdateMonitoring -> Bool)
-> (UpdateMonitoring -> UpdateMonitoring -> Bool)
-> Eq UpdateMonitoring
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMonitoring -> UpdateMonitoring -> Bool
$c/= :: UpdateMonitoring -> UpdateMonitoring -> Bool
== :: UpdateMonitoring -> UpdateMonitoring -> Bool
$c== :: UpdateMonitoring -> UpdateMonitoring -> Bool
Prelude.Eq, ReadPrec [UpdateMonitoring]
ReadPrec UpdateMonitoring
Int -> ReadS UpdateMonitoring
ReadS [UpdateMonitoring]
(Int -> ReadS UpdateMonitoring)
-> ReadS [UpdateMonitoring]
-> ReadPrec UpdateMonitoring
-> ReadPrec [UpdateMonitoring]
-> Read UpdateMonitoring
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateMonitoring]
$creadListPrec :: ReadPrec [UpdateMonitoring]
readPrec :: ReadPrec UpdateMonitoring
$creadPrec :: ReadPrec UpdateMonitoring
readList :: ReadS [UpdateMonitoring]
$creadList :: ReadS [UpdateMonitoring]
readsPrec :: Int -> ReadS UpdateMonitoring
$creadsPrec :: Int -> ReadS UpdateMonitoring
Prelude.Read, Int -> UpdateMonitoring -> ShowS
[UpdateMonitoring] -> ShowS
UpdateMonitoring -> String
(Int -> UpdateMonitoring -> ShowS)
-> (UpdateMonitoring -> String)
-> ([UpdateMonitoring] -> ShowS)
-> Show UpdateMonitoring
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMonitoring] -> ShowS
$cshowList :: [UpdateMonitoring] -> ShowS
show :: UpdateMonitoring -> String
$cshow :: UpdateMonitoring -> String
showsPrec :: Int -> UpdateMonitoring -> ShowS
$cshowsPrec :: Int -> UpdateMonitoring -> ShowS
Prelude.Show, (forall x. UpdateMonitoring -> Rep UpdateMonitoring x)
-> (forall x. Rep UpdateMonitoring x -> UpdateMonitoring)
-> Generic UpdateMonitoring
forall x. Rep UpdateMonitoring x -> UpdateMonitoring
forall x. UpdateMonitoring -> Rep UpdateMonitoring x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateMonitoring x -> UpdateMonitoring
$cfrom :: forall x. UpdateMonitoring -> Rep UpdateMonitoring x
Prelude.Generic)

-- |
-- Create a value of 'UpdateMonitoring' 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:
--
-- 'enhancedMonitoring', 'updateMonitoring_enhancedMonitoring' - Specifies which Apache Kafka metrics Amazon MSK gathers and sends to
-- Amazon CloudWatch for this cluster.
--
-- 'openMonitoring', 'updateMonitoring_openMonitoring' - The settings for open monitoring.
--
-- 'loggingInfo', 'updateMonitoring_loggingInfo' - Undocumented member.
--
-- 'clusterArn', 'updateMonitoring_clusterArn' - The Amazon Resource Name (ARN) that uniquely identifies the cluster.
--
-- 'currentVersion', 'updateMonitoring_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.
newUpdateMonitoring ::
  -- | 'clusterArn'
  Prelude.Text ->
  -- | 'currentVersion'
  Prelude.Text ->
  UpdateMonitoring
newUpdateMonitoring :: Text -> Text -> UpdateMonitoring
newUpdateMonitoring Text
pClusterArn_ Text
pCurrentVersion_ =
  UpdateMonitoring' :: Maybe EnhancedMonitoring
-> Maybe OpenMonitoringInfo
-> Maybe LoggingInfo
-> Text
-> Text
-> UpdateMonitoring
UpdateMonitoring'
    { $sel:enhancedMonitoring:UpdateMonitoring' :: Maybe EnhancedMonitoring
enhancedMonitoring =
        Maybe EnhancedMonitoring
forall a. Maybe a
Prelude.Nothing,
      $sel:openMonitoring:UpdateMonitoring' :: Maybe OpenMonitoringInfo
openMonitoring = Maybe OpenMonitoringInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:loggingInfo:UpdateMonitoring' :: Maybe LoggingInfo
loggingInfo = Maybe LoggingInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterArn:UpdateMonitoring' :: Text
clusterArn = Text
pClusterArn_,
      $sel:currentVersion:UpdateMonitoring' :: Text
currentVersion = Text
pCurrentVersion_
    }

-- | Specifies which Apache Kafka metrics Amazon MSK gathers and sends to
-- Amazon CloudWatch for this cluster.
updateMonitoring_enhancedMonitoring :: Lens.Lens' UpdateMonitoring (Prelude.Maybe EnhancedMonitoring)
updateMonitoring_enhancedMonitoring :: (Maybe EnhancedMonitoring -> f (Maybe EnhancedMonitoring))
-> UpdateMonitoring -> f UpdateMonitoring
updateMonitoring_enhancedMonitoring = (UpdateMonitoring -> Maybe EnhancedMonitoring)
-> (UpdateMonitoring
    -> Maybe EnhancedMonitoring -> UpdateMonitoring)
-> Lens
     UpdateMonitoring
     UpdateMonitoring
     (Maybe EnhancedMonitoring)
     (Maybe EnhancedMonitoring)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMonitoring' {Maybe EnhancedMonitoring
enhancedMonitoring :: Maybe EnhancedMonitoring
$sel:enhancedMonitoring:UpdateMonitoring' :: UpdateMonitoring -> Maybe EnhancedMonitoring
enhancedMonitoring} -> Maybe EnhancedMonitoring
enhancedMonitoring) (\s :: UpdateMonitoring
s@UpdateMonitoring' {} Maybe EnhancedMonitoring
a -> UpdateMonitoring
s {$sel:enhancedMonitoring:UpdateMonitoring' :: Maybe EnhancedMonitoring
enhancedMonitoring = Maybe EnhancedMonitoring
a} :: UpdateMonitoring)

-- | The settings for open monitoring.
updateMonitoring_openMonitoring :: Lens.Lens' UpdateMonitoring (Prelude.Maybe OpenMonitoringInfo)
updateMonitoring_openMonitoring :: (Maybe OpenMonitoringInfo -> f (Maybe OpenMonitoringInfo))
-> UpdateMonitoring -> f UpdateMonitoring
updateMonitoring_openMonitoring = (UpdateMonitoring -> Maybe OpenMonitoringInfo)
-> (UpdateMonitoring
    -> Maybe OpenMonitoringInfo -> UpdateMonitoring)
-> Lens
     UpdateMonitoring
     UpdateMonitoring
     (Maybe OpenMonitoringInfo)
     (Maybe OpenMonitoringInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMonitoring' {Maybe OpenMonitoringInfo
openMonitoring :: Maybe OpenMonitoringInfo
$sel:openMonitoring:UpdateMonitoring' :: UpdateMonitoring -> Maybe OpenMonitoringInfo
openMonitoring} -> Maybe OpenMonitoringInfo
openMonitoring) (\s :: UpdateMonitoring
s@UpdateMonitoring' {} Maybe OpenMonitoringInfo
a -> UpdateMonitoring
s {$sel:openMonitoring:UpdateMonitoring' :: Maybe OpenMonitoringInfo
openMonitoring = Maybe OpenMonitoringInfo
a} :: UpdateMonitoring)

-- | Undocumented member.
updateMonitoring_loggingInfo :: Lens.Lens' UpdateMonitoring (Prelude.Maybe LoggingInfo)
updateMonitoring_loggingInfo :: (Maybe LoggingInfo -> f (Maybe LoggingInfo))
-> UpdateMonitoring -> f UpdateMonitoring
updateMonitoring_loggingInfo = (UpdateMonitoring -> Maybe LoggingInfo)
-> (UpdateMonitoring -> Maybe LoggingInfo -> UpdateMonitoring)
-> Lens
     UpdateMonitoring
     UpdateMonitoring
     (Maybe LoggingInfo)
     (Maybe LoggingInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMonitoring' {Maybe LoggingInfo
loggingInfo :: Maybe LoggingInfo
$sel:loggingInfo:UpdateMonitoring' :: UpdateMonitoring -> Maybe LoggingInfo
loggingInfo} -> Maybe LoggingInfo
loggingInfo) (\s :: UpdateMonitoring
s@UpdateMonitoring' {} Maybe LoggingInfo
a -> UpdateMonitoring
s {$sel:loggingInfo:UpdateMonitoring' :: Maybe LoggingInfo
loggingInfo = Maybe LoggingInfo
a} :: UpdateMonitoring)

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

-- | 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.
updateMonitoring_currentVersion :: Lens.Lens' UpdateMonitoring Prelude.Text
updateMonitoring_currentVersion :: (Text -> f Text) -> UpdateMonitoring -> f UpdateMonitoring
updateMonitoring_currentVersion = (UpdateMonitoring -> Text)
-> (UpdateMonitoring -> Text -> UpdateMonitoring)
-> Lens UpdateMonitoring UpdateMonitoring Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMonitoring' {Text
currentVersion :: Text
$sel:currentVersion:UpdateMonitoring' :: UpdateMonitoring -> Text
currentVersion} -> Text
currentVersion) (\s :: UpdateMonitoring
s@UpdateMonitoring' {} Text
a -> UpdateMonitoring
s {$sel:currentVersion:UpdateMonitoring' :: Text
currentVersion = Text
a} :: UpdateMonitoring)

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

instance Prelude.NFData UpdateMonitoring

instance Core.ToHeaders UpdateMonitoring where
  toHeaders :: UpdateMonitoring -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateMonitoring -> 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 UpdateMonitoring where
  toJSON :: UpdateMonitoring -> Value
toJSON UpdateMonitoring' {Maybe EnhancedMonitoring
Maybe OpenMonitoringInfo
Maybe LoggingInfo
Text
currentVersion :: Text
clusterArn :: Text
loggingInfo :: Maybe LoggingInfo
openMonitoring :: Maybe OpenMonitoringInfo
enhancedMonitoring :: Maybe EnhancedMonitoring
$sel:currentVersion:UpdateMonitoring' :: UpdateMonitoring -> Text
$sel:clusterArn:UpdateMonitoring' :: UpdateMonitoring -> Text
$sel:loggingInfo:UpdateMonitoring' :: UpdateMonitoring -> Maybe LoggingInfo
$sel:openMonitoring:UpdateMonitoring' :: UpdateMonitoring -> Maybe OpenMonitoringInfo
$sel:enhancedMonitoring:UpdateMonitoring' :: UpdateMonitoring -> Maybe EnhancedMonitoring
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"enhancedMonitoring" Text -> EnhancedMonitoring -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (EnhancedMonitoring -> Pair)
-> Maybe EnhancedMonitoring -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EnhancedMonitoring
enhancedMonitoring,
            (Text
"openMonitoring" Text -> OpenMonitoringInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (OpenMonitoringInfo -> Pair)
-> Maybe OpenMonitoringInfo -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpenMonitoringInfo
openMonitoring,
            (Text
"loggingInfo" Text -> LoggingInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LoggingInfo -> Pair) -> Maybe LoggingInfo -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoggingInfo
loggingInfo,
            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 UpdateMonitoring where
  toPath :: UpdateMonitoring -> ByteString
toPath UpdateMonitoring' {Maybe EnhancedMonitoring
Maybe OpenMonitoringInfo
Maybe LoggingInfo
Text
currentVersion :: Text
clusterArn :: Text
loggingInfo :: Maybe LoggingInfo
openMonitoring :: Maybe OpenMonitoringInfo
enhancedMonitoring :: Maybe EnhancedMonitoring
$sel:currentVersion:UpdateMonitoring' :: UpdateMonitoring -> Text
$sel:clusterArn:UpdateMonitoring' :: UpdateMonitoring -> Text
$sel:loggingInfo:UpdateMonitoring' :: UpdateMonitoring -> Maybe LoggingInfo
$sel:openMonitoring:UpdateMonitoring' :: UpdateMonitoring -> Maybe OpenMonitoringInfo
$sel:enhancedMonitoring:UpdateMonitoring' :: UpdateMonitoring -> Maybe EnhancedMonitoring
..} =
    [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
"/monitoring"
      ]

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

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

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

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

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

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

instance Prelude.NFData UpdateMonitoringResponse