{-# 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.InputParallelismUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InputParallelismUpdate = InputParallelismUpdate'
{
InputParallelismUpdate -> Natural
countUpdate :: Prelude.Natural
}
deriving (InputParallelismUpdate -> InputParallelismUpdate -> Bool
(InputParallelismUpdate -> InputParallelismUpdate -> Bool)
-> (InputParallelismUpdate -> InputParallelismUpdate -> Bool)
-> Eq InputParallelismUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputParallelismUpdate -> InputParallelismUpdate -> Bool
$c/= :: InputParallelismUpdate -> InputParallelismUpdate -> Bool
== :: InputParallelismUpdate -> InputParallelismUpdate -> Bool
$c== :: InputParallelismUpdate -> InputParallelismUpdate -> Bool
Prelude.Eq, ReadPrec [InputParallelismUpdate]
ReadPrec InputParallelismUpdate
Int -> ReadS InputParallelismUpdate
ReadS [InputParallelismUpdate]
(Int -> ReadS InputParallelismUpdate)
-> ReadS [InputParallelismUpdate]
-> ReadPrec InputParallelismUpdate
-> ReadPrec [InputParallelismUpdate]
-> Read InputParallelismUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputParallelismUpdate]
$creadListPrec :: ReadPrec [InputParallelismUpdate]
readPrec :: ReadPrec InputParallelismUpdate
$creadPrec :: ReadPrec InputParallelismUpdate
readList :: ReadS [InputParallelismUpdate]
$creadList :: ReadS [InputParallelismUpdate]
readsPrec :: Int -> ReadS InputParallelismUpdate
$creadsPrec :: Int -> ReadS InputParallelismUpdate
Prelude.Read, Int -> InputParallelismUpdate -> ShowS
[InputParallelismUpdate] -> ShowS
InputParallelismUpdate -> String
(Int -> InputParallelismUpdate -> ShowS)
-> (InputParallelismUpdate -> String)
-> ([InputParallelismUpdate] -> ShowS)
-> Show InputParallelismUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputParallelismUpdate] -> ShowS
$cshowList :: [InputParallelismUpdate] -> ShowS
show :: InputParallelismUpdate -> String
$cshow :: InputParallelismUpdate -> String
showsPrec :: Int -> InputParallelismUpdate -> ShowS
$cshowsPrec :: Int -> InputParallelismUpdate -> ShowS
Prelude.Show, (forall x. InputParallelismUpdate -> Rep InputParallelismUpdate x)
-> (forall x.
Rep InputParallelismUpdate x -> InputParallelismUpdate)
-> Generic InputParallelismUpdate
forall x. Rep InputParallelismUpdate x -> InputParallelismUpdate
forall x. InputParallelismUpdate -> Rep InputParallelismUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InputParallelismUpdate x -> InputParallelismUpdate
$cfrom :: forall x. InputParallelismUpdate -> Rep InputParallelismUpdate x
Prelude.Generic)
newInputParallelismUpdate ::
Prelude.Natural ->
InputParallelismUpdate
newInputParallelismUpdate :: Natural -> InputParallelismUpdate
newInputParallelismUpdate Natural
pCountUpdate_ =
InputParallelismUpdate' :: Natural -> InputParallelismUpdate
InputParallelismUpdate'
{ $sel:countUpdate:InputParallelismUpdate' :: Natural
countUpdate =
Natural
pCountUpdate_
}
inputParallelismUpdate_countUpdate :: Lens.Lens' InputParallelismUpdate Prelude.Natural
inputParallelismUpdate_countUpdate :: (Natural -> f Natural)
-> InputParallelismUpdate -> f InputParallelismUpdate
inputParallelismUpdate_countUpdate = (InputParallelismUpdate -> Natural)
-> (InputParallelismUpdate -> Natural -> InputParallelismUpdate)
-> Lens
InputParallelismUpdate InputParallelismUpdate Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputParallelismUpdate' {Natural
countUpdate :: Natural
$sel:countUpdate:InputParallelismUpdate' :: InputParallelismUpdate -> Natural
countUpdate} -> Natural
countUpdate) (\s :: InputParallelismUpdate
s@InputParallelismUpdate' {} Natural
a -> InputParallelismUpdate
s {$sel:countUpdate:InputParallelismUpdate' :: Natural
countUpdate = Natural
a} :: InputParallelismUpdate)
instance Prelude.Hashable InputParallelismUpdate
instance Prelude.NFData InputParallelismUpdate
instance Core.ToJSON InputParallelismUpdate where
toJSON :: InputParallelismUpdate -> Value
toJSON InputParallelismUpdate' {Natural
countUpdate :: Natural
$sel:countUpdate:InputParallelismUpdate' :: InputParallelismUpdate -> Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"CountUpdate" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
countUpdate)]
)