{-# 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.UpdateProject
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Changes the settings of a build project.
module Amazonka.CodeBuild.UpdateProject
  ( -- * Creating a Request
    UpdateProject (..),
    newUpdateProject,

    -- * Request Lenses
    updateProject_artifacts,
    updateProject_badgeEnabled,
    updateProject_buildBatchConfig,
    updateProject_cache,
    updateProject_concurrentBuildLimit,
    updateProject_description,
    updateProject_encryptionKey,
    updateProject_environment,
    updateProject_fileSystemLocations,
    updateProject_logsConfig,
    updateProject_queuedTimeoutInMinutes,
    updateProject_secondaryArtifacts,
    updateProject_secondarySourceVersions,
    updateProject_secondarySources,
    updateProject_serviceRole,
    updateProject_source,
    updateProject_sourceVersion,
    updateProject_tags,
    updateProject_timeoutInMinutes,
    updateProject_vpcConfig,
    updateProject_name,

    -- * Destructuring the Response
    UpdateProjectResponse (..),
    newUpdateProjectResponse,

    -- * Response Lenses
    updateProjectResponse_project,
    updateProjectResponse_httpStatus,
  )
where

import Amazonka.CodeBuild.Types
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateProject' smart constructor.
data UpdateProject = UpdateProject'
  { -- | Information to be changed about the build output artifacts for the build
    -- project.
    UpdateProject -> Maybe ProjectArtifacts
artifacts :: Prelude.Maybe ProjectArtifacts,
    -- | Set this to true to generate a publicly accessible URL for your
    -- project\'s build badge.
    UpdateProject -> Maybe Bool
badgeEnabled :: Prelude.Maybe Prelude.Bool,
    UpdateProject -> Maybe ProjectBuildBatchConfig
buildBatchConfig :: Prelude.Maybe ProjectBuildBatchConfig,
    -- | Stores recently used information so that it can be quickly accessed at a
    -- later time.
    UpdateProject -> Maybe ProjectCache
cache :: Prelude.Maybe ProjectCache,
    -- | The maximum number of concurrent builds that are allowed for this
    -- project.
    --
    -- New builds are only started if the current number of builds is less than
    -- or equal to this limit. If the current build count meets this limit, new
    -- builds are throttled and are not run.
    --
    -- To remove this limit, set this value to -1.
    UpdateProject -> Maybe Int
concurrentBuildLimit :: Prelude.Maybe Prelude.Int,
    -- | A new or replacement description of the build project.
    UpdateProject -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The Key Management Service customer master key (CMK) to be used for
    -- encrypting 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>@).
    UpdateProject -> Maybe Text
encryptionKey :: Prelude.Maybe Prelude.Text,
    -- | Information to be changed about the build environment for the build
    -- project.
    UpdateProject -> Maybe ProjectEnvironment
environment :: Prelude.Maybe ProjectEnvironment,
    -- | An array of @ProjectFileSystemLocation@ objects for a CodeBuild build
    -- project. A @ProjectFileSystemLocation@ object specifies the
    -- @identifier@, @location@, @mountOptions@, @mountPoint@, and @type@ of a
    -- file system created using Amazon Elastic File System.
    UpdateProject -> Maybe [ProjectFileSystemLocation]
fileSystemLocations :: Prelude.Maybe [ProjectFileSystemLocation],
    -- | Information about logs for the build project. A project can create logs
    -- in CloudWatch Logs, logs in an S3 bucket, or both.
    UpdateProject -> Maybe LogsConfig
logsConfig :: Prelude.Maybe LogsConfig,
    -- | The number of minutes a build is allowed to be queued before it times
    -- out.
    UpdateProject -> Maybe Natural
queuedTimeoutInMinutes :: Prelude.Maybe Prelude.Natural,
    -- | An array of @ProjectArtifact@ objects.
    UpdateProject -> Maybe [ProjectArtifacts]
secondaryArtifacts :: Prelude.Maybe [ProjectArtifacts],
    -- | An array of @ProjectSourceVersion@ objects. If @secondarySourceVersions@
    -- is specified at the build level, then they take over these
    -- @secondarySourceVersions@ (at the project level).
    UpdateProject -> Maybe [ProjectSourceVersion]
secondarySourceVersions :: Prelude.Maybe [ProjectSourceVersion],
    -- | An array of @ProjectSource@ objects.
    UpdateProject -> Maybe [ProjectSource]
secondarySources :: Prelude.Maybe [ProjectSource],
    -- | The replacement ARN of the IAM role that enables CodeBuild to interact
    -- with dependent Amazon Web Services services on behalf of the Amazon Web
    -- Services account.
    UpdateProject -> Maybe Text
serviceRole :: Prelude.Maybe Prelude.Text,
    -- | Information to be changed about the build input source code for the
    -- build project.
    UpdateProject -> Maybe ProjectSource
source :: Prelude.Maybe ProjectSource,
    -- | A version of the build input to be built for this project. If not
    -- specified, the latest version is used. If specified, it must be one of:
    --
    -- -   For CodeCommit: the commit ID, branch, or Git tag to use.
    --
    -- -   For 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.
    --
    -- -   For 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.
    --
    -- -   For Amazon S3: the version ID of the object that represents the
    --     build input ZIP file to use.
    --
    -- If @sourceVersion@ is specified at the build level, then that version
    -- takes precedence over this @sourceVersion@ (at the project level).
    --
    -- 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/.
    UpdateProject -> Maybe Text
sourceVersion :: Prelude.Maybe Prelude.Text,
    -- | An updated list of tag key and value pairs associated with this build
    -- project.
    --
    -- These tags are available for use by Amazon Web Services services that
    -- support CodeBuild build project tags.
    UpdateProject -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The replacement value in minutes, from 5 to 480 (8 hours), for CodeBuild
    -- to wait before timing out any related build that did not get marked as
    -- completed.
    UpdateProject -> Maybe Natural
timeoutInMinutes :: Prelude.Maybe Prelude.Natural,
    -- | VpcConfig enables CodeBuild to access resources in an Amazon VPC.
    UpdateProject -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
    -- | The name of the build project.
    --
    -- You cannot change a build project\'s name.
    UpdateProject -> Text
name :: Prelude.Text
  }
  deriving (UpdateProject -> UpdateProject -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateProject -> UpdateProject -> Bool
$c/= :: UpdateProject -> UpdateProject -> Bool
== :: UpdateProject -> UpdateProject -> Bool
$c== :: UpdateProject -> UpdateProject -> Bool
Prelude.Eq, ReadPrec [UpdateProject]
ReadPrec UpdateProject
Int -> ReadS UpdateProject
ReadS [UpdateProject]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateProject]
$creadListPrec :: ReadPrec [UpdateProject]
readPrec :: ReadPrec UpdateProject
$creadPrec :: ReadPrec UpdateProject
readList :: ReadS [UpdateProject]
$creadList :: ReadS [UpdateProject]
readsPrec :: Int -> ReadS UpdateProject
$creadsPrec :: Int -> ReadS UpdateProject
Prelude.Read, Int -> UpdateProject -> ShowS
[UpdateProject] -> ShowS
UpdateProject -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateProject] -> ShowS
$cshowList :: [UpdateProject] -> ShowS
show :: UpdateProject -> String
$cshow :: UpdateProject -> String
showsPrec :: Int -> UpdateProject -> ShowS
$cshowsPrec :: Int -> UpdateProject -> ShowS
Prelude.Show, forall x. Rep UpdateProject x -> UpdateProject
forall x. UpdateProject -> Rep UpdateProject x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateProject x -> UpdateProject
$cfrom :: forall x. UpdateProject -> Rep UpdateProject x
Prelude.Generic)

