module Stratosphere.DataBrew.Job.RecipeProperty (
        RecipeProperty(..), mkRecipeProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RecipeProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-recipe.html>
    RecipeProperty {RecipeProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-recipe.html#cfn-databrew-job-recipe-name>
                    RecipeProperty -> Value Text
name :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-recipe.html#cfn-databrew-job-recipe-version>
                    RecipeProperty -> Maybe (Value Text)
version :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (RecipeProperty -> RecipeProperty -> Bool
(RecipeProperty -> RecipeProperty -> Bool)
-> (RecipeProperty -> RecipeProperty -> Bool) -> Eq RecipeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RecipeProperty -> RecipeProperty -> Bool
== :: RecipeProperty -> RecipeProperty -> Bool
$c/= :: RecipeProperty -> RecipeProperty -> Bool
/= :: RecipeProperty -> RecipeProperty -> Bool
Prelude.Eq, Int -> RecipeProperty -> ShowS
[RecipeProperty] -> ShowS
RecipeProperty -> String
(Int -> RecipeProperty -> ShowS)
-> (RecipeProperty -> String)
-> ([RecipeProperty] -> ShowS)
-> Show RecipeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RecipeProperty -> ShowS
showsPrec :: Int -> RecipeProperty -> ShowS
$cshow :: RecipeProperty -> String
show :: RecipeProperty -> String
$cshowList :: [RecipeProperty] -> ShowS
showList :: [RecipeProperty] -> ShowS
Prelude.Show)
mkRecipeProperty :: Value Prelude.Text -> RecipeProperty
mkRecipeProperty :: Value Text -> RecipeProperty
mkRecipeProperty Value Text
name
  = RecipeProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, version :: Maybe (Value Text)
version = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RecipeProperty where
  toResourceProperties :: RecipeProperty -> ResourceProperties
toResourceProperties RecipeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RecipeProperty -> ()
name :: RecipeProperty -> Value Text
version :: RecipeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
version :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataBrew::Job.Recipe",
         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
"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
"Version" (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)
version]))}
instance JSON.ToJSON RecipeProperty where
  toJSON :: RecipeProperty -> Value
toJSON RecipeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RecipeProperty -> ()
name :: RecipeProperty -> Value Text
version :: RecipeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
version :: Maybe (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
"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
"Version" (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)
version])))
instance Property "Name" RecipeProperty where
  type PropertyType "Name" RecipeProperty = Value Prelude.Text
  set :: PropertyType "Name" RecipeProperty
-> RecipeProperty -> RecipeProperty
set PropertyType "Name" RecipeProperty
newValue RecipeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RecipeProperty -> ()
name :: RecipeProperty -> Value Text
version :: RecipeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
version :: Maybe (Value Text)
..}
    = RecipeProperty {name :: Value Text
name = PropertyType "Name" RecipeProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
version :: Maybe (Value Text)
haddock_workaround_ :: ()
version :: Maybe (Value Text)
..}
instance Property "Version" RecipeProperty where
  type PropertyType "Version" RecipeProperty = Value Prelude.Text
  set :: PropertyType "Version" RecipeProperty
-> RecipeProperty -> RecipeProperty
set PropertyType "Version" RecipeProperty
newValue RecipeProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RecipeProperty -> ()
name :: RecipeProperty -> Value Text
version :: RecipeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
version :: Maybe (Value Text)
..}
    = RecipeProperty {version :: Maybe (Value Text)
version = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Version" RecipeProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
name :: Value Text
haddock_workaround_ :: ()
name :: Value Text
..}