{-# 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.FlinkApplicationConfiguration where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.CheckpointConfiguration
import Amazonka.KinesisAnalyticsV2.Types.MonitoringConfiguration
import Amazonka.KinesisAnalyticsV2.Types.ParallelismConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FlinkApplicationConfiguration = FlinkApplicationConfiguration'
{
FlinkApplicationConfiguration -> Maybe MonitoringConfiguration
monitoringConfiguration :: Prelude.Maybe MonitoringConfiguration,
FlinkApplicationConfiguration -> Maybe ParallelismConfiguration
parallelismConfiguration :: Prelude.Maybe ParallelismConfiguration,
FlinkApplicationConfiguration -> Maybe CheckpointConfiguration
checkpointConfiguration :: Prelude.Maybe CheckpointConfiguration
}
deriving (FlinkApplicationConfiguration
-> FlinkApplicationConfiguration -> Bool
(FlinkApplicationConfiguration
-> FlinkApplicationConfiguration -> Bool)
-> (FlinkApplicationConfiguration
-> FlinkApplicationConfiguration -> Bool)
-> Eq FlinkApplicationConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FlinkApplicationConfiguration
-> FlinkApplicationConfiguration -> Bool
$c/= :: FlinkApplicationConfiguration
-> FlinkApplicationConfiguration -> Bool
== :: FlinkApplicationConfiguration
-> FlinkApplicationConfiguration -> Bool
$c== :: FlinkApplicationConfiguration
-> FlinkApplicationConfiguration -> Bool
Prelude.Eq, ReadPrec [FlinkApplicationConfiguration]
ReadPrec FlinkApplicationConfiguration
Int -> ReadS FlinkApplicationConfiguration
ReadS [FlinkApplicationConfiguration]
(Int -> ReadS FlinkApplicationConfiguration)
-> ReadS [FlinkApplicationConfiguration]
-> ReadPrec FlinkApplicationConfiguration
-> ReadPrec [FlinkApplicationConfiguration]
-> Read FlinkApplicationConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FlinkApplicationConfiguration]
$creadListPrec :: ReadPrec [FlinkApplicationConfiguration]
readPrec :: ReadPrec FlinkApplicationConfiguration
$creadPrec :: ReadPrec FlinkApplicationConfiguration
readList :: ReadS [FlinkApplicationConfiguration]
$creadList :: ReadS [FlinkApplicationConfiguration]
readsPrec :: Int -> ReadS FlinkApplicationConfiguration
$creadsPrec :: Int -> ReadS FlinkApplicationConfiguration
Prelude.Read, Int -> FlinkApplicationConfiguration -> ShowS
[FlinkApplicationConfiguration] -> ShowS
FlinkApplicationConfiguration -> String
(Int -> FlinkApplicationConfiguration -> ShowS)
-> (FlinkApplicationConfiguration -> String)
-> ([FlinkApplicationConfiguration] -> ShowS)
-> Show FlinkApplicationConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FlinkApplicationConfiguration] -> ShowS
$cshowList :: [FlinkApplicationConfiguration] -> ShowS
show :: FlinkApplicationConfiguration -> String
$cshow :: FlinkApplicationConfiguration -> String
showsPrec :: Int -> FlinkApplicationConfiguration -> ShowS
$cshowsPrec :: Int -> FlinkApplicationConfiguration -> ShowS
Prelude.Show, (forall x.
FlinkApplicationConfiguration
-> Rep FlinkApplicationConfiguration x)
-> (forall x.
Rep FlinkApplicationConfiguration x
-> FlinkApplicationConfiguration)
-> Generic FlinkApplicationConfiguration
forall x.
Rep FlinkApplicationConfiguration x
-> FlinkApplicationConfiguration
forall x.
FlinkApplicationConfiguration
-> Rep FlinkApplicationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FlinkApplicationConfiguration x
-> FlinkApplicationConfiguration
$cfrom :: forall x.
FlinkApplicationConfiguration
-> Rep FlinkApplicationConfiguration x
Prelude.Generic)
newFlinkApplicationConfiguration ::
FlinkApplicationConfiguration
newFlinkApplicationConfiguration :: FlinkApplicationConfiguration
newFlinkApplicationConfiguration =
FlinkApplicationConfiguration' :: Maybe MonitoringConfiguration
-> Maybe ParallelismConfiguration
-> Maybe CheckpointConfiguration
-> FlinkApplicationConfiguration
FlinkApplicationConfiguration'
{ $sel:monitoringConfiguration:FlinkApplicationConfiguration' :: Maybe MonitoringConfiguration
monitoringConfiguration =
Maybe MonitoringConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:parallelismConfiguration:FlinkApplicationConfiguration' :: Maybe ParallelismConfiguration
parallelismConfiguration = Maybe ParallelismConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:checkpointConfiguration:FlinkApplicationConfiguration' :: Maybe CheckpointConfiguration
checkpointConfiguration = Maybe CheckpointConfiguration
forall a. Maybe a
Prelude.Nothing
}
flinkApplicationConfiguration_monitoringConfiguration :: Lens.Lens' FlinkApplicationConfiguration (Prelude.Maybe MonitoringConfiguration)
flinkApplicationConfiguration_monitoringConfiguration :: (Maybe MonitoringConfiguration
-> f (Maybe MonitoringConfiguration))
-> FlinkApplicationConfiguration -> f FlinkApplicationConfiguration
flinkApplicationConfiguration_monitoringConfiguration = (FlinkApplicationConfiguration -> Maybe MonitoringConfiguration)
-> (FlinkApplicationConfiguration
-> Maybe MonitoringConfiguration -> FlinkApplicationConfiguration)
-> Lens
FlinkApplicationConfiguration
FlinkApplicationConfiguration
(Maybe MonitoringConfiguration)
(Maybe MonitoringConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FlinkApplicationConfiguration' {Maybe MonitoringConfiguration
monitoringConfiguration :: Maybe MonitoringConfiguration
$sel:monitoringConfiguration:FlinkApplicationConfiguration' :: FlinkApplicationConfiguration -> Maybe MonitoringConfiguration
monitoringConfiguration} -> Maybe MonitoringConfiguration
monitoringConfiguration) (\s :: FlinkApplicationConfiguration
s@FlinkApplicationConfiguration' {} Maybe MonitoringConfiguration
a -> FlinkApplicationConfiguration
s {$sel:monitoringConfiguration:FlinkApplicationConfiguration' :: Maybe MonitoringConfiguration
monitoringConfiguration = Maybe MonitoringConfiguration
a} :: FlinkApplicationConfiguration)
flinkApplicationConfiguration_parallelismConfiguration :: Lens.Lens' FlinkApplicationConfiguration (Prelude.Maybe ParallelismConfiguration)
flinkApplicationConfiguration_parallelismConfiguration :: (Maybe ParallelismConfiguration
-> f (Maybe ParallelismConfiguration))
-> FlinkApplicationConfiguration -> f FlinkApplicationConfiguration
flinkApplicationConfiguration_parallelismConfiguration = (FlinkApplicationConfiguration -> Maybe ParallelismConfiguration)
-> (FlinkApplicationConfiguration
-> Maybe ParallelismConfiguration -> FlinkApplicationConfiguration)
-> Lens
FlinkApplicationConfiguration
FlinkApplicationConfiguration
(Maybe ParallelismConfiguration)
(Maybe ParallelismConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FlinkApplicationConfiguration' {Maybe ParallelismConfiguration
parallelismConfiguration :: Maybe ParallelismConfiguration
$sel:parallelismConfiguration:FlinkApplicationConfiguration' :: FlinkApplicationConfiguration -> Maybe ParallelismConfiguration
parallelismConfiguration} -> Maybe ParallelismConfiguration
parallelismConfiguration) (\s :: FlinkApplicationConfiguration
s@FlinkApplicationConfiguration' {} Maybe ParallelismConfiguration
a -> FlinkApplicationConfiguration
s {$sel:parallelismConfiguration:FlinkApplicationConfiguration' :: Maybe ParallelismConfiguration
parallelismConfiguration = Maybe ParallelismConfiguration
a} :: FlinkApplicationConfiguration)
flinkApplicationConfiguration_checkpointConfiguration :: Lens.Lens' FlinkApplicationConfiguration (Prelude.Maybe CheckpointConfiguration)
flinkApplicationConfiguration_checkpointConfiguration :: (Maybe CheckpointConfiguration
-> f (Maybe CheckpointConfiguration))
-> FlinkApplicationConfiguration -> f FlinkApplicationConfiguration
flinkApplicationConfiguration_checkpointConfiguration = (FlinkApplicationConfiguration -> Maybe CheckpointConfiguration)
-> (FlinkApplicationConfiguration
-> Maybe CheckpointConfiguration -> FlinkApplicationConfiguration)
-> Lens
FlinkApplicationConfiguration
FlinkApplicationConfiguration
(Maybe CheckpointConfiguration)
(Maybe CheckpointConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FlinkApplicationConfiguration' {Maybe CheckpointConfiguration
checkpointConfiguration :: Maybe CheckpointConfiguration
$sel:checkpointConfiguration:FlinkApplicationConfiguration' :: FlinkApplicationConfiguration -> Maybe CheckpointConfiguration
checkpointConfiguration} -> Maybe CheckpointConfiguration
checkpointConfiguration) (\s :: FlinkApplicationConfiguration
s@FlinkApplicationConfiguration' {} Maybe CheckpointConfiguration
a -> FlinkApplicationConfiguration
s {$sel:checkpointConfiguration:FlinkApplicationConfiguration' :: Maybe CheckpointConfiguration
checkpointConfiguration = Maybe CheckpointConfiguration
a} :: FlinkApplicationConfiguration)
instance
Prelude.Hashable
FlinkApplicationConfiguration
instance Prelude.NFData FlinkApplicationConfiguration
instance Core.ToJSON FlinkApplicationConfiguration where
toJSON :: FlinkApplicationConfiguration -> Value
toJSON FlinkApplicationConfiguration' {Maybe CheckpointConfiguration
Maybe MonitoringConfiguration
Maybe ParallelismConfiguration
checkpointConfiguration :: Maybe CheckpointConfiguration
parallelismConfiguration :: Maybe ParallelismConfiguration
monitoringConfiguration :: Maybe MonitoringConfiguration
$sel:checkpointConfiguration:FlinkApplicationConfiguration' :: FlinkApplicationConfiguration -> Maybe CheckpointConfiguration
$sel:parallelismConfiguration:FlinkApplicationConfiguration' :: FlinkApplicationConfiguration -> Maybe ParallelismConfiguration
$sel:monitoringConfiguration:FlinkApplicationConfiguration' :: FlinkApplicationConfiguration -> Maybe MonitoringConfiguration
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"MonitoringConfiguration" Text -> MonitoringConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MonitoringConfiguration -> Pair)
-> Maybe MonitoringConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MonitoringConfiguration
monitoringConfiguration,
(Text
"ParallelismConfiguration" Text -> ParallelismConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ParallelismConfiguration -> Pair)
-> Maybe ParallelismConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ParallelismConfiguration
parallelismConfiguration,
(Text
"CheckpointConfiguration" Text -> CheckpointConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(CheckpointConfiguration -> Pair)
-> Maybe CheckpointConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CheckpointConfiguration
checkpointConfiguration
]
)