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