{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GreengrassV2.Types.ComponentDependencyRequirement
import Amazonka.GreengrassV2.Types.ComponentPlatform
import Amazonka.GreengrassV2.Types.LambdaExecutionParameters
import qualified Amazonka.Prelude as Prelude
data LambdaFunctionRecipeSource = LambdaFunctionRecipeSource'
{
LambdaFunctionRecipeSource
-> Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies :: Prelude.Maybe (Prelude.HashMap Prelude.Text ComponentDependencyRequirement),
LambdaFunctionRecipeSource -> Maybe LambdaExecutionParameters
componentLambdaParameters :: Prelude.Maybe LambdaExecutionParameters,
LambdaFunctionRecipeSource -> Maybe Text
componentName :: Prelude.Maybe Prelude.Text,
LambdaFunctionRecipeSource -> Maybe [ComponentPlatform]
componentPlatforms :: Prelude.Maybe [ComponentPlatform],
LambdaFunctionRecipeSource -> Maybe Text
componentVersion :: Prelude.Maybe Prelude.Text,
LambdaFunctionRecipeSource -> Text
lambdaArn :: Prelude.Text
}
deriving (LambdaFunctionRecipeSource -> LambdaFunctionRecipeSource -> Bool
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]
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
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.
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'
{ $sel:componentDependencies:LambdaFunctionRecipeSource' :: Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies =
forall a. Maybe a
Prelude.Nothing,
$sel:componentLambdaParameters:LambdaFunctionRecipeSource' :: Maybe LambdaExecutionParameters
componentLambdaParameters = forall a. Maybe a
Prelude.Nothing,
$sel:componentName:LambdaFunctionRecipeSource' :: Maybe Text
componentName = forall a. Maybe a
Prelude.Nothing,
$sel:componentPlatforms:LambdaFunctionRecipeSource' :: Maybe [ComponentPlatform]
componentPlatforms = forall a. Maybe a
Prelude.Nothing,
$sel:componentVersion:LambdaFunctionRecipeSource' :: Maybe Text
componentVersion = forall a. Maybe a
Prelude.Nothing,
$sel:lambdaArn:LambdaFunctionRecipeSource' :: Text
lambdaArn = Text
pLambdaArn_
}
lambdaFunctionRecipeSource_componentDependencies :: Lens.Lens' LambdaFunctionRecipeSource (Prelude.Maybe (Prelude.HashMap Prelude.Text ComponentDependencyRequirement))
lambdaFunctionRecipeSource_componentDependencies :: Lens'
LambdaFunctionRecipeSource
(Maybe (HashMap Text ComponentDependencyRequirement))
lambdaFunctionRecipeSource_componentDependencies = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
lambdaFunctionRecipeSource_componentLambdaParameters :: Lens.Lens' LambdaFunctionRecipeSource (Prelude.Maybe LambdaExecutionParameters)
lambdaFunctionRecipeSource_componentLambdaParameters :: Lens' LambdaFunctionRecipeSource (Maybe LambdaExecutionParameters)
lambdaFunctionRecipeSource_componentLambdaParameters = 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_componentName :: Lens.Lens' LambdaFunctionRecipeSource (Prelude.Maybe Prelude.Text)
lambdaFunctionRecipeSource_componentName :: Lens' LambdaFunctionRecipeSource (Maybe Text)
lambdaFunctionRecipeSource_componentName = 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 :: Lens' LambdaFunctionRecipeSource (Maybe [ComponentPlatform])
lambdaFunctionRecipeSource_componentPlatforms = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
lambdaFunctionRecipeSource_componentVersion :: Lens.Lens' LambdaFunctionRecipeSource (Prelude.Maybe Prelude.Text)
lambdaFunctionRecipeSource_componentVersion :: Lens' LambdaFunctionRecipeSource (Maybe Text)
lambdaFunctionRecipeSource_componentVersion = 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_lambdaArn :: Lens.Lens' LambdaFunctionRecipeSource Prelude.Text
lambdaFunctionRecipeSource_lambdaArn :: Lens' LambdaFunctionRecipeSource Text
lambdaFunctionRecipeSource_lambdaArn = 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 where
hashWithSalt :: Int -> LambdaFunctionRecipeSource -> Int
hashWithSalt Int
_salt LambdaFunctionRecipeSource' {Maybe [ComponentPlatform]
Maybe Text
Maybe (HashMap Text ComponentDependencyRequirement)
Maybe LambdaExecutionParameters
Text
lambdaArn :: Text
componentVersion :: Maybe Text
componentPlatforms :: Maybe [ComponentPlatform]
componentName :: Maybe Text
componentLambdaParameters :: Maybe LambdaExecutionParameters
componentDependencies :: Maybe (HashMap Text ComponentDependencyRequirement)
$sel:lambdaArn:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Text
$sel:componentVersion:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe Text
$sel:componentPlatforms:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe [ComponentPlatform]
$sel:componentName:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe Text
$sel:componentLambdaParameters:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe LambdaExecutionParameters
$sel:componentDependencies:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource
-> Maybe (HashMap Text ComponentDependencyRequirement)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LambdaExecutionParameters
componentLambdaParameters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ComponentPlatform]
componentPlatforms
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lambdaArn
instance Prelude.NFData LambdaFunctionRecipeSource where
rnf :: LambdaFunctionRecipeSource -> ()
rnf LambdaFunctionRecipeSource' {Maybe [ComponentPlatform]
Maybe Text
Maybe (HashMap Text ComponentDependencyRequirement)
Maybe LambdaExecutionParameters
Text
lambdaArn :: Text
componentVersion :: Maybe Text
componentPlatforms :: Maybe [ComponentPlatform]
componentName :: Maybe Text
componentLambdaParameters :: Maybe LambdaExecutionParameters
componentDependencies :: Maybe (HashMap Text ComponentDependencyRequirement)
$sel:lambdaArn:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Text
$sel:componentVersion:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe Text
$sel:componentPlatforms:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe [ComponentPlatform]
$sel:componentName:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe Text
$sel:componentLambdaParameters:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe LambdaExecutionParameters
$sel:componentDependencies:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource
-> Maybe (HashMap Text ComponentDependencyRequirement)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LambdaExecutionParameters
componentLambdaParameters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ComponentPlatform]
componentPlatforms
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lambdaArn
instance Data.ToJSON LambdaFunctionRecipeSource where
toJSON :: LambdaFunctionRecipeSource -> Value
toJSON LambdaFunctionRecipeSource' {Maybe [ComponentPlatform]
Maybe Text
Maybe (HashMap Text ComponentDependencyRequirement)
Maybe LambdaExecutionParameters
Text
lambdaArn :: Text
componentVersion :: Maybe Text
componentPlatforms :: Maybe [ComponentPlatform]
componentName :: Maybe Text
componentLambdaParameters :: Maybe LambdaExecutionParameters
componentDependencies :: Maybe (HashMap Text ComponentDependencyRequirement)
$sel:lambdaArn:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Text
$sel:componentVersion:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe Text
$sel:componentPlatforms:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe [ComponentPlatform]
$sel:componentName:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe Text
$sel:componentLambdaParameters:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource -> Maybe LambdaExecutionParameters
$sel:componentDependencies:LambdaFunctionRecipeSource' :: LambdaFunctionRecipeSource
-> Maybe (HashMap Text ComponentDependencyRequirement)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"componentDependencies" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies,
(Key
"componentLambdaParameters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LambdaExecutionParameters
componentLambdaParameters,
(Key
"componentName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
componentName,
(Key
"componentPlatforms" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ComponentPlatform]
componentPlatforms,
(Key
"componentVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
componentVersion,
forall a. a -> Maybe a
Prelude.Just (Key
"lambdaArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
lambdaArn)
]
)