{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.CodeBuild.StartBuild
-- 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)
--
-- Starts running a build.
module Amazonka.CodeBuild.StartBuild
  ( -- * Creating a Request
    StartBuild (..),
    newStartBuild,

    -- * Request Lenses
    startBuild_encryptionKeyOverride,
    startBuild_sourceLocationOverride,
    startBuild_environmentVariablesOverride,
    startBuild_buildStatusConfigOverride,
    startBuild_idempotencyToken,
    startBuild_debugSessionEnabled,
    startBuild_registryCredentialOverride,
    startBuild_timeoutInMinutesOverride,
    startBuild_serviceRoleOverride,
    startBuild_cacheOverride,
    startBuild_queuedTimeoutInMinutesOverride,
    startBuild_secondarySourcesOverride,
    startBuild_gitCloneDepthOverride,
    startBuild_imagePullCredentialsTypeOverride,
    startBuild_logsConfigOverride,
    startBuild_sourceAuthOverride,
    startBuild_gitSubmodulesConfigOverride,
    startBuild_environmentTypeOverride,
    startBuild_certificateOverride,
    startBuild_computeTypeOverride,
    startBuild_privilegedModeOverride,
    startBuild_sourceVersion,
    startBuild_buildspecOverride,
    startBuild_secondarySourcesVersionOverride,
    startBuild_reportBuildStatusOverride,
    startBuild_insecureSslOverride,
    startBuild_imageOverride,
    startBuild_secondaryArtifactsOverride,
    startBuild_artifactsOverride,
    startBuild_sourceTypeOverride,
    startBuild_projectName,

    -- * Destructuring the Response
    StartBuildResponse (..),
    newStartBuildResponse,

    -- * Response Lenses
    startBuildResponse_build,
    startBuildResponse_httpStatus,
  )
where

import Amazonka.CodeBuild.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newStartBuild' smart constructor.
data StartBuild = StartBuild'
  { -- | The Key Management Service customer master key (CMK) that overrides the
    -- one specified in the build project. The CMK key encrypts the build
    -- output artifacts.
    --
    -- You can use a cross-account KMS key to encrypt the build output
    -- artifacts if your service role has permission to that key.
    --
    -- You can specify either the Amazon Resource Name (ARN) of the CMK or, if
    -- available, the CMK\'s alias (using the format @alias\/\<alias-name>@).
    StartBuild -> Maybe Text
encryptionKeyOverride :: Prelude.Maybe Prelude.Text,
    -- | A location that overrides, for this build, the source location for the
    -- one defined in the build project.
    StartBuild -> Maybe Text
sourceLocationOverride :: Prelude.Maybe Prelude.Text,
    -- | A set of environment variables that overrides, for this build only, the
    -- latest ones already defined in the build project.
    StartBuild -> Maybe [EnvironmentVariable]
environmentVariablesOverride :: Prelude.Maybe [EnvironmentVariable],
    -- | Contains information that defines how the build project reports the
    -- build status to the source provider. This option is only used when the
    -- source provider is @GITHUB@, @GITHUB_ENTERPRISE@, or @BITBUCKET@.
    StartBuild -> Maybe BuildStatusConfig
buildStatusConfigOverride :: Prelude.Maybe BuildStatusConfig,
    -- | A unique, case sensitive identifier you provide to ensure the
    -- idempotency of the StartBuild request. The token is included in the
    -- StartBuild request and is valid for 5 minutes. If you repeat the
    -- StartBuild request with the same token, but change a parameter,
    -- CodeBuild returns a parameter mismatch error.
    StartBuild -> Maybe Text
idempotencyToken :: Prelude.Maybe Prelude.Text,
    -- | Specifies if session debugging is enabled for this build. For more
    -- information, see
    -- <https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html Viewing a running build in Session Manager>.
    StartBuild -> Maybe Bool
debugSessionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The credentials for access to a private registry.
    StartBuild -> Maybe RegistryCredential
registryCredentialOverride :: Prelude.Maybe RegistryCredential,
    -- | The number of build timeout minutes, from 5 to 480 (8 hours), that
    -- overrides, for this build only, the latest setting already defined in
    -- the build project.
    StartBuild -> Maybe Natural
timeoutInMinutesOverride :: Prelude.Maybe Prelude.Natural,
    -- | The name of a service role for this build that overrides the one
    -- specified in the build project.
    StartBuild -> Maybe Text
serviceRoleOverride :: Prelude.Maybe Prelude.Text,
    -- | A ProjectCache object specified for this build that overrides the one
    -- defined in the build project.
    StartBuild -> Maybe ProjectCache
cacheOverride :: Prelude.Maybe ProjectCache,
    -- | The number of minutes a build is allowed to be queued before it times
    -- out.
    StartBuild -> Maybe Natural
queuedTimeoutInMinutesOverride :: Prelude.Maybe Prelude.Natural,
    -- | An array of @ProjectSource@ objects.
    StartBuild -> Maybe [ProjectSource]
secondarySourcesOverride :: Prelude.Maybe [ProjectSource],
    -- | The user-defined depth of history, with a minimum value of 0, that
    -- overrides, for this build only, any previous depth of history defined in
    -- the build project.
    StartBuild -> Maybe Natural
gitCloneDepthOverride :: Prelude.Maybe Prelude.Natural,
    -- | The type of credentials CodeBuild uses to pull images in your build.
    -- There are two valid values:
    --
    -- [CODEBUILD]
    --     Specifies that CodeBuild uses its own credentials. This requires
    --     that you modify your ECR repository policy to trust CodeBuild\'s
    --     service principal.
    --
    -- [SERVICE_ROLE]
    --     Specifies that CodeBuild uses your build project\'s service role.
    --
    -- When using a cross-account or private registry image, you must use
    -- @SERVICE_ROLE@ credentials. When using an CodeBuild curated image, you
    -- must use @CODEBUILD@ credentials.
    StartBuild -> Maybe ImagePullCredentialsType
imagePullCredentialsTypeOverride :: Prelude.Maybe ImagePullCredentialsType,
    -- | Log settings for this build that override the log settings defined in
    -- the build project.
    StartBuild -> Maybe LogsConfig
logsConfigOverride :: Prelude.Maybe LogsConfig,
    -- | An authorization type for this build that overrides the one defined in
    -- the build project. This override applies only if the build project\'s
    -- source is BitBucket or GitHub.
    StartBuild -> Maybe SourceAuth
sourceAuthOverride :: Prelude.Maybe SourceAuth,
    -- | Information about the Git submodules configuration for this build of an
    -- CodeBuild build project.
    StartBuild -> Maybe GitSubmodulesConfig
gitSubmodulesConfigOverride :: Prelude.Maybe GitSubmodulesConfig,
    -- | A container type for this build that overrides the one specified in the
    -- build project.
    StartBuild -> Maybe EnvironmentType
environmentTypeOverride :: Prelude.Maybe EnvironmentType,
    -- | The name of a certificate for this build that overrides the one
    -- specified in the build project.
    StartBuild -> Maybe Text
certificateOverride :: Prelude.Maybe Prelude.Text,
    -- | The name of a compute type for this build that overrides the one
    -- specified in the build project.
    StartBuild -> Maybe ComputeType
computeTypeOverride :: Prelude.Maybe ComputeType,
    -- | Enable this flag to override privileged mode in the build project.
    StartBuild -> Maybe Bool
privilegedModeOverride :: Prelude.Maybe Prelude.Bool,
    -- | The version of the build input to be built, for this build only. If not
    -- specified, the latest version is used. If specified, the contents
    -- depends on the source provider:
    --
    -- [CodeCommit]
    --     The commit ID, branch, or Git tag to use.
    --
    -- [GitHub]
    --     The commit ID, pull request ID, branch name, or tag name that
    --     corresponds to the version of the source code you want to build. If
    --     a pull request ID is specified, it must use the format
    --     @pr\/pull-request-ID@ (for example @pr\/25@). If a branch name is
    --     specified, the branch\'s HEAD commit ID is used. If not specified,
    --     the default branch\'s HEAD commit ID is used.
    --
    -- [Bitbucket]
    --     The commit ID, branch name, or tag name that corresponds to the
    --     version of the source code you want to build. If a branch name is
    --     specified, the branch\'s HEAD commit ID is used. If not specified,
    --     the default branch\'s HEAD commit ID is used.
    --
    -- [Amazon S3]
    --     The version ID of the object that represents the build input ZIP
    --     file to use.
    --
    -- If @sourceVersion@ is specified at the project level, then this
    -- @sourceVersion@ (at the build level) takes precedence.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html Source Version Sample with CodeBuild>
    -- in the /CodeBuild User Guide/.
    StartBuild -> Maybe Text
sourceVersion :: Prelude.Maybe Prelude.Text,
    -- | A buildspec file declaration that overrides, for this build only, the
    -- latest one already defined in the build project.
    --
    -- If this value is set, it can be either an inline buildspec definition,
    -- the path to an alternate buildspec file relative to the value of the
    -- built-in @CODEBUILD_SRC_DIR@ environment variable, or the path to an S3
    -- bucket. The bucket must be in the same Amazon Web Services Region as the
    -- build project. Specify the buildspec file using its ARN (for example,
    -- @arn:aws:s3:::my-codebuild-sample2\/buildspec.yml@). If this value is
    -- not provided or is set to an empty string, the source code must contain
    -- a buildspec file in its root directory. For more information, see
    -- <https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage Buildspec File Name and Storage Location>.
    StartBuild -> Maybe Text
buildspecOverride :: Prelude.Maybe Prelude.Text,
    -- | An array of @ProjectSourceVersion@ objects that specify one or more
    -- versions of the project\'s secondary sources to be used for this build
    -- only.
    StartBuild -> Maybe [ProjectSourceVersion]
secondarySourcesVersionOverride :: Prelude.Maybe [ProjectSourceVersion],
    -- | Set to true to report to your source provider the status of a build\'s
    -- start and completion. If you use this option with a source provider
    -- other than GitHub, GitHub Enterprise, or Bitbucket, an
    -- @invalidInputException@ is thrown.
    --
    -- To be able to report the build status to the source provider, the user
    -- associated with the source provider must have write access to the repo.
    -- If the user does not have write access, the build status cannot be
    -- updated. For more information, see
    -- <https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html Source provider access>
    -- in the /CodeBuild User Guide/.
    --
    -- The status of a build triggered by a webhook is always reported to your
    -- source provider.
    StartBuild -> Maybe Bool
reportBuildStatusOverride :: Prelude.Maybe Prelude.Bool,
    -- | Enable this flag to override the insecure SSL setting that is specified
    -- in the build project. The insecure SSL setting determines whether to
    -- ignore SSL warnings while connecting to the project source code. This
    -- override applies only if the build\'s source is GitHub Enterprise.
    StartBuild -> Maybe Bool
insecureSslOverride :: Prelude.Maybe Prelude.Bool,
    -- | The name of an image for this build that overrides the one specified in
    -- the build project.
    StartBuild -> Maybe Text
imageOverride :: Prelude.Maybe Prelude.Text,
    -- | An array of @ProjectArtifacts@ objects.
    StartBuild -> Maybe [ProjectArtifacts]
secondaryArtifactsOverride :: Prelude.Maybe [ProjectArtifacts],
    -- | Build output artifact settings that override, for this build only, the
    -- latest ones already defined in the build project.
    StartBuild -> Maybe ProjectArtifacts
artifactsOverride :: Prelude.Maybe ProjectArtifacts,
    -- | A source input type, for this build, that overrides the source input
    -- defined in the build project.
    StartBuild -> Maybe SourceType
sourceTypeOverride :: Prelude.Maybe SourceType,
    -- | The name of the CodeBuild build project to start running a build.
    StartBuild -> Text
projectName :: Prelude.Text
  }
  deriving (StartBuild -> StartBuild -> Bool
(StartBuild -> StartBuild -> Bool)
-> (StartBuild -> StartBuild -> Bool) -> Eq StartBuild
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartBuild -> StartBuild -> Bool
$c/= :: StartBuild -> StartBuild -> Bool
== :: StartBuild -> StartBuild -> Bool
$c== :: StartBuild -> StartBuild -> Bool
Prelude.Eq, ReadPrec [StartBuild]
ReadPrec StartBuild
Int -> ReadS StartBuild
ReadS [StartBuild]
(Int -> ReadS StartBuild)
-> ReadS [StartBuild]
-> ReadPrec StartBuild
-> ReadPrec [StartBuild]
-> Read StartBuild
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartBuild]
$creadListPrec :: ReadPrec [StartBuild]
readPrec :: ReadPrec StartBuild
$creadPrec :: ReadPrec StartBuild
readList :: ReadS [StartBuild]
$creadList :: ReadS [StartBuild]
readsPrec :: Int -> ReadS StartBuild
$creadsPrec :: Int -> ReadS StartBuild
Prelude.Read, Int -> StartBuild -> ShowS
[StartBuild] -> ShowS
StartBuild -> String
(Int -> StartBuild -> ShowS)
-> (StartBuild -> String)
-> ([StartBuild] -> ShowS)
-> Show StartBuild
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartBuild] -> ShowS
$cshowList :: [StartBuild] -> ShowS
show :: StartBuild -> String
$cshow :: StartBuild -> String
showsPrec :: Int -> StartBuild -> ShowS
$cshowsPrec :: Int -> StartBuild -> ShowS
Prelude.Show, (forall x. StartBuild -> Rep StartBuild x)
-> (forall x. Rep StartBuild x -> StartBuild) -> Generic StartBuild
forall x. Rep StartBuild x -> StartBuild
forall x. StartBuild -> Rep StartBuild x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartBuild x -> StartBuild
$cfrom :: forall x. StartBuild -> Rep StartBuild x
Prelude.Generic)

