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