All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.codebuild.model.BuildBatch Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Code Build module holds the client classes that are used for communicating with AWS Code Build.

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.codebuild.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Contains information about a batch build. *

*/ @Generated("software.amazon.awssdk:codegen") public final class BuildBatch implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("id") .getter(getter(BuildBatch::id)).setter(setter(Builder::id)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("id").build()).build(); private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("arn") .getter(getter(BuildBatch::arn)).setter(setter(Builder::arn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("arn").build()).build(); private static final SdkField START_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("startTime").getter(getter(BuildBatch::startTime)).setter(setter(Builder::startTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("startTime").build()).build(); private static final SdkField END_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("endTime").getter(getter(BuildBatch::endTime)).setter(setter(Builder::endTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("endTime").build()).build(); private static final SdkField CURRENT_PHASE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("currentPhase").getter(getter(BuildBatch::currentPhase)).setter(setter(Builder::currentPhase)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("currentPhase").build()).build(); private static final SdkField BUILD_BATCH_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("buildBatchStatus").getter(getter(BuildBatch::buildBatchStatusAsString)) .setter(setter(Builder::buildBatchStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("buildBatchStatus").build()).build(); private static final SdkField SOURCE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("sourceVersion").getter(getter(BuildBatch::sourceVersion)).setter(setter(Builder::sourceVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sourceVersion").build()).build(); private static final SdkField RESOLVED_SOURCE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("resolvedSourceVersion").getter(getter(BuildBatch::resolvedSourceVersion)) .setter(setter(Builder::resolvedSourceVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("resolvedSourceVersion").build()) .build(); private static final SdkField PROJECT_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("projectName").getter(getter(BuildBatch::projectName)).setter(setter(Builder::projectName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("projectName").build()).build(); private static final SdkField> PHASES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("phases") .getter(getter(BuildBatch::phases)) .setter(setter(Builder::phases)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("phases").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(BuildBatchPhase::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField SOURCE_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("source").getter(getter(BuildBatch::source)).setter(setter(Builder::source)) .constructor(ProjectSource::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("source").build()).build(); private static final SdkField> SECONDARY_SOURCES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("secondarySources") .getter(getter(BuildBatch::secondarySources)) .setter(setter(Builder::secondarySources)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("secondarySources").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ProjectSource::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> SECONDARY_SOURCE_VERSIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("secondarySourceVersions") .getter(getter(BuildBatch::secondarySourceVersions)) .setter(setter(Builder::secondarySourceVersions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("secondarySourceVersions").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ProjectSourceVersion::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField ARTIFACTS_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("artifacts").getter(getter(BuildBatch::artifacts)).setter(setter(Builder::artifacts)) .constructor(BuildArtifacts::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("artifacts").build()).build(); private static final SdkField> SECONDARY_ARTIFACTS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("secondaryArtifacts") .getter(getter(BuildBatch::secondaryArtifacts)) .setter(setter(Builder::secondaryArtifacts)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("secondaryArtifacts").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(BuildArtifacts::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField CACHE_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("cache").getter(getter(BuildBatch::cache)).setter(setter(Builder::cache)) .constructor(ProjectCache::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("cache").build()).build(); private static final SdkField ENVIRONMENT_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("environment") .getter(getter(BuildBatch::environment)).setter(setter(Builder::environment)) .constructor(ProjectEnvironment::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("environment").build()).build(); private static final SdkField SERVICE_ROLE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("serviceRole").getter(getter(BuildBatch::serviceRole)).setter(setter(Builder::serviceRole)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serviceRole").build()).build(); private static final SdkField LOG_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("logConfig").getter(getter(BuildBatch::logConfig)).setter(setter(Builder::logConfig)) .constructor(LogsConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("logConfig").build()).build(); private static final SdkField BUILD_TIMEOUT_IN_MINUTES_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("buildTimeoutInMinutes").getter(getter(BuildBatch::buildTimeoutInMinutes)) .setter(setter(Builder::buildTimeoutInMinutes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("buildTimeoutInMinutes").build()) .build(); private static final SdkField QUEUED_TIMEOUT_IN_MINUTES_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("queuedTimeoutInMinutes").getter(getter(BuildBatch::queuedTimeoutInMinutes)) .setter(setter(Builder::queuedTimeoutInMinutes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("queuedTimeoutInMinutes").build()) .build(); private static final SdkField COMPLETE_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("complete").getter(getter(BuildBatch::complete)).setter(setter(Builder::complete)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("complete").build()).build(); private static final SdkField INITIATOR_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("initiator").getter(getter(BuildBatch::initiator)).setter(setter(Builder::initiator)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("initiator").build()).build(); private static final SdkField VPC_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("vpcConfig").getter(getter(BuildBatch::vpcConfig)).setter(setter(Builder::vpcConfig)) .constructor(VpcConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("vpcConfig").build()).build(); private static final SdkField ENCRYPTION_KEY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("encryptionKey").getter(getter(BuildBatch::encryptionKey)).setter(setter(Builder::encryptionKey)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("encryptionKey").build()).build(); private static final SdkField BUILD_BATCH_NUMBER_FIELD = SdkField. builder(MarshallingType.LONG) .memberName("buildBatchNumber").getter(getter(BuildBatch::buildBatchNumber)) .setter(setter(Builder::buildBatchNumber)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("buildBatchNumber").build()).build(); private static final SdkField> FILE_SYSTEM_LOCATIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("fileSystemLocations") .getter(getter(BuildBatch::fileSystemLocations)) .setter(setter(Builder::fileSystemLocations)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fileSystemLocations").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ProjectFileSystemLocation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField BUILD_BATCH_CONFIG_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("buildBatchConfig") .getter(getter(BuildBatch::buildBatchConfig)).setter(setter(Builder::buildBatchConfig)) .constructor(ProjectBuildBatchConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("buildBatchConfig").build()).build(); private static final SdkField> BUILD_GROUPS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("buildGroups") .getter(getter(BuildBatch::buildGroups)) .setter(setter(Builder::buildGroups)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("buildGroups").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(BuildGroup::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField DEBUG_SESSION_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("debugSessionEnabled").getter(getter(BuildBatch::debugSessionEnabled)) .setter(setter(Builder::debugSessionEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("debugSessionEnabled").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ID_FIELD, ARN_FIELD, START_TIME_FIELD, END_TIME_FIELD, CURRENT_PHASE_FIELD, BUILD_BATCH_STATUS_FIELD, SOURCE_VERSION_FIELD, RESOLVED_SOURCE_VERSION_FIELD, PROJECT_NAME_FIELD, PHASES_FIELD, SOURCE_FIELD, SECONDARY_SOURCES_FIELD, SECONDARY_SOURCE_VERSIONS_FIELD, ARTIFACTS_FIELD, SECONDARY_ARTIFACTS_FIELD, CACHE_FIELD, ENVIRONMENT_FIELD, SERVICE_ROLE_FIELD, LOG_CONFIG_FIELD, BUILD_TIMEOUT_IN_MINUTES_FIELD, QUEUED_TIMEOUT_IN_MINUTES_FIELD, COMPLETE_FIELD, INITIATOR_FIELD, VPC_CONFIG_FIELD, ENCRYPTION_KEY_FIELD, BUILD_BATCH_NUMBER_FIELD, FILE_SYSTEM_LOCATIONS_FIELD, BUILD_BATCH_CONFIG_FIELD, BUILD_GROUPS_FIELD, DEBUG_SESSION_ENABLED_FIELD)); private static final Map> SDK_NAME_TO_FIELD = Collections .unmodifiableMap(new HashMap>() { { put("id", ID_FIELD); put("arn", ARN_FIELD); put("startTime", START_TIME_FIELD); put("endTime", END_TIME_FIELD); put("currentPhase", CURRENT_PHASE_FIELD); put("buildBatchStatus", BUILD_BATCH_STATUS_FIELD); put("sourceVersion", SOURCE_VERSION_FIELD); put("resolvedSourceVersion", RESOLVED_SOURCE_VERSION_FIELD); put("projectName", PROJECT_NAME_FIELD); put("phases", PHASES_FIELD); put("source", SOURCE_FIELD); put("secondarySources", SECONDARY_SOURCES_FIELD); put("secondarySourceVersions", SECONDARY_SOURCE_VERSIONS_FIELD); put("artifacts", ARTIFACTS_FIELD); put("secondaryArtifacts", SECONDARY_ARTIFACTS_FIELD); put("cache", CACHE_FIELD); put("environment", ENVIRONMENT_FIELD); put("serviceRole", SERVICE_ROLE_FIELD); put("logConfig", LOG_CONFIG_FIELD); put("buildTimeoutInMinutes", BUILD_TIMEOUT_IN_MINUTES_FIELD); put("queuedTimeoutInMinutes", QUEUED_TIMEOUT_IN_MINUTES_FIELD); put("complete", COMPLETE_FIELD); put("initiator", INITIATOR_FIELD); put("vpcConfig", VPC_CONFIG_FIELD); put("encryptionKey", ENCRYPTION_KEY_FIELD); put("buildBatchNumber", BUILD_BATCH_NUMBER_FIELD); put("fileSystemLocations", FILE_SYSTEM_LOCATIONS_FIELD); put("buildBatchConfig", BUILD_BATCH_CONFIG_FIELD); put("buildGroups", BUILD_GROUPS_FIELD); put("debugSessionEnabled", DEBUG_SESSION_ENABLED_FIELD); } }); private static final long serialVersionUID = 1L; private final String id; private final String arn; private final Instant startTime; private final Instant endTime; private final String currentPhase; private final String buildBatchStatus; private final String sourceVersion; private final String resolvedSourceVersion; private final String projectName; private final List phases; private final ProjectSource source; private final List secondarySources; private final List secondarySourceVersions; private final BuildArtifacts artifacts; private final List secondaryArtifacts; private final ProjectCache cache; private final ProjectEnvironment environment; private final String serviceRole; private final LogsConfig logConfig; private final Integer buildTimeoutInMinutes; private final Integer queuedTimeoutInMinutes; private final Boolean complete; private final String initiator; private final VpcConfig vpcConfig; private final String encryptionKey; private final Long buildBatchNumber; private final List fileSystemLocations; private final ProjectBuildBatchConfig buildBatchConfig; private final List buildGroups; private final Boolean debugSessionEnabled; private BuildBatch(BuilderImpl builder) { this.id = builder.id; this.arn = builder.arn; this.startTime = builder.startTime; this.endTime = builder.endTime; this.currentPhase = builder.currentPhase; this.buildBatchStatus = builder.buildBatchStatus; this.sourceVersion = builder.sourceVersion; this.resolvedSourceVersion = builder.resolvedSourceVersion; this.projectName = builder.projectName; this.phases = builder.phases; this.source = builder.source; this.secondarySources = builder.secondarySources; this.secondarySourceVersions = builder.secondarySourceVersions; this.artifacts = builder.artifacts; this.secondaryArtifacts = builder.secondaryArtifacts; this.cache = builder.cache; this.environment = builder.environment; this.serviceRole = builder.serviceRole; this.logConfig = builder.logConfig; this.buildTimeoutInMinutes = builder.buildTimeoutInMinutes; this.queuedTimeoutInMinutes = builder.queuedTimeoutInMinutes; this.complete = builder.complete; this.initiator = builder.initiator; this.vpcConfig = builder.vpcConfig; this.encryptionKey = builder.encryptionKey; this.buildBatchNumber = builder.buildBatchNumber; this.fileSystemLocations = builder.fileSystemLocations; this.buildBatchConfig = builder.buildBatchConfig; this.buildGroups = builder.buildGroups; this.debugSessionEnabled = builder.debugSessionEnabled; } /** *

* The identifier of the batch build. *

* * @return The identifier of the batch build. */ public final String id() { return id; } /** *

* The ARN of the batch build. *

* * @return The ARN of the batch build. */ public final String arn() { return arn; } /** *

* The date and time that the batch build started. *

* * @return The date and time that the batch build started. */ public final Instant startTime() { return startTime; } /** *

* The date and time that the batch build ended. *

* * @return The date and time that the batch build ended. */ public final Instant endTime() { return endTime; } /** *

* The current phase of the batch build. *

* * @return The current phase of the batch build. */ public final String currentPhase() { return currentPhase; } /** *

* The status of the batch build. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #buildBatchStatus} * will return {@link StatusType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #buildBatchStatusAsString}. *

* * @return The status of the batch build. * @see StatusType */ public final StatusType buildBatchStatus() { return StatusType.fromValue(buildBatchStatus); } /** *

* The status of the batch build. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #buildBatchStatus} * will return {@link StatusType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #buildBatchStatusAsString}. *

* * @return The status of the batch build. * @see StatusType */ public final String buildBatchStatusAsString() { return buildBatchStatus; } /** *

* The identifier of the version of the source code to be built. *

* * @return The identifier of the version of the source code to be built. */ public final String sourceVersion() { return sourceVersion; } /** *

* The identifier of the resolved version of this batch build's source code. *

*
    *
  • *

    * For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. *

    *
  • *
  • *

    * For CodePipeline, the source revision provided by CodePipeline. *

    *
  • *
  • *

    * For Amazon S3, this does not apply. *

    *
  • *
* * @return The identifier of the resolved version of this batch build's source code.

*
    *
  • *

    * For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. *

    *
  • *
  • *

    * For CodePipeline, the source revision provided by CodePipeline. *

    *
  • *
  • *

    * For Amazon S3, this does not apply. *

    *
  • */ public final String resolvedSourceVersion() { return resolvedSourceVersion; } /** *

    * The name of the batch build project. *

    * * @return The name of the batch build project. */ public final String projectName() { return projectName; } /** * For responses, this returns true if the service returned a value for the Phases property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasPhases() { return phases != null && !(phases instanceof SdkAutoConstructList); } /** *

    * An array of BuildBatchPhase objects the specify the phases of the batch build. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasPhases} method. *

    * * @return An array of BuildBatchPhase objects the specify the phases of the batch build. */ public final List phases() { return phases; } /** * Returns the value of the Source property for this object. * * @return The value of the Source property for this object. */ public final ProjectSource source() { return source; } /** * For responses, this returns true if the service returned a value for the SecondarySources property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasSecondarySources() { return secondarySources != null && !(secondarySources instanceof SdkAutoConstructList); } /** *

    * An array of ProjectSource objects that define the sources for the batch build. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasSecondarySources} method. *

    * * @return An array of ProjectSource objects that define the sources for the batch build. */ public final List secondarySources() { return secondarySources; } /** * For responses, this returns true if the service returned a value for the SecondarySourceVersions property. This * DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the * property). This is useful because the SDK will never return a null collection or map, but you may need to * differentiate between the service returning nothing (or null) and the service returning an empty collection or * map. For requests, this returns true if a value for the property was specified in the request builder, and false * if a value was not specified. */ public final boolean hasSecondarySourceVersions() { return secondarySourceVersions != null && !(secondarySourceVersions instanceof SdkAutoConstructList); } /** *

    * An array of ProjectSourceVersion objects. Each ProjectSourceVersion 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. *

      *
    • *
    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasSecondarySourceVersions} method. *

    * * @return An array of ProjectSourceVersion objects. Each ProjectSourceVersion 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. *

      *
    • */ public final List secondarySourceVersions() { return secondarySourceVersions; } /** *

      * A BuildArtifacts object the defines the build artifacts for this batch build. *

      * * @return A BuildArtifacts object the defines the build artifacts for this batch build. */ public final BuildArtifacts artifacts() { return artifacts; } /** * For responses, this returns true if the service returned a value for the SecondaryArtifacts property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasSecondaryArtifacts() { return secondaryArtifacts != null && !(secondaryArtifacts instanceof SdkAutoConstructList); } /** *

      * An array of BuildArtifacts objects the define the build artifacts for this batch build. *

      *

      * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasSecondaryArtifacts} method. *

      * * @return An array of BuildArtifacts objects the define the build artifacts for this batch build. */ public final List secondaryArtifacts() { return secondaryArtifacts; } /** * Returns the value of the Cache property for this object. * * @return The value of the Cache property for this object. */ public final ProjectCache cache() { return cache; } /** * Returns the value of the Environment property for this object. * * @return The value of the Environment property for this object. */ public final ProjectEnvironment environment() { return environment; } /** *

      * The name of a service role used for builds in the batch. *

      * * @return The name of a service role used for builds in the batch. */ public final String serviceRole() { return serviceRole; } /** * Returns the value of the LogConfig property for this object. * * @return The value of the LogConfig property for this object. */ public final LogsConfig logConfig() { return logConfig; } /** *

      * Specifies the maximum amount of time, in minutes, that the build in a batch must be completed in. *

      * * @return Specifies the maximum amount of time, in minutes, that the build in a batch must be completed in. */ public final Integer buildTimeoutInMinutes() { return buildTimeoutInMinutes; } /** *

      * Specifies the amount of time, in minutes, that the batch build is allowed to be queued before it times out. *

      * * @return Specifies the amount of time, in minutes, that the batch build is allowed to be queued before it times * out. */ public final Integer queuedTimeoutInMinutes() { return queuedTimeoutInMinutes; } /** *

      * Indicates if the batch build is complete. *

      * * @return Indicates if the batch build is complete. */ public final Boolean complete() { return complete; } /** *

      * The entity that started the batch build. Valid values include: *

      *
        *
      • *

        * If CodePipeline started the build, the pipeline's name (for example, codepipeline/my-demo-pipeline). *

        *
      • *
      • *

        * If a user started the build, the user's name. *

        *
      • *
      • *

        * If the Jenkins plugin for CodeBuild started the build, the string CodeBuild-Jenkins-Plugin. *

        *
      • *
      * * @return The entity that started the batch build. Valid values include:

      *
        *
      • *

        * If CodePipeline started the build, the pipeline's name (for example, * codepipeline/my-demo-pipeline). *

        *
      • *
      • *

        * If a user started the build, the user's name. *

        *
      • *
      • *

        * If the Jenkins plugin for CodeBuild started the build, the string CodeBuild-Jenkins-Plugin. *

        *
      • */ public final String initiator() { return initiator; } /** * Returns the value of the VpcConfig property for this object. * * @return The value of the VpcConfig property for this object. */ public final VpcConfig vpcConfig() { return vpcConfig; } /** *

        * The Key Management Service customer master key (CMK) to be used for encrypting the batch 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>). *

        * * @return The Key Management Service customer master key (CMK) to be used for encrypting the batch 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>). */ public final String encryptionKey() { return encryptionKey; } /** *

        * The number of the batch build. For each project, the buildBatchNumber of its first batch build is * 1. The buildBatchNumber of each subsequent batch build is incremented by 1 * . If a batch build is deleted, the buildBatchNumber of other batch builds does not change. *

        * * @return The number of the batch build. For each project, the buildBatchNumber of its first batch * build is 1. The buildBatchNumber of each subsequent batch build is incremented * by 1. If a batch build is deleted, the buildBatchNumber of other batch builds * does not change. */ public final Long buildBatchNumber() { return buildBatchNumber; } /** * For responses, this returns true if the service returned a value for the FileSystemLocations property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasFileSystemLocations() { return fileSystemLocations != null && !(fileSystemLocations instanceof SdkAutoConstructList); } /** *

        * An array of ProjectFileSystemLocation objects for the batch build project. A * ProjectFileSystemLocation object specifies the identifier, location, * mountOptions, mountPoint, and type of a file system created using Amazon * Elastic File System. *

        *

        * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

        *

        * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasFileSystemLocations} method. *

        * * @return An array of ProjectFileSystemLocation objects for the batch build project. A * ProjectFileSystemLocation object specifies the identifier, * location, mountOptions, mountPoint, and type of a * file system created using Amazon Elastic File System. */ public final List fileSystemLocations() { return fileSystemLocations; } /** * Returns the value of the BuildBatchConfig property for this object. * * @return The value of the BuildBatchConfig property for this object. */ public final ProjectBuildBatchConfig buildBatchConfig() { return buildBatchConfig; } /** * For responses, this returns true if the service returned a value for the BuildGroups property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasBuildGroups() { return buildGroups != null && !(buildGroups instanceof SdkAutoConstructList); } /** *

        * An array of BuildGroup objects that define the build groups for the batch build. *

        *

        * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

        *

        * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasBuildGroups} method. *

        * * @return An array of BuildGroup objects that define the build groups for the batch build. */ public final List buildGroups() { return buildGroups; } /** *

        * Specifies if session debugging is enabled for this batch build. For more information, see Viewing a running build in * Session Manager. Batch session debugging is not supported for matrix batch builds. *

        * * @return Specifies if session debugging is enabled for this batch build. For more information, see Viewing a running * build in Session Manager. Batch session debugging is not supported for matrix batch builds. */ public final Boolean debugSessionEnabled() { return debugSessionEnabled; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(id()); hashCode = 31 * hashCode + Objects.hashCode(arn()); hashCode = 31 * hashCode + Objects.hashCode(startTime()); hashCode = 31 * hashCode + Objects.hashCode(endTime()); hashCode = 31 * hashCode + Objects.hashCode(currentPhase()); hashCode = 31 * hashCode + Objects.hashCode(buildBatchStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(sourceVersion()); hashCode = 31 * hashCode + Objects.hashCode(resolvedSourceVersion()); hashCode = 31 * hashCode + Objects.hashCode(projectName()); hashCode = 31 * hashCode + Objects.hashCode(hasPhases() ? phases() : null); hashCode = 31 * hashCode + Objects.hashCode(source()); hashCode = 31 * hashCode + Objects.hashCode(hasSecondarySources() ? secondarySources() : null); hashCode = 31 * hashCode + Objects.hashCode(hasSecondarySourceVersions() ? secondarySourceVersions() : null); hashCode = 31 * hashCode + Objects.hashCode(artifacts()); hashCode = 31 * hashCode + Objects.hashCode(hasSecondaryArtifacts() ? secondaryArtifacts() : null); hashCode = 31 * hashCode + Objects.hashCode(cache()); hashCode = 31 * hashCode + Objects.hashCode(environment()); hashCode = 31 * hashCode + Objects.hashCode(serviceRole()); hashCode = 31 * hashCode + Objects.hashCode(logConfig()); hashCode = 31 * hashCode + Objects.hashCode(buildTimeoutInMinutes()); hashCode = 31 * hashCode + Objects.hashCode(queuedTimeoutInMinutes()); hashCode = 31 * hashCode + Objects.hashCode(complete()); hashCode = 31 * hashCode + Objects.hashCode(initiator()); hashCode = 31 * hashCode + Objects.hashCode(vpcConfig()); hashCode = 31 * hashCode + Objects.hashCode(encryptionKey()); hashCode = 31 * hashCode + Objects.hashCode(buildBatchNumber()); hashCode = 31 * hashCode + Objects.hashCode(hasFileSystemLocations() ? fileSystemLocations() : null); hashCode = 31 * hashCode + Objects.hashCode(buildBatchConfig()); hashCode = 31 * hashCode + Objects.hashCode(hasBuildGroups() ? buildGroups() : null); hashCode = 31 * hashCode + Objects.hashCode(debugSessionEnabled()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof BuildBatch)) { return false; } BuildBatch other = (BuildBatch) obj; return Objects.equals(id(), other.id()) && Objects.equals(arn(), other.arn()) && Objects.equals(startTime(), other.startTime()) && Objects.equals(endTime(), other.endTime()) && Objects.equals(currentPhase(), other.currentPhase()) && Objects.equals(buildBatchStatusAsString(), other.buildBatchStatusAsString()) && Objects.equals(sourceVersion(), other.sourceVersion()) && Objects.equals(resolvedSourceVersion(), other.resolvedSourceVersion()) && Objects.equals(projectName(), other.projectName()) && hasPhases() == other.hasPhases() && Objects.equals(phases(), other.phases()) && Objects.equals(source(), other.source()) && hasSecondarySources() == other.hasSecondarySources() && Objects.equals(secondarySources(), other.secondarySources()) && hasSecondarySourceVersions() == other.hasSecondarySourceVersions() && Objects.equals(secondarySourceVersions(), other.secondarySourceVersions()) && Objects.equals(artifacts(), other.artifacts()) && hasSecondaryArtifacts() == other.hasSecondaryArtifacts() && Objects.equals(secondaryArtifacts(), other.secondaryArtifacts()) && Objects.equals(cache(), other.cache()) && Objects.equals(environment(), other.environment()) && Objects.equals(serviceRole(), other.serviceRole()) && Objects.equals(logConfig(), other.logConfig()) && Objects.equals(buildTimeoutInMinutes(), other.buildTimeoutInMinutes()) && Objects.equals(queuedTimeoutInMinutes(), other.queuedTimeoutInMinutes()) && Objects.equals(complete(), other.complete()) && Objects.equals(initiator(), other.initiator()) && Objects.equals(vpcConfig(), other.vpcConfig()) && Objects.equals(encryptionKey(), other.encryptionKey()) && Objects.equals(buildBatchNumber(), other.buildBatchNumber()) && hasFileSystemLocations() == other.hasFileSystemLocations() && Objects.equals(fileSystemLocations(), other.fileSystemLocations()) && Objects.equals(buildBatchConfig(), other.buildBatchConfig()) && hasBuildGroups() == other.hasBuildGroups() && Objects.equals(buildGroups(), other.buildGroups()) && Objects.equals(debugSessionEnabled(), other.debugSessionEnabled()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("BuildBatch").add("Id", id()).add("Arn", arn()).add("StartTime", startTime()) .add("EndTime", endTime()).add("CurrentPhase", currentPhase()) .add("BuildBatchStatus", buildBatchStatusAsString()).add("SourceVersion", sourceVersion()) .add("ResolvedSourceVersion", resolvedSourceVersion()).add("ProjectName", projectName()) .add("Phases", hasPhases() ? phases() : null).add("Source", source()) .add("SecondarySources", hasSecondarySources() ? secondarySources() : null) .add("SecondarySourceVersions", hasSecondarySourceVersions() ? secondarySourceVersions() : null) .add("Artifacts", artifacts()).add("SecondaryArtifacts", hasSecondaryArtifacts() ? secondaryArtifacts() : null) .add("Cache", cache()).add("Environment", environment()).add("ServiceRole", serviceRole()) .add("LogConfig", logConfig()).add("BuildTimeoutInMinutes", buildTimeoutInMinutes()) .add("QueuedTimeoutInMinutes", queuedTimeoutInMinutes()).add("Complete", complete()) .add("Initiator", initiator()).add("VpcConfig", vpcConfig()).add("EncryptionKey", encryptionKey()) .add("BuildBatchNumber", buildBatchNumber()) .add("FileSystemLocations", hasFileSystemLocations() ? fileSystemLocations() : null) .add("BuildBatchConfig", buildBatchConfig()).add("BuildGroups", hasBuildGroups() ? buildGroups() : null) .add("DebugSessionEnabled", debugSessionEnabled()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "id": return Optional.ofNullable(clazz.cast(id())); case "arn": return Optional.ofNullable(clazz.cast(arn())); case "startTime": return Optional.ofNullable(clazz.cast(startTime())); case "endTime": return Optional.ofNullable(clazz.cast(endTime())); case "currentPhase": return Optional.ofNullable(clazz.cast(currentPhase())); case "buildBatchStatus": return Optional.ofNullable(clazz.cast(buildBatchStatusAsString())); case "sourceVersion": return Optional.ofNullable(clazz.cast(sourceVersion())); case "resolvedSourceVersion": return Optional.ofNullable(clazz.cast(resolvedSourceVersion())); case "projectName": return Optional.ofNullable(clazz.cast(projectName())); case "phases": return Optional.ofNullable(clazz.cast(phases())); case "source": return Optional.ofNullable(clazz.cast(source())); case "secondarySources": return Optional.ofNullable(clazz.cast(secondarySources())); case "secondarySourceVersions": return Optional.ofNullable(clazz.cast(secondarySourceVersions())); case "artifacts": return Optional.ofNullable(clazz.cast(artifacts())); case "secondaryArtifacts": return Optional.ofNullable(clazz.cast(secondaryArtifacts())); case "cache": return Optional.ofNullable(clazz.cast(cache())); case "environment": return Optional.ofNullable(clazz.cast(environment())); case "serviceRole": return Optional.ofNullable(clazz.cast(serviceRole())); case "logConfig": return Optional.ofNullable(clazz.cast(logConfig())); case "buildTimeoutInMinutes": return Optional.ofNullable(clazz.cast(buildTimeoutInMinutes())); case "queuedTimeoutInMinutes": return Optional.ofNullable(clazz.cast(queuedTimeoutInMinutes())); case "complete": return Optional.ofNullable(clazz.cast(complete())); case "initiator": return Optional.ofNullable(clazz.cast(initiator())); case "vpcConfig": return Optional.ofNullable(clazz.cast(vpcConfig())); case "encryptionKey": return Optional.ofNullable(clazz.cast(encryptionKey())); case "buildBatchNumber": return Optional.ofNullable(clazz.cast(buildBatchNumber())); case "fileSystemLocations": return Optional.ofNullable(clazz.cast(fileSystemLocations())); case "buildBatchConfig": return Optional.ofNullable(clazz.cast(buildBatchConfig())); case "buildGroups": return Optional.ofNullable(clazz.cast(buildGroups())); case "debugSessionEnabled": return Optional.ofNullable(clazz.cast(debugSessionEnabled())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((BuildBatch) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

        * The identifier of the batch build. *

        * * @param id * The identifier of the batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder id(String id); /** *

        * The ARN of the batch build. *

        * * @param arn * The ARN of the batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder arn(String arn); /** *

        * The date and time that the batch build started. *

        * * @param startTime * The date and time that the batch build started. * @return Returns a reference to this object so that method calls can be chained together. */ Builder startTime(Instant startTime); /** *

        * The date and time that the batch build ended. *

        * * @param endTime * The date and time that the batch build ended. * @return Returns a reference to this object so that method calls can be chained together. */ Builder endTime(Instant endTime); /** *

        * The current phase of the batch build. *

        * * @param currentPhase * The current phase of the batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder currentPhase(String currentPhase); /** *

        * The status of the batch build. *

        * * @param buildBatchStatus * The status of the batch build. * @see StatusType * @return Returns a reference to this object so that method calls can be chained together. * @see StatusType */ Builder buildBatchStatus(String buildBatchStatus); /** *

        * The status of the batch build. *

        * * @param buildBatchStatus * The status of the batch build. * @see StatusType * @return Returns a reference to this object so that method calls can be chained together. * @see StatusType */ Builder buildBatchStatus(StatusType buildBatchStatus); /** *

        * The identifier of the version of the source code to be built. *

        * * @param sourceVersion * The identifier of the version of the source code to be built. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sourceVersion(String sourceVersion); /** *

        * The identifier of the resolved version of this batch build's source code. *

        *
          *
        • *

          * For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. *

          *
        • *
        • *

          * For CodePipeline, the source revision provided by CodePipeline. *

          *
        • *
        • *

          * For Amazon S3, this does not apply. *

          *
        • *
        * * @param resolvedSourceVersion * The identifier of the resolved version of this batch build's source code.

        *
          *
        • *

          * For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. *

          *
        • *
        • *

          * For CodePipeline, the source revision provided by CodePipeline. *

          *
        • *
        • *

          * For Amazon S3, this does not apply. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. */ Builder resolvedSourceVersion(String resolvedSourceVersion); /** *

          * The name of the batch build project. *

          * * @param projectName * The name of the batch build project. * @return Returns a reference to this object so that method calls can be chained together. */ Builder projectName(String projectName); /** *

          * An array of BuildBatchPhase objects the specify the phases of the batch build. *

          * * @param phases * An array of BuildBatchPhase objects the specify the phases of the batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder phases(Collection phases); /** *

          * An array of BuildBatchPhase objects the specify the phases of the batch build. *

          * * @param phases * An array of BuildBatchPhase objects the specify the phases of the batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder phases(BuildBatchPhase... phases); /** *

          * An array of BuildBatchPhase objects the specify the phases of the batch build. *

          * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.codebuild.model.BuildBatchPhase.Builder} avoiding the need to create * one manually via {@link software.amazon.awssdk.services.codebuild.model.BuildBatchPhase#builder()}. * *

          * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.codebuild.model.BuildBatchPhase.Builder#build()} is called immediately * and its result is passed to {@link #phases(List)}. * * @param phases * a consumer that will call methods on * {@link software.amazon.awssdk.services.codebuild.model.BuildBatchPhase.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #phases(java.util.Collection) */ Builder phases(Consumer... phases); /** * Sets the value of the Source property for this object. * * @param source * The new value for the Source property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder source(ProjectSource source); /** * Sets the value of the Source property for this object. * * This is a convenience method that creates an instance of the {@link ProjectSource.Builder} avoiding the need * to create one manually via {@link ProjectSource#builder()}. * *

          * When the {@link Consumer} completes, {@link ProjectSource.Builder#build()} is called immediately and its * result is passed to {@link #source(ProjectSource)}. * * @param source * a consumer that will call methods on {@link ProjectSource.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #source(ProjectSource) */ default Builder source(Consumer source) { return source(ProjectSource.builder().applyMutation(source).build()); } /** *

          * An array of ProjectSource objects that define the sources for the batch build. *

          * * @param secondarySources * An array of ProjectSource objects that define the sources for the batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder secondarySources(Collection secondarySources); /** *

          * An array of ProjectSource objects that define the sources for the batch build. *

          * * @param secondarySources * An array of ProjectSource objects that define the sources for the batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder secondarySources(ProjectSource... secondarySources); /** *

          * An array of ProjectSource objects that define the sources for the batch build. *

          * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.codebuild.model.ProjectSource.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.codebuild.model.ProjectSource#builder()}. * *

          * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.codebuild.model.ProjectSource.Builder#build()} is called immediately * and its result is passed to {@link #secondarySources(List)}. * * @param secondarySources * a consumer that will call methods on * {@link software.amazon.awssdk.services.codebuild.model.ProjectSource.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #secondarySources(java.util.Collection) */ Builder secondarySources(Consumer... secondarySources); /** *

          * An array of ProjectSourceVersion objects. Each ProjectSourceVersion 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. *

            *
          • *
          * * @param secondarySourceVersions * An array of ProjectSourceVersion objects. Each ProjectSourceVersion 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. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. */ Builder secondarySourceVersions(Collection secondarySourceVersions); /** *

            * An array of ProjectSourceVersion objects. Each ProjectSourceVersion 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. *

              *
            • *
            * * @param secondarySourceVersions * An array of ProjectSourceVersion objects. Each ProjectSourceVersion 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. *

              *
            • * @return Returns a reference to this object so that method calls can be chained together. */ Builder secondarySourceVersions(ProjectSourceVersion... secondarySourceVersions); /** *

              * An array of ProjectSourceVersion objects. Each ProjectSourceVersion 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. *

                *
              • *
              * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.codebuild.model.ProjectSourceVersion.Builder} avoiding the need to * create one manually via * {@link software.amazon.awssdk.services.codebuild.model.ProjectSourceVersion#builder()}. * *

              * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.codebuild.model.ProjectSourceVersion.Builder#build()} is called * immediately and its result is passed to {@link #secondarySourceVersions(List)}. * * @param secondarySourceVersions * a consumer that will call methods on * {@link software.amazon.awssdk.services.codebuild.model.ProjectSourceVersion.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #secondarySourceVersions(java.util.Collection) */ Builder secondarySourceVersions(Consumer... secondarySourceVersions); /** *

              * A BuildArtifacts object the defines the build artifacts for this batch build. *

              * * @param artifacts * A BuildArtifacts object the defines the build artifacts for this batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder artifacts(BuildArtifacts artifacts); /** *

              * A BuildArtifacts object the defines the build artifacts for this batch build. *

              * This is a convenience method that creates an instance of the {@link BuildArtifacts.Builder} avoiding the need * to create one manually via {@link BuildArtifacts#builder()}. * *

              * When the {@link Consumer} completes, {@link BuildArtifacts.Builder#build()} is called immediately and its * result is passed to {@link #artifacts(BuildArtifacts)}. * * @param artifacts * a consumer that will call methods on {@link BuildArtifacts.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #artifacts(BuildArtifacts) */ default Builder artifacts(Consumer artifacts) { return artifacts(BuildArtifacts.builder().applyMutation(artifacts).build()); } /** *

              * An array of BuildArtifacts objects the define the build artifacts for this batch build. *

              * * @param secondaryArtifacts * An array of BuildArtifacts objects the define the build artifacts for this batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder secondaryArtifacts(Collection secondaryArtifacts); /** *

              * An array of BuildArtifacts objects the define the build artifacts for this batch build. *

              * * @param secondaryArtifacts * An array of BuildArtifacts objects the define the build artifacts for this batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder secondaryArtifacts(BuildArtifacts... secondaryArtifacts); /** *

              * An array of BuildArtifacts objects the define the build artifacts for this batch build. *

              * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.codebuild.model.BuildArtifacts.Builder} avoiding the need to create * one manually via {@link software.amazon.awssdk.services.codebuild.model.BuildArtifacts#builder()}. * *

              * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.codebuild.model.BuildArtifacts.Builder#build()} is called immediately * and its result is passed to {@link #secondaryArtifacts(List)}. * * @param secondaryArtifacts * a consumer that will call methods on * {@link software.amazon.awssdk.services.codebuild.model.BuildArtifacts.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #secondaryArtifacts(java.util.Collection) */ Builder secondaryArtifacts(Consumer... secondaryArtifacts); /** * Sets the value of the Cache property for this object. * * @param cache * The new value for the Cache property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cache(ProjectCache cache); /** * Sets the value of the Cache property for this object. * * This is a convenience method that creates an instance of the {@link ProjectCache.Builder} avoiding the need * to create one manually via {@link ProjectCache#builder()}. * *

              * When the {@link Consumer} completes, {@link ProjectCache.Builder#build()} is called immediately and its * result is passed to {@link #cache(ProjectCache)}. * * @param cache * a consumer that will call methods on {@link ProjectCache.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #cache(ProjectCache) */ default Builder cache(Consumer cache) { return cache(ProjectCache.builder().applyMutation(cache).build()); } /** * Sets the value of the Environment property for this object. * * @param environment * The new value for the Environment property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environment(ProjectEnvironment environment); /** * Sets the value of the Environment property for this object. * * This is a convenience method that creates an instance of the {@link ProjectEnvironment.Builder} avoiding the * need to create one manually via {@link ProjectEnvironment#builder()}. * *

              * When the {@link Consumer} completes, {@link ProjectEnvironment.Builder#build()} is called immediately and its * result is passed to {@link #environment(ProjectEnvironment)}. * * @param environment * a consumer that will call methods on {@link ProjectEnvironment.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #environment(ProjectEnvironment) */ default Builder environment(Consumer environment) { return environment(ProjectEnvironment.builder().applyMutation(environment).build()); } /** *

              * The name of a service role used for builds in the batch. *

              * * @param serviceRole * The name of a service role used for builds in the batch. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceRole(String serviceRole); /** * Sets the value of the LogConfig property for this object. * * @param logConfig * The new value for the LogConfig property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder logConfig(LogsConfig logConfig); /** * Sets the value of the LogConfig property for this object. * * This is a convenience method that creates an instance of the {@link LogsConfig.Builder} avoiding the need to * create one manually via {@link LogsConfig#builder()}. * *

              * When the {@link Consumer} completes, {@link LogsConfig.Builder#build()} is called immediately and its result * is passed to {@link #logConfig(LogsConfig)}. * * @param logConfig * a consumer that will call methods on {@link LogsConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #logConfig(LogsConfig) */ default Builder logConfig(Consumer logConfig) { return logConfig(LogsConfig.builder().applyMutation(logConfig).build()); } /** *

              * Specifies the maximum amount of time, in minutes, that the build in a batch must be completed in. *

              * * @param buildTimeoutInMinutes * Specifies the maximum amount of time, in minutes, that the build in a batch must be completed in. * @return Returns a reference to this object so that method calls can be chained together. */ Builder buildTimeoutInMinutes(Integer buildTimeoutInMinutes); /** *

              * Specifies the amount of time, in minutes, that the batch build is allowed to be queued before it times out. *

              * * @param queuedTimeoutInMinutes * Specifies the amount of time, in minutes, that the batch build is allowed to be queued before it times * out. * @return Returns a reference to this object so that method calls can be chained together. */ Builder queuedTimeoutInMinutes(Integer queuedTimeoutInMinutes); /** *

              * Indicates if the batch build is complete. *

              * * @param complete * Indicates if the batch build is complete. * @return Returns a reference to this object so that method calls can be chained together. */ Builder complete(Boolean complete); /** *

              * The entity that started the batch build. Valid values include: *

              *
                *
              • *

                * If CodePipeline started the build, the pipeline's name (for example, * codepipeline/my-demo-pipeline). *

                *
              • *
              • *

                * If a user started the build, the user's name. *

                *
              • *
              • *

                * If the Jenkins plugin for CodeBuild started the build, the string CodeBuild-Jenkins-Plugin. *

                *
              • *
              * * @param initiator * The entity that started the batch build. Valid values include:

              *
                *
              • *

                * If CodePipeline started the build, the pipeline's name (for example, * codepipeline/my-demo-pipeline). *

                *
              • *
              • *

                * If a user started the build, the user's name. *

                *
              • *
              • *

                * If the Jenkins plugin for CodeBuild started the build, the string * CodeBuild-Jenkins-Plugin. *

                *
              • * @return Returns a reference to this object so that method calls can be chained together. */ Builder initiator(String initiator); /** * Sets the value of the VpcConfig property for this object. * * @param vpcConfig * The new value for the VpcConfig property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcConfig(VpcConfig vpcConfig); /** * Sets the value of the VpcConfig property for this object. * * This is a convenience method that creates an instance of the {@link VpcConfig.Builder} avoiding the need to * create one manually via {@link VpcConfig#builder()}. * *

                * When the {@link Consumer} completes, {@link VpcConfig.Builder#build()} is called immediately and its result * is passed to {@link #vpcConfig(VpcConfig)}. * * @param vpcConfig * a consumer that will call methods on {@link VpcConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #vpcConfig(VpcConfig) */ default Builder vpcConfig(Consumer vpcConfig) { return vpcConfig(VpcConfig.builder().applyMutation(vpcConfig).build()); } /** *

                * The Key Management Service customer master key (CMK) to be used for encrypting the batch 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>). *

                * * @param encryptionKey * The Key Management Service customer master key (CMK) to be used for encrypting the batch 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>). * @return Returns a reference to this object so that method calls can be chained together. */ Builder encryptionKey(String encryptionKey); /** *

                * The number of the batch build. For each project, the buildBatchNumber of its first batch build * is 1. The buildBatchNumber of each subsequent batch build is incremented by * 1. If a batch build is deleted, the buildBatchNumber of other batch builds does not * change. *

                * * @param buildBatchNumber * The number of the batch build. For each project, the buildBatchNumber of its first batch * build is 1. The buildBatchNumber of each subsequent batch build is * incremented by 1. If a batch build is deleted, the buildBatchNumber of other * batch builds does not change. * @return Returns a reference to this object so that method calls can be chained together. */ Builder buildBatchNumber(Long buildBatchNumber); /** *

                * An array of ProjectFileSystemLocation objects for the batch build project. A * ProjectFileSystemLocation object specifies the identifier, location, * mountOptions, mountPoint, and type of a file system created using * Amazon Elastic File System. *

                * * @param fileSystemLocations * An array of ProjectFileSystemLocation objects for the batch build project. A * ProjectFileSystemLocation object specifies the identifier, * location, mountOptions, mountPoint, and type of a * file system created using Amazon Elastic File System. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fileSystemLocations(Collection fileSystemLocations); /** *

                * An array of ProjectFileSystemLocation objects for the batch build project. A * ProjectFileSystemLocation object specifies the identifier, location, * mountOptions, mountPoint, and type of a file system created using * Amazon Elastic File System. *

                * * @param fileSystemLocations * An array of ProjectFileSystemLocation objects for the batch build project. A * ProjectFileSystemLocation object specifies the identifier, * location, mountOptions, mountPoint, and type of a * file system created using Amazon Elastic File System. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fileSystemLocations(ProjectFileSystemLocation... fileSystemLocations); /** *

                * An array of ProjectFileSystemLocation objects for the batch build project. A * ProjectFileSystemLocation object specifies the identifier, location, * mountOptions, mountPoint, and type of a file system created using * Amazon Elastic File System. *

                * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.codebuild.model.ProjectFileSystemLocation.Builder} avoiding the need * to create one manually via * {@link software.amazon.awssdk.services.codebuild.model.ProjectFileSystemLocation#builder()}. * *

                * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.codebuild.model.ProjectFileSystemLocation.Builder#build()} is called * immediately and its result is passed to {@link #fileSystemLocations(List)}. * * @param fileSystemLocations * a consumer that will call methods on * {@link software.amazon.awssdk.services.codebuild.model.ProjectFileSystemLocation.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #fileSystemLocations(java.util.Collection) */ Builder fileSystemLocations(Consumer... fileSystemLocations); /** * Sets the value of the BuildBatchConfig property for this object. * * @param buildBatchConfig * The new value for the BuildBatchConfig property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder buildBatchConfig(ProjectBuildBatchConfig buildBatchConfig); /** * Sets the value of the BuildBatchConfig property for this object. * * This is a convenience method that creates an instance of the {@link ProjectBuildBatchConfig.Builder} avoiding * the need to create one manually via {@link ProjectBuildBatchConfig#builder()}. * *

                * When the {@link Consumer} completes, {@link ProjectBuildBatchConfig.Builder#build()} is called immediately * and its result is passed to {@link #buildBatchConfig(ProjectBuildBatchConfig)}. * * @param buildBatchConfig * a consumer that will call methods on {@link ProjectBuildBatchConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #buildBatchConfig(ProjectBuildBatchConfig) */ default Builder buildBatchConfig(Consumer buildBatchConfig) { return buildBatchConfig(ProjectBuildBatchConfig.builder().applyMutation(buildBatchConfig).build()); } /** *

                * An array of BuildGroup objects that define the build groups for the batch build. *

                * * @param buildGroups * An array of BuildGroup objects that define the build groups for the batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder buildGroups(Collection buildGroups); /** *

                * An array of BuildGroup objects that define the build groups for the batch build. *

                * * @param buildGroups * An array of BuildGroup objects that define the build groups for the batch build. * @return Returns a reference to this object so that method calls can be chained together. */ Builder buildGroups(BuildGroup... buildGroups); /** *

                * An array of BuildGroup objects that define the build groups for the batch build. *

                * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.codebuild.model.BuildGroup.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.codebuild.model.BuildGroup#builder()}. * *

                * When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.codebuild.model.BuildGroup.Builder#build()} is called immediately and * its result is passed to {@link #buildGroups(List)}. * * @param buildGroups * a consumer that will call methods on * {@link software.amazon.awssdk.services.codebuild.model.BuildGroup.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #buildGroups(java.util.Collection) */ Builder buildGroups(Consumer... buildGroups); /** *

                * Specifies if session debugging is enabled for this batch build. For more information, see Viewing a running build in * Session Manager. Batch session debugging is not supported for matrix batch builds. *

                * * @param debugSessionEnabled * Specifies if session debugging is enabled for this batch build. For more information, see Viewing a running * build in Session Manager. Batch session debugging is not supported for matrix batch builds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder debugSessionEnabled(Boolean debugSessionEnabled); } static final class BuilderImpl implements Builder { private String id; private String arn; private Instant startTime; private Instant endTime; private String currentPhase; private String buildBatchStatus; private String sourceVersion; private String resolvedSourceVersion; private String projectName; private List phases = DefaultSdkAutoConstructList.getInstance(); private ProjectSource source; private List secondarySources = DefaultSdkAutoConstructList.getInstance(); private List secondarySourceVersions = DefaultSdkAutoConstructList.getInstance(); private BuildArtifacts artifacts; private List secondaryArtifacts = DefaultSdkAutoConstructList.getInstance(); private ProjectCache cache; private ProjectEnvironment environment; private String serviceRole; private LogsConfig logConfig; private Integer buildTimeoutInMinutes; private Integer queuedTimeoutInMinutes; private Boolean complete; private String initiator; private VpcConfig vpcConfig; private String encryptionKey; private Long buildBatchNumber; private List fileSystemLocations = DefaultSdkAutoConstructList.getInstance(); private ProjectBuildBatchConfig buildBatchConfig; private List buildGroups = DefaultSdkAutoConstructList.getInstance(); private Boolean debugSessionEnabled; private BuilderImpl() { } private BuilderImpl(BuildBatch model) { id(model.id); arn(model.arn); startTime(model.startTime); endTime(model.endTime); currentPhase(model.currentPhase); buildBatchStatus(model.buildBatchStatus); sourceVersion(model.sourceVersion); resolvedSourceVersion(model.resolvedSourceVersion); projectName(model.projectName); phases(model.phases); source(model.source); secondarySources(model.secondarySources); secondarySourceVersions(model.secondarySourceVersions); artifacts(model.artifacts); secondaryArtifacts(model.secondaryArtifacts); cache(model.cache); environment(model.environment); serviceRole(model.serviceRole); logConfig(model.logConfig); buildTimeoutInMinutes(model.buildTimeoutInMinutes); queuedTimeoutInMinutes(model.queuedTimeoutInMinutes); complete(model.complete); initiator(model.initiator); vpcConfig(model.vpcConfig); encryptionKey(model.encryptionKey); buildBatchNumber(model.buildBatchNumber); fileSystemLocations(model.fileSystemLocations); buildBatchConfig(model.buildBatchConfig); buildGroups(model.buildGroups); debugSessionEnabled(model.debugSessionEnabled); } public final String getId() { return id; } public final void setId(String id) { this.id = id; } @Override public final Builder id(String id) { this.id = id; return this; } public final String getArn() { return arn; } public final void setArn(String arn) { this.arn = arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } public final Instant getStartTime() { return startTime; } public final void setStartTime(Instant startTime) { this.startTime = startTime; } @Override public final Builder startTime(Instant startTime) { this.startTime = startTime; return this; } public final Instant getEndTime() { return endTime; } public final void setEndTime(Instant endTime) { this.endTime = endTime; } @Override public final Builder endTime(Instant endTime) { this.endTime = endTime; return this; } public final String getCurrentPhase() { return currentPhase; } public final void setCurrentPhase(String currentPhase) { this.currentPhase = currentPhase; } @Override public final Builder currentPhase(String currentPhase) { this.currentPhase = currentPhase; return this; } public final String getBuildBatchStatus() { return buildBatchStatus; } public final void setBuildBatchStatus(String buildBatchStatus) { this.buildBatchStatus = buildBatchStatus; } @Override public final Builder buildBatchStatus(String buildBatchStatus) { this.buildBatchStatus = buildBatchStatus; return this; } @Override public final Builder buildBatchStatus(StatusType buildBatchStatus) { this.buildBatchStatus(buildBatchStatus == null ? null : buildBatchStatus.toString()); return this; } public final String getSourceVersion() { return sourceVersion; } public final void setSourceVersion(String sourceVersion) { this.sourceVersion = sourceVersion; } @Override public final Builder sourceVersion(String sourceVersion) { this.sourceVersion = sourceVersion; return this; } public final String getResolvedSourceVersion() { return resolvedSourceVersion; } public final void setResolvedSourceVersion(String resolvedSourceVersion) { this.resolvedSourceVersion = resolvedSourceVersion; } @Override public final Builder resolvedSourceVersion(String resolvedSourceVersion) { this.resolvedSourceVersion = resolvedSourceVersion; return this; } public final String getProjectName() { return projectName; } public final void setProjectName(String projectName) { this.projectName = projectName; } @Override public final Builder projectName(String projectName) { this.projectName = projectName; return this; } public final List getPhases() { List result = BuildBatchPhasesCopier.copyToBuilder(this.phases); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setPhases(Collection phases) { this.phases = BuildBatchPhasesCopier.copyFromBuilder(phases); } @Override public final Builder phases(Collection phases) { this.phases = BuildBatchPhasesCopier.copy(phases); return this; } @Override @SafeVarargs public final Builder phases(BuildBatchPhase... phases) { phases(Arrays.asList(phases)); return this; } @Override @SafeVarargs public final Builder phases(Consumer... phases) { phases(Stream.of(phases).map(c -> BuildBatchPhase.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final ProjectSource.Builder getSource() { return source != null ? source.toBuilder() : null; } public final void setSource(ProjectSource.BuilderImpl source) { this.source = source != null ? source.build() : null; } @Override public final Builder source(ProjectSource source) { this.source = source; return this; } public final List getSecondarySources() { List result = ProjectSourcesCopier.copyToBuilder(this.secondarySources); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setSecondarySources(Collection secondarySources) { this.secondarySources = ProjectSourcesCopier.copyFromBuilder(secondarySources); } @Override public final Builder secondarySources(Collection secondarySources) { this.secondarySources = ProjectSourcesCopier.copy(secondarySources); return this; } @Override @SafeVarargs public final Builder secondarySources(ProjectSource... secondarySources) { secondarySources(Arrays.asList(secondarySources)); return this; } @Override @SafeVarargs public final Builder secondarySources(Consumer... secondarySources) { secondarySources(Stream.of(secondarySources).map(c -> ProjectSource.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final List getSecondarySourceVersions() { List result = ProjectSecondarySourceVersionsCopier .copyToBuilder(this.secondarySourceVersions); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setSecondarySourceVersions(Collection secondarySourceVersions) { this.secondarySourceVersions = ProjectSecondarySourceVersionsCopier.copyFromBuilder(secondarySourceVersions); } @Override public final Builder secondarySourceVersions(Collection secondarySourceVersions) { this.secondarySourceVersions = ProjectSecondarySourceVersionsCopier.copy(secondarySourceVersions); return this; } @Override @SafeVarargs public final Builder secondarySourceVersions(ProjectSourceVersion... secondarySourceVersions) { secondarySourceVersions(Arrays.asList(secondarySourceVersions)); return this; } @Override @SafeVarargs public final Builder secondarySourceVersions(Consumer... secondarySourceVersions) { secondarySourceVersions(Stream.of(secondarySourceVersions) .map(c -> ProjectSourceVersion.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final BuildArtifacts.Builder getArtifacts() { return artifacts != null ? artifacts.toBuilder() : null; } public final void setArtifacts(BuildArtifacts.BuilderImpl artifacts) { this.artifacts = artifacts != null ? artifacts.build() : null; } @Override public final Builder artifacts(BuildArtifacts artifacts) { this.artifacts = artifacts; return this; } public final List getSecondaryArtifacts() { List result = BuildArtifactsListCopier.copyToBuilder(this.secondaryArtifacts); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setSecondaryArtifacts(Collection secondaryArtifacts) { this.secondaryArtifacts = BuildArtifactsListCopier.copyFromBuilder(secondaryArtifacts); } @Override public final Builder secondaryArtifacts(Collection secondaryArtifacts) { this.secondaryArtifacts = BuildArtifactsListCopier.copy(secondaryArtifacts); return this; } @Override @SafeVarargs public final Builder secondaryArtifacts(BuildArtifacts... secondaryArtifacts) { secondaryArtifacts(Arrays.asList(secondaryArtifacts)); return this; } @Override @SafeVarargs public final Builder secondaryArtifacts(Consumer... secondaryArtifacts) { secondaryArtifacts(Stream.of(secondaryArtifacts).map(c -> BuildArtifacts.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final ProjectCache.Builder getCache() { return cache != null ? cache.toBuilder() : null; } public final void setCache(ProjectCache.BuilderImpl cache) { this.cache = cache != null ? cache.build() : null; } @Override public final Builder cache(ProjectCache cache) { this.cache = cache; return this; } public final ProjectEnvironment.Builder getEnvironment() { return environment != null ? environment.toBuilder() : null; } public final void setEnvironment(ProjectEnvironment.BuilderImpl environment) { this.environment = environment != null ? environment.build() : null; } @Override public final Builder environment(ProjectEnvironment environment) { this.environment = environment; return this; } public final String getServiceRole() { return serviceRole; } public final void setServiceRole(String serviceRole) { this.serviceRole = serviceRole; } @Override public final Builder serviceRole(String serviceRole) { this.serviceRole = serviceRole; return this; } public final LogsConfig.Builder getLogConfig() { return logConfig != null ? logConfig.toBuilder() : null; } public final void setLogConfig(LogsConfig.BuilderImpl logConfig) { this.logConfig = logConfig != null ? logConfig.build() : null; } @Override public final Builder logConfig(LogsConfig logConfig) { this.logConfig = logConfig; return this; } public final Integer getBuildTimeoutInMinutes() { return buildTimeoutInMinutes; } public final void setBuildTimeoutInMinutes(Integer buildTimeoutInMinutes) { this.buildTimeoutInMinutes = buildTimeoutInMinutes; } @Override public final Builder buildTimeoutInMinutes(Integer buildTimeoutInMinutes) { this.buildTimeoutInMinutes = buildTimeoutInMinutes; return this; } public final Integer getQueuedTimeoutInMinutes() { return queuedTimeoutInMinutes; } public final void setQueuedTimeoutInMinutes(Integer queuedTimeoutInMinutes) { this.queuedTimeoutInMinutes = queuedTimeoutInMinutes; } @Override public final Builder queuedTimeoutInMinutes(Integer queuedTimeoutInMinutes) { this.queuedTimeoutInMinutes = queuedTimeoutInMinutes; return this; } public final Boolean getComplete() { return complete; } public final void setComplete(Boolean complete) { this.complete = complete; } @Override public final Builder complete(Boolean complete) { this.complete = complete; return this; } public final String getInitiator() { return initiator; } public final void setInitiator(String initiator) { this.initiator = initiator; } @Override public final Builder initiator(String initiator) { this.initiator = initiator; return this; } public final VpcConfig.Builder getVpcConfig() { return vpcConfig != null ? vpcConfig.toBuilder() : null; } public final void setVpcConfig(VpcConfig.BuilderImpl vpcConfig) { this.vpcConfig = vpcConfig != null ? vpcConfig.build() : null; } @Override public final Builder vpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; return this; } public final String getEncryptionKey() { return encryptionKey; } public final void setEncryptionKey(String encryptionKey) { this.encryptionKey = encryptionKey; } @Override public final Builder encryptionKey(String encryptionKey) { this.encryptionKey = encryptionKey; return this; } public final Long getBuildBatchNumber() { return buildBatchNumber; } public final void setBuildBatchNumber(Long buildBatchNumber) { this.buildBatchNumber = buildBatchNumber; } @Override public final Builder buildBatchNumber(Long buildBatchNumber) { this.buildBatchNumber = buildBatchNumber; return this; } public final List getFileSystemLocations() { List result = ProjectFileSystemLocationsCopier .copyToBuilder(this.fileSystemLocations); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setFileSystemLocations(Collection fileSystemLocations) { this.fileSystemLocations = ProjectFileSystemLocationsCopier.copyFromBuilder(fileSystemLocations); } @Override public final Builder fileSystemLocations(Collection fileSystemLocations) { this.fileSystemLocations = ProjectFileSystemLocationsCopier.copy(fileSystemLocations); return this; } @Override @SafeVarargs public final Builder fileSystemLocations(ProjectFileSystemLocation... fileSystemLocations) { fileSystemLocations(Arrays.asList(fileSystemLocations)); return this; } @Override @SafeVarargs public final Builder fileSystemLocations(Consumer... fileSystemLocations) { fileSystemLocations(Stream.of(fileSystemLocations) .map(c -> ProjectFileSystemLocation.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final ProjectBuildBatchConfig.Builder getBuildBatchConfig() { return buildBatchConfig != null ? buildBatchConfig.toBuilder() : null; } public final void setBuildBatchConfig(ProjectBuildBatchConfig.BuilderImpl buildBatchConfig) { this.buildBatchConfig = buildBatchConfig != null ? buildBatchConfig.build() : null; } @Override public final Builder buildBatchConfig(ProjectBuildBatchConfig buildBatchConfig) { this.buildBatchConfig = buildBatchConfig; return this; } public final List getBuildGroups() { List result = BuildGroupsCopier.copyToBuilder(this.buildGroups); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setBuildGroups(Collection buildGroups) { this.buildGroups = BuildGroupsCopier.copyFromBuilder(buildGroups); } @Override public final Builder buildGroups(Collection buildGroups) { this.buildGroups = BuildGroupsCopier.copy(buildGroups); return this; } @Override @SafeVarargs public final Builder buildGroups(BuildGroup... buildGroups) { buildGroups(Arrays.asList(buildGroups)); return this; } @Override @SafeVarargs public final Builder buildGroups(Consumer... buildGroups) { buildGroups(Stream.of(buildGroups).map(c -> BuildGroup.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final Boolean getDebugSessionEnabled() { return debugSessionEnabled; } public final void setDebugSessionEnabled(Boolean debugSessionEnabled) { this.debugSessionEnabled = debugSessionEnabled; } @Override public final Builder debugSessionEnabled(Boolean debugSessionEnabled) { this.debugSessionEnabled = debugSessionEnabled; return this; } @Override public BuildBatch build() { return new BuildBatch(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy