module Stratosphere.DataBrew.Recipe.RecipeStepProperty (
module Exports, RecipeStepProperty(..), mkRecipeStepProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.DataBrew.Recipe.ActionProperty as Exports
import {-# SOURCE #-} Stratosphere.DataBrew.Recipe.ConditionExpressionProperty as Exports
import Stratosphere.ResourceProperties
data RecipeStepProperty
=
RecipeStepProperty {RecipeStepProperty -> ()
haddock_workaround_ :: (),
RecipeStepProperty -> ActionProperty
action :: ActionProperty,
RecipeStepProperty -> Maybe [ConditionExpressionProperty]
conditionExpressions :: (Prelude.Maybe [ConditionExpressionProperty])}
deriving stock (RecipeStepProperty -> RecipeStepProperty -> Bool
(RecipeStepProperty -> RecipeStepProperty -> Bool)
-> (RecipeStepProperty -> RecipeStepProperty -> Bool)
-> Eq RecipeStepProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RecipeStepProperty -> RecipeStepProperty -> Bool
== :: RecipeStepProperty -> RecipeStepProperty -> Bool
$c/= :: RecipeStepProperty -> RecipeStepProperty -> Bool
/= :: RecipeStepProperty -> RecipeStepProperty -> Bool
Prelude.Eq, Int -> RecipeStepProperty -> ShowS
[RecipeStepProperty] -> ShowS
RecipeStepProperty -> String
(Int -> RecipeStepProperty -> ShowS)
-> (RecipeStepProperty -> String)
-> ([RecipeStepProperty] -> ShowS)
-> Show RecipeStepProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RecipeStepProperty -> ShowS
showsPrec :: Int -> RecipeStepProperty -> ShowS
$cshow :: RecipeStepProperty -> String
show :: RecipeStepProperty -> String
$cshowList :: [RecipeStepProperty] -> ShowS
showList :: [RecipeStepProperty] -> ShowS
Prelude.Show)
mkRecipeStepProperty :: ActionProperty -> RecipeStepProperty
mkRecipeStepProperty :: ActionProperty -> RecipeStepProperty
mkRecipeStepProperty ActionProperty
action
= RecipeStepProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), action :: ActionProperty
action = ActionProperty
action,
conditionExpressions :: Maybe [ConditionExpressionProperty]
conditionExpressions = Maybe [ConditionExpressionProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RecipeStepProperty where
toResourceProperties :: RecipeStepProperty -> ResourceProperties
toResourceProperties RecipeStepProperty {Maybe [ConditionExpressionProperty]
()
ActionProperty
haddock_workaround_ :: RecipeStepProperty -> ()
action :: RecipeStepProperty -> ActionProperty
conditionExpressions :: RecipeStepProperty -> Maybe [ConditionExpressionProperty]
haddock_workaround_ :: ()
action :: ActionProperty
conditionExpressions :: Maybe [ConditionExpressionProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::DataBrew::Recipe.RecipeStep",
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
"Action" Key -> ActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ActionProperty
action]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [ConditionExpressionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConditionExpressions"
([ConditionExpressionProperty] -> (Key, Value))
-> Maybe [ConditionExpressionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConditionExpressionProperty]
conditionExpressions]))}
instance JSON.ToJSON RecipeStepProperty where
toJSON :: RecipeStepProperty -> Value
toJSON RecipeStepProperty {Maybe [ConditionExpressionProperty]
()
ActionProperty
haddock_workaround_ :: RecipeStepProperty -> ()
action :: RecipeStepProperty -> ActionProperty
conditionExpressions :: RecipeStepProperty -> Maybe [ConditionExpressionProperty]
haddock_workaround_ :: ()
action :: ActionProperty
conditionExpressions :: Maybe [ConditionExpressionProperty]
..}
= [(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
"Action" Key -> ActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ActionProperty
action]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [ConditionExpressionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConditionExpressions"
([ConditionExpressionProperty] -> (Key, Value))
-> Maybe [ConditionExpressionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConditionExpressionProperty]
conditionExpressions])))
instance Property "Action" RecipeStepProperty where
type PropertyType "Action" RecipeStepProperty = ActionProperty
set :: PropertyType "Action" RecipeStepProperty
-> RecipeStepProperty -> RecipeStepProperty
set PropertyType "Action" RecipeStepProperty
newValue RecipeStepProperty {Maybe [ConditionExpressionProperty]
()
ActionProperty
haddock_workaround_ :: RecipeStepProperty -> ()
action :: RecipeStepProperty -> ActionProperty
conditionExpressions :: RecipeStepProperty -> Maybe [ConditionExpressionProperty]
haddock_workaround_ :: ()
action :: ActionProperty
conditionExpressions :: Maybe [ConditionExpressionProperty]
..}
= RecipeStepProperty {action :: ActionProperty
action = PropertyType "Action" RecipeStepProperty
ActionProperty
newValue, Maybe [ConditionExpressionProperty]
()
haddock_workaround_ :: ()
conditionExpressions :: Maybe [ConditionExpressionProperty]
haddock_workaround_ :: ()
conditionExpressions :: Maybe [ConditionExpressionProperty]
..}
instance Property "ConditionExpressions" RecipeStepProperty where
type PropertyType "ConditionExpressions" RecipeStepProperty = [ConditionExpressionProperty]
set :: PropertyType "ConditionExpressions" RecipeStepProperty
-> RecipeStepProperty -> RecipeStepProperty
set PropertyType "ConditionExpressions" RecipeStepProperty
newValue RecipeStepProperty {Maybe [ConditionExpressionProperty]
()
ActionProperty
haddock_workaround_ :: RecipeStepProperty -> ()
action :: RecipeStepProperty -> ActionProperty
conditionExpressions :: RecipeStepProperty -> Maybe [ConditionExpressionProperty]
haddock_workaround_ :: ()
action :: ActionProperty
conditionExpressions :: Maybe [ConditionExpressionProperty]
..}
= RecipeStepProperty
{conditionExpressions :: Maybe [ConditionExpressionProperty]
conditionExpressions = [ConditionExpressionProperty]
-> Maybe [ConditionExpressionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ConditionExpressionProperty]
PropertyType "ConditionExpressions" RecipeStepProperty
newValue, ()
ActionProperty
haddock_workaround_ :: ()
action :: ActionProperty
haddock_workaround_ :: ()
action :: ActionProperty
..}