{-# 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.CheckpointConfigurationUpdate 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 CheckpointConfigurationUpdate = CheckpointConfigurationUpdate'
{
CheckpointConfigurationUpdate -> Maybe Natural
checkpointIntervalUpdate :: Prelude.Maybe Prelude.Natural,
CheckpointConfigurationUpdate -> Maybe Bool
checkpointingEnabledUpdate :: Prelude.Maybe Prelude.Bool,
CheckpointConfigurationUpdate -> Maybe Natural
minPauseBetweenCheckpointsUpdate :: Prelude.Maybe Prelude.Natural,
CheckpointConfigurationUpdate -> Maybe ConfigurationType
configurationTypeUpdate :: Prelude.Maybe ConfigurationType
}
deriving (CheckpointConfigurationUpdate
-> CheckpointConfigurationUpdate -> Bool
(CheckpointConfigurationUpdate
-> CheckpointConfigurationUpdate -> Bool)
-> (CheckpointConfigurationUpdate
-> CheckpointConfigurationUpdate -> Bool)
-> Eq CheckpointConfigurationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CheckpointConfigurationUpdate
-> CheckpointConfigurationUpdate -> Bool
$c/= :: CheckpointConfigurationUpdate
-> CheckpointConfigurationUpdate -> Bool
== :: CheckpointConfigurationUpdate
-> CheckpointConfigurationUpdate -> Bool
$c== :: CheckpointConfigurationUpdate
-> CheckpointConfigurationUpdate -> Bool
Prelude.Eq, ReadPrec [CheckpointConfigurationUpdate]
ReadPrec CheckpointConfigurationUpdate
Int -> ReadS CheckpointConfigurationUpdate
ReadS [CheckpointConfigurationUpdate]
(Int -> ReadS CheckpointConfigurationUpdate)
-> ReadS [CheckpointConfigurationUpdate]
-> ReadPrec CheckpointConfigurationUpdate
-> ReadPrec [CheckpointConfigurationUpdate]
-> Read CheckpointConfigurationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CheckpointConfigurationUpdate]
$creadListPrec :: ReadPrec [CheckpointConfigurationUpdate]
readPrec :: ReadPrec CheckpointConfigurationUpdate
$creadPrec :: ReadPrec CheckpointConfigurationUpdate
readList :: ReadS [CheckpointConfigurationUpdate]
$creadList :: ReadS [CheckpointConfigurationUpdate]
readsPrec :: Int -> ReadS CheckpointConfigurationUpdate
$creadsPrec :: Int -> ReadS CheckpointConfigurationUpdate
Prelude.Read, Int -> CheckpointConfigurationUpdate -> ShowS
[CheckpointConfigurationUpdate] -> ShowS
CheckpointConfigurationUpdate -> String
(Int -> CheckpointConfigurationUpdate -> ShowS)
-> (CheckpointConfigurationUpdate -> String)
-> ([CheckpointConfigurationUpdate] -> ShowS)
-> Show CheckpointConfigurationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CheckpointConfigurationUpdate] -> ShowS
$cshowList :: [CheckpointConfigurationUpdate] -> ShowS
show :: CheckpointConfigurationUpdate -> String
$cshow :: CheckpointConfigurationUpdate -> String
showsPrec :: Int -> CheckpointConfigurationUpdate -> ShowS
$cshowsPrec :: Int -> CheckpointConfigurationUpdate -> ShowS
Prelude.Show, (forall x.
CheckpointConfigurationUpdate
-> Rep CheckpointConfigurationUpdate x)
-> (forall x.
Rep CheckpointConfigurationUpdate x
-> CheckpointConfigurationUpdate)
-> Generic CheckpointConfigurationUpdate
forall x.
Rep CheckpointConfigurationUpdate x
-> CheckpointConfigurationUpdate
forall x.
CheckpointConfigurationUpdate
-> Rep CheckpointConfigurationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CheckpointConfigurationUpdate x
-> CheckpointConfigurationUpdate
$cfrom :: forall x.
CheckpointConfigurationUpdate
-> Rep CheckpointConfigurationUpdate x
Prelude.Generic)
newCheckpointConfigurationUpdate ::
CheckpointConfigurationUpdate
newCheckpointConfigurationUpdate :: CheckpointConfigurationUpdate
newCheckpointConfigurationUpdate =
CheckpointConfigurationUpdate' :: Maybe Natural
-> Maybe Bool
-> Maybe Natural
-> Maybe ConfigurationType
-> CheckpointConfigurationUpdate
CheckpointConfigurationUpdate'
{ $sel:checkpointIntervalUpdate:CheckpointConfigurationUpdate' :: Maybe Natural
checkpointIntervalUpdate =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:checkpointingEnabledUpdate:CheckpointConfigurationUpdate' :: Maybe Bool
checkpointingEnabledUpdate = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:minPauseBetweenCheckpointsUpdate:CheckpointConfigurationUpdate' :: Maybe Natural
minPauseBetweenCheckpointsUpdate =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:configurationTypeUpdate:CheckpointConfigurationUpdate' :: Maybe ConfigurationType
configurationTypeUpdate = Maybe ConfigurationType
forall a. Maybe a
Prelude.Nothing
}
checkpointConfigurationUpdate_checkpointIntervalUpdate :: Lens.Lens' CheckpointConfigurationUpdate (Prelude.Maybe Prelude.Natural)
checkpointConfigurationUpdate_checkpointIntervalUpdate :: (Maybe Natural -> f (Maybe Natural))
-> CheckpointConfigurationUpdate -> f CheckpointConfigurationUpdate
checkpointConfigurationUpdate_checkpointIntervalUpdate = (CheckpointConfigurationUpdate -> Maybe Natural)
-> (CheckpointConfigurationUpdate
-> Maybe Natural -> CheckpointConfigurationUpdate)
-> Lens
CheckpointConfigurationUpdate
CheckpointConfigurationUpdate
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CheckpointConfigurationUpdate' {Maybe Natural
checkpointIntervalUpdate :: Maybe Natural
$sel:checkpointIntervalUpdate:CheckpointConfigurationUpdate' :: CheckpointConfigurationUpdate -> Maybe Natural
checkpointIntervalUpdate} -> Maybe Natural
checkpointIntervalUpdate) (\s :: CheckpointConfigurationUpdate
s@CheckpointConfigurationUpdate' {} Maybe Natural
a -> CheckpointConfigurationUpdate
s {$sel:checkpointIntervalUpdate:CheckpointConfigurationUpdate' :: Maybe Natural
checkpointIntervalUpdate = Maybe Natural
a} :: CheckpointConfigurationUpdate)
checkpointConfigurationUpdate_checkpointingEnabledUpdate :: Lens.Lens' CheckpointConfigurationUpdate (Prelude.Maybe Prelude.Bool)
checkpointConfigurationUpdate_checkpointingEnabledUpdate :: (Maybe Bool -> f (Maybe Bool))
-> CheckpointConfigurationUpdate -> f CheckpointConfigurationUpdate
checkpointConfigurationUpdate_checkpointingEnabledUpdate = (CheckpointConfigurationUpdate -> Maybe Bool)
-> (CheckpointConfigurationUpdate
-> Maybe Bool -> CheckpointConfigurationUpdate)
-> Lens
CheckpointConfigurationUpdate
CheckpointConfigurationUpdate
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CheckpointConfigurationUpdate' {Maybe Bool
checkpointingEnabledUpdate :: Maybe Bool
$sel:checkpointingEnabledUpdate:CheckpointConfigurationUpdate' :: CheckpointConfigurationUpdate -> Maybe Bool
checkpointingEnabledUpdate} -> Maybe Bool
checkpointingEnabledUpdate) (\s :: CheckpointConfigurationUpdate
s@CheckpointConfigurationUpdate' {} Maybe Bool
a -> CheckpointConfigurationUpdate
s {$sel:checkpointingEnabledUpdate:CheckpointConfigurationUpdate' :: Maybe Bool
checkpointingEnabledUpdate = Maybe Bool
a} :: CheckpointConfigurationUpdate)
checkpointConfigurationUpdate_minPauseBetweenCheckpointsUpdate :: Lens.Lens' CheckpointConfigurationUpdate (Prelude.Maybe Prelude.Natural)
checkpointConfigurationUpdate_minPauseBetweenCheckpointsUpdate :: (Maybe Natural -> f (Maybe Natural))
-> CheckpointConfigurationUpdate -> f CheckpointConfigurationUpdate
checkpointConfigurationUpdate_minPauseBetweenCheckpointsUpdate = (CheckpointConfigurationUpdate -> Maybe Natural)
-> (CheckpointConfigurationUpdate
-> Maybe Natural -> CheckpointConfigurationUpdate)
-> Lens
CheckpointConfigurationUpdate
CheckpointConfigurationUpdate
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CheckpointConfigurationUpdate' {Maybe Natural
minPauseBetweenCheckpointsUpdate :: Maybe Natural
$sel:minPauseBetweenCheckpointsUpdate:CheckpointConfigurationUpdate' :: CheckpointConfigurationUpdate -> Maybe Natural
minPauseBetweenCheckpointsUpdate} -> Maybe Natural
minPauseBetweenCheckpointsUpdate) (\s :: CheckpointConfigurationUpdate
s@CheckpointConfigurationUpdate' {} Maybe Natural
a -> CheckpointConfigurationUpdate
s {$sel:minPauseBetweenCheckpointsUpdate:CheckpointConfigurationUpdate' :: Maybe Natural
minPauseBetweenCheckpointsUpdate = Maybe Natural
a} :: CheckpointConfigurationUpdate)
checkpointConfigurationUpdate_configurationTypeUpdate :: Lens.Lens' CheckpointConfigurationUpdate (Prelude.Maybe ConfigurationType)
checkpointConfigurationUpdate_configurationTypeUpdate :: (Maybe ConfigurationType -> f (Maybe ConfigurationType))
-> CheckpointConfigurationUpdate -> f CheckpointConfigurationUpdate
checkpointConfigurationUpdate_configurationTypeUpdate = (CheckpointConfigurationUpdate -> Maybe ConfigurationType)
-> (CheckpointConfigurationUpdate
-> Maybe ConfigurationType -> CheckpointConfigurationUpdate)
-> Lens
CheckpointConfigurationUpdate
CheckpointConfigurationUpdate
(Maybe ConfigurationType)
(Maybe ConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CheckpointConfigurationUpdate' {Maybe ConfigurationType
configurationTypeUpdate :: Maybe ConfigurationType
$sel:configurationTypeUpdate:CheckpointConfigurationUpdate' :: CheckpointConfigurationUpdate -> Maybe ConfigurationType
configurationTypeUpdate} -> Maybe ConfigurationType
configurationTypeUpdate) (\s :: CheckpointConfigurationUpdate
s@CheckpointConfigurationUpdate' {} Maybe ConfigurationType
a -> CheckpointConfigurationUpdate
s {$sel:configurationTypeUpdate:CheckpointConfigurationUpdate' :: Maybe ConfigurationType
configurationTypeUpdate = Maybe ConfigurationType
a} :: CheckpointConfigurationUpdate)
instance
Prelude.Hashable
CheckpointConfigurationUpdate
instance Prelude.NFData CheckpointConfigurationUpdate
instance Core.ToJSON CheckpointConfigurationUpdate where
toJSON :: CheckpointConfigurationUpdate -> Value
toJSON CheckpointConfigurationUpdate' {Maybe Bool
Maybe Natural
Maybe ConfigurationType
configurationTypeUpdate :: Maybe ConfigurationType
minPauseBetweenCheckpointsUpdate :: Maybe Natural
checkpointingEnabledUpdate :: Maybe Bool
checkpointIntervalUpdate :: Maybe Natural
$sel:configurationTypeUpdate:CheckpointConfigurationUpdate' :: CheckpointConfigurationUpdate -> Maybe ConfigurationType
$sel:minPauseBetweenCheckpointsUpdate:CheckpointConfigurationUpdate' :: CheckpointConfigurationUpdate -> Maybe Natural
$sel:checkpointingEnabledUpdate:CheckpointConfigurationUpdate' :: CheckpointConfigurationUpdate -> Maybe Bool
$sel:checkpointIntervalUpdate:CheckpointConfigurationUpdate' :: CheckpointConfigurationUpdate -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"CheckpointIntervalUpdate" 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
checkpointIntervalUpdate,
(Text
"CheckpointingEnabledUpdate" 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
checkpointingEnabledUpdate,
(Text
"MinPauseBetweenCheckpointsUpdate" 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
minPauseBetweenCheckpointsUpdate,
(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
]
)