{-# 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 #-}
module Amazonka.KinesisAnalyticsV2.Types.MonitoringConfigurationDescription where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.ConfigurationType
import Amazonka.KinesisAnalyticsV2.Types.LogLevel
import Amazonka.KinesisAnalyticsV2.Types.MetricsLevel
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MonitoringConfigurationDescription = MonitoringConfigurationDescription'
{
MonitoringConfigurationDescription -> Maybe LogLevel
logLevel :: Prelude.Maybe LogLevel,
MonitoringConfigurationDescription -> Maybe ConfigurationType
configurationType :: Prelude.Maybe ConfigurationType,
MonitoringConfigurationDescription -> Maybe MetricsLevel
metricsLevel :: Prelude.Maybe MetricsLevel
}
deriving (MonitoringConfigurationDescription
-> MonitoringConfigurationDescription -> Bool
(MonitoringConfigurationDescription
-> MonitoringConfigurationDescription -> Bool)
-> (MonitoringConfigurationDescription
-> MonitoringConfigurationDescription -> Bool)
-> Eq MonitoringConfigurationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MonitoringConfigurationDescription
-> MonitoringConfigurationDescription -> Bool
$c/= :: MonitoringConfigurationDescription
-> MonitoringConfigurationDescription -> Bool
== :: MonitoringConfigurationDescription
-> MonitoringConfigurationDescription -> Bool
$c== :: MonitoringConfigurationDescription
-> MonitoringConfigurationDescription -> Bool
Prelude.Eq, ReadPrec [MonitoringConfigurationDescription]
ReadPrec MonitoringConfigurationDescription
Int -> ReadS MonitoringConfigurationDescription
ReadS [MonitoringConfigurationDescription]
(Int -> ReadS MonitoringConfigurationDescription)
-> ReadS [MonitoringConfigurationDescription]
-> ReadPrec MonitoringConfigurationDescription
-> ReadPrec [MonitoringConfigurationDescription]
-> Read MonitoringConfigurationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MonitoringConfigurationDescription]
$creadListPrec :: ReadPrec [MonitoringConfigurationDescription]
readPrec :: ReadPrec MonitoringConfigurationDescription
$creadPrec :: ReadPrec MonitoringConfigurationDescription
readList :: ReadS [MonitoringConfigurationDescription]
$creadList :: ReadS [MonitoringConfigurationDescription]
readsPrec :: Int -> ReadS MonitoringConfigurationDescription
$creadsPrec :: Int -> ReadS MonitoringConfigurationDescription
Prelude.Read, Int -> MonitoringConfigurationDescription -> ShowS
[MonitoringConfigurationDescription] -> ShowS
MonitoringConfigurationDescription -> String
(Int -> MonitoringConfigurationDescription -> ShowS)
-> (MonitoringConfigurationDescription -> String)
-> ([MonitoringConfigurationDescription] -> ShowS)
-> Show MonitoringConfigurationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MonitoringConfigurationDescription] -> ShowS
$cshowList :: [MonitoringConfigurationDescription] -> ShowS
show :: MonitoringConfigurationDescription -> String
$cshow :: MonitoringConfigurationDescription -> String
showsPrec :: Int -> MonitoringConfigurationDescription -> ShowS
$cshowsPrec :: Int -> MonitoringConfigurationDescription -> ShowS
Prelude.Show, (forall x.
MonitoringConfigurationDescription
-> Rep MonitoringConfigurationDescription x)
-> (forall x.
Rep MonitoringConfigurationDescription x
-> MonitoringConfigurationDescription)
-> Generic MonitoringConfigurationDescription
forall x.
Rep MonitoringConfigurationDescription x
-> MonitoringConfigurationDescription
forall x.
MonitoringConfigurationDescription
-> Rep MonitoringConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MonitoringConfigurationDescription x
-> MonitoringConfigurationDescription
$cfrom :: forall x.
MonitoringConfigurationDescription
-> Rep MonitoringConfigurationDescription x
Prelude.Generic)
newMonitoringConfigurationDescription ::
MonitoringConfigurationDescription
newMonitoringConfigurationDescription :: MonitoringConfigurationDescription
newMonitoringConfigurationDescription =
MonitoringConfigurationDescription' :: Maybe LogLevel
-> Maybe ConfigurationType
-> Maybe MetricsLevel
-> MonitoringConfigurationDescription
MonitoringConfigurationDescription'
{ $sel:logLevel:MonitoringConfigurationDescription' :: Maybe LogLevel
logLevel =
Maybe LogLevel
forall a. Maybe a
Prelude.Nothing,
$sel:configurationType:MonitoringConfigurationDescription' :: Maybe ConfigurationType
configurationType = Maybe ConfigurationType
forall a. Maybe a
Prelude.Nothing,
$sel:metricsLevel:MonitoringConfigurationDescription' :: Maybe MetricsLevel
metricsLevel = Maybe MetricsLevel
forall a. Maybe a
Prelude.Nothing
}
monitoringConfigurationDescription_logLevel :: Lens.Lens' MonitoringConfigurationDescription (Prelude.Maybe LogLevel)
monitoringConfigurationDescription_logLevel :: (Maybe LogLevel -> f (Maybe LogLevel))
-> MonitoringConfigurationDescription
-> f MonitoringConfigurationDescription
monitoringConfigurationDescription_logLevel = (MonitoringConfigurationDescription -> Maybe LogLevel)
-> (MonitoringConfigurationDescription
-> Maybe LogLevel -> MonitoringConfigurationDescription)
-> Lens
MonitoringConfigurationDescription
MonitoringConfigurationDescription
(Maybe LogLevel)
(Maybe LogLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringConfigurationDescription' {Maybe LogLevel
logLevel :: Maybe LogLevel
$sel:logLevel:MonitoringConfigurationDescription' :: MonitoringConfigurationDescription -> Maybe LogLevel
logLevel} -> Maybe LogLevel
logLevel) (\s :: MonitoringConfigurationDescription
s@MonitoringConfigurationDescription' {} Maybe LogLevel
a -> MonitoringConfigurationDescription
s {$sel:logLevel:MonitoringConfigurationDescription' :: Maybe LogLevel
logLevel = Maybe LogLevel
a} :: MonitoringConfigurationDescription)
monitoringConfigurationDescription_configurationType :: Lens.Lens' MonitoringConfigurationDescription (Prelude.Maybe ConfigurationType)
monitoringConfigurationDescription_configurationType :: (Maybe ConfigurationType -> f (Maybe ConfigurationType))
-> MonitoringConfigurationDescription
-> f MonitoringConfigurationDescription
monitoringConfigurationDescription_configurationType = (MonitoringConfigurationDescription -> Maybe ConfigurationType)
-> (MonitoringConfigurationDescription
-> Maybe ConfigurationType -> MonitoringConfigurationDescription)
-> Lens
MonitoringConfigurationDescription
MonitoringConfigurationDescription
(Maybe ConfigurationType)
(Maybe ConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringConfigurationDescription' {Maybe ConfigurationType
configurationType :: Maybe ConfigurationType
$sel:configurationType:MonitoringConfigurationDescription' :: MonitoringConfigurationDescription -> Maybe ConfigurationType
configurationType} -> Maybe ConfigurationType
configurationType) (\s :: MonitoringConfigurationDescription
s@MonitoringConfigurationDescription' {} Maybe ConfigurationType
a -> MonitoringConfigurationDescription
s {$sel:configurationType:MonitoringConfigurationDescription' :: Maybe ConfigurationType
configurationType = Maybe ConfigurationType
a} :: MonitoringConfigurationDescription)
monitoringConfigurationDescription_metricsLevel :: Lens.Lens' MonitoringConfigurationDescription (Prelude.Maybe MetricsLevel)
monitoringConfigurationDescription_metricsLevel :: (Maybe MetricsLevel -> f (Maybe MetricsLevel))
-> MonitoringConfigurationDescription
-> f MonitoringConfigurationDescription
monitoringConfigurationDescription_metricsLevel = (MonitoringConfigurationDescription -> Maybe MetricsLevel)
-> (MonitoringConfigurationDescription
-> Maybe MetricsLevel -> MonitoringConfigurationDescription)
-> Lens
MonitoringConfigurationDescription
MonitoringConfigurationDescription
(Maybe MetricsLevel)
(Maybe MetricsLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringConfigurationDescription' {Maybe MetricsLevel
metricsLevel :: Maybe MetricsLevel
$sel:metricsLevel:MonitoringConfigurationDescription' :: MonitoringConfigurationDescription -> Maybe MetricsLevel
metricsLevel} -> Maybe MetricsLevel
metricsLevel) (\s :: MonitoringConfigurationDescription
s@MonitoringConfigurationDescription' {} Maybe MetricsLevel
a -> MonitoringConfigurationDescription
s {$sel:metricsLevel:MonitoringConfigurationDescription' :: Maybe MetricsLevel
metricsLevel = Maybe MetricsLevel
a} :: MonitoringConfigurationDescription)
instance
Core.FromJSON
MonitoringConfigurationDescription
where
parseJSON :: Value -> Parser MonitoringConfigurationDescription
parseJSON =
String
-> (Object -> Parser MonitoringConfigurationDescription)
-> Value
-> Parser MonitoringConfigurationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MonitoringConfigurationDescription"
( \Object
x ->
Maybe LogLevel
-> Maybe ConfigurationType
-> Maybe MetricsLevel
-> MonitoringConfigurationDescription
MonitoringConfigurationDescription'
(Maybe LogLevel
-> Maybe ConfigurationType
-> Maybe MetricsLevel
-> MonitoringConfigurationDescription)
-> Parser (Maybe LogLevel)
-> Parser
(Maybe ConfigurationType
-> Maybe MetricsLevel -> MonitoringConfigurationDescription)
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")
Parser
(Maybe ConfigurationType
-> Maybe MetricsLevel -> MonitoringConfigurationDescription)
-> Parser (Maybe ConfigurationType)
-> Parser
(Maybe MetricsLevel -> MonitoringConfigurationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConfigurationType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConfigurationType")
Parser (Maybe MetricsLevel -> MonitoringConfigurationDescription)
-> Parser (Maybe MetricsLevel)
-> Parser MonitoringConfigurationDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MetricsLevel)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MetricsLevel")
)
instance
Prelude.Hashable
MonitoringConfigurationDescription
instance
Prelude.NFData
MonitoringConfigurationDescription