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

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

-- | The monitoring configuration for Apache Zeppelin within a Kinesis Data
-- Analytics Studio notebook.
--
-- /See:/ 'newZeppelinMonitoringConfigurationDescription' smart constructor.
data ZeppelinMonitoringConfigurationDescription = ZeppelinMonitoringConfigurationDescription'
  { -- | Describes the verbosity of the CloudWatch Logs for an application.
    ZeppelinMonitoringConfigurationDescription -> Maybe LogLevel
logLevel :: Prelude.Maybe LogLevel
  }
  deriving (ZeppelinMonitoringConfigurationDescription
-> ZeppelinMonitoringConfigurationDescription -> Bool
(ZeppelinMonitoringConfigurationDescription
 -> ZeppelinMonitoringConfigurationDescription -> Bool)
-> (ZeppelinMonitoringConfigurationDescription
    -> ZeppelinMonitoringConfigurationDescription -> Bool)
-> Eq ZeppelinMonitoringConfigurationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ZeppelinMonitoringConfigurationDescription
-> ZeppelinMonitoringConfigurationDescription -> Bool
$c/= :: ZeppelinMonitoringConfigurationDescription
-> ZeppelinMonitoringConfigurationDescription -> Bool
== :: ZeppelinMonitoringConfigurationDescription
-> ZeppelinMonitoringConfigurationDescription -> Bool
$c== :: ZeppelinMonitoringConfigurationDescription
-> ZeppelinMonitoringConfigurationDescription -> Bool
Prelude.Eq, ReadPrec [ZeppelinMonitoringConfigurationDescription]
ReadPrec ZeppelinMonitoringConfigurationDescription
Int -> ReadS ZeppelinMonitoringConfigurationDescription
ReadS [ZeppelinMonitoringConfigurationDescription]
(Int -> ReadS ZeppelinMonitoringConfigurationDescription)
-> ReadS [ZeppelinMonitoringConfigurationDescription]
-> ReadPrec ZeppelinMonitoringConfigurationDescription
-> ReadPrec [ZeppelinMonitoringConfigurationDescription]
-> Read ZeppelinMonitoringConfigurationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ZeppelinMonitoringConfigurationDescription]
$creadListPrec :: ReadPrec [ZeppelinMonitoringConfigurationDescription]
readPrec :: ReadPrec ZeppelinMonitoringConfigurationDescription
$creadPrec :: ReadPrec ZeppelinMonitoringConfigurationDescription
readList :: ReadS [ZeppelinMonitoringConfigurationDescription]
$creadList :: ReadS [ZeppelinMonitoringConfigurationDescription]
readsPrec :: Int -> ReadS ZeppelinMonitoringConfigurationDescription
$creadsPrec :: Int -> ReadS ZeppelinMonitoringConfigurationDescription
Prelude.Read, Int -> ZeppelinMonitoringConfigurationDescription -> ShowS
[ZeppelinMonitoringConfigurationDescription] -> ShowS
ZeppelinMonitoringConfigurationDescription -> String
(Int -> ZeppelinMonitoringConfigurationDescription -> ShowS)
-> (ZeppelinMonitoringConfigurationDescription -> String)
-> ([ZeppelinMonitoringConfigurationDescription] -> ShowS)
-> Show ZeppelinMonitoringConfigurationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ZeppelinMonitoringConfigurationDescription] -> ShowS
$cshowList :: [ZeppelinMonitoringConfigurationDescription] -> ShowS
show :: ZeppelinMonitoringConfigurationDescription -> String
$cshow :: ZeppelinMonitoringConfigurationDescription -> String
showsPrec :: Int -> ZeppelinMonitoringConfigurationDescription -> ShowS
$cshowsPrec :: Int -> ZeppelinMonitoringConfigurationDescription -> ShowS
Prelude.Show, (forall x.
 ZeppelinMonitoringConfigurationDescription
 -> Rep ZeppelinMonitoringConfigurationDescription x)
-> (forall x.
    Rep ZeppelinMonitoringConfigurationDescription x
    -> ZeppelinMonitoringConfigurationDescription)
-> Generic ZeppelinMonitoringConfigurationDescription
forall x.
Rep ZeppelinMonitoringConfigurationDescription x
-> ZeppelinMonitoringConfigurationDescription
forall x.
ZeppelinMonitoringConfigurationDescription
-> Rep ZeppelinMonitoringConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ZeppelinMonitoringConfigurationDescription x
-> ZeppelinMonitoringConfigurationDescription
$cfrom :: forall x.
ZeppelinMonitoringConfigurationDescription
-> Rep ZeppelinMonitoringConfigurationDescription x
Prelude.Generic)

-- |
-- Create a value of 'ZeppelinMonitoringConfigurationDescription' 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', 'zeppelinMonitoringConfigurationDescription_logLevel' - Describes the verbosity of the CloudWatch Logs for an application.
newZeppelinMonitoringConfigurationDescription ::
  ZeppelinMonitoringConfigurationDescription
newZeppelinMonitoringConfigurationDescription :: ZeppelinMonitoringConfigurationDescription
newZeppelinMonitoringConfigurationDescription =
  ZeppelinMonitoringConfigurationDescription' :: Maybe LogLevel -> ZeppelinMonitoringConfigurationDescription
ZeppelinMonitoringConfigurationDescription'
    { $sel:logLevel:ZeppelinMonitoringConfigurationDescription' :: Maybe LogLevel
logLevel =
        Maybe LogLevel
forall a. Maybe a
Prelude.Nothing
    }

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

instance
  Core.FromJSON
    ZeppelinMonitoringConfigurationDescription
  where
  parseJSON :: Value -> Parser ZeppelinMonitoringConfigurationDescription
parseJSON =
    String
-> (Object -> Parser ZeppelinMonitoringConfigurationDescription)
-> Value
-> Parser ZeppelinMonitoringConfigurationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ZeppelinMonitoringConfigurationDescription"
      ( \Object
x ->
          Maybe LogLevel -> ZeppelinMonitoringConfigurationDescription
ZeppelinMonitoringConfigurationDescription'
            (Maybe LogLevel -> ZeppelinMonitoringConfigurationDescription)
-> Parser (Maybe LogLevel)
-> Parser ZeppelinMonitoringConfigurationDescription
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe LogLevel)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LogLevel")
      )

instance
  Prelude.Hashable
    ZeppelinMonitoringConfigurationDescription

instance
  Prelude.NFData
    ZeppelinMonitoringConfigurationDescription