{-# 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.RunConfigurationDescription where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.ApplicationRestoreConfiguration
import Amazonka.KinesisAnalyticsV2.Types.FlinkRunConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RunConfigurationDescription = RunConfigurationDescription'
{
RunConfigurationDescription
-> Maybe ApplicationRestoreConfiguration
applicationRestoreConfigurationDescription :: Prelude.Maybe ApplicationRestoreConfiguration,
RunConfigurationDescription -> Maybe FlinkRunConfiguration
flinkRunConfigurationDescription :: Prelude.Maybe FlinkRunConfiguration
}
deriving (RunConfigurationDescription -> RunConfigurationDescription -> Bool
(RunConfigurationDescription
-> RunConfigurationDescription -> Bool)
-> (RunConfigurationDescription
-> RunConfigurationDescription -> Bool)
-> Eq RunConfigurationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RunConfigurationDescription -> RunConfigurationDescription -> Bool
$c/= :: RunConfigurationDescription -> RunConfigurationDescription -> Bool
== :: RunConfigurationDescription -> RunConfigurationDescription -> Bool
$c== :: RunConfigurationDescription -> RunConfigurationDescription -> Bool
Prelude.Eq, ReadPrec [RunConfigurationDescription]
ReadPrec RunConfigurationDescription
Int -> ReadS RunConfigurationDescription
ReadS [RunConfigurationDescription]
(Int -> ReadS RunConfigurationDescription)
-> ReadS [RunConfigurationDescription]
-> ReadPrec RunConfigurationDescription
-> ReadPrec [RunConfigurationDescription]
-> Read RunConfigurationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RunConfigurationDescription]
$creadListPrec :: ReadPrec [RunConfigurationDescription]
readPrec :: ReadPrec RunConfigurationDescription
$creadPrec :: ReadPrec RunConfigurationDescription
readList :: ReadS [RunConfigurationDescription]
$creadList :: ReadS [RunConfigurationDescription]
readsPrec :: Int -> ReadS RunConfigurationDescription
$creadsPrec :: Int -> ReadS RunConfigurationDescription
Prelude.Read, Int -> RunConfigurationDescription -> ShowS
[RunConfigurationDescription] -> ShowS
RunConfigurationDescription -> String
(Int -> RunConfigurationDescription -> ShowS)
-> (RunConfigurationDescription -> String)
-> ([RunConfigurationDescription] -> ShowS)
-> Show RunConfigurationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RunConfigurationDescription] -> ShowS
$cshowList :: [RunConfigurationDescription] -> ShowS
show :: RunConfigurationDescription -> String
$cshow :: RunConfigurationDescription -> String
showsPrec :: Int -> RunConfigurationDescription -> ShowS
$cshowsPrec :: Int -> RunConfigurationDescription -> ShowS
Prelude.Show, (forall x.
RunConfigurationDescription -> Rep RunConfigurationDescription x)
-> (forall x.
Rep RunConfigurationDescription x -> RunConfigurationDescription)
-> Generic RunConfigurationDescription
forall x.
Rep RunConfigurationDescription x -> RunConfigurationDescription
forall x.
RunConfigurationDescription -> Rep RunConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RunConfigurationDescription x -> RunConfigurationDescription
$cfrom :: forall x.
RunConfigurationDescription -> Rep RunConfigurationDescription x
Prelude.Generic)
newRunConfigurationDescription ::
RunConfigurationDescription
newRunConfigurationDescription :: RunConfigurationDescription
newRunConfigurationDescription =
RunConfigurationDescription' :: Maybe ApplicationRestoreConfiguration
-> Maybe FlinkRunConfiguration -> RunConfigurationDescription
RunConfigurationDescription'
{ $sel:applicationRestoreConfigurationDescription:RunConfigurationDescription' :: Maybe ApplicationRestoreConfiguration
applicationRestoreConfigurationDescription =
Maybe ApplicationRestoreConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:flinkRunConfigurationDescription:RunConfigurationDescription' :: Maybe FlinkRunConfiguration
flinkRunConfigurationDescription =
Maybe FlinkRunConfiguration
forall a. Maybe a
Prelude.Nothing
}
runConfigurationDescription_applicationRestoreConfigurationDescription :: Lens.Lens' RunConfigurationDescription (Prelude.Maybe ApplicationRestoreConfiguration)
runConfigurationDescription_applicationRestoreConfigurationDescription :: (Maybe ApplicationRestoreConfiguration
-> f (Maybe ApplicationRestoreConfiguration))
-> RunConfigurationDescription -> f RunConfigurationDescription
runConfigurationDescription_applicationRestoreConfigurationDescription = (RunConfigurationDescription
-> Maybe ApplicationRestoreConfiguration)
-> (RunConfigurationDescription
-> Maybe ApplicationRestoreConfiguration
-> RunConfigurationDescription)
-> Lens
RunConfigurationDescription
RunConfigurationDescription
(Maybe ApplicationRestoreConfiguration)
(Maybe ApplicationRestoreConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunConfigurationDescription' {Maybe ApplicationRestoreConfiguration
applicationRestoreConfigurationDescription :: Maybe ApplicationRestoreConfiguration
$sel:applicationRestoreConfigurationDescription:RunConfigurationDescription' :: RunConfigurationDescription
-> Maybe ApplicationRestoreConfiguration
applicationRestoreConfigurationDescription} -> Maybe ApplicationRestoreConfiguration
applicationRestoreConfigurationDescription) (\s :: RunConfigurationDescription
s@RunConfigurationDescription' {} Maybe ApplicationRestoreConfiguration
a -> RunConfigurationDescription
s {$sel:applicationRestoreConfigurationDescription:RunConfigurationDescription' :: Maybe ApplicationRestoreConfiguration
applicationRestoreConfigurationDescription = Maybe ApplicationRestoreConfiguration
a} :: RunConfigurationDescription)
runConfigurationDescription_flinkRunConfigurationDescription :: Lens.Lens' RunConfigurationDescription (Prelude.Maybe FlinkRunConfiguration)
runConfigurationDescription_flinkRunConfigurationDescription :: (Maybe FlinkRunConfiguration -> f (Maybe FlinkRunConfiguration))
-> RunConfigurationDescription -> f RunConfigurationDescription
runConfigurationDescription_flinkRunConfigurationDescription = (RunConfigurationDescription -> Maybe FlinkRunConfiguration)
-> (RunConfigurationDescription
-> Maybe FlinkRunConfiguration -> RunConfigurationDescription)
-> Lens
RunConfigurationDescription
RunConfigurationDescription
(Maybe FlinkRunConfiguration)
(Maybe FlinkRunConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunConfigurationDescription' {Maybe FlinkRunConfiguration
flinkRunConfigurationDescription :: Maybe FlinkRunConfiguration
$sel:flinkRunConfigurationDescription:RunConfigurationDescription' :: RunConfigurationDescription -> Maybe FlinkRunConfiguration
flinkRunConfigurationDescription} -> Maybe FlinkRunConfiguration
flinkRunConfigurationDescription) (\s :: RunConfigurationDescription
s@RunConfigurationDescription' {} Maybe FlinkRunConfiguration
a -> RunConfigurationDescription
s {$sel:flinkRunConfigurationDescription:RunConfigurationDescription' :: Maybe FlinkRunConfiguration
flinkRunConfigurationDescription = Maybe FlinkRunConfiguration
a} :: RunConfigurationDescription)
instance Core.FromJSON RunConfigurationDescription where
parseJSON :: Value -> Parser RunConfigurationDescription
parseJSON =
String
-> (Object -> Parser RunConfigurationDescription)
-> Value
-> Parser RunConfigurationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RunConfigurationDescription"
( \Object
x ->
Maybe ApplicationRestoreConfiguration
-> Maybe FlinkRunConfiguration -> RunConfigurationDescription
RunConfigurationDescription'
(Maybe ApplicationRestoreConfiguration
-> Maybe FlinkRunConfiguration -> RunConfigurationDescription)
-> Parser (Maybe ApplicationRestoreConfiguration)
-> Parser
(Maybe FlinkRunConfiguration -> RunConfigurationDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
Object -> Text -> Parser (Maybe ApplicationRestoreConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ApplicationRestoreConfigurationDescription"
)
Parser (Maybe FlinkRunConfiguration -> RunConfigurationDescription)
-> Parser (Maybe FlinkRunConfiguration)
-> Parser RunConfigurationDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FlinkRunConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FlinkRunConfigurationDescription")
)
instance Prelude.Hashable RunConfigurationDescription
instance Prelude.NFData RunConfigurationDescription