{-# 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.AppRunner.Types.CodeConfigurationValues
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AppRunner.Types.CodeConfigurationValues where

import Amazonka.AppRunner.Types.Runtime
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Describes the basic configuration needed for building and running an App
-- Runner service. This type doesn\'t support the full set of possible
-- configuration options. Fur full configuration capabilities, use a
-- @apprunner.yaml@ file in the source code repository.
--
-- /See:/ 'newCodeConfigurationValues' smart constructor.
data CodeConfigurationValues = CodeConfigurationValues'
  { -- | The command App Runner runs to build your application.
    CodeConfigurationValues -> Maybe (Sensitive Text)
buildCommand :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The port that your application listens to in the container.
    --
    -- Default: @8080@
    CodeConfigurationValues -> Maybe Text
port :: Prelude.Maybe Prelude.Text,
    -- | An array of key-value pairs representing the secrets and parameters that
    -- get referenced to your service as an environment variable. The supported
    -- values are either the full Amazon Resource Name (ARN) of the Secrets
    -- Manager secret or the full ARN of the parameter in the Amazon Web
    -- Services Systems Manager Parameter Store.
    --
    -- -   If the Amazon Web Services Systems Manager Parameter Store parameter
    --     exists in the same Amazon Web Services Region as the service that
    --     you\'re launching, you can use either the full ARN or name of the
    --     secret. If the parameter exists in a different Region, then the full
    --     ARN must be specified.
    --
    -- -   Currently, cross account referencing of Amazon Web Services Systems
    --     Manager Parameter Store parameter is not supported.
    CodeConfigurationValues -> Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentSecrets :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Data.Sensitive Prelude.Text)),
    -- | The environment variables that are available to your running App Runner
    -- service. An array of key-value pairs.
    CodeConfigurationValues -> Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentVariables :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Data.Sensitive Prelude.Text)),
    -- | The command App Runner runs to start your application.
    CodeConfigurationValues -> Maybe (Sensitive Text)
startCommand :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | A runtime environment type for building and running an App Runner
    -- service. It represents a programming language runtime.
    CodeConfigurationValues -> Runtime
runtime :: Runtime
  }
  deriving (CodeConfigurationValues -> CodeConfigurationValues -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeConfigurationValues -> CodeConfigurationValues -> Bool
$c/= :: CodeConfigurationValues -> CodeConfigurationValues -> Bool
== :: CodeConfigurationValues -> CodeConfigurationValues -> Bool
$c== :: CodeConfigurationValues -> CodeConfigurationValues -> Bool
Prelude.Eq, Int -> CodeConfigurationValues -> ShowS
[CodeConfigurationValues] -> ShowS
CodeConfigurationValues -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeConfigurationValues] -> ShowS
$cshowList :: [CodeConfigurationValues] -> ShowS
show :: CodeConfigurationValues -> String
$cshow :: CodeConfigurationValues -> String
showsPrec :: Int -> CodeConfigurationValues -> ShowS
$cshowsPrec :: Int -> CodeConfigurationValues -> ShowS
Prelude.Show, forall x. Rep CodeConfigurationValues x -> CodeConfigurationValues
forall x. CodeConfigurationValues -> Rep CodeConfigurationValues x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CodeConfigurationValues x -> CodeConfigurationValues
$cfrom :: forall x. CodeConfigurationValues -> Rep CodeConfigurationValues x
Prelude.Generic)

-- |
-- Create a value of 'CodeConfigurationValues' 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:
--
-- 'buildCommand', 'codeConfigurationValues_buildCommand' - The command App Runner runs to build your application.
--
-- 'port', 'codeConfigurationValues_port' - The port that your application listens to in the container.
--
-- Default: @8080@
--
-- 'runtimeEnvironmentSecrets', 'codeConfigurationValues_runtimeEnvironmentSecrets' - An array of key-value pairs representing the secrets and parameters that
-- get referenced to your service as an environment variable. The supported
-- values are either the full Amazon Resource Name (ARN) of the Secrets
-- Manager secret or the full ARN of the parameter in the Amazon Web
-- Services Systems Manager Parameter Store.
--
-- -   If the Amazon Web Services Systems Manager Parameter Store parameter
--     exists in the same Amazon Web Services Region as the service that
--     you\'re launching, you can use either the full ARN or name of the
--     secret. If the parameter exists in a different Region, then the full
--     ARN must be specified.
--
-- -   Currently, cross account referencing of Amazon Web Services Systems
--     Manager Parameter Store parameter is not supported.
--
-- 'runtimeEnvironmentVariables', 'codeConfigurationValues_runtimeEnvironmentVariables' - The environment variables that are available to your running App Runner
-- service. An array of key-value pairs.
--
-- 'startCommand', 'codeConfigurationValues_startCommand' - The command App Runner runs to start your application.
--
-- 'runtime', 'codeConfigurationValues_runtime' - A runtime environment type for building and running an App Runner
-- service. It represents a programming language runtime.
newCodeConfigurationValues ::
  -- | 'runtime'
  Runtime ->
  CodeConfigurationValues
newCodeConfigurationValues :: Runtime -> CodeConfigurationValues
newCodeConfigurationValues Runtime
pRuntime_ =
  CodeConfigurationValues'
    { $sel:buildCommand:CodeConfigurationValues' :: Maybe (Sensitive Text)
buildCommand =
        forall a. Maybe a
Prelude.Nothing,
      $sel:port:CodeConfigurationValues' :: Maybe Text
port = forall a. Maybe a
Prelude.Nothing,
      $sel:runtimeEnvironmentSecrets:CodeConfigurationValues' :: Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentSecrets = forall a. Maybe a
Prelude.Nothing,
      $sel:runtimeEnvironmentVariables:CodeConfigurationValues' :: Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentVariables = forall a. Maybe a
Prelude.Nothing,
      $sel:startCommand:CodeConfigurationValues' :: Maybe (Sensitive Text)
startCommand = forall a. Maybe a
Prelude.Nothing,
      $sel:runtime:CodeConfigurationValues' :: Runtime
runtime = Runtime
pRuntime_
    }

-- | The command App Runner runs to build your application.
codeConfigurationValues_buildCommand :: Lens.Lens' CodeConfigurationValues (Prelude.Maybe Prelude.Text)
codeConfigurationValues_buildCommand :: Lens' CodeConfigurationValues (Maybe Text)
codeConfigurationValues_buildCommand = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeConfigurationValues' {Maybe (Sensitive Text)
buildCommand :: Maybe (Sensitive Text)
$sel:buildCommand:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (Sensitive Text)
buildCommand} -> Maybe (Sensitive Text)
buildCommand) (\s :: CodeConfigurationValues
s@CodeConfigurationValues' {} Maybe (Sensitive Text)
a -> CodeConfigurationValues
s {$sel:buildCommand:CodeConfigurationValues' :: Maybe (Sensitive Text)
buildCommand = Maybe (Sensitive Text)
a} :: CodeConfigurationValues) 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 a. Iso' (Sensitive a) a
Data._Sensitive

-- | The port that your application listens to in the container.
--
-- Default: @8080@
codeConfigurationValues_port :: Lens.Lens' CodeConfigurationValues (Prelude.Maybe Prelude.Text)
codeConfigurationValues_port :: Lens' CodeConfigurationValues (Maybe Text)
codeConfigurationValues_port = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeConfigurationValues' {Maybe Text
port :: Maybe Text
$sel:port:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe Text
port} -> Maybe Text
port) (\s :: CodeConfigurationValues
s@CodeConfigurationValues' {} Maybe Text
a -> CodeConfigurationValues
s {$sel:port:CodeConfigurationValues' :: Maybe Text
port = Maybe Text
a} :: CodeConfigurationValues)

