module Stratosphere.KinesisAnalyticsV2.Application.RunConfigurationProperty (
        module Exports, RunConfigurationProperty(..),
        mkRunConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.KinesisAnalyticsV2.Application.ApplicationRestoreConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.KinesisAnalyticsV2.Application.FlinkRunConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data RunConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalyticsv2-application-runconfiguration.html>
    RunConfigurationProperty {RunConfigurationProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalyticsv2-application-runconfiguration.html#cfn-kinesisanalyticsv2-application-runconfiguration-applicationrestoreconfiguration>
                              RunConfigurationProperty
-> Maybe ApplicationRestoreConfigurationProperty
applicationRestoreConfiguration :: (Prelude.Maybe ApplicationRestoreConfigurationProperty),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalyticsv2-application-runconfiguration.html#cfn-kinesisanalyticsv2-application-runconfiguration-flinkrunconfiguration>
                              RunConfigurationProperty -> Maybe FlinkRunConfigurationProperty
flinkRunConfiguration :: (Prelude.Maybe FlinkRunConfigurationProperty)}
  deriving stock (RunConfigurationProperty -> RunConfigurationProperty -> Bool
(RunConfigurationProperty -> RunConfigurationProperty -> Bool)
-> (RunConfigurationProperty -> RunConfigurationProperty -> Bool)
-> Eq RunConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RunConfigurationProperty -> RunConfigurationProperty -> Bool
== :: RunConfigurationProperty -> RunConfigurationProperty -> Bool
$c/= :: RunConfigurationProperty -> RunConfigurationProperty -> Bool
/= :: RunConfigurationProperty -> RunConfigurationProperty -> Bool
Prelude.Eq, Int -> RunConfigurationProperty -> ShowS
[RunConfigurationProperty] -> ShowS
RunConfigurationProperty -> String
(Int -> RunConfigurationProperty -> ShowS)
-> (RunConfigurationProperty -> String)
-> ([RunConfigurationProperty] -> ShowS)
-> Show RunConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RunConfigurationProperty -> ShowS
showsPrec :: Int -> RunConfigurationProperty -> ShowS
$cshow :: RunConfigurationProperty -> String
show :: RunConfigurationProperty -> String
$cshowList :: [RunConfigurationProperty] -> ShowS
showList :: [RunConfigurationProperty] -> ShowS
Prelude.Show)
mkRunConfigurationProperty :: RunConfigurationProperty
mkRunConfigurationProperty :: RunConfigurationProperty
mkRunConfigurationProperty
  = RunConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       applicationRestoreConfiguration :: Maybe ApplicationRestoreConfigurationProperty
applicationRestoreConfiguration = Maybe ApplicationRestoreConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       flinkRunConfiguration :: Maybe FlinkRunConfigurationProperty
flinkRunConfiguration = Maybe FlinkRunConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RunConfigurationProperty where
  toResourceProperties :: RunConfigurationProperty -> ResourceProperties
toResourceProperties RunConfigurationProperty {Maybe ApplicationRestoreConfigurationProperty
Maybe FlinkRunConfigurationProperty
()
haddock_workaround_ :: RunConfigurationProperty -> ()
applicationRestoreConfiguration :: RunConfigurationProperty
-> Maybe ApplicationRestoreConfigurationProperty
flinkRunConfiguration :: RunConfigurationProperty -> Maybe FlinkRunConfigurationProperty
haddock_workaround_ :: ()
applicationRestoreConfiguration :: Maybe ApplicationRestoreConfigurationProperty
flinkRunConfiguration :: Maybe FlinkRunConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::KinesisAnalyticsV2::Application.RunConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> ApplicationRestoreConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ApplicationRestoreConfiguration"
                              (ApplicationRestoreConfigurationProperty -> (Key, Value))
-> Maybe ApplicationRestoreConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ApplicationRestoreConfigurationProperty
applicationRestoreConfiguration,
                            Key -> FlinkRunConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FlinkRunConfiguration"
                              (FlinkRunConfigurationProperty -> (Key, Value))
-> Maybe FlinkRunConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FlinkRunConfigurationProperty
flinkRunConfiguration])}
instance JSON.ToJSON RunConfigurationProperty where
  toJSON :: RunConfigurationProperty -> Value