-- |
-- Create a value of 'StartBuild' 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:
--
-- 'encryptionKeyOverride', 'startBuild_encryptionKeyOverride' - The Key Management Service customer master key (CMK) that overrides the
-- one specified in the build project. The CMK key encrypts the build
-- output artifacts.
--
-- You can use a cross-account KMS key to encrypt the build output
-- artifacts if your service role has permission to that key.
--
-- You can specify either the Amazon Resource Name (ARN) of the CMK or, if
-- available, the CMK\'s alias (using the format @alias\/\<alias-name>@).
--
-- 'sourceLocationOverride', 'startBuild_sourceLocationOverride' - A location that overrides, for this build, the source location for the
-- one defined in the build project.
--
-- 'environmentVariablesOverride', 'startBuild_environmentVariablesOverride' - A set of environment variables that overrides, for this build only, the
-- latest ones already defined in the build project.
--
-- 'buildStatusConfigOverride', 'startBuild_buildStatusConfigOverride' - Contains information that defines how the build project reports the
-- build status to the source provider. This option is only used when the
-- source provider is @GITHUB@, @GITHUB_ENTERPRISE@, or @BITBUCKET@.
--
-- 'idempotencyToken', 'startBuild_idempotencyToken' - A unique, case sensitive identifier you provide to ensure the
-- idempotency of the StartBuild request. The token is included in the
-- StartBuild request and is valid for 5 minutes. If you repeat the
-- StartBuild request with the same token, but change a parameter,
-- CodeBuild returns a parameter mismatch error.
--
-- 'debugSessionEnabled', 'startBuild_debugSessionEnabled' - Specifies if session debugging is enabled for this build. For more
-- information, see
-- <https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html Viewing a running build in Session Manager>.
--
-- 'registryCredentialOverride', 'startBuild_registryCredentialOverride' - The credentials for access to a private registry.
--
-- 'timeoutInMinutesOverride', 'startBuild_timeoutInMinutesOverride' - The number of build timeout minutes, from 5 to 480 (8 hours), that
-- overrides, for this build only, the latest setting already defined in
-- the build project.
--
-- 'serviceRoleOverride', 'startBuild_serviceRoleOverride' - The name of a service role for this build that overrides the one
-- specified in the build project.
--
-- 'cacheOverride', 'startBuild_cacheOverride' - A ProjectCache object specified for this build that overrides the one
-- defined in the build project.
--
-- 'queuedTimeoutInMinutesOverride', 'startBuild_queuedTimeoutInMinutesOverride' - The number of minutes a build is allowed to be queued before it times
-- out.
--
-- 'secondarySourcesOverride', 'startBuild_secondarySourcesOverride' - An array of @ProjectSource@ objects.
--
-- 'gitCloneDepthOverride', 'startBuild_gitCloneDepthOverride' - The user-defined depth of history, with a minimum value of 0, that
-- overrides, for this build only, any previous depth of history defined in
-- the build project.
--
-- 'imagePullCredentialsTypeOverride', 'startBuild_imagePullCredentialsTypeOverride' - The type of credentials CodeBuild uses to pull images in your build.
-- There are two valid values:
--
-- [CODEBUILD]
--     Specifies that CodeBuild uses its own credentials. This requires
--     that you modify your ECR repository policy to trust CodeBuild\'s
--     service principal.
--
-- [SERVICE_ROLE]
--     Specifies that CodeBuild uses your build project\'s service role.
--
-- When using a cross-account or private registry image, you must use
-- @SERVICE_ROLE@ credentials. When using an CodeBuild curated image, you
-- must use @CODEBUILD@ credentials.
--
-- 'logsConfigOverride', 'startBuild_logsConfigOverride' - Log settings for this build that override the log settings defined in
-- the build project.
--
-- 'sourceAuthOverride', 'startBuild_sourceAuthOverride' - An authorization type for this build that overrides the one defined in
-- the build project. This override applies only if the build project\'s
-- source is BitBucket or GitHub.
--
-- 'gitSubmodulesConfigOverride', 'startBuild_gitSubmodulesConfigOverride' - Information about the Git submodules configuration for this build of an
-- CodeBuild build project.
--
-- 'environmentTypeOverride', 'startBuild_environmentTypeOverride' - A container type for this build that overrides the one specified in the
-- build project.
--
-- 'certificateOverride', 'startBuild_certificateOverride' - The name of a certificate for this build that overrides the one
-- specified in the build project.
--
-- 'computeTypeOverride', 'startBuild_computeTypeOverride' - The name of a compute type for this build that overrides the one
-- specified in the build project.
--
-- 'privilegedModeOverride', 'startBuild_privilegedModeOverride' - Enable this flag to override privileged mode in the build project.
--
-- 'sourceVersion', 'startBuild_sourceVersion' - The version of the build input to be built, for this build only. If not
-- specified, the latest version is used. If specified, the contents
-- depends on the source provider:
--
-- [CodeCommit]
--     The commit ID, branch, or Git tag to use.
--
-- [GitHub]
--     The commit ID, pull request ID, branch name, or tag name that
--     corresponds to the version of the source code you want to build. If
--     a pull request ID is specified, it must use the format
--     @pr\/pull-request-ID@ (for example @pr\/25@). If a branch name is
--     specified, the branch\'s HEAD commit ID is used. If not specified,
--     the default branch\'s HEAD commit ID is used.
--
-- [Bitbucket]
--     The commit ID, branch name, or tag name that corresponds to the
--     version of the source code you want to build. If a branch name is
--     specified, the branch\'s HEAD commit ID is used. If not specified,
--     the default branch\'s HEAD commit ID is used.
--
-- [Amazon S3]
--     The version ID of the object that represents the build input ZIP
--     file to use.
--
-- If @sourceVersion@ is specified at the project level, then this
-- @sourceVersion@ (at the build level) takes precedence.
--
-- For more information, see
-- <https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html Source Version Sample with CodeBuild>
-- in the /CodeBuild User Guide/.
--
-- 'buildspecOverride', 'startBuild_buildspecOverride' - A buildspec file declaration that overrides, for this build only, the
-- latest one already defined in the build project.
--
-- If this value is set, it can be either an inline buildspec definition,
-- the path to an alternate buildspec file relative to the value of the
-- built-in @CODEBUILD_SRC_DIR@ environment variable, or the path to an S3
-- bucket. The bucket must be in the same Amazon Web Services Region as the
-- build project. Specify the buildspec file using its ARN (for example,
-- @arn:aws:s3:::my-codebuild-sample2\/buildspec.yml@). If this value is
-- not provided or is set to an empty string, the source code must contain
-- a buildspec file in its root directory. For more information, see
-- <https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage Buildspec File Name and Storage Location>.
--
-- 'secondarySourcesVersionOverride', 'startBuild_secondarySourcesVersionOverride' - An array of @ProjectSourceVersion@ objects that specify one or more
-- versions of the project\'s secondary sources to be used for this build
-- only.
--
-- 'reportBuildStatusOverride', 'startBuild_reportBuildStatusOverride' - Set to true to report to your source provider the status of a build\'s
-- start and completion. If you use this option with a source provider
-- other than GitHub, GitHub Enterprise, or Bitbucket, an
-- @invalidInputException@ is thrown.
--
-- To be able to report the build status to the source provider, the user
-- associated with the source provider must have write access to the repo.
-- If the user does not have write access, the build status cannot be
-- updated. For more information, see
-- <https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html Source provider access>
-- in the /CodeBuild User Guide/.
--
-- The status of a build triggered by a webhook is always reported to your
-- source provider.
--
-- 'insecureSslOverride', 'startBuild_insecureSslOverride' - Enable this flag to override the insecure SSL setting that is specified
-- in the build project. The insecure SSL setting determines whether to
-- ignore SSL warnings while connecting to the project source code. This
-- override applies only if the build\'s source is GitHub Enterprise.
--
-- 'imageOverride', 'startBuild_imageOverride' - The name of an image for this build that overrides the one specified in
-- the build project.
--
-- 'secondaryArtifactsOverride', 'startBuild_secondaryArtifactsOverride' - An array of @ProjectArtifacts@ objects.
--
-- 'artifactsOverride', 'startBuild_artifactsOverride' - Build output artifact settings that override, for this build only, the
-- latest ones already defined in the build project.
--
-- 'sourceTypeOverride', 'startBuild_sourceTypeOverride' - A source input type, for this build, that overrides the source input
-- defined in the build project.
--
-- 'projectName', 'startBuild_projectName' - The name of the CodeBuild build project to start running a build.
newStartBuild ::
  -- | 'projectName'
  Prelude.Text ->
  StartBuild
newStartBuild :: Text -> StartBuild
newStartBuild Text
pProjectName_ =
  StartBuild' :: Maybe Text
-> Maybe Text
-> Maybe [EnvironmentVariable]
-> Maybe BuildStatusConfig
-> Maybe Text
-> Maybe Bool
-> Maybe RegistryCredential
-> Maybe Natural
-> Maybe Text
-> Maybe ProjectCache
-> Maybe Natural
-> Maybe [ProjectSource]
-> Maybe Natural
-> Maybe ImagePullCredentialsType
-> Maybe LogsConfig
-> Maybe SourceAuth
-> Maybe GitSubmodulesConfig
-> Maybe EnvironmentType
-> Maybe Text
-> Maybe ComputeType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [ProjectSourceVersion]
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [ProjectArtifacts]
-> Maybe ProjectArtifacts
-> Maybe SourceType
-> Text
-> StartBuild
StartBuild'
    { $sel:encryptionKeyOverride:StartBuild' :: Maybe Text
encryptionKeyOverride =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceLocationOverride:StartBuild' :: Maybe Text
sourceLocationOverride = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:environmentVariablesOverride:StartBuild' :: Maybe [EnvironmentVariable]
environmentVariablesOverride = Maybe [EnvironmentVariable]
forall a. Maybe a
Prelude.Nothing,
      $sel:buildStatusConfigOverride:StartBuild' :: Maybe BuildStatusConfig
buildStatusConfigOverride = Maybe BuildStatusConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:idempotencyToken:StartBuild' :: Maybe Text
idempotencyToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:debugSessionEnabled:StartBuild' :: Maybe Bool
debugSessionEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:registryCredentialOverride:StartBuild' :: Maybe RegistryCredential
registryCredentialOverride = Maybe RegistryCredential
forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutInMinutesOverride:StartBuild' :: Maybe Natural
timeoutInMinutesOverride = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRoleOverride:StartBuild' :: Maybe Text
serviceRoleOverride = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheOverride:StartBuild' :: Maybe ProjectCache
cacheOverride = Maybe ProjectCache
forall a. Maybe a
Prelude.Nothing,
      $sel:queuedTimeoutInMinutesOverride:StartBuild' :: Maybe Natural
queuedTimeoutInMinutesOverride = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:secondarySourcesOverride:StartBuild' :: Maybe [ProjectSource]
secondarySourcesOverride = Maybe [ProjectSource]
forall a. Maybe a
Prelude.Nothing,
      $sel:gitCloneDepthOverride:StartBuild' :: Maybe Natural
gitCloneDepthOverride = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:imagePullCredentialsTypeOverride:StartBuild' :: Maybe ImagePullCredentialsType
imagePullCredentialsTypeOverride = Maybe ImagePullCredentialsType
forall a. Maybe a
Prelude.Nothing,
      $sel:logsConfigOverride:StartBuild' :: Maybe LogsConfig
logsConfigOverride = Maybe LogsConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceAuthOverride:StartBuild' :: Maybe SourceAuth
sourceAuthOverride = Maybe SourceAuth
forall a. Maybe a
Prelude.Nothing,
      $sel:gitSubmodulesConfigOverride:StartBuild' :: Maybe GitSubmodulesConfig
gitSubmodulesConfigOverride = Maybe GitSubmodulesConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:environmentTypeOverride:StartBuild' :: Maybe EnvironmentType
environmentTypeOverride = Maybe EnvironmentType
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateOverride:StartBuild' :: Maybe Text
certificateOverride = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:computeTypeOverride:StartBuild' :: Maybe ComputeType
computeTypeOverride = Maybe ComputeType
forall a. Maybe a
Prelude.Nothing,
      $sel:privilegedModeOverride:StartBuild' :: Maybe Bool
privilegedModeOverride = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceVersion:StartBuild' :: Maybe Text
sourceVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:buildspecOverride:StartBuild' :: Maybe Text
buildspecOverride = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:secondarySourcesVersionOverride:StartBuild' :: Maybe [ProjectSourceVersion]
secondarySourcesVersionOverride = Maybe [ProjectSourceVersion]
forall a. Maybe a
Prelude.Nothing,
      $sel:reportBuildStatusOverride:StartBuild' :: Maybe Bool
reportBuildStatusOverride = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:insecureSslOverride:StartBuild' :: Maybe Bool
insecureSslOverride = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:imageOverride:StartBuild' :: Maybe Text
imageOverride = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:secondaryArtifactsOverride:StartBuild' :: Maybe [ProjectArtifacts]
secondaryArtifactsOverride = Maybe [ProjectArtifacts]
forall a. Maybe a
Prelude.Nothing,
      $sel:artifactsOverride:StartBuild' :: Maybe ProjectArtifacts
artifactsOverride = Maybe ProjectArtifacts
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceTypeOverride:StartBuild' :: Maybe SourceType
sourceTypeOverride = Maybe SourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:projectName:StartBuild' :: Text
projectName = Text
pProjectName_
    }

-- | The Key Management Service customer master key (CMK) that overrides the
-- one specified in the build project. The CMK key encrypts the build
-- output artifacts.
--
-- You can use a cross-account KMS key to encrypt the build output
-- artifacts if your service role has permission to that key.
--
-- You can specify either the Amazon Resource Name (ARN) of the CMK or, if
-- available, the CMK\'s alias (using the format @alias\/\<alias-name>@).
startBuild_encryptionKeyOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Text)
startBuild_encryptionKeyOverride :: (Maybe Text -> f (Maybe Text)) -> StartBuild -> f StartBuild
startBuild_encryptionKeyOverride = (StartBuild -> Maybe Text)
-> (StartBuild -> Maybe Text -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Text
encryptionKeyOverride :: Maybe Text
$sel:encryptionKeyOverride:StartBuild' :: StartBuild -> Maybe Text
encryptionKeyOverride} -> Maybe Text
encryptionKeyOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Text
a -> StartBuild
s {$sel:encryptionKeyOverride:StartBuild' :: Maybe Text
encryptionKeyOverride = Maybe Text
a} :: StartBuild)

-- | A location that overrides, for this build, the source location for the
-- one defined in the build project.
startBuild_sourceLocationOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Text)
startBuild_sourceLocationOverride :: (Maybe Text -> f (Maybe Text)) -> StartBuild -> f StartBuild
startBuild_sourceLocationOverride = (StartBuild -> Maybe Text)
-> (StartBuild -> Maybe Text -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Text
sourceLocationOverride :: Maybe Text
$sel:sourceLocationOverride:StartBuild' :: StartBuild -> Maybe Text
sourceLocationOverride} -> Maybe Text
sourceLocationOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Text
a -> StartBuild
s {$sel:sourceLocationOverride:StartBuild' :: Maybe Text
sourceLocationOverride = Maybe Text
a} :: StartBuild)

-- | A set of environment variables that overrides, for this build only, the
-- latest ones already defined in the build project.
startBuild_environmentVariablesOverride :: Lens.Lens' StartBuild (Prelude.Maybe [EnvironmentVariable])
startBuild_environmentVariablesOverride :: (Maybe [EnvironmentVariable] -> f (Maybe [EnvironmentVariable]))
-> StartBuild -> f StartBuild
startBuild_environmentVariablesOverride = (StartBuild -> Maybe [EnvironmentVariable])
-> (StartBuild -> Maybe [EnvironmentVariable] -> StartBuild)
-> Lens
     StartBuild
     StartBuild
     (Maybe [EnvironmentVariable])
     (Maybe [EnvironmentVariable])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe [EnvironmentVariable]
environmentVariablesOverride :: Maybe [EnvironmentVariable]
$sel:environmentVariablesOverride:StartBuild' :: StartBuild -> Maybe [EnvironmentVariable]
environmentVariablesOverride} -> Maybe [EnvironmentVariable]
environmentVariablesOverride) (\s :: StartBuild
s@StartBuild' {} Maybe [EnvironmentVariable]
a -> StartBuild
s {$sel:environmentVariablesOverride:StartBuild' :: Maybe [EnvironmentVariable]
environmentVariablesOverride = Maybe [EnvironmentVariable]
a} :: StartBuild) ((Maybe [EnvironmentVariable] -> f (Maybe [EnvironmentVariable]))
 -> StartBuild -> f StartBuild)
-> ((Maybe [EnvironmentVariable]
     -> f (Maybe [EnvironmentVariable]))
    -> Maybe [EnvironmentVariable] -> f (Maybe [EnvironmentVariable]))
-> (Maybe [EnvironmentVariable] -> f (Maybe [EnvironmentVariable]))
-> StartBuild
-> f StartBuild
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EnvironmentVariable]
  [EnvironmentVariable]
  [EnvironmentVariable]
  [EnvironmentVariable]
-> Iso
     (Maybe [EnvironmentVariable])
     (Maybe [EnvironmentVariable])
     (Maybe [EnvironmentVariable])
     (Maybe [EnvironmentVariable])
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
  [EnvironmentVariable]
  [EnvironmentVariable]
  [EnvironmentVariable]
  [EnvironmentVariable]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Contains information that defines how the build project reports the
-- build status to the source provider. This option is only used when the
-- source provider is @GITHUB@, @GITHUB_ENTERPRISE@, or @BITBUCKET@.
startBuild_buildStatusConfigOverride :: Lens.Lens' StartBuild (Prelude.Maybe BuildStatusConfig)
startBuild_buildStatusConfigOverride :: (Maybe BuildStatusConfig -> f (Maybe BuildStatusConfig))
-> StartBuild -> f StartBuild
startBuild_buildStatusConfigOverride = (StartBuild -> Maybe BuildStatusConfig)
-> (StartBuild -> Maybe BuildStatusConfig -> StartBuild)
-> Lens
     StartBuild
     StartBuild
     (Maybe BuildStatusConfig)
     (Maybe BuildStatusConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe BuildStatusConfig
buildStatusConfigOverride :: Maybe BuildStatusConfig
$sel:buildStatusConfigOverride:StartBuild' :: StartBuild -> Maybe BuildStatusConfig
buildStatusConfigOverride} -> Maybe BuildStatusConfig
buildStatusConfigOverride) (\s :: StartBuild
s@StartBuild' {} Maybe BuildStatusConfig
a -> StartBuild
s {$sel:buildStatusConfigOverride:StartBuild' :: Maybe BuildStatusConfig
buildStatusConfigOverride = Maybe BuildStatusConfig
a} :: StartBuild)

-- | A unique, case sensitive identifier you provide to ensure the
-- idempotency of the StartBuild request. The token is included in the
-- StartBuild request and is valid for 5 minutes. If you repeat the
-- StartBuild request with the same token, but change a parameter,
-- CodeBuild returns a parameter mismatch error.
startBuild_idempotencyToken :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Text)
startBuild_idempotencyToken :: (Maybe Text -> f (Maybe Text)) -> StartBuild -> f StartBuild
startBuild_idempotencyToken = (StartBuild -> Maybe Text)
-> (StartBuild -> Maybe Text -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Text
idempotencyToken :: Maybe Text
$sel:idempotencyToken:StartBuild' :: StartBuild -> Maybe Text
idempotencyToken} -> Maybe Text
idempotencyToken) (\s :: StartBuild
s@StartBuild' {} Maybe Text
a -> StartBuild
s {$sel:idempotencyToken:StartBuild' :: Maybe Text
idempotencyToken = Maybe Text
a} :: StartBuild)

-- | Specifies if session debugging is enabled for this build. For more
-- information, see
-- <https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html Viewing a running build in Session Manager>.
startBuild_debugSessionEnabled :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Bool)
startBuild_debugSessionEnabled :: (Maybe Bool -> f (Maybe Bool)) -> StartBuild -> f StartBuild
startBuild_debugSessionEnabled = (StartBuild -> Maybe Bool)
-> (StartBuild -> Maybe Bool -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Bool
debugSessionEnabled :: Maybe Bool
$sel:debugSessionEnabled:StartBuild' :: StartBuild -> Maybe Bool
debugSessionEnabled} -> Maybe Bool
debugSessionEnabled) (\s :: StartBuild
s@StartBuild' {} Maybe Bool
a -> StartBuild
s {$sel:debugSessionEnabled:StartBuild' :: Maybe Bool
debugSessionEnabled = Maybe Bool
a} :: StartBuild)

-- | The credentials for access to a private registry.
startBuild_registryCredentialOverride :: Lens.Lens' StartBuild (Prelude.Maybe RegistryCredential)
startBuild_registryCredentialOverride :: (Maybe RegistryCredential -> f (Maybe RegistryCredential))
-> StartBuild -> f StartBuild
startBuild_registryCredentialOverride = (StartBuild -> Maybe RegistryCredential)
-> (StartBuild -> Maybe RegistryCredential -> StartBuild)
-> Lens
     StartBuild
     StartBuild
     (Maybe RegistryCredential)
     (Maybe RegistryCredential)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe RegistryCredential
registryCredentialOverride :: Maybe RegistryCredential
$sel:registryCredentialOverride:StartBuild' :: StartBuild -> Maybe RegistryCredential
registryCredentialOverride} -> Maybe RegistryCredential
registryCredentialOverride) (\s :: StartBuild
s@StartBuild' {} Maybe RegistryCredential
a -> StartBuild
s {$sel:registryCredentialOverride:StartBuild' :: Maybe RegistryCredential
registryCredentialOverride = Maybe RegistryCredential
a} :: StartBuild)

-- | The number of build timeout minutes, from 5 to 480 (8 hours), that
-- overrides, for this build only, the latest setting already defined in
-- the build project.
startBuild_timeoutInMinutesOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Natural)
startBuild_timeoutInMinutesOverride :: (Maybe Natural -> f (Maybe Natural)) -> StartBuild -> f StartBuild
startBuild_timeoutInMinutesOverride = (StartBuild -> Maybe Natural)
-> (StartBuild -> Maybe Natural -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Natural
timeoutInMinutesOverride :: Maybe Natural
$sel:timeoutInMinutesOverride:StartBuild' :: StartBuild -> Maybe Natural
timeoutInMinutesOverride} -> Maybe Natural
timeoutInMinutesOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Natural
a -> StartBuild
s {$sel:timeoutInMinutesOverride:StartBuild' :: Maybe Natural
timeoutInMinutesOverride = Maybe Natural
a} :: StartBuild)

-- | The name of a service role for this build that overrides the one
-- specified in the build project.
startBuild_serviceRoleOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Text)
startBuild_serviceRoleOverride :: (Maybe Text -> f (Maybe Text)) -> StartBuild -> f StartBuild
startBuild_serviceRoleOverride = (StartBuild -> Maybe Text)
-> (StartBuild -> Maybe Text -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Text
serviceRoleOverride :: Maybe Text
$sel:serviceRoleOverride:StartBuild' :: StartBuild -> Maybe Text
serviceRoleOverride} -> Maybe Text
serviceRoleOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Text
a -> StartBuild
s {$sel:serviceRoleOverride:StartBuild' :: Maybe Text
serviceRoleOverride = Maybe Text
a} :: StartBuild)

-- | A ProjectCache object specified for this build that overrides the one
-- defined in the build project.
startBuild_cacheOverride :: Lens.Lens' StartBuild (Prelude.Maybe ProjectCache)
startBuild_cacheOverride :: (Maybe ProjectCache -> f (Maybe ProjectCache))
-> StartBuild -> f StartBuild
startBuild_cacheOverride = (StartBuild -> Maybe ProjectCache)
-> (StartBuild -> Maybe ProjectCache -> StartBuild)
-> Lens
     StartBuild StartBuild (Maybe ProjectCache) (Maybe ProjectCache)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe ProjectCache
cacheOverride :: Maybe ProjectCache
$sel:cacheOverride:StartBuild' :: StartBuild -> Maybe ProjectCache
cacheOverride} -> Maybe ProjectCache
cacheOverride) (\s :: StartBuild
s@StartBuild' {} Maybe ProjectCache
a -> StartBuild
s {$sel:cacheOverride:StartBuild' :: Maybe ProjectCache
cacheOverride = Maybe ProjectCache
a} :: StartBuild)

-- | The number of minutes a build is allowed to be queued before it times
-- out.
startBuild_queuedTimeoutInMinutesOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Natural)
startBuild_queuedTimeoutInMinutesOverride :: (Maybe Natural -> f (Maybe Natural)) -> StartBuild -> f StartBuild
startBuild_queuedTimeoutInMinutesOverride = (StartBuild -> Maybe Natural)
-> (StartBuild -> Maybe Natural -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Natural
queuedTimeoutInMinutesOverride :: Maybe Natural
$sel:queuedTimeoutInMinutesOverride:StartBuild' :: StartBuild -> Maybe Natural
queuedTimeoutInMinutesOverride} -> Maybe Natural
queuedTimeoutInMinutesOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Natural
a -> StartBuild
s {$sel:queuedTimeoutInMinutesOverride:StartBuild' :: Maybe Natural
queuedTimeoutInMinutesOverride = Maybe Natural
a} :: StartBuild)

-- | An array of @ProjectSource@ objects.
startBuild_secondarySourcesOverride :: Lens.Lens' StartBuild (Prelude.Maybe [ProjectSource])
startBuild_secondarySourcesOverride :: (Maybe [ProjectSource] -> f (Maybe [ProjectSource]))
-> StartBuild -> f StartBuild
startBuild_secondarySourcesOverride = (StartBuild -> Maybe [ProjectSource])
-> (StartBuild -> Maybe [ProjectSource] -> StartBuild)
-> Lens
     StartBuild
     StartBuild
     (Maybe [ProjectSource])
     (Maybe [ProjectSource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe [ProjectSource]
secondarySourcesOverride :: Maybe [ProjectSource]
$sel:secondarySourcesOverride:StartBuild' :: StartBuild -> Maybe [ProjectSource]
secondarySourcesOverride} -> Maybe [ProjectSource]
secondarySourcesOverride) (\s :: StartBuild
s@StartBuild' {} Maybe [ProjectSource]
a -> StartBuild
s {$sel:secondarySourcesOverride:StartBuild' :: Maybe [ProjectSource]
secondarySourcesOverride = Maybe [ProjectSource]
a} :: StartBuild) ((Maybe [ProjectSource] -> f (Maybe [ProjectSource]))
 -> StartBuild -> f StartBuild)
-> ((Maybe [ProjectSource] -> f (Maybe [ProjectSource]))
    -> Maybe [ProjectSource] -> f (Maybe [ProjectSource]))
-> (Maybe [ProjectSource] -> f (Maybe [ProjectSource]))
-> StartBuild
-> f StartBuild
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ProjectSource] [ProjectSource] [ProjectSource] [ProjectSource]
-> Iso
     (Maybe [ProjectSource])
     (Maybe [ProjectSource])
     (Maybe [ProjectSource])
     (Maybe [ProjectSource])
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
  [ProjectSource] [ProjectSource] [ProjectSource] [ProjectSource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The user-defined depth of history, with a minimum value of 0, that
-- overrides, for this build only, any previous depth of history defined in
-- the build project.
startBuild_gitCloneDepthOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Natural)
startBuild_gitCloneDepthOverride :: (Maybe Natural -> f (Maybe Natural)) -> StartBuild -> f StartBuild
startBuild_gitCloneDepthOverride = (StartBuild -> Maybe Natural)
-> (StartBuild -> Maybe Natural -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Natural
gitCloneDepthOverride :: Maybe Natural
$sel:gitCloneDepthOverride:StartBuild' :: StartBuild -> Maybe Natural
gitCloneDepthOverride} -> Maybe Natural
gitCloneDepthOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Natural
a -> StartBuild
s {$sel:gitCloneDepthOverride:StartBuild' :: Maybe Natural
gitCloneDepthOverride = Maybe Natural
a} :: StartBuild)

-- | The type of credentials CodeBuild uses to pull images in your build.
-- There are two valid values:
--
-- [CODEBUILD]
--     Specifies that CodeBuild uses its own credentials. This requires
--     that you modify your ECR repository policy to trust CodeBuild\'s
--     service principal.
--
-- [SERVICE_ROLE]
--     Specifies that CodeBuild uses your build project\'s service role.
--
-- When using a cross-account or private registry image, you must use
-- @SERVICE_ROLE@ credentials. When using an CodeBuild curated image, you
-- must use @CODEBUILD@ credentials.
startBuild_imagePullCredentialsTypeOverride :: Lens.Lens' StartBuild (Prelude.Maybe ImagePullCredentialsType)
startBuild_imagePullCredentialsTypeOverride :: (Maybe ImagePullCredentialsType
 -> f (Maybe ImagePullCredentialsType))
-> StartBuild -> f StartBuild
startBuild_imagePullCredentialsTypeOverride = (StartBuild -> Maybe ImagePullCredentialsType)
-> (StartBuild -> Maybe ImagePullCredentialsType -> StartBuild)
-> Lens
     StartBuild
     StartBuild
     (Maybe ImagePullCredentialsType)
     (Maybe ImagePullCredentialsType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe ImagePullCredentialsType
imagePullCredentialsTypeOverride :: Maybe ImagePullCredentialsType
$sel:imagePullCredentialsTypeOverride:StartBuild' :: StartBuild -> Maybe ImagePullCredentialsType
imagePullCredentialsTypeOverride} -> Maybe ImagePullCredentialsType
imagePullCredentialsTypeOverride) (\s :: StartBuild
s@StartBuild' {} Maybe ImagePullCredentialsType
a -> StartBuild
s {$sel:imagePullCredentialsTypeOverride:StartBuild' :: Maybe ImagePullCredentialsType
imagePullCredentialsTypeOverride = Maybe ImagePullCredentialsType
a} :: StartBuild)

-- | Log settings for this build that override the log settings defined in
-- the build project.
startBuild_logsConfigOverride :: Lens.Lens' StartBuild (Prelude.Maybe LogsConfig)
startBuild_logsConfigOverride :: (Maybe LogsConfig -> f (Maybe LogsConfig))
-> StartBuild -> f StartBuild
startBuild_logsConfigOverride = (StartBuild -> Maybe LogsConfig)
-> (StartBuild -> Maybe LogsConfig -> StartBuild)
-> Lens StartBuild StartBuild (Maybe LogsConfig) (Maybe LogsConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe LogsConfig
logsConfigOverride :: Maybe LogsConfig
$sel:logsConfigOverride:StartBuild' :: StartBuild -> Maybe LogsConfig
logsConfigOverride} -> Maybe LogsConfig
logsConfigOverride) (\s :: StartBuild
s@StartBuild' {} Maybe LogsConfig
a -> StartBuild
s {$sel:logsConfigOverride:StartBuild' :: Maybe LogsConfig
logsConfigOverride = Maybe LogsConfig
a} :: StartBuild)

-- | An authorization type for this build that overrides the one defined in
-- the build project. This override applies only if the build project\'s
-- source is BitBucket or GitHub.
startBuild_sourceAuthOverride :: Lens.Lens' StartBuild (Prelude.Maybe SourceAuth)
startBuild_sourceAuthOverride :: (Maybe SourceAuth -> f (Maybe SourceAuth))
-> StartBuild -> f StartBuild
startBuild_sourceAuthOverride = (StartBuild -> Maybe SourceAuth)
-> (StartBuild -> Maybe SourceAuth -> StartBuild)
-> Lens StartBuild StartBuild (Maybe SourceAuth) (Maybe SourceAuth)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe SourceAuth
sourceAuthOverride :: Maybe SourceAuth
$sel:sourceAuthOverride:StartBuild' :: StartBuild -> Maybe SourceAuth
sourceAuthOverride} -> Maybe SourceAuth
sourceAuthOverride) (\s :: StartBuild
s@StartBuild' {} Maybe SourceAuth
a -> StartBuild
s {$sel:sourceAuthOverride:StartBuild' :: Maybe SourceAuth
sourceAuthOverride = Maybe SourceAuth
a} :: StartBuild)

-- | Information about the Git submodules configuration for this build of an
-- CodeBuild build project.
startBuild_gitSubmodulesConfigOverride :: Lens.Lens' StartBuild (Prelude.Maybe GitSubmodulesConfig)
startBuild_gitSubmodulesConfigOverride :: (Maybe GitSubmodulesConfig -> f (Maybe GitSubmodulesConfig))
-> StartBuild -> f StartBuild
startBuild_gitSubmodulesConfigOverride = (StartBuild -> Maybe GitSubmodulesConfig)
-> (StartBuild -> Maybe GitSubmodulesConfig -> StartBuild)
-> Lens
     StartBuild
     StartBuild
     (Maybe GitSubmodulesConfig)
     (Maybe GitSubmodulesConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe GitSubmodulesConfig
gitSubmodulesConfigOverride :: Maybe GitSubmodulesConfig
$sel:gitSubmodulesConfigOverride:StartBuild' :: StartBuild -> Maybe GitSubmodulesConfig
gitSubmodulesConfigOverride} -> Maybe GitSubmodulesConfig
gitSubmodulesConfigOverride) (\s :: StartBuild
s@StartBuild' {} Maybe GitSubmodulesConfig
a -> StartBuild
s {$sel:gitSubmodulesConfigOverride:StartBuild' :: Maybe GitSubmodulesConfig
gitSubmodulesConfigOverride = Maybe GitSubmodulesConfig
a} :: StartBuild)

-- | A container type for this build that overrides the one specified in the
-- build project.
startBuild_environmentTypeOverride :: Lens.Lens' StartBuild (Prelude.Maybe EnvironmentType)
startBuild_environmentTypeOverride :: (Maybe EnvironmentType -> f (Maybe EnvironmentType))
-> StartBuild -> f StartBuild
startBuild_environmentTypeOverride = (StartBuild -> Maybe EnvironmentType)
-> (StartBuild -> Maybe EnvironmentType -> StartBuild)
-> Lens
     StartBuild
     StartBuild
     (Maybe EnvironmentType)
     (Maybe EnvironmentType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe EnvironmentType
environmentTypeOverride :: Maybe EnvironmentType
$sel:environmentTypeOverride:StartBuild' :: StartBuild -> Maybe EnvironmentType
environmentTypeOverride} -> Maybe EnvironmentType
environmentTypeOverride) (\s :: StartBuild
s@StartBuild' {} Maybe EnvironmentType
a -> StartBuild
s {$sel:environmentTypeOverride:StartBuild' :: Maybe EnvironmentType
environmentTypeOverride = Maybe EnvironmentType
a} :: StartBuild)

-- | The name of a certificate for this build that overrides the one
-- specified in the build project.
startBuild_certificateOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Text)
startBuild_certificateOverride :: (Maybe Text -> f (Maybe Text)) -> StartBuild -> f StartBuild
startBuild_certificateOverride = (StartBuild -> Maybe Text)
-> (StartBuild -> Maybe Text -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Text
certificateOverride :: Maybe Text
$sel:certificateOverride:StartBuild' :: StartBuild -> Maybe Text
certificateOverride} -> Maybe Text
certificateOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Text
a -> StartBuild
s {$sel:certificateOverride:StartBuild' :: Maybe Text
certificateOverride = Maybe Text
a} :: StartBuild)

-- | The name of a compute type for this build that overrides the one
-- specified in the build project.
startBuild_computeTypeOverride :: Lens.Lens' StartBuild (Prelude.Maybe ComputeType)
startBuild_computeTypeOverride :: (Maybe ComputeType -> f (Maybe ComputeType))
-> StartBuild -> f StartBuild
startBuild_computeTypeOverride = (StartBuild -> Maybe ComputeType)
-> (StartBuild -> Maybe ComputeType -> StartBuild)
-> Lens
     StartBuild StartBuild (Maybe ComputeType) (Maybe ComputeType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe ComputeType
computeTypeOverride :: Maybe ComputeType
$sel:computeTypeOverride:StartBuild' :: StartBuild -> Maybe ComputeType
computeTypeOverride} -> Maybe ComputeType
computeTypeOverride) (\s :: StartBuild
s@StartBuild' {} Maybe ComputeType
a -> StartBuild
s {$sel:computeTypeOverride:StartBuild' :: Maybe ComputeType
computeTypeOverride = Maybe ComputeType
a} :: StartBuild)

-- | Enable this flag to override privileged mode in the build project.
startBuild_privilegedModeOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Bool)
startBuild_privilegedModeOverride :: (Maybe Bool -> f (Maybe Bool)) -> StartBuild -> f StartBuild
startBuild_privilegedModeOverride = (StartBuild -> Maybe Bool)
-> (StartBuild -> Maybe Bool -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Bool
privilegedModeOverride :: Maybe Bool
$sel:privilegedModeOverride:StartBuild' :: StartBuild -> Maybe Bool
privilegedModeOverride} -> Maybe Bool
privilegedModeOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Bool
a -> StartBuild
s {$sel:privilegedModeOverride:StartBuild' :: Maybe Bool
privilegedModeOverride = Maybe Bool
a} :: StartBuild)

-- | The version of the build input to be built, for this build only. If not
-- specified, the latest version is used. If specified, the contents
-- depends on the source provider:
--
-- [CodeCommit]
--     The commit ID, branch, or Git tag to use.
--
-- [GitHub]
--     The commit ID, pull request ID, branch name, or tag name that
--     corresponds to the version of the source code you want to build. If
--     a pull request ID is specified, it must use the format
--     @pr\/pull-request-ID@ (for example @pr\/25@). If a branch name is
--     specified, the branch\'s HEAD commit ID is used. If not specified,
--     the default branch\'s HEAD commit ID is used.
--
-- [Bitbucket]
--     The commit ID, branch name, or tag name that corresponds to the
--     version of the source code you want to build. If a branch name is
--     specified, the branch\'s HEAD commit ID is used. If not specified,
--     the default branch\'s HEAD commit ID is used.
--
-- [Amazon S3]
--     The version ID of the object that represents the build input ZIP
--     file to use.
--
-- If @sourceVersion@ is specified at the project level, then this
-- @sourceVersion@ (at the build level) takes precedence.
--
-- For more information, see
-- <https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html Source Version Sample with CodeBuild>
-- in the /CodeBuild User Guide/.
startBuild_sourceVersion :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Text)
startBuild_sourceVersion :: (Maybe Text -> f (Maybe Text)) -> StartBuild -> f StartBuild
startBuild_sourceVersion = (StartBuild -> Maybe Text)
-> (StartBuild -> Maybe Text -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Text
sourceVersion :: Maybe Text
$sel:sourceVersion:StartBuild' :: StartBuild -> Maybe Text
sourceVersion} -> Maybe Text
sourceVersion) (\s :: StartBuild
s@StartBuild' {} Maybe Text
a -> StartBuild
s {$sel:sourceVersion:StartBuild' :: Maybe Text
sourceVersion = Maybe Text
a} :: StartBuild)

-- | A buildspec file declaration that overrides, for this build only, the
-- latest one already defined in the build project.
--
-- If this value is set, it can be either an inline buildspec definition,
-- the path to an alternate buildspec file relative to the value of the
-- built-in @CODEBUILD_SRC_DIR@ environment variable, or the path to an S3
-- bucket. The bucket must be in the same Amazon Web Services Region as the
-- build project. Specify the buildspec file using its ARN (for example,
-- @arn:aws:s3:::my-codebuild-sample2\/buildspec.yml@). If this value is
-- not provided or is set to an empty string, the source code must contain
-- a buildspec file in its root directory. For more information, see
-- <https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage Buildspec File Name and Storage Location>.
startBuild_buildspecOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Text)
startBuild_buildspecOverride :: (Maybe Text -> f (Maybe Text)) -> StartBuild -> f StartBuild
startBuild_buildspecOverride = (StartBuild -> Maybe Text)
-> (StartBuild -> Maybe Text -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Text
buildspecOverride :: Maybe Text
$sel:buildspecOverride:StartBuild' :: StartBuild -> Maybe Text
buildspecOverride} -> Maybe Text
buildspecOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Text
a -> StartBuild
s {$sel:buildspecOverride:StartBuild' :: Maybe Text
buildspecOverride = Maybe Text
a} :: StartBuild)

-- | An array of @ProjectSourceVersion@ objects that specify one or more
-- versions of the project\'s secondary sources to be used for this build
-- only.
startBuild_secondarySourcesVersionOverride :: Lens.Lens' StartBuild (Prelude.Maybe [ProjectSourceVersion])
startBuild_secondarySourcesVersionOverride :: (Maybe [ProjectSourceVersion] -> f (Maybe [ProjectSourceVersion]))
-> StartBuild -> f StartBuild
startBuild_secondarySourcesVersionOverride = (StartBuild -> Maybe [ProjectSourceVersion])
-> (StartBuild -> Maybe [ProjectSourceVersion] -> StartBuild)
-> Lens
     StartBuild
     StartBuild
     (Maybe [ProjectSourceVersion])
     (Maybe [ProjectSourceVersion])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe [ProjectSourceVersion]
secondarySourcesVersionOverride :: Maybe [ProjectSourceVersion]
$sel:secondarySourcesVersionOverride:StartBuild' :: StartBuild -> Maybe [ProjectSourceVersion]
secondarySourcesVersionOverride} -> Maybe [ProjectSourceVersion]
secondarySourcesVersionOverride) (\s :: StartBuild
s@StartBuild' {} Maybe [ProjectSourceVersion]
a -> StartBuild
s {$sel:secondarySourcesVersionOverride:StartBuild' :: Maybe [ProjectSourceVersion]
secondarySourcesVersionOverride = Maybe [ProjectSourceVersion]
a} :: StartBuild) ((Maybe [ProjectSourceVersion] -> f (Maybe [ProjectSourceVersion]))
 -> StartBuild -> f StartBuild)
-> ((Maybe [ProjectSourceVersion]
     -> f (Maybe [ProjectSourceVersion]))
    -> Maybe [ProjectSourceVersion]
    -> f (Maybe [ProjectSourceVersion]))
-> (Maybe [ProjectSourceVersion]
    -> f (Maybe [ProjectSourceVersion]))
-> StartBuild
-> f StartBuild
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ProjectSourceVersion]
  [ProjectSourceVersion]
  [ProjectSourceVersion]
  [ProjectSourceVersion]
-> Iso
     (Maybe [ProjectSourceVersion])
     (Maybe [ProjectSourceVersion])
     (Maybe [ProjectSourceVersion])
     (Maybe [ProjectSourceVersion])
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
  [ProjectSourceVersion]
  [ProjectSourceVersion]
  [ProjectSourceVersion]
  [ProjectSourceVersion]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Set to true to report to your source provider the status of a build\'s
-- start and completion. If you use this option with a source provider
-- other than GitHub, GitHub Enterprise, or Bitbucket, an
-- @invalidInputException@ is thrown.
--
-- To be able to report the build status to the source provider, the user
-- associated with the source provider must have write access to the repo.
-- If the user does not have write access, the build status cannot be
-- updated. For more information, see
-- <https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html Source provider access>
-- in the /CodeBuild User Guide/.
--
-- The status of a build triggered by a webhook is always reported to your
-- source provider.
startBuild_reportBuildStatusOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Bool)
startBuild_reportBuildStatusOverride :: (Maybe Bool -> f (Maybe Bool)) -> StartBuild -> f StartBuild
startBuild_reportBuildStatusOverride = (StartBuild -> Maybe Bool)
-> (StartBuild -> Maybe Bool -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Bool
reportBuildStatusOverride :: Maybe Bool
$sel:reportBuildStatusOverride:StartBuild' :: StartBuild -> Maybe Bool
reportBuildStatusOverride} -> Maybe Bool
reportBuildStatusOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Bool
a -> StartBuild
s {$sel:reportBuildStatusOverride:StartBuild' :: Maybe Bool
reportBuildStatusOverride = Maybe Bool
a} :: StartBuild)

-- | Enable this flag to override the insecure SSL setting that is specified
-- in the build project. The insecure SSL setting determines whether to
-- ignore SSL warnings while connecting to the project source code. This
-- override applies only if the build\'s source is GitHub Enterprise.
startBuild_insecureSslOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Bool)
startBuild_insecureSslOverride :: (Maybe Bool -> f (Maybe Bool)) -> StartBuild -> f StartBuild
startBuild_insecureSslOverride = (StartBuild -> Maybe Bool)
-> (StartBuild -> Maybe Bool -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Bool
insecureSslOverride :: Maybe Bool
$sel:insecureSslOverride:StartBuild' :: StartBuild -> Maybe Bool
insecureSslOverride} -> Maybe Bool
insecureSslOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Bool
a -> StartBuild
s {$sel:insecureSslOverride:StartBuild' :: Maybe Bool
insecureSslOverride = Maybe Bool
a} :: StartBuild)

-- | The name of an image for this build that overrides the one specified in
-- the build project.
startBuild_imageOverride :: Lens.Lens' StartBuild (Prelude.Maybe Prelude.Text)
startBuild_imageOverride :: (Maybe Text -> f (Maybe Text)) -> StartBuild -> f StartBuild
startBuild_imageOverride = (StartBuild -> Maybe Text)
-> (StartBuild -> Maybe Text -> StartBuild)
-> Lens StartBuild StartBuild (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe Text
imageOverride :: Maybe Text
$sel:imageOverride:StartBuild' :: StartBuild -> Maybe Text
imageOverride} -> Maybe Text
imageOverride) (\s :: StartBuild
s@StartBuild' {} Maybe Text
a -> StartBuild
s {$sel:imageOverride:StartBuild' :: Maybe Text
imageOverride = Maybe Text
a} :: StartBuild)

