{-# 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.ParallelismConfigurationUpdate where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.ConfigurationType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ParallelismConfigurationUpdate = ParallelismConfigurationUpdate'
{
ParallelismConfigurationUpdate -> Maybe Natural
parallelismUpdate :: Prelude.Maybe Prelude.Natural,
ParallelismConfigurationUpdate -> Maybe Bool
autoScalingEnabledUpdate :: Prelude.Maybe Prelude.Bool,
ParallelismConfigurationUpdate -> Maybe Natural
parallelismPerKPUUpdate :: Prelude.Maybe Prelude.Natural,
ParallelismConfigurationUpdate -> Maybe ConfigurationType
configurationTypeUpdate :: Prelude.Maybe ConfigurationType
}
deriving (ParallelismConfigurationUpdate
-> ParallelismConfigurationUpdate -> Bool
(ParallelismConfigurationUpdate
-> ParallelismConfigurationUpdate -> Bool)
-> (ParallelismConfigurationUpdate
-> ParallelismConfigurationUpdate -> Bool)
-> Eq ParallelismConfigurationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ParallelismConfigurationUpdate
-> ParallelismConfigurationUpdate -> Bool
$c/= :: ParallelismConfigurationUpdate
-> ParallelismConfigurationUpdate -> Bool
== :: ParallelismConfigurationUpdate
-> ParallelismConfigurationUpdate -> Bool
$c== :: ParallelismConfigurationUpdate
-> ParallelismConfigurationUpdate -> Bool
Prelude.Eq, ReadPrec [ParallelismConfigurationUpdate]
ReadPrec ParallelismConfigurationUpdate
Int -> ReadS ParallelismConfigurationUpdate
ReadS [ParallelismConfigurationUpdate]
(Int -> ReadS ParallelismConfigurationUpdate)
-> ReadS [ParallelismConfigurationUpdate]
-> ReadPrec ParallelismConfigurationUpdate
-> ReadPrec [ParallelismConfigurationUpdate]
-> Read ParallelismConfigurationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ParallelismConfigurationUpdate]
$creadListPrec :: ReadPrec [ParallelismConfigurationUpdate]
readPrec :: ReadPrec ParallelismConfigurationUpdate
$creadPrec :: ReadPrec ParallelismConfigurationUpdate
readList :: ReadS [ParallelismConfigurationUpdate]
$creadList :: ReadS [ParallelismConfigurationUpdate]
readsPrec :: Int -> ReadS ParallelismConfigurationUpdate
$creadsPrec :: Int -> ReadS ParallelismConfigurationUpdate
Prelude.Read, Int -> ParallelismConfigurationUpdate -> ShowS
[ParallelismConfigurationUpdate] -> ShowS
ParallelismConfigurationUpdate -> String
(Int -> ParallelismConfigurationUpdate -> ShowS)
-> (ParallelismConfigurationUpdate -> String)
-> ([ParallelismConfigurationUpdate] -> ShowS)
-> Show ParallelismConfigurationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ParallelismConfigurationUpdate] -> ShowS
$cshowList :: [ParallelismConfigurationUpdate] -> ShowS
show :: ParallelismConfigurationUpdate -> String
$cshow :: ParallelismConfigurationUpdate -> String
showsPrec :: Int -> ParallelismConfigurationUpdate -> ShowS
$cshowsPrec :: Int -> ParallelismConfigurationUpdate -> ShowS
Prelude.Show, (forall x.
ParallelismConfigurationUpdate
-> Rep ParallelismConfigurationUpdate x)
-> (forall x.
Rep ParallelismConfigurationUpdate x
-> ParallelismConfigurationUpdate)
-> Generic ParallelismConfigurationUpdate
forall x.
Rep ParallelismConfigurationUpdate x
-> ParallelismConfigurationUpdate
forall x.
ParallelismConfigurationUpdate
-> Rep ParallelismConfigurationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ParallelismConfigurationUpdate x
-> ParallelismConfigurationUpdate
$cfrom :: forall x.
ParallelismConfigurationUpdate
-> Rep ParallelismConfigurationUpdate x
Prelude.Generic)
newParallelismConfigurationUpdate ::
ParallelismConfigurationUpdate
newParallelismConfigurationUpdate :: ParallelismConfigurationUpdate
newParallelismConfigurationUpdate =
ParallelismConfigurationUpdate' :: Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> Maybe ConfigurationType
-> ParallelismConfigurationUpdate
ParallelismConfigurationUpdate'
{ $sel:parallelismUpdate:ParallelismConfigurationUpdate' :: Maybe Natural
parallelismUpdate =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:autoScalingEnabledUpdate:ParallelismConfigurationUpdate' :: Maybe Bool
autoScalingEnabledUpdate = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:parallelismPerKPUUpdate:ParallelismConfigurationUpdate' :: Maybe Natural
parallelismPerKPUUpdate = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:configurationTypeUpdate:ParallelismConfigurationUpdate' :: Maybe ConfigurationType
configurationTypeUpdate = Maybe ConfigurationType
forall a. Maybe a
Prelude.Nothing
}
parallelismConfigurationUpdate_parallelismUpdate :: Lens.Lens' ParallelismConfigurationUpdate (Prelude.Maybe Prelude.Natural)
parallelismConfigurationUpdate_parallelismUpdate :: (Maybe Natural -> f (Maybe Natural))
-> ParallelismConfigurationUpdate
-> f ParallelismConfigurationUpdate
parallelismConfigurationUpdate_parallelismUpdate = (ParallelismConfigurationUpdate -> Maybe Natural)
-> (ParallelismConfigurationUpdate
-> Maybe Natural -> ParallelismConfigurationUpdate)
-> Lens
ParallelismConfigurationUpdate
ParallelismConfigurationUpdate
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParallelismConfigurationUpdate' {Maybe Natural
parallelismUpdate :: Maybe Natural
$sel:parallelismUpdate:ParallelismConfigurationUpdate' :: ParallelismConfigurationUpdate -> Maybe Natural
parallelismUpdate} -> Maybe Natural
parallelismUpdate) (\s :: ParallelismConfigurationUpdate
s@ParallelismConfigurationUpdate' {} Maybe Natural
a -> ParallelismConfigurationUpdate
s {$sel:parallelismUpdate:ParallelismConfigurationUpdate' :: Maybe Natural
parallelismUpdate = Maybe Natural
a} :: ParallelismConfigurationUpdate)
parallelismConfigurationUpdate_autoScalingEnabledUpdate :: Lens.Lens' ParallelismConfigurationUpdate (Prelude.Maybe Prelude.Bool)
parallelismConfigurationUpdate_autoScalingEnabledUpdate :: (Maybe Bool -> f (Maybe Bool))
-> ParallelismConfigurationUpdate
-> f ParallelismConfigurationUpdate
parallelismConfigurationUpdate_autoScalingEnabledUpdate = (ParallelismConfigurationUpdate -> Maybe Bool)
-> (ParallelismConfigurationUpdate
-> Maybe Bool -> ParallelismConfigurationUpdate)
-> Lens
ParallelismConfigurationUpdate
ParallelismConfigurationUpdate
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParallelismConfigurationUpdate' {Maybe Bool
autoScalingEnabledUpdate :: Maybe Bool
$sel:autoScalingEnabledUpdate:ParallelismConfigurationUpdate' :: ParallelismConfigurationUpdate -> Maybe Bool
autoScalingEnabledUpdate} -> Maybe Bool
autoScalingEnabledUpdate) (\s :: ParallelismConfigurationUpdate
s@ParallelismConfigurationUpdate' {} Maybe Bool
a -> ParallelismConfigurationUpdate
s {$sel:autoScalingEnabledUpdate:ParallelismConfigurationUpdate' :: Maybe Bool
autoScalingEnabledUpdate = Maybe Bool
a} :: ParallelismConfigurationUpdate)
parallelismConfigurationUpdate_parallelismPerKPUUpdate :: Lens.Lens' ParallelismConfigurationUpdate (Prelude.Maybe Prelude.Natural)
parallelismConfigurationUpdate_parallelismPerKPUUpdate :: (Maybe Natural -> f (Maybe Natural))
-> ParallelismConfigurationUpdate
-> f ParallelismConfigurationUpdate
parallelismConfigurationUpdate_parallelismPerKPUUpdate = (ParallelismConfigurationUpdate -> Maybe Natural)
-> (ParallelismConfigurationUpdate
-> Maybe Natural -> ParallelismConfigurationUpdate)
-> Lens
ParallelismConfigurationUpdate
ParallelismConfigurationUpdate
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParallelismConfigurationUpdate' {Maybe Natural
parallelismPerKPUUpdate :: Maybe Natural
$sel:parallelismPerKPUUpdate:ParallelismConfigurationUpdate' :: ParallelismConfigurationUpdate -> Maybe Natural
parallelismPerKPUUpdate} -> Maybe Natural
parallelismPerKPUUpdate) (\s :: ParallelismConfigurationUpdate
s@ParallelismConfigurationUpdate' {} Maybe Natural
a -> ParallelismConfigurationUpdate
s {$sel:parallelismPerKPUUpdate:ParallelismConfigurationUpdate' :: Maybe Natural
parallelismPerKPUUpdate = Maybe Natural
a} :: ParallelismConfigurationUpdate)
parallelismConfigurationUpdate_configurationTypeUpdate :: Lens.Lens' ParallelismConfigurationUpdate (Prelude.Maybe ConfigurationType)
parallelismConfigurationUpdate_configurationTypeUpdate :: (Maybe ConfigurationType -> f (Maybe ConfigurationType))
-> ParallelismConfigurationUpdate
-> f ParallelismConfigurationUpdate
parallelismConfigurationUpdate_configurationTypeUpdate = (ParallelismConfigurationUpdate -> Maybe ConfigurationType)
-> (ParallelismConfigurationUpdate
-> Maybe ConfigurationType -> ParallelismConfigurationUpdate)
-> Lens
ParallelismConfigurationUpdate
ParallelismConfigurationUpdate
(Maybe ConfigurationType)
(Maybe ConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParallelismConfigurationUpdate' {Maybe ConfigurationType
configurationTypeUpdate :: Maybe ConfigurationType
$sel:configurationTypeUpdate:ParallelismConfigurationUpdate' :: ParallelismConfigurationUpdate -> Maybe ConfigurationType
configurationTypeUpdate} -> Maybe ConfigurationType
configurationTypeUpdate) (\s :: ParallelismConfigurationUpdate
s@ParallelismConfigurationUpdate' {} Maybe ConfigurationType
a -> ParallelismConfigurationUpdate
s {$sel:configurationTypeUpdate:ParallelismConfigurationUpdate' :: Maybe ConfigurationType
configurationTypeUpdate = Maybe ConfigurationType
a} :: ParallelismConfigurationUpdate)
instance
Prelude.Hashable
ParallelismConfigurationUpdate
instance
Prelude.NFData
ParallelismConfigurationUpdate
instance Core.ToJSON ParallelismConfigurationUpdate where
toJSON :: ParallelismConfigurationUpdate -> Value
toJSON ParallelismConfigurationUpdate' {Maybe Bool
Maybe Natural
Maybe ConfigurationType
configurationTypeUpdate :: Maybe ConfigurationType
parallelismPerKPUUpdate :: Maybe Natural
autoScalingEnabledUpdate :: Maybe Bool
parallelismUpdate :: Maybe Natural
$sel:configurationTypeUpdate:ParallelismConfigurationUpdate' :: ParallelismConfigurationUpdate -> Maybe ConfigurationType
$sel:parallelismPerKPUUpdate:ParallelismConfigurationUpdate' :: ParallelismConfigurationUpdate -> Maybe Natural
$sel:autoScalingEnabledUpdate:ParallelismConfigurationUpdate' :: ParallelismConfigurationUpdate -> Maybe Bool
$sel:parallelismUpdate:ParallelismConfigurationUpdate' :: ParallelismConfigurationUpdate -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ParallelismUpdate" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
parallelismUpdate,
(Text
"AutoScalingEnabledUpdate" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
autoScalingEnabledUpdate,
(Text
"ParallelismPerKPUUpdate" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
parallelismPerKPUUpdate,
(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
]
)