-- |
-- Create a value of 'UpdateProject' 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:
--
-- 'artifacts', 'updateProject_artifacts' - Information to be changed about the build output artifacts for the build
-- project.
--
-- 'badgeEnabled', 'updateProject_badgeEnabled' - Set this to true to generate a publicly accessible URL for your
-- project\'s build badge.
--
-- 'buildBatchConfig', 'updateProject_buildBatchConfig' - Undocumented member.
--
-- 'cache', 'updateProject_cache' - Stores recently used information so that it can be quickly accessed at a
-- later time.
--
-- 'concurrentBuildLimit', 'updateProject_concurrentBuildLimit' - The maximum number of concurrent builds that are allowed for this
-- project.
--
-- New builds are only started if the current number of builds is less than
-- or equal to this limit. If the current build count meets this limit, new
-- builds are throttled and are not run.
--
-- To remove this limit, set this value to -1.
--
-- 'description', 'updateProject_description' - A new or replacement description of the build project.
--
-- 'encryptionKey', 'updateProject_encryptionKey' - The Key Management Service customer master key (CMK) to be used for
-- encrypting 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>@).
--
-- 'environment', 'updateProject_environment' - Information to be changed about the build environment for the build
-- project.
--
-- 'fileSystemLocations', 'updateProject_fileSystemLocations' - An array of @ProjectFileSystemLocation@ objects for a CodeBuild build
-- project. A @ProjectFileSystemLocation@ object specifies the
-- @identifier@, @location@, @mountOptions@, @mountPoint@, and @type@ of a
-- file system created using Amazon Elastic File System.
--
-- 'logsConfig', 'updateProject_logsConfig' - Information about logs for the build project. A project can create logs
-- in CloudWatch Logs, logs in an S3 bucket, or both.
--
-- 'queuedTimeoutInMinutes', 'updateProject_queuedTimeoutInMinutes' - The number of minutes a build is allowed to be queued before it times
-- out.
--
-- 'secondaryArtifacts', 'updateProject_secondaryArtifacts' - An array of @ProjectArtifact@ objects.
--
-- 'secondarySourceVersions', 'updateProject_secondarySourceVersions' - An array of @ProjectSourceVersion@ objects. If @secondarySourceVersions@
-- is specified at the build level, then they take over these
-- @secondarySourceVersions@ (at the project level).
--
-- 'secondarySources', 'updateProject_secondarySources' - An array of @ProjectSource@ objects.
--
-- 'serviceRole', 'updateProject_serviceRole' - The replacement ARN of the IAM role that enables CodeBuild to interact
-- with dependent Amazon Web Services services on behalf of the Amazon Web
-- Services account.
--
-- 'source', 'updateProject_source' - Information to be changed about the build input source code for the
-- build project.
--
-- 'sourceVersion', 'updateProject_sourceVersion' - A version of the build input to be built for this project. If not
-- specified, the latest version is used. If specified, it must be one of:
--
-- -   For CodeCommit: the commit ID, branch, or Git tag to use.
--
-- -   For 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.
--
-- -   For 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.
--
-- -   For Amazon S3: the version ID of the object that represents the
--     build input ZIP file to use.
--
-- If @sourceVersion@ is specified at the build level, then that version
-- takes precedence over this @sourceVersion@ (at the project level).
--
-- 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/.
--
-- 'tags', 'updateProject_tags' - An updated list of tag key and value pairs associated with this build
-- project.
--
-- These tags are available for use by Amazon Web Services services that
-- support CodeBuild build project tags.
--
-- 'timeoutInMinutes', 'updateProject_timeoutInMinutes' - The replacement value in minutes, from 5 to 480 (8 hours), for CodeBuild
-- to wait before timing out any related build that did not get marked as
-- completed.
--
-- 'vpcConfig', 'updateProject_vpcConfig' - VpcConfig enables CodeBuild to access resources in an Amazon VPC.
--
-- 'name', 'updateProject_name' - The name of the build project.
--
-- You cannot change a build project\'s name.
newUpdateProject ::
  -- | 'name'
  Prelude.Text ->
  UpdateProject
