{-# 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.ParallelismConfigurationDescription 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 ParallelismConfigurationDescription = ParallelismConfigurationDescription'
{
ParallelismConfigurationDescription -> Maybe Bool
autoScalingEnabled :: Prelude.Maybe Prelude.Bool,
ParallelismConfigurationDescription -> Maybe Natural
currentParallelism :: Prelude.Maybe Prelude.Natural,
ParallelismConfigurationDescription -> Maybe Natural
parallelismPerKPU :: Prelude.Maybe Prelude.Natural,
ParallelismConfigurationDescription -> Maybe ConfigurationType
configurationType :: Prelude.Maybe ConfigurationType,
ParallelismConfigurationDescription -> Maybe Natural
parallelism :: Prelude.Maybe Prelude.Natural
}
deriving (ParallelismConfigurationDescription
-> ParallelismConfigurationDescription -> Bool
(ParallelismConfigurationDescription
-> ParallelismConfigurationDescription -> Bool)
-> (ParallelismConfigurationDescription
-> ParallelismConfigurationDescription -> Bool)
-> Eq ParallelismConfigurationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ParallelismConfigurationDescription
-> ParallelismConfigurationDescription -> Bool
$c/= :: ParallelismConfigurationDescription
-> ParallelismConfigurationDescription -> Bool
== :: ParallelismConfigurationDescription
-> ParallelismConfigurationDescription -> Bool
$c== :: ParallelismConfigurationDescription
-> ParallelismConfigurationDescription -> Bool
Prelude.Eq, ReadPrec [ParallelismConfigurationDescription]
ReadPrec ParallelismConfigurationDescription
Int -> ReadS ParallelismConfigurationDescription
ReadS [ParallelismConfigurationDescription]
(Int -> ReadS ParallelismConfigurationDescription)
-> ReadS [ParallelismConfigurationDescription]
-> ReadPrec ParallelismConfigurationDescription
-> ReadPrec [ParallelismConfigurationDescription]
-> Read ParallelismConfigurationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ParallelismConfigurationDescription]
$creadListPrec :: ReadPrec [ParallelismConfigurationDescription]
readPrec :: ReadPrec ParallelismConfigurationDescription
$creadPrec :: ReadPrec ParallelismConfigurationDescription
readList :: ReadS [ParallelismConfigurationDescription]
$creadList :: ReadS [ParallelismConfigurationDescription]
readsPrec :: Int -> ReadS ParallelismConfigurationDescription
$creadsPrec :: Int -> ReadS ParallelismConfigurationDescription
Prelude.Read, Int -> ParallelismConfigurationDescription -> ShowS
[ParallelismConfigurationDescription] -> ShowS
ParallelismConfigurationDescription -> String
(Int -> ParallelismConfigurationDescription -> ShowS)
-> (ParallelismConfigurationDescription -> String)
-> ([ParallelismConfigurationDescription] -> ShowS)
-> Show ParallelismConfigurationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ParallelismConfigurationDescription] -> ShowS
$cshowList :: [ParallelismConfigurationDescription] -> ShowS
show :: ParallelismConfigurationDescription -> String
$cshow :: ParallelismConfigurationDescription -> String
showsPrec :: Int -> ParallelismConfigurationDescription -> ShowS
$cshowsPrec :: Int -> ParallelismConfigurationDescription -> ShowS
Prelude.Show, (forall x.
ParallelismConfigurationDescription
-> Rep ParallelismConfigurationDescription x)
-> (forall x.
Rep ParallelismConfigurationDescription x
-> ParallelismConfigurationDescription)
-> Generic ParallelismConfigurationDescription
forall x.
Rep ParallelismConfigurationDescription x
-> ParallelismConfigurationDescription
forall x.
ParallelismConfigurationDescription
-> Rep ParallelismConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ParallelismConfigurationDescription x
-> ParallelismConfigurationDescription
$cfrom :: forall x.
ParallelismConfigurationDescription
-> Rep ParallelismConfigurationDescription x
Prelude.Generic)
newParallelismConfigurationDescription ::
ParallelismConfigurationDescription
newParallelismConfigurationDescription :: ParallelismConfigurationDescription
newParallelismConfigurationDescription =
ParallelismConfigurationDescription' :: Maybe Bool
-> Maybe Natural
-> Maybe Natural
-> Maybe ConfigurationType
-> Maybe Natural
-> ParallelismConfigurationDescription
ParallelismConfigurationDescription'
{ $sel:autoScalingEnabled:ParallelismConfigurationDescription' :: Maybe Bool
autoScalingEnabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:currentParallelism:ParallelismConfigurationDescription' :: Maybe Natural
currentParallelism = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:parallelismPerKPU:ParallelismConfigurationDescription' :: Maybe Natural
parallelismPerKPU = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:configurationType:ParallelismConfigurationDescription' :: Maybe ConfigurationType
configurationType = Maybe ConfigurationType
forall a. Maybe a
Prelude.Nothing,
$sel:parallelism:ParallelismConfigurationDescription' :: Maybe Natural
parallelism = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
parallelismConfigurationDescription_autoScalingEnabled :: Lens.Lens' ParallelismConfigurationDescription (Prelude.Maybe Prelude.Bool)
parallelismConfigurationDescription_autoScalingEnabled :: (Maybe Bool -> f (Maybe Bool))
-> ParallelismConfigurationDescription
-> f ParallelismConfigurationDescription
parallelismConfigurationDescription_autoScalingEnabled = (ParallelismConfigurationDescription -> Maybe Bool)
-> (ParallelismConfigurationDescription
-> Maybe Bool -> ParallelismConfigurationDescription)
-> Lens
ParallelismConfigurationDescription
ParallelismConfigurationDescription
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParallelismConfigurationDescription' {Maybe Bool
autoScalingEnabled :: Maybe Bool
$sel:autoScalingEnabled:ParallelismConfigurationDescription' :: ParallelismConfigurationDescription -> Maybe Bool
autoScalingEnabled} -> Maybe Bool
autoScalingEnabled) (\s :: ParallelismConfigurationDescription
s@ParallelismConfigurationDescription' {} Maybe Bool
a -> ParallelismConfigurationDescription
s {$sel:autoScalingEnabled:ParallelismConfigurationDescription' :: Maybe Bool
autoScalingEnabled = Maybe Bool
a} :: ParallelismConfigurationDescription)
parallelismConfigurationDescription_currentParallelism :: Lens.Lens' ParallelismConfigurationDescription (Prelude.Maybe Prelude.Natural)
parallelismConfigurationDescription_currentParallelism :: (Maybe Natural -> f (Maybe Natural))
-> ParallelismConfigurationDescription
-> f ParallelismConfigurationDescription
parallelismConfigurationDescription_currentParallelism = (ParallelismConfigurationDescription -> Maybe Natural)
-> (ParallelismConfigurationDescription
-> Maybe Natural -> ParallelismConfigurationDescription)
-> Lens
ParallelismConfigurationDescription
ParallelismConfigurationDescription
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParallelismConfigurationDescription' {Maybe Natural
currentParallelism :: Maybe Natural
$sel:currentParallelism:ParallelismConfigurationDescription' :: ParallelismConfigurationDescription -> Maybe Natural
currentParallelism} -> Maybe Natural
currentParallelism) (\s :: ParallelismConfigurationDescription
s@ParallelismConfigurationDescription' {} Maybe Natural
a -> ParallelismConfigurationDescription
s {$sel:currentParallelism:ParallelismConfigurationDescription' :: Maybe Natural
currentParallelism = Maybe Natural
a} :: ParallelismConfigurationDescription)
parallelismConfigurationDescription_parallelismPerKPU :: Lens.Lens' ParallelismConfigurationDescription (Prelude.Maybe Prelude.Natural)
parallelismConfigurationDescription_parallelismPerKPU :: (Maybe Natural -> f (Maybe Natural))
-> ParallelismConfigurationDescription
-> f ParallelismConfigurationDescription
parallelismConfigurationDescription_parallelismPerKPU = (ParallelismConfigurationDescription -> Maybe Natural)
-> (ParallelismConfigurationDescription
-> Maybe Natural -> ParallelismConfigurationDescription)
-> Lens
ParallelismConfigurationDescription
ParallelismConfigurationDescription
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParallelismConfigurationDescription' {Maybe Natural
parallelismPerKPU :: Maybe Natural
$sel:parallelismPerKPU:ParallelismConfigurationDescription' :: ParallelismConfigurationDescription -> Maybe Natural
parallelismPerKPU} -> Maybe Natural
parallelismPerKPU) (\s :: ParallelismConfigurationDescription
s@ParallelismConfigurationDescription' {} Maybe Natural
a -> ParallelismConfigurationDescription
s {$sel:parallelismPerKPU:ParallelismConfigurationDescription' :: Maybe Natural
parallelismPerKPU = Maybe Natural
a} :: ParallelismConfigurationDescription)
parallelismConfigurationDescription_configurationType :: Lens.Lens' ParallelismConfigurationDescription (Prelude.Maybe ConfigurationType)
parallelismConfigurationDescription_configurationType :: (Maybe ConfigurationType -> f (Maybe ConfigurationType))
-> ParallelismConfigurationDescription
-> f ParallelismConfigurationDescription
parallelismConfigurationDescription_configurationType = (ParallelismConfigurationDescription -> Maybe ConfigurationType)
-> (ParallelismConfigurationDescription
-> Maybe ConfigurationType -> ParallelismConfigurationDescription)
-> Lens
ParallelismConfigurationDescription
ParallelismConfigurationDescription
(Maybe ConfigurationType)
(Maybe ConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParallelismConfigurationDescription' {Maybe ConfigurationType
configurationType :: Maybe ConfigurationType
$sel:configurationType:ParallelismConfigurationDescription' :: ParallelismConfigurationDescription -> Maybe ConfigurationType
configurationType} -> Maybe ConfigurationType
configurationType) (\s :: ParallelismConfigurationDescription
s@ParallelismConfigurationDescription' {} Maybe ConfigurationType
a -> ParallelismConfigurationDescription
s {$sel:configurationType:ParallelismConfigurationDescription' :: Maybe ConfigurationType
configurationType = Maybe ConfigurationType
a} :: ParallelismConfigurationDescription)
parallelismConfigurationDescription_parallelism :: Lens.Lens' ParallelismConfigurationDescription (Prelude.Maybe Prelude.Natural)
parallelismConfigurationDescription_parallelism :: (Maybe Natural -> f (Maybe Natural))
-> ParallelismConfigurationDescription
-> f ParallelismConfigurationDescription
parallelismConfigurationDescription_parallelism = (ParallelismConfigurationDescription -> Maybe Natural)
-> (ParallelismConfigurationDescription
-> Maybe Natural -> ParallelismConfigurationDescription)
-> Lens
ParallelismConfigurationDescription
ParallelismConfigurationDescription
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParallelismConfigurationDescription' {Maybe Natural
parallelism :: Maybe Natural
$sel:parallelism:ParallelismConfigurationDescription' :: ParallelismConfigurationDescription -> Maybe Natural
parallelism} -> Maybe Natural
parallelism) (\s :: ParallelismConfigurationDescription
s@ParallelismConfigurationDescription' {} Maybe Natural
a -> ParallelismConfigurationDescription
s {$sel:parallelism:ParallelismConfigurationDescription' :: Maybe Natural
parallelism = Maybe Natural
a} :: ParallelismConfigurationDescription)
instance
Core.FromJSON
ParallelismConfigurationDescription
where
parseJSON :: Value -> Parser ParallelismConfigurationDescription
parseJSON =
String
-> (Object -> Parser ParallelismConfigurationDescription)
-> Value
-> Parser ParallelismConfigurationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ParallelismConfigurationDescription"
( \Object
x ->
Maybe Bool
-> Maybe Natural
-> Maybe Natural
-> Maybe ConfigurationType
-> Maybe Natural
-> ParallelismConfigurationDescription
ParallelismConfigurationDescription'
(Maybe Bool
-> Maybe Natural
-> Maybe Natural
-> Maybe ConfigurationType
-> Maybe Natural
-> ParallelismConfigurationDescription)
-> Parser (Maybe Bool)
-> Parser
(Maybe Natural
-> Maybe Natural
-> Maybe ConfigurationType
-> Maybe Natural
-> ParallelismConfigurationDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AutoScalingEnabled")
Parser
(Maybe Natural
-> Maybe Natural
-> Maybe ConfigurationType
-> Maybe Natural
-> ParallelismConfigurationDescription)
-> Parser (Maybe Natural)
-> Parser
(Maybe Natural
-> Maybe ConfigurationType
-> Maybe Natural
-> ParallelismConfigurationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CurrentParallelism")
Parser
(Maybe Natural
-> Maybe ConfigurationType
-> Maybe Natural
-> ParallelismConfigurationDescription)
-> Parser (Maybe Natural)
-> Parser
(Maybe ConfigurationType
-> Maybe Natural -> ParallelismConfigurationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ParallelismPerKPU")
Parser
(Maybe ConfigurationType
-> Maybe Natural -> ParallelismConfigurationDescription)
-> Parser (Maybe ConfigurationType)
-> Parser (Maybe Natural -> ParallelismConfigurationDescription)
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 Natural -> ParallelismConfigurationDescription)
-> Parser (Maybe Natural)
-> Parser ParallelismConfigurationDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Parallelism")
)
instance
Prelude.Hashable
ParallelismConfigurationDescription
instance
Prelude.NFData
ParallelismConfigurationDescription