toJSON RunConfigurationProperty {Maybe ApplicationRestoreConfigurationProperty
Maybe FlinkRunConfigurationProperty
()
haddock_workaround_ :: RunConfigurationProperty -> ()
applicationRestoreConfiguration :: RunConfigurationProperty
-> Maybe ApplicationRestoreConfigurationProperty
flinkRunConfiguration :: RunConfigurationProperty -> Maybe FlinkRunConfigurationProperty
haddock_workaround_ :: ()
applicationRestoreConfiguration :: Maybe ApplicationRestoreConfigurationProperty
flinkRunConfiguration :: Maybe FlinkRunConfigurationProperty
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> ApplicationRestoreConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ApplicationRestoreConfiguration"
                 (ApplicationRestoreConfigurationProperty -> (Key, Value))
-> Maybe ApplicationRestoreConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ApplicationRestoreConfigurationProperty
applicationRestoreConfiguration,
               Key -> FlinkRunConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FlinkRunConfiguration"
                 (FlinkRunConfigurationProperty -> (Key, Value))
-> Maybe FlinkRunConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FlinkRunConfigurationProperty
flinkRunConfiguration]))
instance Property "ApplicationRestoreConfiguration" RunConfigurationProperty where
  type PropertyType "ApplicationRestoreConfiguration" RunConfigurationProperty = ApplicationRestoreConfigurationProperty
  set :: PropertyType
  "ApplicationRestoreConfiguration" RunConfigurationProperty
-> RunConfigurationProperty -> RunConfigurationProperty
set PropertyType
  "ApplicationRestoreConfiguration" RunConfigurationProperty
newValue RunConfigurationProperty {Maybe ApplicationRestoreConfigurationProperty
Maybe FlinkRunConfigurationProperty
()
haddock_workaround_ :: RunConfigurationProperty -> ()
applicationRestoreConfiguration :: RunConfigurationProperty
-> Maybe ApplicationRestoreConfigurationProperty
flinkRunConfiguration :: RunConfigurationProperty -> Maybe FlinkRunConfigurationProperty
haddock_workaround_ :: ()
applicationRestoreConfiguration :: Maybe ApplicationRestoreConfigurationProperty
flinkRunConfiguration :: Maybe FlinkRunConfigurationProperty
..}
    = RunConfigurationProperty
        {applicationRestoreConfiguration :: Maybe ApplicationRestoreConfigurationProperty
applicationRestoreConfiguration = ApplicationRestoreConfigurationProperty
-> Maybe ApplicationRestoreConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ApplicationRestoreConfiguration" RunConfigurationProperty
ApplicationRestoreConfigurationProperty
newValue, Maybe FlinkRunConfigurationProperty
()
haddock_workaround_ :: ()
flinkRunConfiguration :: Maybe FlinkRunConfigurationProperty
haddock_workaround_ :: ()
flinkRunConfiguration :: Maybe FlinkRunConfigurationProperty
..}
instance Property "FlinkRunConfiguration" RunConfigurationProperty where
  type PropertyType "FlinkRunConfiguration" RunConfigurationProperty = FlinkRunConfigurationProperty
  set :: PropertyType "FlinkRunConfiguration" RunConfigurationProperty
-> RunConfigurationProperty -> RunConfigurationProperty
set PropertyType "FlinkRunConfiguration" RunConfigurationProperty
newValue RunConfigurationProperty {Maybe ApplicationRestoreConfigurationProperty
Maybe FlinkRunConfigurationProperty
()
haddock_workaround_ :: RunConfigurationProperty -> ()
applicationRestoreConfiguration :: RunConfigurationProperty
-> Maybe ApplicationRestoreConfigurationProperty
flinkRunConfiguration :: RunConfigurationProperty -> Maybe FlinkRunConfigurationProperty
haddock_workaround_ :: ()
applicationRestoreConfiguration :: Maybe ApplicationRestoreConfigurationProperty
flinkRunConfiguration :: Maybe FlinkRunConfigurationProperty
..}
    = RunConfigurationProperty
        {flinkRunConfiguration :: Maybe FlinkRunConfigurationProperty
flinkRunConfiguration = FlinkRunConfigurationProperty
-> Maybe FlinkRunConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FlinkRunConfiguration" RunConfigurationProperty
FlinkRunConfigurationProperty
newValue, Maybe ApplicationRestoreConfigurationProperty
()
haddock_workaround_ :: ()
applicationRestoreConfiguration :: Maybe ApplicationRestoreConfigurationProperty
haddock_workaround_ :: ()
applicationRestoreConfiguration :: Maybe ApplicationRestoreConfigurationProperty
..}