newUpdateProject :: Text -> UpdateProject
newUpdateProject Text
pName_ =
  UpdateProject'
    { $sel:artifacts:UpdateProject' :: Maybe ProjectArtifacts
artifacts = forall a. Maybe a
Prelude.Nothing,
      $sel:badgeEnabled:UpdateProject' :: Maybe Bool
badgeEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:buildBatchConfig:UpdateProject' :: Maybe ProjectBuildBatchConfig
buildBatchConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:cache:UpdateProject' :: Maybe ProjectCache
cache = forall a. Maybe a
Prelude.Nothing,
      $sel:concurrentBuildLimit:UpdateProject' :: Maybe Int
concurrentBuildLimit = forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateProject' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionKey:UpdateProject' :: Maybe Text
encryptionKey = forall a. Maybe a
Prelude.Nothing,
      $sel:environment:UpdateProject' :: Maybe ProjectEnvironment
environment = forall a. Maybe a
Prelude.Nothing,
      $sel:fileSystemLocations:UpdateProject' :: Maybe [ProjectFileSystemLocation]
fileSystemLocations = forall a. Maybe a
Prelude.Nothing,
      $sel:logsConfig:UpdateProject' :: Maybe LogsConfig
logsConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:queuedTimeoutInMinutes:UpdateProject' :: Maybe Natural
queuedTimeoutInMinutes = forall a. Maybe a
Prelude.Nothing,
      $sel:secondaryArtifacts:UpdateProject' :: Maybe [ProjectArtifacts]
secondaryArtifacts = forall a. Maybe a
Prelude.Nothing,
      $sel:secondarySourceVersions:UpdateProject' :: Maybe [ProjectSourceVersion]
secondarySourceVersions = forall a. Maybe a
Prelude.Nothing,
      $sel:secondarySources:UpdateProject' :: Maybe [ProjectSource]
secondarySources = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRole:UpdateProject' :: Maybe Text
serviceRole = forall a. Maybe a
Prelude.Nothing,
      $sel:source:UpdateProject' :: Maybe ProjectSource
source = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceVersion:UpdateProject' :: Maybe Text
sourceVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:UpdateProject' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutInMinutes:UpdateProject' :: Maybe Natural
timeoutInMinutes = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcConfig:UpdateProject' :: Maybe VpcConfig
vpcConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateProject' :: Text
name = Text
pName_
    }

-- | Information to be changed about the build output artifacts for the build
-- project.
updateProject_artifacts :: Lens.Lens' UpdateProject (Prelude.Maybe ProjectArtifacts)
updateProject_artifacts :: Lens' UpdateProject (Maybe ProjectArtifacts)
updateProject_artifacts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe ProjectArtifacts
artifacts :: Maybe ProjectArtifacts
$sel:artifacts:UpdateProject' :: UpdateProject -> Maybe ProjectArtifacts
artifacts} -> Maybe ProjectArtifacts
artifacts) (\s :: UpdateProject
s@UpdateProject' {} Maybe ProjectArtifacts
a -> UpdateProject
s {$sel:artifacts:UpdateProject' :: Maybe ProjectArtifacts
artifacts = Maybe ProjectArtifacts
a} :: UpdateProject)

-- | Set this to true to generate a publicly accessible URL for your
-- project\'s build badge.
updateProject_badgeEnabled :: Lens.Lens' UpdateProject (Prelude.Maybe Prelude.Bool)
updateProject_badgeEnabled :: Lens' UpdateProject (Maybe Bool)
updateProject_badgeEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe Bool
badgeEnabled :: Maybe Bool
$sel:badgeEnabled:UpdateProject' :: UpdateProject -> Maybe Bool
badgeEnabled} -> Maybe Bool
badgeEnabled) (\s :: UpdateProject
s@UpdateProject' {} Maybe Bool
a -> UpdateProject
s {$sel:badgeEnabled:UpdateProject' :: Maybe Bool
badgeEnabled = Maybe Bool
a} :: UpdateProject)

-- | Undocumented member.
updateProject_buildBatchConfig :: Lens.Lens' UpdateProject (Prelude.Maybe ProjectBuildBatchConfig)
updateProject_buildBatchConfig :: Lens' UpdateProject (Maybe ProjectBuildBatchConfig)
updateProject_buildBatchConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe ProjectBuildBatchConfig
buildBatchConfig :: Maybe ProjectBuildBatchConfig
$sel:buildBatchConfig:UpdateProject' :: UpdateProject -> Maybe ProjectBuildBatchConfig
buildBatchConfig} -> Maybe ProjectBuildBatchConfig
buildBatchConfig) (\s :: UpdateProject
s@UpdateProject' {} Maybe ProjectBuildBatchConfig
a -> UpdateProject
s {$sel:buildBatchConfig:UpdateProject' :: Maybe ProjectBuildBatchConfig
buildBatchConfig = Maybe ProjectBuildBatchConfig
a} :: UpdateProject)

-- | Stores recently used information so that it can be quickly accessed at a
-- later time.
updateProject_cache :: Lens.Lens' UpdateProject (Prelude.Maybe ProjectCache)
updateProject_cache :: Lens' UpdateProject (Maybe ProjectCache)
updateProject_cache = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe ProjectCache
cache :: Maybe ProjectCache
$sel:cache:UpdateProject' :: UpdateProject -> Maybe ProjectCache
cache} -> Maybe ProjectCache
cache) (\s :: UpdateProject
s@UpdateProject' {} Maybe ProjectCache
a -> UpdateProject
s {$sel:cache:UpdateProject' :: Maybe ProjectCache
cache = Maybe ProjectCache
a} :: UpdateProject)