-- | An array of @ProjectArtifacts@ objects.
startBuild_secondaryArtifactsOverride :: Lens.Lens' StartBuild (Prelude.Maybe [ProjectArtifacts])
startBuild_secondaryArtifactsOverride :: (Maybe [ProjectArtifacts] -> f (Maybe [ProjectArtifacts]))
-> StartBuild -> f StartBuild
startBuild_secondaryArtifactsOverride = (StartBuild -> Maybe [ProjectArtifacts])
-> (StartBuild -> Maybe [ProjectArtifacts] -> StartBuild)
-> Lens
     StartBuild
     StartBuild
     (Maybe [ProjectArtifacts])
     (Maybe [ProjectArtifacts])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe [ProjectArtifacts]
secondaryArtifactsOverride :: Maybe [ProjectArtifacts]
$sel:secondaryArtifactsOverride:StartBuild' :: StartBuild -> Maybe [ProjectArtifacts]
secondaryArtifactsOverride} -> Maybe [ProjectArtifacts]
secondaryArtifactsOverride) (\s :: StartBuild
s@StartBuild' {} Maybe [ProjectArtifacts]
a -> StartBuild
s {$sel:secondaryArtifactsOverride:StartBuild' :: Maybe [ProjectArtifacts]
secondaryArtifactsOverride = Maybe [ProjectArtifacts]
a} :: StartBuild) ((Maybe [ProjectArtifacts] -> f (Maybe [ProjectArtifacts]))
 -> StartBuild -> f StartBuild)
-> ((Maybe [ProjectArtifacts] -> f (Maybe [ProjectArtifacts]))
    -> Maybe [ProjectArtifacts] -> f (Maybe [ProjectArtifacts]))
-> (Maybe [ProjectArtifacts] -> f (Maybe [ProjectArtifacts]))
-> StartBuild
-> f StartBuild
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ProjectArtifacts]
  [ProjectArtifacts]
  [ProjectArtifacts]
  [ProjectArtifacts]
-> Iso
     (Maybe [ProjectArtifacts])
     (Maybe [ProjectArtifacts])
     (Maybe [ProjectArtifacts])
     (Maybe [ProjectArtifacts])
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
  [ProjectArtifacts]
  [ProjectArtifacts]
  [ProjectArtifacts]
  [ProjectArtifacts]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Build output artifact settings that override, for this build only, the
-- latest ones already defined in the build project.
startBuild_artifactsOverride :: Lens.Lens' StartBuild (Prelude.Maybe ProjectArtifacts)
startBuild_artifactsOverride :: (Maybe ProjectArtifacts -> f (Maybe ProjectArtifacts))
-> StartBuild -> f StartBuild
startBuild_artifactsOverride = (StartBuild -> Maybe ProjectArtifacts)
-> (StartBuild -> Maybe ProjectArtifacts -> StartBuild)
-> Lens
     StartBuild
     StartBuild
     (Maybe ProjectArtifacts)
     (Maybe ProjectArtifacts)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe ProjectArtifacts
artifactsOverride :: Maybe ProjectArtifacts
$sel:artifactsOverride:StartBuild' :: StartBuild -> Maybe ProjectArtifacts
artifactsOverride} -> Maybe ProjectArtifacts
artifactsOverride) (\s :: StartBuild
s@StartBuild' {} Maybe ProjectArtifacts
a -> StartBuild
s {$sel:artifactsOverride:StartBuild' :: Maybe ProjectArtifacts
artifactsOverride = Maybe ProjectArtifacts
a} :: StartBuild)

-- | A source input type, for this build, that overrides the source input
-- defined in the build project.
startBuild_sourceTypeOverride :: Lens.Lens' StartBuild (Prelude.Maybe SourceType)
startBuild_sourceTypeOverride :: (Maybe SourceType -> f (Maybe SourceType))
-> StartBuild -> f StartBuild
startBuild_sourceTypeOverride = (StartBuild -> Maybe SourceType)
-> (StartBuild -> Maybe SourceType -> StartBuild)
-> Lens StartBuild StartBuild (Maybe SourceType) (Maybe SourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Maybe SourceType
sourceTypeOverride :: Maybe SourceType
$sel:sourceTypeOverride:StartBuild' :: StartBuild -> Maybe SourceType
sourceTypeOverride} -> Maybe SourceType
sourceTypeOverride) (\s :: StartBuild
s@StartBuild' {} Maybe SourceType
a -> StartBuild
s {$sel:sourceTypeOverride:StartBuild' :: Maybe SourceType
sourceTypeOverride = Maybe SourceType
a} :: StartBuild)

-- | The name of the CodeBuild build project to start running a build.
startBuild_projectName :: Lens.Lens' StartBuild Prelude.Text
startBuild_projectName :: (Text -> f Text) -> StartBuild -> f StartBuild
startBuild_projectName = (StartBuild -> Text)
-> (StartBuild -> Text -> StartBuild)
-> Lens StartBuild StartBuild Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuild' {Text
projectName :: Text
$sel:projectName:StartBuild' :: StartBuild -> Text
projectName} -> Text
projectName) (\s :: StartBuild
s@StartBuild' {} Text
a -> StartBuild
s {$sel:projectName:StartBuild' :: Text
projectName = Text
a} :: StartBuild)

instance Core.AWSRequest StartBuild where
  type AWSResponse StartBuild = StartBuildResponse
  request :: StartBuild -> Request StartBuild
request = Service -> StartBuild -> Request StartBuild
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartBuild
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartBuild)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartBuild))
-> Logger
-> Service
-> Proxy StartBuild
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartBuild)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Build -> Int -> StartBuildResponse
StartBuildResponse'
            (Maybe Build -> Int -> StartBuildResponse)
-> Either String (Maybe Build)
-> Either String (Int -> StartBuildResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Build)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"build")
            Either String (Int -> StartBuildResponse)
-> Either String Int -> Either String StartBuildResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable StartBuild

instance Prelude.NFData StartBuild

instance Core.ToHeaders StartBuild where
  toHeaders :: StartBuild -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartBuild -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"CodeBuild_20161006.StartBuild" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON StartBuild where
  toJSON :: StartBuild -> Value
