{-# 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.MonitoringConfigurationUpdate 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 MonitoringConfigurationUpdate = MonitoringConfigurationUpdate'
{
MonitoringConfigurationUpdate -> Maybe MetricsLevel
metricsLevelUpdate :: Prelude.Maybe MetricsLevel,
MonitoringConfigurationUpdate -> Maybe LogLevel
logLevelUpdate :: Prelude.Maybe LogLevel,
MonitoringConfigurationUpdate -> Maybe ConfigurationType
configurationTypeUpdate :: Prelude.Maybe ConfigurationType
}
deriving (MonitoringConfigurationUpdate
-> MonitoringConfigurationUpdate -> Bool
(MonitoringConfigurationUpdate
-> MonitoringConfigurationUpdate -> Bool)
-> (MonitoringConfigurationUpdate
-> MonitoringConfigurationUpdate -> Bool)
-> Eq MonitoringConfigurationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MonitoringConfigurationUpdate
-> MonitoringConfigurationUpdate -> Bool
$c/= :: MonitoringConfigurationUpdate
-> MonitoringConfigurationUpdate -> Bool
== :: MonitoringConfigurationUpdate
-> MonitoringConfigurationUpdate -> Bool
$c== :: MonitoringConfigurationUpdate
-> MonitoringConfigurationUpdate -> Bool
Prelude.Eq, ReadPrec [MonitoringConfigurationUpdate]
ReadPrec MonitoringConfigurationUpdate
Int -> ReadS MonitoringConfigurationUpdate
ReadS [MonitoringConfigurationUpdate]
(Int -> ReadS MonitoringConfigurationUpdate)
-> ReadS [MonitoringConfigurationUpdate]
-> ReadPrec MonitoringConfigurationUpdate
-> ReadPrec [MonitoringConfigurationUpdate]
-> Read MonitoringConfigurationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MonitoringConfigurationUpdate]
$creadListPrec :: ReadPrec [MonitoringConfigurationUpdate]
readPrec :: ReadPrec MonitoringConfigurationUpdate
$creadPrec :: ReadPrec MonitoringConfigurationUpdate
readList :: ReadS [MonitoringConfigurationUpdate]
$creadList :: ReadS [MonitoringConfigurationUpdate]
readsPrec :: Int -> ReadS MonitoringConfigurationUpdate
$creadsPrec :: Int -> ReadS MonitoringConfigurationUpdate
Prelude.Read, Int -> MonitoringConfigurationUpdate -> ShowS
[MonitoringConfigurationUpdate] -> ShowS
MonitoringConfigurationUpdate -> String
(Int -> MonitoringConfigurationUpdate -> ShowS)
-> (MonitoringConfigurationUpdate -> String)
-> ([MonitoringConfigurationUpdate] -> ShowS)
-> Show MonitoringConfigurationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MonitoringConfigurationUpdate] -> ShowS
$cshowList :: [MonitoringConfigurationUpdate] -> ShowS
show :: MonitoringConfigurationUpdate -> String
$cshow :: MonitoringConfigurationUpdate -> String
showsPrec :: Int -> MonitoringConfigurationUpdate -> ShowS
$cshowsPrec :: Int -> MonitoringConfigurationUpdate -> ShowS
Prelude.Show, (forall x.
MonitoringConfigurationUpdate
-> Rep MonitoringConfigurationUpdate x)
-> (forall x.
Rep MonitoringConfigurationUpdate x
-> MonitoringConfigurationUpdate)
-> Generic MonitoringConfigurationUpdate
forall x.
Rep MonitoringConfigurationUpdate x
-> MonitoringConfigurationUpdate
forall x.
MonitoringConfigurationUpdate
-> Rep MonitoringConfigurationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MonitoringConfigurationUpdate x
-> MonitoringConfigurationUpdate
$cfrom :: forall x.
MonitoringConfigurationUpdate
-> Rep MonitoringConfigurationUpdate x
Prelude.Generic)
newMonitoringConfigurationUpdate ::
MonitoringConfigurationUpdate
newMonitoringConfigurationUpdate :: MonitoringConfigurationUpdate
newMonitoringConfigurationUpdate =
MonitoringConfigurationUpdate' :: Maybe MetricsLevel
-> Maybe LogLevel
-> Maybe ConfigurationType
-> MonitoringConfigurationUpdate
MonitoringConfigurationUpdate'
{ $sel:metricsLevelUpdate:MonitoringConfigurationUpdate' :: Maybe MetricsLevel
metricsLevelUpdate =
Maybe MetricsLevel
forall a. Maybe a
Prelude.Nothing,
$sel:logLevelUpdate:MonitoringConfigurationUpdate' :: Maybe LogLevel
logLevelUpdate = Maybe LogLevel
forall a. Maybe a
Prelude.Nothing,
$sel:configurationTypeUpdate:MonitoringConfigurationUpdate' :: Maybe ConfigurationType
configurationTypeUpdate = Maybe ConfigurationType
forall a. Maybe a
Prelude.Nothing
}
monitoringConfigurationUpdate_metricsLevelUpdate :: Lens.Lens' MonitoringConfigurationUpdate (Prelude.Maybe MetricsLevel)
monitoringConfigurationUpdate_metricsLevelUpdate :: (Maybe MetricsLevel -> f (Maybe MetricsLevel))
-> MonitoringConfigurationUpdate -> f MonitoringConfigurationUpdate
monitoringConfigurationUpdate_metricsLevelUpdate = (MonitoringConfigurationUpdate -> Maybe MetricsLevel)
-> (MonitoringConfigurationUpdate
-> Maybe MetricsLevel -> MonitoringConfigurationUpdate)
-> Lens
MonitoringConfigurationUpdate
MonitoringConfigurationUpdate
(Maybe MetricsLevel)
(Maybe MetricsLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringConfigurationUpdate' {Maybe MetricsLevel
metricsLevelUpdate :: Maybe MetricsLevel
$sel:metricsLevelUpdate:MonitoringConfigurationUpdate' :: MonitoringConfigurationUpdate -> Maybe MetricsLevel
metricsLevelUpdate} -> Maybe MetricsLevel
metricsLevelUpdate) (\s :: MonitoringConfigurationUpdate
s@MonitoringConfigurationUpdate' {} Maybe MetricsLevel
a -> MonitoringConfigurationUpdate
s {$sel:metricsLevelUpdate:MonitoringConfigurationUpdate' :: Maybe MetricsLevel
metricsLevelUpdate = Maybe MetricsLevel
a} :: MonitoringConfigurationUpdate)
monitoringConfigurationUpdate_logLevelUpdate :: Lens.Lens' MonitoringConfigurationUpdate (Prelude.Maybe LogLevel)
monitoringConfigurationUpdate_logLevelUpdate :: (Maybe LogLevel -> f (Maybe LogLevel))
-> MonitoringConfigurationUpdate -> f MonitoringConfigurationUpdate
monitoringConfigurationUpdate_logLevelUpdate = (MonitoringConfigurationUpdate -> Maybe LogLevel)
-> (MonitoringConfigurationUpdate
-> Maybe LogLevel -> MonitoringConfigurationUpdate)
-> Lens
MonitoringConfigurationUpdate
MonitoringConfigurationUpdate
(Maybe LogLevel)
(Maybe LogLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringConfigurationUpdate' {Maybe LogLevel
logLevelUpdate :: Maybe LogLevel
$sel:logLevelUpdate:MonitoringConfigurationUpdate' :: MonitoringConfigurationUpdate -> Maybe LogLevel
logLevelUpdate} -> Maybe LogLevel
logLevelUpdate) (\s :: MonitoringConfigurationUpdate
s@MonitoringConfigurationUpdate' {} Maybe LogLevel
a -> MonitoringConfigurationUpdate
s {$sel:logLevelUpdate:MonitoringConfigurationUpdate' :: Maybe LogLevel
logLevelUpdate = Maybe LogLevel
a} :: MonitoringConfigurationUpdate)
monitoringConfigurationUpdate_configurationTypeUpdate :: Lens.Lens' MonitoringConfigurationUpdate (Prelude.Maybe ConfigurationType)
monitoringConfigurationUpdate_configurationTypeUpdate :: (Maybe ConfigurationType -> f (Maybe ConfigurationType))
-> MonitoringConfigurationUpdate -> f MonitoringConfigurationUpdate
monitoringConfigurationUpdate_configurationTypeUpdate = (MonitoringConfigurationUpdate -> Maybe ConfigurationType)
-> (MonitoringConfigurationUpdate
-> Maybe ConfigurationType -> MonitoringConfigurationUpdate)
-> Lens
MonitoringConfigurationUpdate
MonitoringConfigurationUpdate
(Maybe ConfigurationType)
(Maybe ConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringConfigurationUpdate' {Maybe ConfigurationType
configurationTypeUpdate :: Maybe ConfigurationType
$sel:configurationTypeUpdate:MonitoringConfigurationUpdate' :: MonitoringConfigurationUpdate -> Maybe ConfigurationType
configurationTypeUpdate} -> Maybe ConfigurationType
configurationTypeUpdate) (\s :: MonitoringConfigurationUpdate
s@MonitoringConfigurationUpdate' {} Maybe ConfigurationType
a -> MonitoringConfigurationUpdate
s {$sel:configurationTypeUpdate:MonitoringConfigurationUpdate' :: Maybe ConfigurationType
configurationTypeUpdate = Maybe ConfigurationType
a} :: MonitoringConfigurationUpdate)
instance
Prelude.Hashable
MonitoringConfigurationUpdate
instance Prelude.NFData MonitoringConfigurationUpdate
instance Core.ToJSON MonitoringConfigurationUpdate where
toJSON :: MonitoringConfigurationUpdate -> Value
toJSON MonitoringConfigurationUpdate' {Maybe ConfigurationType
Maybe LogLevel
Maybe MetricsLevel
configurationTypeUpdate :: Maybe ConfigurationType
logLevelUpdate :: Maybe LogLevel
metricsLevelUpdate :: Maybe MetricsLevel
$sel:configurationTypeUpdate:MonitoringConfigurationUpdate' :: MonitoringConfigurationUpdate -> Maybe ConfigurationType
$sel:logLevelUpdate:MonitoringConfigurationUpdate' :: MonitoringConfigurationUpdate -> Maybe LogLevel
$sel:metricsLevelUpdate:MonitoringConfigurationUpdate' :: MonitoringConfigurationUpdate -> Maybe MetricsLevel
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"MetricsLevelUpdate" Text -> MetricsLevel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MetricsLevel -> Pair) -> Maybe MetricsLevel -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetricsLevel
metricsLevelUpdate,
(Text
"LogLevelUpdate" Text -> LogLevel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(LogLevel -> Pair) -> Maybe LogLevel -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LogLevel
logLevelUpdate,
(Text
"ConfigurationTypeUpdate" Text -> ConfigurationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ConfigurationType -> Pair)
-> Maybe ConfigurationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConfigurationType
configurationTypeUpdate
]
)