-- | The maximum number of concurrent builds that are allowed for this
-- project.
--
-- New builds are only started if the current number of builds is less than
-- or equal to this limit. If the current build count meets this limit, new
-- builds are throttled and are not run.
--
-- To remove this limit, set this value to -1.
updateProject_concurrentBuildLimit :: Lens.Lens' UpdateProject (Prelude.Maybe Prelude.Int)
updateProject_concurrentBuildLimit :: Lens' UpdateProject (Maybe Int)
updateProject_concurrentBuildLimit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe Int
concurrentBuildLimit :: Maybe Int
$sel:concurrentBuildLimit:UpdateProject' :: UpdateProject -> Maybe Int
concurrentBuildLimit} -> Maybe Int
concurrentBuildLimit) (\s :: UpdateProject
s@UpdateProject' {} Maybe Int
a -> UpdateProject
s {$sel:concurrentBuildLimit:UpdateProject' :: Maybe Int
concurrentBuildLimit = Maybe Int
a} :: UpdateProject)

-- | A new or replacement description of the build project.
updateProject_description :: Lens.Lens' UpdateProject (Prelude.Maybe Prelude.Text)
updateProject_description :: Lens' UpdateProject (Maybe Text)
updateProject_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe Text
description :: Maybe Text
$sel:description:UpdateProject' :: UpdateProject -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateProject
s@UpdateProject' {} Maybe Text
a -> UpdateProject
s {$sel:description:UpdateProject' :: Maybe Text
description = Maybe Text
a} :: UpdateProject)

-- | The Key Management Service customer master key (CMK) to be used for
-- encrypting 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>@).
updateProject_encryptionKey :: Lens.Lens' UpdateProject (Prelude.Maybe Prelude.Text)
updateProject_encryptionKey :: Lens' UpdateProject (Maybe Text)
updateProject_encryptionKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe Text
encryptionKey :: Maybe Text
$sel:encryptionKey:UpdateProject' :: UpdateProject -> Maybe Text
encryptionKey} -> Maybe Text
encryptionKey) (\s :: UpdateProject
s@UpdateProject' {} Maybe Text
a -> UpdateProject
s {$sel:encryptionKey:UpdateProject' :: Maybe Text
encryptionKey = Maybe Text
a} :: UpdateProject)

-- | Information to be changed about the build environment for the build
-- project.
updateProject_environment :: Lens.Lens' UpdateProject (Prelude.Maybe ProjectEnvironment)
updateProject_environment :: Lens' UpdateProject (Maybe ProjectEnvironment)
updateProject_environment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe ProjectEnvironment
environment :: Maybe ProjectEnvironment
$sel:environment:UpdateProject' :: UpdateProject -> Maybe ProjectEnvironment
environment} -> Maybe ProjectEnvironment
environment) (\s :: UpdateProject
s@UpdateProject' {} Maybe ProjectEnvironment
a -> UpdateProject
s {$sel:environment:UpdateProject' :: Maybe ProjectEnvironment
environment = Maybe ProjectEnvironment
a} :: UpdateProject)

-- | An array of @ProjectFileSystemLocation@ objects for a CodeBuild build
-- project. A @ProjectFileSystemLocation@ object specifies the
-- @identifier@, @location@, @mountOptions@, @mountPoint@, and @type@ of a
-- file system created using Amazon Elastic File System.
updateProject_fileSystemLocations :: Lens.Lens' UpdateProject (Prelude.Maybe [ProjectFileSystemLocation])
updateProject_fileSystemLocations :: Lens' UpdateProject (Maybe [ProjectFileSystemLocation])
updateProject_fileSystemLocations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe [ProjectFileSystemLocation]
fileSystemLocations :: Maybe [ProjectFileSystemLocation]
$sel:fileSystemLocations:UpdateProject' :: UpdateProject -> Maybe [ProjectFileSystemLocation]
fileSystemLocations} -> Maybe [ProjectFileSystemLocation]
fileSystemLocations) (\s :: UpdateProject
s@UpdateProject' {} Maybe [ProjectFileSystemLocation]
a -> UpdateProject
s {$sel:fileSystemLocations:UpdateProject' :: Maybe [ProjectFileSystemLocation]
fileSystemLocations = Maybe [ProjectFileSystemLocation]
a} :: UpdateProject) 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

-- | Information about logs for the build project. A project can create logs
-- in CloudWatch Logs, logs in an S3 bucket, or both.
updateProject_logsConfig :: Lens.Lens' UpdateProject (Prelude.Maybe LogsConfig)
updateProject_logsConfig :: Lens' UpdateProject (Maybe LogsConfig)
updateProject_logsConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe LogsConfig
logsConfig :: Maybe LogsConfig
$sel:logsConfig:UpdateProject' :: UpdateProject -> Maybe LogsConfig
logsConfig} -> Maybe LogsConfig
logsConfig) (\s :: UpdateProject
s@UpdateProject' {} Maybe LogsConfig
a -> UpdateProject
s {$sel:logsConfig:UpdateProject' :: Maybe LogsConfig
logsConfig = Maybe LogsConfig
a} :: UpdateProject)

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

