{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.KinesisAnalyticsV2.Types.ZeppelinMonitoringConfigurationUpdate
-- 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)
module Amazonka.KinesisAnalyticsV2.Types.ZeppelinMonitoringConfigurationUpdate where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.LogLevel
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Updates to the monitoring configuration for Apache Zeppelin within a
-- Kinesis Data Analytics Studio notebook.
--
-- /See:/ 'newZeppelinMonitoringConfigurationUpdate' smart constructor.
data ZeppelinMonitoringConfigurationUpdate = ZeppelinMonitoringConfigurationUpdate'
  { -- | Updates to the logging level for Apache Zeppelin within a Kinesis Data
    -- Analytics Studio notebook.
    ZeppelinMonitoringConfigurationUpdate -> LogLevel
logLevelUpdate :: LogLevel
  }
  deriving (ZeppelinMonitoringConfigurationUpdate
-> ZeppelinMonitoringConfigurationUpdate -> Bool
(ZeppelinMonitoringConfigurationUpdate
 -> ZeppelinMonitoringConfigurationUpdate -> Bool)
-> (ZeppelinMonitoringConfigurationUpdate
    -> ZeppelinMonitoringConfigurationUpdate -> Bool)
-> Eq ZeppelinMonitoringConfigurationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ZeppelinMonitoringConfigurationUpdate
-> ZeppelinMonitoringConfigurationUpdate -> Bool
$c/= :: ZeppelinMonitoringConfigurationUpdate
-> ZeppelinMonitoringConfigurationUpdate -> Bool
== :: ZeppelinMonitoringConfigurationUpdate
-> ZeppelinMonitoringConfigurationUpdate -> Bool
$c== :: ZeppelinMonitoringConfigurationUpdate
-> ZeppelinMonitoringConfigurationUpdate -> Bool
Prelude.Eq, ReadPrec [ZeppelinMonitoringConfigurationUpdate]
ReadPrec ZeppelinMonitoringConfigurationUpdate
Int -> ReadS ZeppelinMonitoringConfigurationUpdate
ReadS [ZeppelinMonitoringConfigurationUpdate]
(Int -> ReadS ZeppelinMonitoringConfigurationUpdate)
-> ReadS [ZeppelinMonitoringConfigurationUpdate]
-> ReadPrec ZeppelinMonitoringConfigurationUpdate
-> ReadPrec [ZeppelinMonitoringConfigurationUpdate]
-> Read ZeppelinMonitoringConfigurationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ZeppelinMonitoringConfigurationUpdate]
$creadListPrec :: ReadPrec [ZeppelinMonitoringConfigurationUpdate]
readPrec :: ReadPrec ZeppelinMonitoringConfigurationUpdate
$creadPrec :: ReadPrec ZeppelinMonitoringConfigurationUpdate
readList :: ReadS [ZeppelinMonitoringConfigurationUpdate]
$creadList :: ReadS [ZeppelinMonitoringConfigurationUpdate]
readsPrec :: Int -> ReadS ZeppelinMonitoringConfigurationUpdate
$creadsPrec :: Int -> ReadS ZeppelinMonitoringConfigurationUpdate
Prelude.Read, Int -> ZeppelinMonitoringConfigurationUpdate -> ShowS
[ZeppelinMonitoringConfigurationUpdate] -> ShowS
ZeppelinMonitoringConfigurationUpdate -> String
(Int -> ZeppelinMonitoringConfigurationUpdate -> ShowS)
-> (ZeppelinMonitoringConfigurationUpdate -> String)
-> ([ZeppelinMonitoringConfigurationUpdate] -> ShowS)
-> Show ZeppelinMonitoringConfigurationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ZeppelinMonitoringConfigurationUpdate] -> ShowS
$cshowList :: [ZeppelinMonitoringConfigurationUpdate] -> ShowS
show :: ZeppelinMonitoringConfigurationUpdate -> String
$cshow :: ZeppelinMonitoringConfigurationUpdate -> String
showsPrec :: Int -> ZeppelinMonitoringConfigurationUpdate -> ShowS
$cshowsPrec :: Int -> ZeppelinMonitoringConfigurationUpdate -> ShowS
Prelude.Show, (forall x.
 ZeppelinMonitoringConfigurationUpdate
 -> Rep ZeppelinMonitoringConfigurationUpdate x)
-> (forall x.
    Rep ZeppelinMonitoringConfigurationUpdate x
    -> ZeppelinMonitoringConfigurationUpdate)
-> Generic ZeppelinMonitoringConfigurationUpdate
forall x.
Rep ZeppelinMonitoringConfigurationUpdate x
-> ZeppelinMonitoringConfigurationUpdate
forall x.
ZeppelinMonitoringConfigurationUpdate
-> Rep ZeppelinMonitoringConfigurationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ZeppelinMonitoringConfigurationUpdate x
-> ZeppelinMonitoringConfigurationUpdate
$cfrom :: forall x.
ZeppelinMonitoringConfigurationUpdate
-> Rep ZeppelinMonitoringConfigurationUpdate x
Prelude.Generic)

-- |
-- Create a value of 'ZeppelinMonitoringConfigurationUpdate' 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:
--
-- 'logLevelUpdate', 'zeppelinMonitoringConfigurationUpdate_logLevelUpdate' - Updates to the logging level for Apache Zeppelin within a Kinesis Data
-- Analytics Studio notebook.
newZeppelinMonitoringConfigurationUpdate ::
  -- | 'logLevelUpdate'
  LogLevel ->
  ZeppelinMonitoringConfigurationUpdate
newZeppelinMonitoringConfigurationUpdate :: LogLevel -> ZeppelinMonitoringConfigurationUpdate
newZeppelinMonitoringConfigurationUpdate
  LogLevel
pLogLevelUpdate_ =
    ZeppelinMonitoringConfigurationUpdate' :: LogLevel -> ZeppelinMonitoringConfigurationUpdate
ZeppelinMonitoringConfigurationUpdate'
      { $sel:logLevelUpdate:ZeppelinMonitoringConfigurationUpdate' :: LogLevel
logLevelUpdate =
          LogLevel
pLogLevelUpdate_
      }

-- | Updates to the logging level for Apache Zeppelin within a Kinesis Data
-- Analytics Studio notebook.
zeppelinMonitoringConfigurationUpdate_logLevelUpdate :: Lens.Lens' ZeppelinMonitoringConfigurationUpdate LogLevel
zeppelinMonitoringConfigurationUpdate_logLevelUpdate :: (LogLevel -> f LogLevel)
-> ZeppelinMonitoringConfigurationUpdate
-> f ZeppelinMonitoringConfigurationUpdate
zeppelinMonitoringConfigurationUpdate_logLevelUpdate = (ZeppelinMonitoringConfigurationUpdate -> LogLevel)
-> (ZeppelinMonitoringConfigurationUpdate
    -> LogLevel -> ZeppelinMonitoringConfigurationUpdate)
-> Lens
     ZeppelinMonitoringConfigurationUpdate
     ZeppelinMonitoringConfigurationUpdate
     LogLevel
     LogLevel
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZeppelinMonitoringConfigurationUpdate' {LogLevel
logLevelUpdate :: LogLevel
$sel:logLevelUpdate:ZeppelinMonitoringConfigurationUpdate' :: ZeppelinMonitoringConfigurationUpdate -> LogLevel
logLevelUpdate} -> LogLevel
logLevelUpdate) (\s :: ZeppelinMonitoringConfigurationUpdate
s@ZeppelinMonitoringConfigurationUpdate' {} LogLevel
a -> ZeppelinMonitoringConfigurationUpdate
s {$sel:logLevelUpdate:ZeppelinMonitoringConfigurationUpdate' :: LogLevel
logLevelUpdate = LogLevel
a} :: ZeppelinMonitoringConfigurationUpdate)

instance
  Prelude.Hashable
    ZeppelinMonitoringConfigurationUpdate

instance
  Prelude.NFData
    ZeppelinMonitoringConfigurationUpdate

instance
  Core.ToJSON
    ZeppelinMonitoringConfigurationUpdate
  where
  toJSON :: ZeppelinMonitoringConfigurationUpdate -> Value
toJSON ZeppelinMonitoringConfigurationUpdate' {LogLevel
logLevelUpdate :: LogLevel
$sel:logLevelUpdate:ZeppelinMonitoringConfigurationUpdate' :: ZeppelinMonitoringConfigurationUpdate -> LogLevel
..} =
    [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
"LogLevelUpdate" Text -> LogLevel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LogLevel
logLevelUpdate)
          ]
      )