{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.GreengrassV2.Types.LambdaFunctionRecipeSource where
import qualified Amazonka.Core as Core
import Amazonka.GreengrassV2.Types.ComponentDependencyRequirement
import Amazonka.GreengrassV2.Types.ComponentPlatform
import Amazonka.GreengrassV2.Types.LambdaExecutionParameters
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LambdaFunctionRecipeSource = LambdaFunctionRecipeSource'
{
LambdaFunctionRecipeSource -> Maybe LambdaExecutionParameters
componentLambdaParameters :: Prelude.Maybe LambdaExecutionParameters,
LambdaFunctionRecipeSource -> Maybe Text
componentVersion :: Prelude.Maybe Prelude.Text,
LambdaFunctionRecipeSource -> Maybe Text
componentName :: Prelude.Maybe Prelude.Text,
LambdaFunctionRecipeSource -> Maybe [ComponentPlatform]
componentPlatforms :: Prelude.Maybe [ComponentPlatform],
LambdaFunctionRecipeSource
-> Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies :: Prelude.Maybe (Prelude.HashMap Prelude.Text ComponentDependencyRequirement),
LambdaFunctionRecipeSource -> Text
lambdaArn :: Prelude.Text
}
deriving (LambdaFunctionRecipeSource -> LambdaFunctionRecipeSource -> Bool
(LambdaFunctionRecipeSource -> LambdaFunctionRecipeSource -> Bool)
-> (LambdaFunctionRecipeSource
-> LambdaFunctionRecipeSource -> Bool)
-> Eq LambdaFunctionRecipeSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LambdaFunctionRecipeSource -> LambdaFunctionRecipeSource -> Bool
$c/= :: LambdaFunctionRecipeSource -> LambdaFunctionRecipeSource -> Bool
== :: LambdaFunctionRecipeSource -> LambdaFunctionRecipeSource -> Bool
$c== :: LambdaFunctionRecipeSource -> LambdaFunctionRecipeSource -> Bool
Prelude.Eq, ReadPrec [LambdaFunctionRecipeSource]
ReadPrec LambdaFunctionRecipeSource
Int -> ReadS LambdaFunctionRecipeSource
ReadS [LambdaFunctionRecipeSource]
(Int -> ReadS LambdaFunctionRecipeSource)
-> ReadS [LambdaFunctionRecipeSource]
-> ReadPrec LambdaFunctionRecipeSource
-> ReadPrec [LambdaFunctionRecipeSource]
-> Read LambdaFunctionRecipeSource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LambdaFunctionRecipeSource]
$creadListPrec :: ReadPrec [LambdaFunctionRecipeSource]
readPrec :: ReadPrec LambdaFunctionRecipeSource
$creadPrec :: ReadPrec LambdaFunctionRecipeSource
readList :: ReadS [LambdaFunctionRecipeSource]
$creadList :: ReadS [LambdaFunctionRecipeSource]
readsPrec :: Int -> ReadS LambdaFunctionRecipeSource
$creadsPrec :: Int -> ReadS LambdaFunctionRecipeSource
Prelude.Read, Int -> LambdaFunctionRecipeSource -> ShowS
[LambdaFunctionRecipeSource] -> ShowS
LambdaFunctionRecipeSource -> String
(Int -> LambdaFunctionRecipeSource -> ShowS)
-> (LambdaFunctionRecipeSource -> String)
-> ([LambdaFunctionRecipeSource] -> ShowS)
-> Show LambdaFunctionRecipeSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LambdaFunctionRecipeSource] -> ShowS
$cshowList :: [LambdaFunctionRecipeSource] -> ShowS
show :: LambdaFunctionRecipeSource -> String
$cshow :: LambdaFunctionRecipeSource -> String
showsPrec :: Int -> LambdaFunctionRecipeSource -> ShowS
$cshowsPrec :: Int -> LambdaFunctionRecipeSource -> ShowS
Prelude.Show, (forall x.
LambdaFunctionRecipeSource -> Rep LambdaFunctionRecipeSource x)
-> (forall x.
Rep LambdaFunctionRecipeSource x -> LambdaFunctionRecipeSource)
-> Generic LambdaFunctionRecipeSource
forall x.
Rep LambdaFunctionRecipeSource x -> LambdaFunctionRecipeSource
forall x.
LambdaFunctionRecipeSource -> Rep LambdaFunctionRecipeSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LambdaFunctionRecipeSource x -> LambdaFunctionRecipeSource
$cfrom :: forall x.
LambdaFunctionRecipeSource -> Rep LambdaFunctionRecipeSource x
Prelude.Generic)
newLambdaFunctionRecipeSource ::
Prelude.Text ->
LambdaFunctionRecipeSource
newLambdaFunctionRecipeSource :: Text -> LambdaFunctionRecipeSource
newLambdaFunctionRecipeSource Text
pLambdaArn_ =
LambdaFunctionRecipeSource' :: Maybe LambdaExecutionParameters
-> Maybe Text
-> Maybe Text
-> Maybe [ComponentPlatform]
-> Maybe (HashMap Text ComponentDependencyRequirement)
-> Text
-> LambdaFunctionRecipeSource
LambdaFunctionRecipeSource'
{ $sel:componentLambdaParameters:LambdaFunctionRecipeSource' :: Maybe LambdaExecutionParameters
componentLambdaParameters =
Maybe LambdaExecutionParameters
forall a. Maybe a
Prelude.Nothing,
$sel:componentVersion:LambdaFunctionRecipeSource' :: Maybe Text
componentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:componentName:LambdaFunctionRecipeSource' :: Maybe Text
componentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:componentPlatforms:LambdaFunctionRecipeSource' :: Maybe [ComponentPlatform]
componentPlatforms = Maybe [ComponentPlatform]
forall a. Maybe a
Prelude.Nothing,
$sel:componentDependencies:LambdaFunctionRecipeSource' :: Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies = Maybe (HashMap Text ComponentDependencyRequirement)
forall a. Maybe a
Prelude.Nothing,
$sel:lambdaArn:LambdaFunctionRecipeSource' :: Text
lambdaArn = Text
pLambdaArn_
}
lambdaFunctionRecipeSource_componentLambdaParameters :: Lens.Lens' LambdaFunctionRecipeSource (Prelude.Maybe LambdaExecutionParameters)
lambdaFunctionRecipeSource_componentLambdaParameters :: (Maybe LambdaExecutionParameters
-> f (Maybe LambdaExecutionParameters))
-> LambdaFunctionRecipeSource -> f LambdaFunctionRecipeSource
lambdaFunctionRecipeSource_componentLambdaParameters = (LambdaFunctionRecipeSource -> Maybe LambdaExecutionParameters)
-> (LambdaFunctionRecipeSource
-> Maybe LambdaExecutionParameters -> LambdaFunctionRecipeSource)
-> Lens
LambdaFunctionRecipeSource
LambdaFunctionRecipeSource
(Maybe LambdaExecutionParameters)
(Maybe LambdaExecutionParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecipeSource' {Maybe LambdaExecutionParameters
componentLambdaParameters :: Maybe LambdaExecutionParameters
$sel:componentLambdaParameters:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe LambdaExecutionParameters
componentLambdaParameters} -> Maybe LambdaExecutionParameters
componentLambdaParameters) (\s :: LambdaFunctionRecipeSource
s@LambdaFunctionRecipeSource' {} Maybe LambdaExecutionParameters
a -> LambdaFunctionRecipeSource
s {$sel:componentLambdaParameters:LambdaFunctionRecipeSource' :: Maybe LambdaExecutionParameters
componentLambdaParameters = Maybe LambdaExecutionParameters
a} :: LambdaFunctionRecipeSource)
lambdaFunctionRecipeSource_componentVersion :: Lens.Lens' LambdaFunctionRecipeSource (Prelude.Maybe Prelude.Text)
lambdaFunctionRecipeSource_componentVersion :: (Maybe Text -> f (Maybe Text))
-> LambdaFunctionRecipeSource -> f LambdaFunctionRecipeSource
lambdaFunctionRecipeSource_componentVersion = (LambdaFunctionRecipeSource -> Maybe Text)
-> (LambdaFunctionRecipeSource
-> Maybe Text -> LambdaFunctionRecipeSource)
-> Lens
LambdaFunctionRecipeSource
LambdaFunctionRecipeSource
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecipeSource' {Maybe Text
componentVersion :: Maybe Text
$sel:componentVersion:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe Text
componentVersion} -> Maybe Text
componentVersion) (\s :: LambdaFunctionRecipeSource
s@LambdaFunctionRecipeSource' {} Maybe Text
a -> LambdaFunctionRecipeSource
s {$sel:componentVersion:LambdaFunctionRecipeSource' :: Maybe Text
componentVersion = Maybe Text
a} :: LambdaFunctionRecipeSource)
lambdaFunctionRecipeSource_componentName :: Lens.Lens' LambdaFunctionRecipeSource (Prelude.Maybe Prelude.Text)
lambdaFunctionRecipeSource_componentName :: (Maybe Text -> f (Maybe Text))
-> LambdaFunctionRecipeSource -> f LambdaFunctionRecipeSource
lambdaFunctionRecipeSource_componentName = (LambdaFunctionRecipeSource -> Maybe Text)
-> (LambdaFunctionRecipeSource
-> Maybe Text -> LambdaFunctionRecipeSource)
-> Lens
LambdaFunctionRecipeSource
LambdaFunctionRecipeSource
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecipeSource' {Maybe Text
componentName :: Maybe Text
$sel:componentName:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe Text
componentName} -> Maybe Text
componentName) (\s :: LambdaFunctionRecipeSource
s@LambdaFunctionRecipeSource' {} Maybe Text
a -> LambdaFunctionRecipeSource
s {$sel:componentName:LambdaFunctionRecipeSource' :: Maybe Text
componentName = Maybe Text
a} :: LambdaFunctionRecipeSource)
lambdaFunctionRecipeSource_componentPlatforms :: Lens.Lens' LambdaFunctionRecipeSource (Prelude.Maybe [ComponentPlatform])
lambdaFunctionRecipeSource_componentPlatforms :: (Maybe [ComponentPlatform] -> f (Maybe [ComponentPlatform]))
-> LambdaFunctionRecipeSource -> f LambdaFunctionRecipeSource
lambdaFunctionRecipeSource_componentPlatforms = (LambdaFunctionRecipeSource -> Maybe [ComponentPlatform])
-> (LambdaFunctionRecipeSource
-> Maybe [ComponentPlatform] -> LambdaFunctionRecipeSource)
-> Lens
LambdaFunctionRecipeSource
LambdaFunctionRecipeSource
(Maybe [ComponentPlatform])
(Maybe [ComponentPlatform])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecipeSource' {Maybe [ComponentPlatform]
componentPlatforms :: Maybe [ComponentPlatform]
$sel:componentPlatforms:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe [ComponentPlatform]
componentPlatforms} -> Maybe [ComponentPlatform]
componentPlatforms) (\s :: LambdaFunctionRecipeSource
s@LambdaFunctionRecipeSource' {} Maybe [ComponentPlatform]
a -> LambdaFunctionRecipeSource
s {$sel:componentPlatforms:LambdaFunctionRecipeSource' :: Maybe [ComponentPlatform]
componentPlatforms = Maybe [ComponentPlatform]
a} :: LambdaFunctionRecipeSource) ((Maybe [ComponentPlatform] -> f (Maybe [ComponentPlatform]))
-> LambdaFunctionRecipeSource -> f LambdaFunctionRecipeSource)
-> ((Maybe [ComponentPlatform] -> f (Maybe [ComponentPlatform]))
-> Maybe [ComponentPlatform] -> f (Maybe [ComponentPlatform]))
-> (Maybe [ComponentPlatform] -> f (Maybe [ComponentPlatform]))
-> LambdaFunctionRecipeSource
-> f LambdaFunctionRecipeSource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ComponentPlatform]
[ComponentPlatform]
[ComponentPlatform]
[ComponentPlatform]
-> Iso
(Maybe [ComponentPlatform])
(Maybe [ComponentPlatform])
(Maybe [ComponentPlatform])
(Maybe [ComponentPlatform])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[ComponentPlatform]
[ComponentPlatform]
[ComponentPlatform]
[ComponentPlatform]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
lambdaFunctionRecipeSource_componentDependencies :: Lens.Lens' LambdaFunctionRecipeSource (Prelude.Maybe (Prelude.HashMap Prelude.Text ComponentDependencyRequirement))
lambdaFunctionRecipeSource_componentDependencies :: (Maybe (HashMap Text ComponentDependencyRequirement)
-> f (Maybe (HashMap Text ComponentDependencyRequirement)))
-> LambdaFunctionRecipeSource -> f LambdaFunctionRecipeSource
lambdaFunctionRecipeSource_componentDependencies = (LambdaFunctionRecipeSource
-> Maybe (HashMap Text ComponentDependencyRequirement))
-> (LambdaFunctionRecipeSource
-> Maybe (HashMap Text ComponentDependencyRequirement)
-> LambdaFunctionRecipeSource)
-> Lens
LambdaFunctionRecipeSource
LambdaFunctionRecipeSource
(Maybe (HashMap Text ComponentDependencyRequirement))
(Maybe (HashMap Text ComponentDependencyRequirement))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecipeSource' {Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies :: Maybe (HashMap Text ComponentDependencyRequirement)
$sel:componentDependencies:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource
-> Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies} -> Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies) (\s :: LambdaFunctionRecipeSource
s@LambdaFunctionRecipeSource' {} Maybe (HashMap Text ComponentDependencyRequirement)
a -> LambdaFunctionRecipeSource
s {$sel:componentDependencies:LambdaFunctionRecipeSource' :: Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies = Maybe (HashMap Text ComponentDependencyRequirement)
a} :: LambdaFunctionRecipeSource) ((Maybe (HashMap Text ComponentDependencyRequirement)
-> f (Maybe (HashMap Text ComponentDependencyRequirement)))
-> LambdaFunctionRecipeSource -> f LambdaFunctionRecipeSource)
-> ((Maybe (HashMap Text ComponentDependencyRequirement)
-> f (Maybe (HashMap Text ComponentDependencyRequirement)))
-> Maybe (HashMap Text ComponentDependencyRequirement)
-> f (Maybe (HashMap Text ComponentDependencyRequirement)))
-> (Maybe (HashMap Text ComponentDependencyRequirement)
-> f (Maybe (HashMap Text ComponentDependencyRequirement)))
-> LambdaFunctionRecipeSource
-> f LambdaFunctionRecipeSource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text ComponentDependencyRequirement)
(HashMap Text ComponentDependencyRequirement)
(HashMap Text ComponentDependencyRequirement)
(HashMap Text ComponentDependencyRequirement)
-> Iso
(Maybe (HashMap Text ComponentDependencyRequirement))
(Maybe (HashMap Text ComponentDependencyRequirement))
(Maybe (HashMap Text ComponentDependencyRequirement))
(Maybe (HashMap Text ComponentDependencyRequirement))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text ComponentDependencyRequirement)
(HashMap Text ComponentDependencyRequirement)
(HashMap Text ComponentDependencyRequirement)
(HashMap Text ComponentDependencyRequirement)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
lambdaFunctionRecipeSource_lambdaArn :: Lens.Lens' LambdaFunctionRecipeSource Prelude.Text
lambdaFunctionRecipeSource_lambdaArn :: (Text -> f Text)
-> LambdaFunctionRecipeSource -> f LambdaFunctionRecipeSource
lambdaFunctionRecipeSource_lambdaArn = (LambdaFunctionRecipeSource -> Text)
-> (LambdaFunctionRecipeSource
-> Text -> LambdaFunctionRecipeSource)
-> Lens
LambdaFunctionRecipeSource LambdaFunctionRecipeSource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecipeSource' {Text
lambdaArn :: Text
$sel:lambdaArn:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Text
lambdaArn} -> Text
lambdaArn) (\s :: LambdaFunctionRecipeSource
s@LambdaFunctionRecipeSource' {} Text
a -> LambdaFunctionRecipeSource
s {$sel:lambdaArn:LambdaFunctionRecipeSource' :: Text
lambdaArn = Text
a} :: LambdaFunctionRecipeSource)
instance Prelude.Hashable LambdaFunctionRecipeSource
instance Prelude.NFData LambdaFunctionRecipeSource
instance Core.ToJSON LambdaFunctionRecipeSource where
toJSON :: LambdaFunctionRecipeSource -> Value
toJSON LambdaFunctionRecipeSource' {Maybe [ComponentPlatform]
Maybe Text
Maybe (HashMap Text ComponentDependencyRequirement)
Maybe LambdaExecutionParameters
Text
lambdaArn :: Text
componentDependencies :: Maybe (HashMap Text ComponentDependencyRequirement)
componentPlatforms :: Maybe [ComponentPlatform]
componentName :: Maybe Text
componentVersion :: Maybe Text
componentLambdaParameters :: Maybe LambdaExecutionParameters
$sel:lambdaArn:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Text
$sel:componentDependencies:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource
-> Maybe (HashMap Text ComponentDependencyRequirement)
$sel:componentPlatforms:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe [ComponentPlatform]
$sel:componentName:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe Text
$sel:componentVersion:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe Text
$sel:componentLambdaParameters:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe LambdaExecutionParameters
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"componentLambdaParameters" Text -> LambdaExecutionParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(LambdaExecutionParameters -> Pair)
-> Maybe LambdaExecutionParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LambdaExecutionParameters
componentLambdaParameters,
(Text
"componentVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
componentVersion,
(Text
"componentName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
componentName,
(Text
"componentPlatforms" Text -> [ComponentPlatform] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([ComponentPlatform] -> Pair)
-> Maybe [ComponentPlatform] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ComponentPlatform]
componentPlatforms,
(Text
"componentDependencies" Text -> HashMap Text ComponentDependencyRequirement -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text ComponentDependencyRequirement -> Pair)
-> Maybe (HashMap Text ComponentDependencyRequirement)
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"lambdaArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
lambdaArn)
]
)