-- | An array of @ProjectArtifact@ objects.
updateProject_secondaryArtifacts :: Lens.Lens' UpdateProject (Prelude.Maybe [ProjectArtifacts])
updateProject_secondaryArtifacts :: Lens' UpdateProject (Maybe [ProjectArtifacts])
updateProject_secondaryArtifacts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe [ProjectArtifacts]
secondaryArtifacts :: Maybe [ProjectArtifacts]
$sel:secondaryArtifacts:UpdateProject' :: UpdateProject -> Maybe [ProjectArtifacts]
secondaryArtifacts} -> Maybe [ProjectArtifacts]
secondaryArtifacts) (\s :: UpdateProject
s@UpdateProject' {} Maybe [ProjectArtifacts]
a -> UpdateProject
s {$sel:secondaryArtifacts:UpdateProject' :: Maybe [ProjectArtifacts]
secondaryArtifacts = Maybe [ProjectArtifacts]
a} :: UpdateProject) 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

-- | An array of @ProjectSourceVersion@ objects. If @secondarySourceVersions@
-- is specified at the build level, then they take over these
-- @secondarySourceVersions@ (at the project level).
updateProject_secondarySourceVersions :: Lens.Lens' UpdateProject (Prelude.Maybe [ProjectSourceVersion])
updateProject_secondarySourceVersions :: Lens' UpdateProject (Maybe [ProjectSourceVersion])
updateProject_secondarySourceVersions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe [ProjectSourceVersion]
secondarySourceVersions :: Maybe [ProjectSourceVersion]
$sel:secondarySourceVersions:UpdateProject' :: UpdateProject -> Maybe [ProjectSourceVersion]
secondarySourceVersions} -> Maybe [ProjectSourceVersion]
secondarySourceVersions) (\s :: UpdateProject
s@UpdateProject' {} Maybe [ProjectSourceVersion]
a -> UpdateProject
s {$sel:secondarySourceVersions:UpdateProject' :: Maybe [ProjectSourceVersion]
secondarySourceVersions = Maybe [ProjectSourceVersion]
a} :: UpdateProject) 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

-- | An array of @ProjectSource@ objects.
updateProject_secondarySources :: Lens.Lens' UpdateProject (Prelude.Maybe [ProjectSource])
updateProject_secondarySources :: Lens' UpdateProject (Maybe [ProjectSource])
updateProject_secondarySources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe [ProjectSource]
secondarySources :: Maybe [ProjectSource]
$sel:secondarySources:UpdateProject' :: UpdateProject -> Maybe [ProjectSource]
secondarySources} -> Maybe [ProjectSource]
secondarySources) (\s :: UpdateProject
s@UpdateProject' {} Maybe [ProjectSource]
a -> UpdateProject
s {$sel:secondarySources:UpdateProject' :: Maybe [ProjectSource]
secondarySources = Maybe [ProjectSource]
a} :: UpdateProject) 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 replacement ARN of the IAM role that enables CodeBuild to interact
-- with dependent Amazon Web Services services on behalf of the Amazon Web
-- Services account.
updateProject_serviceRole :: Lens.Lens' UpdateProject (Prelude.Maybe Prelude.Text)
updateProject_serviceRole :: Lens' UpdateProject (Maybe Text)
updateProject_serviceRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe Text
serviceRole :: Maybe Text
$sel:serviceRole:UpdateProject' :: UpdateProject -> Maybe Text
serviceRole} -> Maybe Text
serviceRole) (\s :: UpdateProject
s@UpdateProject' {} Maybe Text
a -> UpdateProject
s {$sel:serviceRole:UpdateProject' :: Maybe Text
serviceRole = Maybe Text
a} :: UpdateProject)

-- | Information to be changed about the build input source code for the
-- build project.
updateProject_source :: Lens.Lens' UpdateProject (Prelude.Maybe ProjectSource)
updateProject_source :: Lens' UpdateProject (Maybe ProjectSource)
updateProject_source = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe ProjectSource
source :: Maybe ProjectSource
$sel:source:UpdateProject' :: UpdateProject -> Maybe ProjectSource
source} -> Maybe ProjectSource
source) (\s :: UpdateProject
s@UpdateProject' {} Maybe ProjectSource
a -> UpdateProject
s {$sel:source:UpdateProject' :: Maybe ProjectSource
source = Maybe ProjectSource
a} :: UpdateProject)

-- | A version of the build input to be built for this project. If not
-- specified, the latest version is used. If specified, it must be one of:
--
-- -   For CodeCommit: the commit ID, branch, or Git tag to use.
--
-- -   For 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.
--
-- -   For 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.
--
-- -   For Amazon S3: the version ID of the object that represents the
--     build input ZIP file to use.
--
-- If @sourceVersion@ is specified at the build level, then that version
-- takes precedence over this @sourceVersion@ (at the project level).
--
-- 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/.
updateProject_sourceVersion :: Lens.Lens' UpdateProject (Prelude.Maybe Prelude.Text)
updateProject_sourceVersion :: Lens' UpdateProject (Maybe Text)
updateProject_sourceVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe Text
sourceVersion :: Maybe Text
$sel:sourceVersion:UpdateProject' :: UpdateProject -> Maybe Text
sourceVersion} -> Maybe Text
sourceVersion) (\s :: UpdateProject
s@UpdateProject' {} Maybe Text
a -> UpdateProject
s {$sel:sourceVersion:UpdateProject' :: Maybe Text
sourceVersion = Maybe Text
a} :: UpdateProject)

-- | An updated list of tag key and value pairs associated with this build
-- project.
--
-- These tags are available for use by Amazon Web Services services that
-- support CodeBuild build project tags.
updateProject_tags :: Lens.Lens' UpdateProject (Prelude.Maybe [Tag])
updateProject_tags :: Lens' UpdateProject (Maybe [Tag])
updateProject_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:UpdateProject' :: UpdateProject -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: UpdateProject
s@UpdateProject' {} Maybe [Tag]
a -> UpdateProject
s {$sel:tags:UpdateProject' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: UpdateProject) 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 replacement value in minutes, from 5 to 480 (8 hours), for CodeBuild
-- to wait before timing out any related build that did not get marked as
-- completed.
updateProject_timeoutInMinutes :: Lens.Lens' UpdateProject (Prelude.Maybe Prelude.Natural)
updateProject_timeoutInMinutes :: Lens' UpdateProject (Maybe Natural)
updateProject_timeoutInMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe Natural
timeoutInMinutes :: Maybe Natural
$sel:timeoutInMinutes:UpdateProject' :: UpdateProject -> Maybe Natural
timeoutInMinutes} -> Maybe Natural
timeoutInMinutes) (\s :: UpdateProject
s@UpdateProject' {} Maybe Natural
a -> UpdateProject
s {$sel:timeoutInMinutes:UpdateProject' :: Maybe Natural
timeoutInMinutes = Maybe Natural
a} :: UpdateProject)

-- | VpcConfig enables CodeBuild to access resources in an Amazon VPC.
updateProject_vpcConfig :: Lens.Lens' UpdateProject (Prelude.Maybe VpcConfig)
updateProject_vpcConfig :: Lens' UpdateProject (Maybe VpcConfig)
updateProject_vpcConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:UpdateProject' :: UpdateProject -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: UpdateProject
s@UpdateProject' {} Maybe VpcConfig
a -> UpdateProject
s {$sel:vpcConfig:UpdateProject' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: UpdateProject)

-- | The name of the build project.
--
-- You cannot change a build project\'s name.
updateProject_name :: Lens.Lens' UpdateProject Prelude.Text
updateProject_name :: Lens' UpdateProject Text
updateProject_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProject' {Text
name :: Text
$sel:name:UpdateProject' :: UpdateProject -> Text
name} -> Text
name) (\s :: UpdateProject
s@UpdateProject' {} Text
a -> UpdateProject
s {$sel:name:UpdateProject' :: Text
name = Text
a} :: UpdateProject)

instance Core.AWSRequest UpdateProject where
  type
    AWSResponse UpdateProject =
      UpdateProjectResponse
  request :: (Service -> Service) -> UpdateProject -> Request UpdateProject
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateProject
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateProject)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Project -> Int -> UpdateProjectResponse
UpdateProjectResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"project")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateProject where
  hashWithSalt :: Int -> UpdateProject -> Int
hashWithSalt Int
_salt UpdateProject' {Maybe Bool
Maybe Int
Maybe Natural
Maybe [ProjectArtifacts]
Maybe [ProjectFileSystemLocation]
Maybe [ProjectSourceVersion]
Maybe [ProjectSource]
Maybe [Tag]
Maybe Text
Maybe ProjectArtifacts
Maybe ProjectBuildBatchConfig
Maybe ProjectCache
Maybe ProjectEnvironment
Maybe LogsConfig
Maybe ProjectSource
Maybe VpcConfig
Text
name :: Text
vpcConfig :: Maybe VpcConfig
timeoutInMinutes :: Maybe Natural
tags :: Maybe [Tag]
sourceVersion :: Maybe Text
source :: Maybe ProjectSource
serviceRole :: Maybe Text
secondarySources :: Maybe [ProjectSource]
secondarySourceVersions :: Maybe [ProjectSourceVersion]
secondaryArtifacts :: Maybe [ProjectArtifacts]
queuedTimeoutInMinutes :: Maybe Natural
logsConfig :: Maybe LogsConfig
fileSystemLocations :: Maybe [ProjectFileSystemLocation]
environment :: Maybe ProjectEnvironment
encryptionKey :: Maybe Text
description :: Maybe Text
concurrentBuildLimit :: Maybe Int
cache :: Maybe ProjectCache
buildBatchConfig :: Maybe ProjectBuildBatchConfig
badgeEnabled :: Maybe Bool
artifacts :: Maybe ProjectArtifacts
$sel:name:UpdateProject' :: UpdateProject -> Text
$sel:vpcConfig:UpdateProject' :: UpdateProject -> Maybe VpcConfig
$sel:timeoutInMinutes:UpdateProject' :: UpdateProject -> Maybe Natural
$sel:tags:UpdateProject' :: UpdateProject -> Maybe [Tag]
$sel:sourceVersion:UpdateProject' :: UpdateProject -> Maybe Text
$sel:source:UpdateProject' :: UpdateProject -> Maybe ProjectSource
$sel:serviceRole:UpdateProject' :: UpdateProject -> Maybe Text
$sel:secondarySources:UpdateProject' :: UpdateProject -> Maybe [ProjectSource]
$sel:secondarySourceVersions:UpdateProject' :: UpdateProject -> Maybe [ProjectSourceVersion]
$sel:secondaryArtifacts:UpdateProject' :: UpdateProject -> Maybe [ProjectArtifacts]
$sel:queuedTimeoutInMinutes:UpdateProject' :: UpdateProject -> Maybe Natural
$sel:logsConfig:UpdateProject' :: UpdateProject -> Maybe LogsConfig
$sel:fileSystemLocations:UpdateProject' :: UpdateProject -> Maybe [ProjectFileSystemLocation]
$sel:environment:UpdateProject' :: UpdateProject -> Maybe ProjectEnvironment
$sel:encryptionKey:UpdateProject' :: UpdateProject -> Maybe Text
$sel:description:UpdateProject' :: UpdateProject -> Maybe Text
$sel:concurrentBuildLimit:UpdateProject' :: UpdateProject -> Maybe Int
$sel:cache:UpdateProject' :: UpdateProject -> Maybe ProjectCache
$sel:buildBatchConfig:UpdateProject' :: UpdateProject -> Maybe ProjectBuildBatchConfig
$sel:badgeEnabled:UpdateProject' :: UpdateProject -> Maybe Bool
$sel:artifacts:UpdateProject' :: UpdateProject -> Maybe ProjectArtifacts
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProjectArtifacts
artifacts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
badgeEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProjectBuildBatchConfig
buildBatchConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProjectCache
cache
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
concurrentBuildLimit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
encryptionKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProjectEnvironment
environment
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ProjectFileSystemLocation]
fileSystemLocations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LogsConfig
logsConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
queuedTimeoutInMinutes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ProjectArtifacts]
secondaryArtifacts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ProjectSourceVersion]
secondarySourceVersions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ProjectSource]
secondarySources
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceRole
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProjectSource
source
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
timeoutInMinutes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcConfig
vpcConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData UpdateProject where
  rnf :: UpdateProject -> ()
