module Stratosphere.EMR.Cluster.StepConfigProperty (
module Exports, StepConfigProperty(..), mkStepConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EMR.Cluster.HadoopJarStepConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StepConfigProperty
=
StepConfigProperty {StepConfigProperty -> ()
haddock_workaround_ :: (),
StepConfigProperty -> Maybe (Value Text)
actionOnFailure :: (Prelude.Maybe (Value Prelude.Text)),
StepConfigProperty -> HadoopJarStepConfigProperty
hadoopJarStep :: HadoopJarStepConfigProperty,
StepConfigProperty -> Value Text
name :: (Value Prelude.Text)}
deriving stock (StepConfigProperty -> StepConfigProperty -> Bool
(StepConfigProperty -> StepConfigProperty -> Bool)
-> (StepConfigProperty -> StepConfigProperty -> Bool)
-> Eq StepConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StepConfigProperty -> StepConfigProperty -> Bool
== :: StepConfigProperty -> StepConfigProperty -> Bool
$c/= :: StepConfigProperty -> StepConfigProperty -> Bool
/= :: StepConfigProperty -> StepConfigProperty -> Bool
Prelude.Eq, Int -> StepConfigProperty -> ShowS
[StepConfigProperty] -> ShowS
StepConfigProperty -> String
(Int -> StepConfigProperty -> ShowS)
-> (StepConfigProperty -> String)
-> ([StepConfigProperty] -> ShowS)
-> Show StepConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StepConfigProperty -> ShowS
showsPrec :: Int -> StepConfigProperty -> ShowS
$cshow :: StepConfigProperty -> String
show :: StepConfigProperty -> String
$cshowList :: [StepConfigProperty] -> ShowS
showList :: [StepConfigProperty] -> ShowS
Prelude.Show)
mkStepConfigProperty ::
HadoopJarStepConfigProperty
-> Value Prelude.Text -> StepConfigProperty
mkStepConfigProperty :: HadoopJarStepConfigProperty -> Value Text -> StepConfigProperty
mkStepConfigProperty HadoopJarStepConfigProperty
hadoopJarStep Value Text
name
= StepConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), hadoopJarStep :: HadoopJarStepConfigProperty
hadoopJarStep = HadoopJarStepConfigProperty
hadoopJarStep,
name :: Value Text
name = Value Text
name, actionOnFailure :: Maybe (Value Text)
actionOnFailure = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StepConfigProperty where
toResourceProperties :: StepConfigProperty -> ResourceProperties
toResourceProperties StepConfigProperty {Maybe (Value Text)
()
Value Text
HadoopJarStepConfigProperty
haddock_workaround_ :: StepConfigProperty -> ()
actionOnFailure :: StepConfigProperty -> Maybe (Value Text)
hadoopJarStep :: StepConfigProperty -> HadoopJarStepConfigProperty
name :: StepConfigProperty -> Value Text
haddock_workaround_ :: ()
actionOnFailure :: Maybe (Value Text)
hadoopJarStep :: HadoopJarStepConfigProperty
name :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EMR::Cluster.StepConfig",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"HadoopJarStep" Key -> HadoopJarStepConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= HadoopJarStepConfigProperty
hadoopJarStep, Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ActionOnFailure" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
actionOnFailure]))}
instance JSON.ToJSON StepConfigProperty where
toJSON :: StepConfigProperty -> Value
toJSON StepConfigProperty {Maybe (Value Text)
()
Value Text
HadoopJarStepConfigProperty
haddock_workaround_ :: StepConfigProperty -> ()
actionOnFailure :: StepConfigProperty -> Maybe (Value Text)
hadoopJarStep :: StepConfigProperty -> HadoopJarStepConfigProperty
name :: StepConfigProperty -> Value Text
haddock_workaround_ :: ()
actionOnFailure :: Maybe (Value Text)
hadoopJarStep :: HadoopJarStepConfigProperty
name :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"HadoopJarStep" Key -> HadoopJarStepConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= HadoopJarStepConfigProperty
hadoopJarStep, Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ActionOnFailure" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
actionOnFailure])))
instance Property "ActionOnFailure" StepConfigProperty where
type PropertyType "ActionOnFailure" StepConfigProperty = Value Prelude.Text
set :: PropertyType "ActionOnFailure" StepConfigProperty
-> StepConfigProperty -> StepConfigProperty
set PropertyType "ActionOnFailure" StepConfigProperty
newValue StepConfigProperty {Maybe (Value Text)
()
Value Text
HadoopJarStepConfigProperty
haddock_workaround_ :: StepConfigProperty -> ()
actionOnFailure :: StepConfigProperty -> Maybe (Value Text)
hadoopJarStep :: StepConfigProperty -> HadoopJarStepConfigProperty
name :: StepConfigProperty -> Value Text
haddock_workaround_ :: ()
actionOnFailure :: Maybe (Value Text)
hadoopJarStep :: HadoopJarStepConfigProperty
name :: Value Text
..}
= StepConfigProperty {actionOnFailure :: Maybe (Value Text)
actionOnFailure = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ActionOnFailure" StepConfigProperty
Value Text
newValue, ()
Value Text
HadoopJarStepConfigProperty
haddock_workaround_ :: ()
hadoopJarStep :: HadoopJarStepConfigProperty
name :: Value Text
haddock_workaround_ :: ()
hadoopJarStep :: HadoopJarStepConfigProperty
name :: Value Text
..}
instance Property "HadoopJarStep" StepConfigProperty where
type PropertyType "HadoopJarStep" StepConfigProperty = HadoopJarStepConfigProperty
set :: PropertyType "HadoopJarStep" StepConfigProperty
-> StepConfigProperty -> StepConfigProperty
set PropertyType "HadoopJarStep" StepConfigProperty
newValue StepConfigProperty {Maybe (Value Text)
()
Value Text
HadoopJarStepConfigProperty
haddock_workaround_ :: StepConfigProperty -> ()
actionOnFailure :: StepConfigProperty -> Maybe (Value Text)
hadoopJarStep :: StepConfigProperty -> HadoopJarStepConfigProperty
name :: StepConfigProperty -> Value Text
haddock_workaround_ :: ()
actionOnFailure :: Maybe (Value Text)
hadoopJarStep :: HadoopJarStepConfigProperty
name :: Value Text
..}
= StepConfigProperty {hadoopJarStep :: HadoopJarStepConfigProperty
hadoopJarStep = PropertyType "HadoopJarStep" StepConfigProperty
HadoopJarStepConfigProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
actionOnFailure :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
actionOnFailure :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Name" StepConfigProperty where
type PropertyType "Name" StepConfigProperty = Value Prelude.Text
set :: PropertyType "Name" StepConfigProperty
-> StepConfigProperty -> StepConfigProperty
set PropertyType "Name" StepConfigProperty
newValue StepConfigProperty {Maybe (Value Text)
()
Value Text
HadoopJarStepConfigProperty
haddock_workaround_ :: StepConfigProperty -> ()
actionOnFailure :: StepConfigProperty -> Maybe (Value Text)
hadoopJarStep :: StepConfigProperty -> HadoopJarStepConfigProperty
name :: StepConfigProperty -> Value Text
haddock_workaround_ :: ()
actionOnFailure :: Maybe (Value Text)
hadoopJarStep :: HadoopJarStepConfigProperty
name :: Value Text
..}
= StepConfigProperty {name :: Value Text
name = PropertyType "Name" StepConfigProperty
Value Text
newValue, Maybe (Value Text)
()
HadoopJarStepConfigProperty
haddock_workaround_ :: ()
actionOnFailure :: Maybe (Value Text)
hadoopJarStep :: HadoopJarStepConfigProperty
haddock_workaround_ :: ()
actionOnFailure :: Maybe (Value Text)
hadoopJarStep :: HadoopJarStepConfigProperty
..}