-- | An array of key-value pairs representing the secrets and parameters that
-- get referenced to your service as an environment variable. The supported
-- values are either the full Amazon Resource Name (ARN) of the Secrets
-- Manager secret or the full ARN of the parameter in the Amazon Web
-- Services Systems Manager Parameter Store.
--
-- -   If the Amazon Web Services Systems Manager Parameter Store parameter
--     exists in the same Amazon Web Services Region as the service that
--     you\'re launching, you can use either the full ARN or name of the
--     secret. If the parameter exists in a different Region, then the full
--     ARN must be specified.
--
-- -   Currently, cross account referencing of Amazon Web Services Systems
--     Manager Parameter Store parameter is not supported.
codeConfigurationValues_runtimeEnvironmentSecrets :: Lens.Lens' CodeConfigurationValues (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
codeConfigurationValues_runtimeEnvironmentSecrets :: Lens' CodeConfigurationValues (Maybe (HashMap Text Text))
codeConfigurationValues_runtimeEnvironmentSecrets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeConfigurationValues' {Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentSecrets :: Maybe (HashMap Text (Sensitive Text))
$sel:runtimeEnvironmentSecrets:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentSecrets} -> Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentSecrets) (\s :: CodeConfigurationValues
s@CodeConfigurationValues' {} Maybe (HashMap Text (Sensitive Text))
a -> CodeConfigurationValues
s {$sel:runtimeEnvironmentSecrets:CodeConfigurationValues' :: Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentSecrets = Maybe (HashMap Text (Sensitive Text))
a} :: CodeConfigurationValues) 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

-- | The environment variables that are available to your running App Runner
-- service. An array of key-value pairs.
codeConfigurationValues_runtimeEnvironmentVariables :: Lens.Lens' CodeConfigurationValues (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
codeConfigurationValues_runtimeEnvironmentVariables :: Lens' CodeConfigurationValues (Maybe (HashMap Text Text))
codeConfigurationValues_runtimeEnvironmentVariables = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeConfigurationValues' {Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentVariables :: Maybe (HashMap Text (Sensitive Text))
$sel:runtimeEnvironmentVariables:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentVariables} -> Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentVariables) (\s :: CodeConfigurationValues
s@CodeConfigurationValues' {} Maybe (HashMap Text (Sensitive Text))
a -> CodeConfigurationValues
s {$sel:runtimeEnvironmentVariables:CodeConfigurationValues' :: Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentVariables = Maybe (HashMap Text (Sensitive Text))
a} :: CodeConfigurationValues) 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

-- | The command App Runner runs to start your application.
codeConfigurationValues_startCommand :: Lens.Lens' CodeConfigurationValues (Prelude.Maybe Prelude.Text)
codeConfigurationValues_startCommand :: Lens' CodeConfigurationValues (Maybe Text)
codeConfigurationValues_startCommand = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeConfigurationValues' {Maybe (Sensitive Text)
startCommand :: Maybe (Sensitive Text)
$sel:startCommand:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (Sensitive Text)
startCommand} -> Maybe (Sensitive Text)
startCommand) (\s :: CodeConfigurationValues
s@CodeConfigurationValues' {} Maybe (Sensitive Text)
a -> CodeConfigurationValues
s {$sel:startCommand:CodeConfigurationValues' :: Maybe (Sensitive Text)
startCommand = Maybe (Sensitive Text)
a} :: CodeConfigurationValues) 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 a. Iso' (Sensitive a) a
Data._Sensitive

-- | A runtime environment type for building and running an App Runner
-- service. It represents a programming language runtime.
codeConfigurationValues_runtime :: Lens.Lens' CodeConfigurationValues Runtime
codeConfigurationValues_runtime :: Lens' CodeConfigurationValues Runtime
codeConfigurationValues_runtime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeConfigurationValues' {Runtime
runtime :: Runtime
$sel:runtime:CodeConfigurationValues' :: CodeConfigurationValues -> Runtime
runtime} -> Runtime
runtime) (\s :: CodeConfigurationValues
s@CodeConfigurationValues' {} Runtime
a -> CodeConfigurationValues
s {$sel:runtime:CodeConfigurationValues' :: Runtime
runtime = Runtime
a} :: CodeConfigurationValues)