rnf UpdateProject' {Maybe Bool
Maybe Int
Maybe Natural
Maybe [ProjectArtifacts]
Maybe [ProjectFileSystemLocation]
Maybe [ProjectSourceVersion]
Maybe [ProjectSource]
Maybe [Tag]
Maybe Text
Maybe ProjectArtifacts
Maybe ProjectBuildBatchConfig
Maybe ProjectCache
Maybe ProjectEnvironment
Maybe LogsConfig
Maybe ProjectSource
Maybe VpcConfig
Text
name :: Text
vpcConfig :: Maybe VpcConfig
timeoutInMinutes :: Maybe Natural
tags :: Maybe [Tag]
sourceVersion :: Maybe Text
source :: Maybe ProjectSource
serviceRole :: Maybe Text
secondarySources :: Maybe [ProjectSource]
secondarySourceVersions :: Maybe [ProjectSourceVersion]
secondaryArtifacts :: Maybe [ProjectArtifacts]
queuedTimeoutInMinutes :: Maybe Natural
logsConfig :: Maybe LogsConfig
fileSystemLocations :: Maybe [ProjectFileSystemLocation]
environment :: Maybe ProjectEnvironment
encryptionKey :: Maybe Text
description :: Maybe Text
concurrentBuildLimit :: Maybe Int
cache :: Maybe ProjectCache
buildBatchConfig :: Maybe ProjectBuildBatchConfig
badgeEnabled :: Maybe Bool
artifacts :: Maybe ProjectArtifacts
$sel:name:UpdateProject' :: UpdateProject -> Text
$sel:vpcConfig:UpdateProject' :: UpdateProject -> Maybe VpcConfig
$sel:timeoutInMinutes:UpdateProject' :: UpdateProject -> Maybe Natural
$sel:tags:UpdateProject' :: UpdateProject -> Maybe [Tag]
$sel:sourceVersion:UpdateProject' :: UpdateProject -> Maybe Text
$sel:source:UpdateProject' :: UpdateProject -> Maybe ProjectSource
$sel:serviceRole:UpdateProject' :: UpdateProject -> Maybe Text
$sel:secondarySources:UpdateProject' :: UpdateProject -> Maybe [ProjectSource]
$sel:secondarySourceVersions:UpdateProject' :: UpdateProject -> Maybe [ProjectSourceVersion]
$sel:secondaryArtifacts:UpdateProject' :: UpdateProject -> Maybe [ProjectArtifacts]
$sel:queuedTimeoutInMinutes:UpdateProject' :: UpdateProject -> Maybe Natural
$sel:logsConfig:UpdateProject' :: UpdateProject -> Maybe LogsConfig
$sel:fileSystemLocations:UpdateProject' :: UpdateProject -> Maybe [ProjectFileSystemLocation]
$sel:environment:UpdateProject' :: UpdateProject -> Maybe ProjectEnvironment
$sel:encryptionKey:UpdateProject' :: UpdateProject -> Maybe Text
$sel:description:UpdateProject' :: UpdateProject -> Maybe Text
$sel:concurrentBuildLimit:UpdateProject' :: UpdateProject -> Maybe Int
$sel:cache:UpdateProject' :: UpdateProject -> Maybe ProjectCache
$sel:buildBatchConfig:UpdateProject' :: UpdateProject -> Maybe ProjectBuildBatchConfig
$sel:badgeEnabled:UpdateProject' :: UpdateProject -> Maybe Bool
$sel:artifacts:UpdateProject' :: UpdateProject -> Maybe ProjectArtifacts
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ProjectArtifacts
artifacts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
badgeEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProjectBuildBatchConfig
buildBatchConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProjectCache
cache
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
concurrentBuildLimit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
encryptionKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProjectEnvironment
environment
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ProjectFileSystemLocation]
fileSystemLocations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LogsConfig
logsConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
queuedTimeoutInMinutes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ProjectArtifacts]
secondaryArtifacts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ProjectSourceVersion]
secondarySourceVersions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ProjectSource]
secondarySources
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceRole
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProjectSource
source
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeoutInMinutes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcConfig
vpcConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

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

instance Data.ToJSON UpdateProject where
  toJSON :: UpdateProject -> Value
