{-# 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.ZeppelinMonitoringConfiguration
-- 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.ZeppelinMonitoringConfiguration where

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

-- | Describes configuration parameters for Amazon CloudWatch logging for a
-- Kinesis Data Analytics Studio notebook. For more information about
-- CloudWatch logging, see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/java/monitoring-overview.html Monitoring>.
--
-- /See:/ 'newZeppelinMonitoringConfiguration' smart constructor.
data ZeppelinMonitoringConfiguration = ZeppelinMonitoringConfiguration'
  { -- | The verbosity of the CloudWatch Logs for an application.
    ZeppelinMonitoringConfiguration -> LogLevel
logLevel :: LogLevel
  }
  deriving (ZeppelinMonitoringConfiguration
-> ZeppelinMonitoringConfiguration -> Bool
(ZeppelinMonitoringConfiguration
 -> ZeppelinMonitoringConfiguration -> Bool)
-> (ZeppelinMonitoringConfiguration
    -> ZeppelinMonitoringConfiguration -> Bool)
-> Eq ZeppelinMonitoringConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ZeppelinMonitoringConfiguration
-> ZeppelinMonitoringConfiguration -> Bool
$c/= :: ZeppelinMonitoringConfiguration
-> ZeppelinMonitoringConfiguration -> Bool
== :: ZeppelinMonitoringConfiguration
-> ZeppelinMonitoringConfiguration -> Bool
$c== :: ZeppelinMonitoringConfiguration
-> ZeppelinMonitoringConfiguration -> Bool
Prelude.Eq, ReadPrec [ZeppelinMonitoringConfiguration]
ReadPrec ZeppelinMonitoringConfiguration
Int -> ReadS ZeppelinMonitoringConfiguration
ReadS [ZeppelinMonitoringConfiguration]
(Int -> ReadS ZeppelinMonitoringConfiguration)
-> ReadS [ZeppelinMonitoringConfiguration]
-> ReadPrec ZeppelinMonitoringConfiguration
-> ReadPrec [ZeppelinMonitoringConfiguration]
-> Read ZeppelinMonitoringConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ZeppelinMonitoringConfiguration]
$creadListPrec :: ReadPrec [ZeppelinMonitoringConfiguration]
readPrec :: ReadPrec ZeppelinMonitoringConfiguration
$creadPrec :: ReadPrec ZeppelinMonitoringConfiguration
readList :: ReadS [ZeppelinMonitoringConfiguration]
$creadList :: ReadS [ZeppelinMonitoringConfiguration]
readsPrec :: Int -> ReadS ZeppelinMonitoringConfiguration
$creadsPrec :: Int -> ReadS ZeppelinMonitoringConfiguration
Prelude.Read, Int -> ZeppelinMonitoringConfiguration -> ShowS
[ZeppelinMonitoringConfiguration] -> ShowS
ZeppelinMonitoringConfiguration -> String
(Int -> ZeppelinMonitoringConfiguration -> ShowS)
-> (ZeppelinMonitoringConfiguration -> String)
-> ([ZeppelinMonitoringConfiguration] -> ShowS)
-> Show ZeppelinMonitoringConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ZeppelinMonitoringConfiguration] -> ShowS
$cshowList :: [ZeppelinMonitoringConfiguration] -> ShowS
show :: ZeppelinMonitoringConfiguration -> String
$cshow :: ZeppelinMonitoringConfiguration -> String
showsPrec :: Int -> ZeppelinMonitoringConfiguration -> ShowS
$cshowsPrec :: Int -> ZeppelinMonitoringConfiguration -> ShowS
Prelude.Show, (forall x.
 ZeppelinMonitoringConfiguration
 -> Rep ZeppelinMonitoringConfiguration x)
-> (forall x.
    Rep ZeppelinMonitoringConfiguration x
    -> ZeppelinMonitoringConfiguration)
-> Generic ZeppelinMonitoringConfiguration
forall x.
Rep ZeppelinMonitoringConfiguration x
-> ZeppelinMonitoringConfiguration
forall x.
ZeppelinMonitoringConfiguration
-> Rep ZeppelinMonitoringConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ZeppelinMonitoringConfiguration x
-> ZeppelinMonitoringConfiguration
$cfrom :: forall x.
ZeppelinMonitoringConfiguration
-> Rep ZeppelinMonitoringConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'ZeppelinMonitoringConfiguration' 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:
--
-- 'logLevel', 'zeppelinMonitoringConfiguration_logLevel' - The verbosity of the CloudWatch Logs for an application.
newZeppelinMonitoringConfiguration ::
  -- | 'logLevel'
  LogLevel ->
  ZeppelinMonitoringConfiguration
newZeppelinMonitoringConfiguration :: LogLevel -> ZeppelinMonitoringConfiguration
newZeppelinMonitoringConfiguration LogLevel
pLogLevel_ =
  ZeppelinMonitoringConfiguration' :: LogLevel -> ZeppelinMonitoringConfiguration
ZeppelinMonitoringConfiguration'
    { $sel:logLevel:ZeppelinMonitoringConfiguration' :: LogLevel
logLevel =
        LogLevel
pLogLevel_
    }

-- | The verbosity of the CloudWatch Logs for an application.
zeppelinMonitoringConfiguration_logLevel :: Lens.Lens' ZeppelinMonitoringConfiguration LogLevel
zeppelinMonitoringConfiguration_logLevel :: (LogLevel -> f LogLevel)
-> ZeppelinMonitoringConfiguration
-> f ZeppelinMonitoringConfiguration
zeppelinMonitoringConfiguration_logLevel = (ZeppelinMonitoringConfiguration -> LogLevel)
-> (ZeppelinMonitoringConfiguration
    -> LogLevel -> ZeppelinMonitoringConfiguration)
-> Lens
     ZeppelinMonitoringConfiguration
     ZeppelinMonitoringConfiguration
     LogLevel
     LogLevel
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZeppelinMonitoringConfiguration' {LogLevel
logLevel :: LogLevel
$sel:logLevel:ZeppelinMonitoringConfiguration' :: ZeppelinMonitoringConfiguration -> LogLevel
logLevel} -> LogLevel
logLevel) (\s :: ZeppelinMonitoringConfiguration
s@ZeppelinMonitoringConfiguration' {} LogLevel
a -> ZeppelinMonitoringConfiguration
s {$sel:logLevel:ZeppelinMonitoringConfiguration' :: LogLevel
logLevel = LogLevel
a} :: ZeppelinMonitoringConfiguration)

instance
  Prelude.Hashable
    ZeppelinMonitoringConfiguration

instance
  Prelude.NFData
    ZeppelinMonitoringConfiguration

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