instance Data.FromJSON CodeConfigurationValues where
  parseJSON :: Value -> Parser CodeConfigurationValues
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"CodeConfigurationValues"
      ( \Object
x ->
          Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (HashMap Text (Sensitive Text))
-> Maybe (HashMap Text (Sensitive Text))
-> Maybe (Sensitive Text)
-> Runtime
-> CodeConfigurationValues
CodeConfigurationValues'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BuildCommand")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Port")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RuntimeEnvironmentSecrets"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RuntimeEnvironmentVariables"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StartCommand")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Runtime")
      )

instance Prelude.Hashable CodeConfigurationValues where
  hashWithSalt :: Int -> CodeConfigurationValues -> Int
hashWithSalt Int
_salt CodeConfigurationValues' {Maybe Text
Maybe (HashMap Text (Sensitive Text))
Maybe (Sensitive Text)
Runtime
runtime :: Runtime
startCommand :: Maybe (Sensitive Text)
runtimeEnvironmentVariables :: Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentSecrets :: Maybe (HashMap Text (Sensitive Text))
port :: Maybe Text
buildCommand :: Maybe (Sensitive Text)
$sel:runtime:CodeConfigurationValues' :: CodeConfigurationValues -> Runtime
$sel:startCommand:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (Sensitive Text)
$sel:runtimeEnvironmentVariables:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (HashMap Text (Sensitive Text))
$sel:runtimeEnvironmentSecrets:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (HashMap Text (Sensitive Text))
$sel:port:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe Text
$sel:buildCommand:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (Sensitive Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
buildCommand
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
port
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentSecrets
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentVariables
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
startCommand
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Runtime
runtime

instance Prelude.NFData CodeConfigurationValues where
  rnf :: CodeConfigurationValues -> ()
rnf CodeConfigurationValues' {Maybe Text
Maybe (HashMap Text (Sensitive Text))
Maybe (Sensitive Text)
Runtime
runtime :: Runtime
startCommand :: Maybe (Sensitive Text)
runtimeEnvironmentVariables :: Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentSecrets :: Maybe (HashMap Text (Sensitive Text))
port :: Maybe Text
buildCommand :: Maybe (Sensitive Text)
$sel:runtime:CodeConfigurationValues' :: CodeConfigurationValues -> Runtime
$sel:startCommand:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (Sensitive Text)
$sel:runtimeEnvironmentVariables:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (HashMap Text (Sensitive Text))
$sel:runtimeEnvironmentSecrets:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (HashMap Text (Sensitive Text))
$sel:port:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe Text
$sel:buildCommand:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (Sensitive Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
buildCommand
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
port
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentSecrets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentVariables
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
startCommand
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Runtime
runtime

instance Data.ToJSON CodeConfigurationValues where
  toJSON :: CodeConfigurationValues -> Value
toJSON CodeConfigurationValues' {Maybe Text
Maybe (HashMap Text (Sensitive Text))
Maybe (Sensitive Text)
Runtime
runtime :: Runtime
startCommand :: Maybe (Sensitive Text)
runtimeEnvironmentVariables :: Maybe (HashMap Text (Sensitive Text))
runtimeEnvironmentSecrets :: Maybe (HashMap Text (Sensitive Text))
port :: Maybe Text
buildCommand :: Maybe (Sensitive Text)
$sel:runtime:CodeConfigurationValues' :: CodeConfigurationValues -> Runtime
$sel:startCommand:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (Sensitive Text)
$sel:runtimeEnvironmentVariables:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (HashMap Text (Sensitive Text))
$sel:runtimeEnvironmentSecrets:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (HashMap Text (Sensitive Text))
$sel:port:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe Text
$sel:buildCommand:CodeConfigurationValues' :: CodeConfigurationValues -> Maybe (Sensitive Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"BuildCommand" 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 (Sensitive Text)
buildCommand,
            (Key
"Port" 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
port,
            (Key
"RuntimeEnvironmentSecrets" 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 (Sensitive Text))
runtimeEnvironmentSecrets,
            (Key
"RuntimeEnvironmentVariables" 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 (Sensitive Text))
runtimeEnvironmentVariables,
            (Key
"StartCommand" 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 (Sensitive Text)
startCommand,
            forall a. a -> Maybe a
Prelude.Just (Key
"Runtime" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Runtime
runtime)
          ]
      )