toJSON StartBuild' {Maybe Bool
Maybe Natural
Maybe [EnvironmentVariable]
Maybe [ProjectArtifacts]
Maybe [ProjectSourceVersion]
Maybe [ProjectSource]
Maybe Text
Maybe BuildStatusConfig
Maybe ComputeType
Maybe EnvironmentType
Maybe GitSubmodulesConfig
Maybe ImagePullCredentialsType
Maybe ProjectArtifacts
Maybe ProjectCache
Maybe RegistryCredential
Maybe LogsConfig
Maybe SourceAuth
Maybe SourceType
Text
projectName :: Text
sourceTypeOverride :: Maybe SourceType
artifactsOverride :: Maybe ProjectArtifacts
secondaryArtifactsOverride :: Maybe [ProjectArtifacts]
imageOverride :: Maybe Text
insecureSslOverride :: Maybe Bool
reportBuildStatusOverride :: Maybe Bool
secondarySourcesVersionOverride :: Maybe [ProjectSourceVersion]
buildspecOverride :: Maybe Text
sourceVersion :: Maybe Text
privilegedModeOverride :: Maybe Bool
computeTypeOverride :: Maybe ComputeType
certificateOverride :: Maybe Text
environmentTypeOverride :: Maybe EnvironmentType
gitSubmodulesConfigOverride :: Maybe GitSubmodulesConfig
sourceAuthOverride :: Maybe SourceAuth
logsConfigOverride :: Maybe LogsConfig
imagePullCredentialsTypeOverride :: Maybe ImagePullCredentialsType
gitCloneDepthOverride :: Maybe Natural
secondarySourcesOverride :: Maybe [ProjectSource]
queuedTimeoutInMinutesOverride :: Maybe Natural
cacheOverride :: Maybe ProjectCache
serviceRoleOverride :: Maybe Text
timeoutInMinutesOverride :: Maybe Natural
registryCredentialOverride :: Maybe RegistryCredential
debugSessionEnabled :: Maybe Bool
idempotencyToken :: Maybe Text
buildStatusConfigOverride :: Maybe BuildStatusConfig
environmentVariablesOverride :: Maybe [EnvironmentVariable]
sourceLocationOverride :: Maybe Text
encryptionKeyOverride :: Maybe Text
$sel:projectName:StartBuild' :: StartBuild -> Text
$sel:sourceTypeOverride:StartBuild' :: StartBuild -> Maybe SourceType
$sel:artifactsOverride:StartBuild' :: StartBuild -> Maybe ProjectArtifacts
$sel:secondaryArtifactsOverride:StartBuild' :: StartBuild -> Maybe [ProjectArtifacts]
$sel:imageOverride:StartBuild' :: StartBuild -> Maybe Text
$sel:insecureSslOverride:StartBuild' :: StartBuild -> Maybe Bool
$sel:reportBuildStatusOverride:StartBuild' :: StartBuild -> Maybe Bool
$sel:secondarySourcesVersionOverride:StartBuild' :: StartBuild -> Maybe [ProjectSourceVersion]
$sel:buildspecOverride:StartBuild' :: StartBuild -> Maybe Text
$sel:sourceVersion:StartBuild' :: StartBuild -> Maybe Text
$sel:privilegedModeOverride:StartBuild' :: StartBuild -> Maybe Bool
$sel:computeTypeOverride:StartBuild' :: StartBuild -> Maybe ComputeType
$sel:certificateOverride:StartBuild' :: StartBuild -> Maybe Text
$sel:environmentTypeOverride:StartBuild' :: StartBuild -> Maybe EnvironmentType
$sel:gitSubmodulesConfigOverride:StartBuild' :: StartBuild -> Maybe GitSubmodulesConfig
$sel:sourceAuthOverride:StartBuild' :: StartBuild -> Maybe SourceAuth
$sel:logsConfigOverride:StartBuild' :: StartBuild -> Maybe LogsConfig
$sel:imagePullCredentialsTypeOverride:StartBuild' :: StartBuild -> Maybe ImagePullCredentialsType
$sel:gitCloneDepthOverride:StartBuild' :: StartBuild -> Maybe Natural
$sel:secondarySourcesOverride:StartBuild' :: StartBuild -> Maybe [ProjectSource]
$sel:queuedTimeoutInMinutesOverride:StartBuild' :: StartBuild -> Maybe Natural
$sel:cacheOverride:StartBuild' :: StartBuild -> Maybe ProjectCache
$sel:serviceRoleOverride:StartBuild' :: StartBuild -> Maybe Text
$sel:timeoutInMinutesOverride:StartBuild' :: StartBuild -> Maybe Natural
$sel:registryCredentialOverride:StartBuild' :: StartBuild -> Maybe RegistryCredential
$sel:debugSessionEnabled:StartBuild' :: StartBuild -> Maybe Bool
$sel:idempotencyToken:StartBuild' :: StartBuild -> Maybe Text
$sel:buildStatusConfigOverride:StartBuild' :: StartBuild -> Maybe BuildStatusConfig
$sel:environmentVariablesOverride:StartBuild' :: StartBuild -> Maybe [EnvironmentVariable]
$sel:sourceLocationOverride:StartBuild' :: StartBuild -> Maybe Text
$sel:encryptionKeyOverride:StartBuild' :: StartBuild -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"encryptionKeyOverride" 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
encryptionKeyOverride,
            (Text
"sourceLocationOverride" 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
sourceLocationOverride,
            (Text
"environmentVariablesOverride" Text -> [EnvironmentVariable] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([EnvironmentVariable] -> Pair)
-> Maybe [EnvironmentVariable] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EnvironmentVariable]
environmentVariablesOverride,
            (Text
"buildStatusConfigOverride" Text -> BuildStatusConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BuildStatusConfig -> Pair)
-> Maybe BuildStatusConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BuildStatusConfig
buildStatusConfigOverride,
            (Text
"idempotencyToken" 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
idempotencyToken,
            (Text
"debugSessionEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
debugSessionEnabled,
            (Text
"registryCredentialOverride" Text -> RegistryCredential -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RegistryCredential -> Pair)
-> Maybe RegistryCredential -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RegistryCredential
registryCredentialOverride,
            (Text
"timeoutInMinutesOverride" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeoutInMinutesOverride,
            (Text
"serviceRoleOverride" 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
serviceRoleOverride,
            (Text
"cacheOverride" Text -> ProjectCache -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ProjectCache -> Pair) -> Maybe ProjectCache -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProjectCache
cacheOverride,
            (Text
"queuedTimeoutInMinutesOverride" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
queuedTimeoutInMinutesOverride,
            (Text
"secondarySourcesOverride" Text -> [ProjectSource] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([ProjectSource] -> Pair) -> Maybe [ProjectSource] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ProjectSource]
secondarySourcesOverride,
            (Text
"gitCloneDepthOverride" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
gitCloneDepthOverride,
            (Text
"imagePullCredentialsTypeOverride" Text -> ImagePullCredentialsType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ImagePullCredentialsType -> Pair)
-> Maybe ImagePullCredentialsType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ImagePullCredentialsType
imagePullCredentialsTypeOverride,
            (Text
"logsConfigOverride" Text -> LogsConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (LogsConfig -> Pair) -> Maybe LogsConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LogsConfig
logsConfigOverride,
            (Text
"sourceAuthOverride" Text -> SourceAuth -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SourceAuth -> Pair) -> Maybe SourceAuth -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceAuth
sourceAuthOverride,
            (Text
"gitSubmodulesConfigOverride" Text -> GitSubmodulesConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (GitSubmodulesConfig -> Pair)
-> Maybe GitSubmodulesConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe GitSubmodulesConfig
gitSubmodulesConfigOverride,
            (Text
"environmentTypeOverride" Text -> EnvironmentType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (EnvironmentType -> Pair) -> Maybe EnvironmentType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EnvironmentType
environmentTypeOverride,
            (Text
"certificateOverride" 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
certificateOverride,
            (Text
"computeTypeOverride" Text -> ComputeType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ComputeType -> Pair) -> Maybe ComputeType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ComputeType
computeTypeOverride,
            (Text
"privilegedModeOverride" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
privilegedModeOverride,
            (Text
"sourceVersion" 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
sourceVersion,
            (Text
"buildspecOverride" 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
buildspecOverride,
            (Text
"secondarySourcesVersionOverride" Text -> [ProjectSourceVersion] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([ProjectSourceVersion] -> Pair)
-> Maybe [ProjectSourceVersion] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ProjectSourceVersion]
secondarySourcesVersionOverride,
            (Text
"reportBuildStatusOverride" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
reportBuildStatusOverride,
            (Text
"insecureSslOverride" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
insecureSslOverride,
            (Text
"imageOverride" 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
imageOverride,
            (Text
"secondaryArtifactsOverride" Text -> [ProjectArtifacts] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([ProjectArtifacts] -> Pair)
-> Maybe [ProjectArtifacts] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ProjectArtifacts]
secondaryArtifactsOverride,
            (Text
"artifactsOverride" Text -> ProjectArtifacts -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ProjectArtifacts -> Pair) -> Maybe ProjectArtifacts -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProjectArtifacts
artifactsOverride,
            (Text
"sourceTypeOverride" Text -> SourceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SourceType -> Pair) -> Maybe SourceType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceType
sourceTypeOverride,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"projectName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
projectName)
          ]
      )

instance Core.ToPath StartBuild where
  toPath :: StartBuild -> ByteString
toPath = ByteString -> StartBuild -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery StartBuild where
  toQuery :: StartBuild -> QueryString
toQuery = QueryString -> StartBuild -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newStartBuildResponse' smart constructor.
data StartBuildResponse = StartBuildResponse'
  { -- | Information about the build to be run.
    StartBuildResponse -> Maybe Build
build :: Prelude.Maybe Build,
    -- | The response's http status code.
    StartBuildResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartBuildResponse -> StartBuildResponse -> Bool
(StartBuildResponse -> StartBuildResponse -> Bool)
-> (StartBuildResponse -> StartBuildResponse -> Bool)
-> Eq StartBuildResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartBuildResponse -> StartBuildResponse -> Bool
$c/= :: StartBuildResponse -> StartBuildResponse -> Bool
== :: StartBuildResponse -> StartBuildResponse -> Bool
$c== :: StartBuildResponse -> StartBuildResponse -> Bool
Prelude.Eq, ReadPrec [StartBuildResponse]
ReadPrec StartBuildResponse
Int -> ReadS StartBuildResponse
ReadS [StartBuildResponse]
(Int -> ReadS StartBuildResponse)
-> ReadS [StartBuildResponse]
-> ReadPrec StartBuildResponse
-> ReadPrec [StartBuildResponse]
-> Read StartBuildResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartBuildResponse]
$creadListPrec :: ReadPrec [StartBuildResponse]
readPrec :: ReadPrec StartBuildResponse
$creadPrec :: ReadPrec StartBuildResponse
readList :: ReadS [StartBuildResponse]
$creadList :: ReadS [StartBuildResponse]
readsPrec :: Int -> ReadS StartBuildResponse
$creadsPrec :: Int -> ReadS StartBuildResponse
Prelude.Read, Int -> StartBuildResponse -> ShowS
[StartBuildResponse] -> ShowS
StartBuildResponse -> String
(Int -> StartBuildResponse -> ShowS)
-> (StartBuildResponse -> String)
-> ([StartBuildResponse] -> ShowS)
-> Show StartBuildResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartBuildResponse] -> ShowS
$cshowList :: [StartBuildResponse] -> ShowS
show :: StartBuildResponse -> String
$cshow :: StartBuildResponse -> String
showsPrec :: Int -> StartBuildResponse -> ShowS
$cshowsPrec :: Int -> StartBuildResponse -> ShowS
Prelude.Show, (forall x. StartBuildResponse -> Rep StartBuildResponse x)
-> (forall x. Rep StartBuildResponse x -> StartBuildResponse)
-> Generic StartBuildResponse
forall x. Rep StartBuildResponse x -> StartBuildResponse
forall x. StartBuildResponse -> Rep StartBuildResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartBuildResponse x -> StartBuildResponse
$cfrom :: forall x. StartBuildResponse -> Rep StartBuildResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartBuildResponse' 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:
--
-- 'build', 'startBuildResponse_build' - Information about the build to be run.
--
-- 'httpStatus', 'startBuildResponse_httpStatus' - The response's http status code.
newStartBuildResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartBuildResponse
newStartBuildResponse :: Int -> StartBuildResponse
newStartBuildResponse Int
pHttpStatus_ =
  StartBuildResponse' :: Maybe Build -> Int -> StartBuildResponse
StartBuildResponse'
    { $sel:build:StartBuildResponse' :: Maybe Build
build = Maybe Build
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartBuildResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the build to be run.
startBuildResponse_build :: Lens.Lens' StartBuildResponse (Prelude.Maybe Build)
startBuildResponse_build :: (Maybe Build -> f (Maybe Build))
-> StartBuildResponse -> f StartBuildResponse
startBuildResponse_build = (StartBuildResponse -> Maybe Build)
-> (StartBuildResponse -> Maybe Build -> StartBuildResponse)
-> Lens
     StartBuildResponse StartBuildResponse (Maybe Build) (Maybe Build)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuildResponse' {Maybe Build
build :: Maybe Build
$sel:build:StartBuildResponse' :: StartBuildResponse -> Maybe Build
build} -> Maybe Build
build) (\s :: StartBuildResponse
s@StartBuildResponse' {} Maybe Build
a -> StartBuildResponse
s {$sel:build:StartBuildResponse' :: Maybe Build
build = Maybe Build
a} :: StartBuildResponse)

-- | The response's http status code.
startBuildResponse_httpStatus :: Lens.Lens' StartBuildResponse Prelude.Int
startBuildResponse_httpStatus :: (Int -> f Int) -> StartBuildResponse -> f StartBuildResponse
startBuildResponse_httpStatus = (StartBuildResponse -> Int)
-> (StartBuildResponse -> Int -> StartBuildResponse)
-> Lens StartBuildResponse StartBuildResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBuildResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartBuildResponse' :: StartBuildResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartBuildResponse
s@StartBuildResponse' {} Int
a -> StartBuildResponse
s {$sel:httpStatus:StartBuildResponse' :: Int
httpStatus = Int
a} :: StartBuildResponse)

instance Prelude.NFData StartBuildResponse