{-# 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.CheckpointConfigurationDescription 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 CheckpointConfigurationDescription = CheckpointConfigurationDescription'
{
CheckpointConfigurationDescription -> Maybe Bool
checkpointingEnabled :: Prelude.Maybe Prelude.Bool,
CheckpointConfigurationDescription -> Maybe ConfigurationType
configurationType :: Prelude.Maybe ConfigurationType,
CheckpointConfigurationDescription -> Maybe Natural
minPauseBetweenCheckpoints :: Prelude.Maybe Prelude.Natural,
CheckpointConfigurationDescription -> Maybe Natural
checkpointInterval :: Prelude.Maybe Prelude.Natural
}
deriving (CheckpointConfigurationDescription
-> CheckpointConfigurationDescription -> Bool
(CheckpointConfigurationDescription
-> CheckpointConfigurationDescription -> Bool)
-> (CheckpointConfigurationDescription
-> CheckpointConfigurationDescription -> Bool)
-> Eq CheckpointConfigurationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CheckpointConfigurationDescription
-> CheckpointConfigurationDescription -> Bool
$c/= :: CheckpointConfigurationDescription
-> CheckpointConfigurationDescription -> Bool
== :: CheckpointConfigurationDescription
-> CheckpointConfigurationDescription -> Bool
$c== :: CheckpointConfigurationDescription
-> CheckpointConfigurationDescription -> Bool
Prelude.Eq, ReadPrec [CheckpointConfigurationDescription]
ReadPrec CheckpointConfigurationDescription
Int -> ReadS CheckpointConfigurationDescription
ReadS [CheckpointConfigurationDescription]
(Int -> ReadS CheckpointConfigurationDescription)
-> ReadS [CheckpointConfigurationDescription]
-> ReadPrec CheckpointConfigurationDescription
-> ReadPrec [CheckpointConfigurationDescription]
-> Read CheckpointConfigurationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CheckpointConfigurationDescription]
$creadListPrec :: ReadPrec [CheckpointConfigurationDescription]
readPrec :: ReadPrec CheckpointConfigurationDescription
$creadPrec :: ReadPrec CheckpointConfigurationDescription
readList :: ReadS [CheckpointConfigurationDescription]
$creadList :: ReadS [CheckpointConfigurationDescription]
readsPrec :: Int -> ReadS CheckpointConfigurationDescription
$creadsPrec :: Int -> ReadS CheckpointConfigurationDescription
Prelude.Read, Int -> CheckpointConfigurationDescription -> ShowS
[CheckpointConfigurationDescription] -> ShowS
CheckpointConfigurationDescription -> String
(Int -> CheckpointConfigurationDescription -> ShowS)
-> (CheckpointConfigurationDescription -> String)
-> ([CheckpointConfigurationDescription] -> ShowS)
-> Show CheckpointConfigurationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CheckpointConfigurationDescription] -> ShowS
$cshowList :: [CheckpointConfigurationDescription] -> ShowS
show :: CheckpointConfigurationDescription -> String
$cshow :: CheckpointConfigurationDescription -> String
showsPrec :: Int -> CheckpointConfigurationDescription -> ShowS
$cshowsPrec :: Int -> CheckpointConfigurationDescription -> ShowS
Prelude.Show, (forall x.
CheckpointConfigurationDescription
-> Rep CheckpointConfigurationDescription x)
-> (forall x.
Rep CheckpointConfigurationDescription x
-> CheckpointConfigurationDescription)
-> Generic CheckpointConfigurationDescription
forall x.
Rep CheckpointConfigurationDescription x
-> CheckpointConfigurationDescription
forall x.
CheckpointConfigurationDescription
-> Rep CheckpointConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CheckpointConfigurationDescription x
-> CheckpointConfigurationDescription
$cfrom :: forall x.
CheckpointConfigurationDescription
-> Rep CheckpointConfigurationDescription x
Prelude.Generic)
newCheckpointConfigurationDescription ::
CheckpointConfigurationDescription
newCheckpointConfigurationDescription :: CheckpointConfigurationDescription
newCheckpointConfigurationDescription =
CheckpointConfigurationDescription' :: Maybe Bool
-> Maybe ConfigurationType
-> Maybe Natural
-> Maybe Natural
-> CheckpointConfigurationDescription
CheckpointConfigurationDescription'
{ $sel:checkpointingEnabled:CheckpointConfigurationDescription' :: Maybe Bool
checkpointingEnabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:configurationType:CheckpointConfigurationDescription' :: Maybe ConfigurationType
configurationType = Maybe ConfigurationType
forall a. Maybe a
Prelude.Nothing,
$sel:minPauseBetweenCheckpoints:CheckpointConfigurationDescription' :: Maybe Natural
minPauseBetweenCheckpoints =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:checkpointInterval:CheckpointConfigurationDescription' :: Maybe Natural
checkpointInterval = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
checkpointConfigurationDescription_checkpointingEnabled :: Lens.Lens' CheckpointConfigurationDescription (Prelude.Maybe Prelude.Bool)
checkpointConfigurationDescription_checkpointingEnabled :: (Maybe Bool -> f (Maybe Bool))
-> CheckpointConfigurationDescription
-> f CheckpointConfigurationDescription
checkpointConfigurationDescription_checkpointingEnabled = (CheckpointConfigurationDescription -> Maybe Bool)
-> (CheckpointConfigurationDescription
-> Maybe Bool -> CheckpointConfigurationDescription)
-> Lens
CheckpointConfigurationDescription
CheckpointConfigurationDescription
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CheckpointConfigurationDescription' {Maybe Bool
checkpointingEnabled :: Maybe Bool
$sel:checkpointingEnabled:CheckpointConfigurationDescription' :: CheckpointConfigurationDescription -> Maybe Bool
checkpointingEnabled} -> Maybe Bool
checkpointingEnabled) (\s :: CheckpointConfigurationDescription
s@CheckpointConfigurationDescription' {} Maybe Bool
a -> CheckpointConfigurationDescription
s {$sel:checkpointingEnabled:CheckpointConfigurationDescription' :: Maybe Bool
checkpointingEnabled = Maybe Bool
a} :: CheckpointConfigurationDescription)
checkpointConfigurationDescription_configurationType :: Lens.Lens' CheckpointConfigurationDescription (Prelude.Maybe ConfigurationType)
checkpointConfigurationDescription_configurationType :: (Maybe ConfigurationType -> f (Maybe ConfigurationType))
-> CheckpointConfigurationDescription
-> f CheckpointConfigurationDescription
checkpointConfigurationDescription_configurationType = (CheckpointConfigurationDescription -> Maybe ConfigurationType)
-> (CheckpointConfigurationDescription
-> Maybe ConfigurationType -> CheckpointConfigurationDescription)
-> Lens
CheckpointConfigurationDescription
CheckpointConfigurationDescription
(Maybe ConfigurationType)
(Maybe ConfigurationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CheckpointConfigurationDescription' {Maybe ConfigurationType
configurationType :: Maybe ConfigurationType
$sel:configurationType:CheckpointConfigurationDescription' :: CheckpointConfigurationDescription -> Maybe ConfigurationType
configurationType} -> Maybe ConfigurationType
configurationType) (\s :: CheckpointConfigurationDescription
s@CheckpointConfigurationDescription' {} Maybe ConfigurationType
a -> CheckpointConfigurationDescription
s {$sel:configurationType:CheckpointConfigurationDescription' :: Maybe ConfigurationType
configurationType = Maybe ConfigurationType
a} :: CheckpointConfigurationDescription)
checkpointConfigurationDescription_minPauseBetweenCheckpoints :: Lens.Lens' CheckpointConfigurationDescription (Prelude.Maybe Prelude.Natural)
checkpointConfigurationDescription_minPauseBetweenCheckpoints :: (Maybe Natural -> f (Maybe Natural))
-> CheckpointConfigurationDescription
-> f CheckpointConfigurationDescription
checkpointConfigurationDescription_minPauseBetweenCheckpoints = (CheckpointConfigurationDescription -> Maybe Natural)
-> (CheckpointConfigurationDescription
-> Maybe Natural -> CheckpointConfigurationDescription)
-> Lens
CheckpointConfigurationDescription
CheckpointConfigurationDescription
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CheckpointConfigurationDescription' {Maybe Natural
minPauseBetweenCheckpoints :: Maybe Natural
$sel:minPauseBetweenCheckpoints:CheckpointConfigurationDescription' :: CheckpointConfigurationDescription -> Maybe Natural
minPauseBetweenCheckpoints} -> Maybe Natural
minPauseBetweenCheckpoints) (\s :: CheckpointConfigurationDescription
s@CheckpointConfigurationDescription' {} Maybe Natural
a -> CheckpointConfigurationDescription
s {$sel:minPauseBetweenCheckpoints:CheckpointConfigurationDescription' :: Maybe Natural
minPauseBetweenCheckpoints = Maybe Natural
a} :: CheckpointConfigurationDescription)
checkpointConfigurationDescription_checkpointInterval :: Lens.Lens' CheckpointConfigurationDescription (Prelude.Maybe Prelude.Natural)
checkpointConfigurationDescription_checkpointInterval :: (Maybe Natural -> f (Maybe Natural))
-> CheckpointConfigurationDescription
-> f CheckpointConfigurationDescription
checkpointConfigurationDescription_checkpointInterval = (CheckpointConfigurationDescription -> Maybe Natural)
-> (CheckpointConfigurationDescription
-> Maybe Natural -> CheckpointConfigurationDescription)
-> Lens
CheckpointConfigurationDescription
CheckpointConfigurationDescription
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CheckpointConfigurationDescription' {Maybe Natural
checkpointInterval :: Maybe Natural
$sel:checkpointInterval:CheckpointConfigurationDescription' :: CheckpointConfigurationDescription -> Maybe Natural
checkpointInterval} -> Maybe Natural
checkpointInterval) (\s :: CheckpointConfigurationDescription
s@CheckpointConfigurationDescription' {} Maybe Natural
a -> CheckpointConfigurationDescription
s {$sel:checkpointInterval:CheckpointConfigurationDescription' :: Maybe Natural
checkpointInterval = Maybe Natural
a} :: CheckpointConfigurationDescription)
instance
Core.FromJSON
CheckpointConfigurationDescription
where
parseJSON :: Value -> Parser CheckpointConfigurationDescription
parseJSON =
String
-> (Object -> Parser CheckpointConfigurationDescription)
-> Value
-> Parser CheckpointConfigurationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CheckpointConfigurationDescription"
( \Object
x ->
Maybe Bool
-> Maybe ConfigurationType
-> Maybe Natural
-> Maybe Natural
-> CheckpointConfigurationDescription
CheckpointConfigurationDescription'
(Maybe Bool
-> Maybe ConfigurationType
-> Maybe Natural
-> Maybe Natural
-> CheckpointConfigurationDescription)
-> Parser (Maybe Bool)
-> Parser
(Maybe ConfigurationType
-> Maybe Natural
-> Maybe Natural
-> CheckpointConfigurationDescription)
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
"CheckpointingEnabled")
Parser
(Maybe ConfigurationType
-> Maybe Natural
-> Maybe Natural
-> CheckpointConfigurationDescription)
-> Parser (Maybe ConfigurationType)
-> Parser
(Maybe Natural
-> Maybe Natural -> CheckpointConfigurationDescription)
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
-> Maybe Natural -> CheckpointConfigurationDescription)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> CheckpointConfigurationDescription)
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
"MinPauseBetweenCheckpoints")
Parser (Maybe Natural -> CheckpointConfigurationDescription)
-> Parser (Maybe Natural)
-> Parser CheckpointConfigurationDescription
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
"CheckpointInterval")
)
instance
Prelude.Hashable
CheckpointConfigurationDescription
instance
Prelude.NFData
CheckpointConfigurationDescription