toJSON UpdateProject' {Maybe Bool
Maybe Int
Maybe Natural
Maybe [ProjectArtifacts]
Maybe [ProjectFileSystemLocation]
Maybe [ProjectSourceVersion]
Maybe [ProjectSource]
Maybe [Tag]
Maybe Text
Maybe ProjectArtifacts
Maybe ProjectBuildBatchConfig
Maybe ProjectCache
Maybe ProjectEnvironment
Maybe LogsConfig
Maybe ProjectSource
Maybe VpcConfig
Text
name :: Text
vpcConfig :: Maybe VpcConfig
timeoutInMinutes :: Maybe Natural
tags :: Maybe [Tag]
sourceVersion :: Maybe Text
source :: Maybe ProjectSource
serviceRole :: Maybe Text
secondarySources :: Maybe [ProjectSource]
secondarySourceVersions :: Maybe [ProjectSourceVersion]
secondaryArtifacts :: Maybe [ProjectArtifacts]
queuedTimeoutInMinutes :: Maybe Natural
logsConfig :: Maybe LogsConfig
fileSystemLocations :: Maybe [ProjectFileSystemLocation]
environment :: Maybe ProjectEnvironment
encryptionKey :: Maybe Text
description :: Maybe Text
concurrentBuildLimit :: Maybe Int
cache :: Maybe ProjectCache
buildBatchConfig :: Maybe ProjectBuildBatchConfig
badgeEnabled :: Maybe Bool
artifacts :: Maybe ProjectArtifacts
$sel:name:UpdateProject' :: UpdateProject -> Text
$sel:vpcConfig:UpdateProject' :: UpdateProject -> Maybe VpcConfig
$sel:timeoutInMinutes:UpdateProject' :: UpdateProject -> Maybe Natural
$sel:tags:UpdateProject' :: UpdateProject -> Maybe [Tag]
$sel:sourceVersion:UpdateProject' :: UpdateProject -> Maybe Text
$sel:source:UpdateProject' :: UpdateProject -> Maybe ProjectSource
$sel:serviceRole:UpdateProject' :: UpdateProject -> Maybe Text
$sel:secondarySources:UpdateProject' :: UpdateProject -> Maybe [ProjectSource]
$sel:secondarySourceVersions:UpdateProject' :: UpdateProject -> Maybe [ProjectSourceVersion]
$sel:secondaryArtifacts:UpdateProject' :: UpdateProject -> Maybe [ProjectArtifacts]
$sel:queuedTimeoutInMinutes:UpdateProject' :: UpdateProject -> Maybe Natural
$sel:logsConfig:UpdateProject' :: UpdateProject -> Maybe LogsConfig
$sel:fileSystemLocations:UpdateProject' :: UpdateProject -> Maybe [ProjectFileSystemLocation]
$sel:environment:UpdateProject' :: UpdateProject -> Maybe ProjectEnvironment
$sel:encryptionKey:UpdateProject' :: UpdateProject -> Maybe Text
$sel:description:UpdateProject' :: UpdateProject -> Maybe Text
$sel:concurrentBuildLimit:UpdateProject' :: UpdateProject -> Maybe Int
$sel:cache:UpdateProject' :: UpdateProject -> Maybe ProjectCache
$sel:buildBatchConfig:UpdateProject' :: UpdateProject -> Maybe ProjectBuildBatchConfig
$sel:badgeEnabled:UpdateProject' :: UpdateProject -> Maybe Bool
$sel:artifacts:UpdateProject' :: UpdateProject -> Maybe ProjectArtifacts
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"artifacts" 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 ProjectArtifacts
artifacts,
            (Key
"badgeEnabled" 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 Bool
badgeEnabled,
            (Key
"buildBatchConfig" 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 ProjectBuildBatchConfig
buildBatchConfig,
            (Key
"cache" 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 ProjectCache
cache,
            (Key
"concurrentBuildLimit" 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 Int
concurrentBuildLimit,
            (Key
"description" 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
description,
            (Key
"encryptionKey" 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
encryptionKey,
            (Key
"environment" 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 ProjectEnvironment
environment,
            (Key
"fileSystemLocations" 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 [ProjectFileSystemLocation]
fileSystemLocations,
            (Key
"logsConfig" 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 LogsConfig
logsConfig,
            (Key
"queuedTimeoutInMinutes" 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 Natural
queuedTimeoutInMinutes,
            (Key
"secondaryArtifacts" 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 [ProjectArtifacts]
secondaryArtifacts,
            (Key
"secondarySourceVersions" 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 [ProjectSourceVersion]
secondarySourceVersions,
            (Key
"secondarySources" 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 [ProjectSource]
secondarySources,
            (Key
"serviceRole" 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
serviceRole,
            (Key
"source" 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 ProjectSource
source,
            (Key
"sourceVersion" 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
sourceVersion,
            (Key
"tags" 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 [Tag]
tags,
            (Key
"timeoutInMinutes" 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 Natural
timeoutInMinutes,
            (Key
"vpcConfig" 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 VpcConfig
vpcConfig,
            forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateProjectResponse' 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:
--
-- 'project', 'updateProjectResponse_project' - Information about the build project that was changed.
--
-- 'httpStatus', 'updateProjectResponse_httpStatus' - The response's http status code.
newUpdateProjectResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateProjectResponse
newUpdateProjectResponse :: Int -> UpdateProjectResponse
newUpdateProjectResponse Int
pHttpStatus_ =
  UpdateProjectResponse'
    { $sel:project:UpdateProjectResponse' :: Maybe Project
project = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateProjectResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the build project that was changed.
updateProjectResponse_project :: Lens.Lens' UpdateProjectResponse (Prelude.Maybe Project)
updateProjectResponse_project :: Lens' UpdateProjectResponse (Maybe Project)
updateProjectResponse_project = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProjectResponse' {Maybe Project
project :: Maybe Project
$sel:project:UpdateProjectResponse' :: UpdateProjectResponse -> Maybe Project
project} -> Maybe Project
project) (\s :: UpdateProjectResponse
s@UpdateProjectResponse' {} Maybe Project
a -> UpdateProjectResponse
s {$sel:project:UpdateProjectResponse' :: Maybe Project
project = Maybe Project
a} :: UpdateProjectResponse)

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

instance Prelude.NFData UpdateProjectResponse where
  rnf :: UpdateProjectResponse -> ()
rnf UpdateProjectResponse' {Int
Maybe Project
httpStatus :: Int
project :: Maybe Project
$sel:httpStatus:UpdateProjectResponse' :: UpdateProjectResponse -> Int
$sel:project:UpdateProjectResponse' :: UpdateProjectResponse -> Maybe Project
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Project
project
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus