{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.GreengrassV2.Types.LambdaFunctionRecipeSource
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Contains information about an Lambda function to import to create a
-- component.
--
-- /See:/ 'newLambdaFunctionRecipeSource' smart constructor.
data LambdaFunctionRecipeSource = LambdaFunctionRecipeSource'
  { -- | The system and runtime parameters for the Lambda function as it runs on
    -- the Greengrass core device.
    LambdaFunctionRecipeSource -> Maybe LambdaExecutionParameters
componentLambdaParameters :: Prelude.Maybe LambdaExecutionParameters,
    -- | The version of the component.
    --
    -- Defaults to the version of the Lambda function as a semantic version.
    -- For example, if your function version is @3@, the component version
    -- becomes @3.0.0@.
    LambdaFunctionRecipeSource -> Maybe Text
componentVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the component.
    --
    -- Defaults to the name of the Lambda function.
    LambdaFunctionRecipeSource -> Maybe Text
componentName :: Prelude.Maybe Prelude.Text,
    -- | The platforms that the component version supports.
    LambdaFunctionRecipeSource -> Maybe [ComponentPlatform]
componentPlatforms :: Prelude.Maybe [ComponentPlatform],
    -- | The component versions on which this Lambda function component depends.
    LambdaFunctionRecipeSource
-> Maybe (HashMap Text ComponentDependencyRequirement)
componentDependencies :: Prelude.Maybe (Prelude.HashMap Prelude.Text ComponentDependencyRequirement),
    -- | The
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
    -- of the Lambda function. The ARN must include the version of the function
    -- to import. You can\'t use version aliases like @$LATEST@.
    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)

-- |
-- Create a value of 'LambdaFunctionRecipeSource' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'componentLambdaParameters', 'lambdaFunctionRecipeSource_componentLambdaParameters' - The system and runtime parameters for the Lambda function as it runs on
-- the Greengrass core device.
--
-- 'componentVersion', 'lambdaFunctionRecipeSource_componentVersion' - The version of the component.
--
-- Defaults to the version of the Lambda function as a semantic version.
-- For example, if your function version is @3@, the component version
-- becomes @3.0.0@.
--
-- 'componentName', 'lambdaFunctionRecipeSource_componentName' - The name of the component.
--
-- Defaults to the name of the Lambda function.
--
-- 'componentPlatforms', 'lambdaFunctionRecipeSource_componentPlatforms' - The platforms that the component version supports.
--
-- 'componentDependencies', 'lambdaFunctionRecipeSource_componentDependencies' - The component versions on which this Lambda function component depends.
--
-- 'lambdaArn', 'lambdaFunctionRecipeSource_lambdaArn' - The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the Lambda function. The ARN must include the version of the function
-- to import. You can\'t use version aliases like @$LATEST@.
newLambdaFunctionRecipeSource ::
  -- | 'lambdaArn'
  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_
    }

-- | The system and runtime parameters for the Lambda function as it runs on
-- the Greengrass core device.
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)

-- | The version of the component.
--
-- Defaults to the version of the Lambda function as a semantic version.
-- For example, if your function version is @3@, the component version
-- becomes @3.0.0@.
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)

-- | The name of the component.
--
-- Defaults to the name of the Lambda function.
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)

-- | The platforms that the component version supports.
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

-- | The component versions on which this Lambda function component depends.
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

-- | The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the Lambda function. The ARN must include the version of the function
-- to import. You can\'t use version aliases like @$LATEST@.
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)
          ]
      )