software.amazon.awssdk.services.codebuild.model.StartBuildRequest Maven / Gradle / Ivy
Show all versions of codebuild Show documentation
/*
* 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.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.awscore.AwsRequestOverrideConfiguration;
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;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class StartBuildRequest extends CodeBuildRequest implements
ToCopyableBuilder {
private static final SdkField PROJECT_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("projectName").getter(getter(StartBuildRequest::projectName)).setter(setter(Builder::projectName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("projectName").build()).build();
private static final SdkField> SECONDARY_SOURCES_OVERRIDE_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("secondarySourcesOverride")
.getter(getter(StartBuildRequest::secondarySourcesOverride))
.setter(setter(Builder::secondarySourcesOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("secondarySourcesOverride").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_SOURCES_VERSION_OVERRIDE_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("secondarySourcesVersionOverride")
.getter(getter(StartBuildRequest::secondarySourcesVersionOverride))
.setter(setter(Builder::secondarySourcesVersionOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("secondarySourcesVersionOverride")
.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 SOURCE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("sourceVersion").getter(getter(StartBuildRequest::sourceVersion)).setter(setter(Builder::sourceVersion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sourceVersion").build()).build();
private static final SdkField ARTIFACTS_OVERRIDE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("artifactsOverride")
.getter(getter(StartBuildRequest::artifactsOverride)).setter(setter(Builder::artifactsOverride))
.constructor(ProjectArtifacts::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("artifactsOverride").build()).build();
private static final SdkField> SECONDARY_ARTIFACTS_OVERRIDE_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("secondaryArtifactsOverride")
.getter(getter(StartBuildRequest::secondaryArtifactsOverride))
.setter(setter(Builder::secondaryArtifactsOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("secondaryArtifactsOverride").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(ProjectArtifacts::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField> ENVIRONMENT_VARIABLES_OVERRIDE_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("environmentVariablesOverride")
.getter(getter(StartBuildRequest::environmentVariablesOverride))
.setter(setter(Builder::environmentVariablesOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("environmentVariablesOverride")
.build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(EnvironmentVariable::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField SOURCE_TYPE_OVERRIDE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("sourceTypeOverride").getter(getter(StartBuildRequest::sourceTypeOverrideAsString))
.setter(setter(Builder::sourceTypeOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sourceTypeOverride").build())
.build();
private static final SdkField SOURCE_LOCATION_OVERRIDE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("sourceLocationOverride").getter(getter(StartBuildRequest::sourceLocationOverride))
.setter(setter(Builder::sourceLocationOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sourceLocationOverride").build())
.build();
private static final SdkField SOURCE_AUTH_OVERRIDE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("sourceAuthOverride")
.getter(getter(StartBuildRequest::sourceAuthOverride)).setter(setter(Builder::sourceAuthOverride))
.constructor(SourceAuth::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sourceAuthOverride").build())
.build();
private static final SdkField GIT_CLONE_DEPTH_OVERRIDE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("gitCloneDepthOverride").getter(getter(StartBuildRequest::gitCloneDepthOverride))
.setter(setter(Builder::gitCloneDepthOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("gitCloneDepthOverride").build())
.build();
private static final SdkField GIT_SUBMODULES_CONFIG_OVERRIDE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("gitSubmodulesConfigOverride")
.getter(getter(StartBuildRequest::gitSubmodulesConfigOverride))
.setter(setter(Builder::gitSubmodulesConfigOverride))
.constructor(GitSubmodulesConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("gitSubmodulesConfigOverride")
.build()).build();
private static final SdkField BUILDSPEC_OVERRIDE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("buildspecOverride").getter(getter(StartBuildRequest::buildspecOverride))
.setter(setter(Builder::buildspecOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("buildspecOverride").build()).build();
private static final SdkField INSECURE_SSL_OVERRIDE_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("insecureSslOverride").getter(getter(StartBuildRequest::insecureSslOverride))
.setter(setter(Builder::insecureSslOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("insecureSslOverride").build())
.build();
private static final SdkField REPORT_BUILD_STATUS_OVERRIDE_FIELD = SdkField
. builder(MarshallingType.BOOLEAN).memberName("reportBuildStatusOverride")
.getter(getter(StartBuildRequest::reportBuildStatusOverride)).setter(setter(Builder::reportBuildStatusOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("reportBuildStatusOverride").build())
.build();
private static final SdkField BUILD_STATUS_CONFIG_OVERRIDE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("buildStatusConfigOverride")
.getter(getter(StartBuildRequest::buildStatusConfigOverride)).setter(setter(Builder::buildStatusConfigOverride))
.constructor(BuildStatusConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("buildStatusConfigOverride").build())
.build();
private static final SdkField ENVIRONMENT_TYPE_OVERRIDE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("environmentTypeOverride").getter(getter(StartBuildRequest::environmentTypeOverrideAsString))
.setter(setter(Builder::environmentTypeOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("environmentTypeOverride").build())
.build();
private static final SdkField IMAGE_OVERRIDE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("imageOverride").getter(getter(StartBuildRequest::imageOverride)).setter(setter(Builder::imageOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("imageOverride").build()).build();
private static final SdkField COMPUTE_TYPE_OVERRIDE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("computeTypeOverride").getter(getter(StartBuildRequest::computeTypeOverrideAsString))
.setter(setter(Builder::computeTypeOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("computeTypeOverride").build())
.build();
private static final SdkField CERTIFICATE_OVERRIDE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("certificateOverride").getter(getter(StartBuildRequest::certificateOverride))
.setter(setter(Builder::certificateOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("certificateOverride").build())
.build();
private static final SdkField CACHE_OVERRIDE_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("cacheOverride").getter(getter(StartBuildRequest::cacheOverride)).setter(setter(Builder::cacheOverride))
.constructor(ProjectCache::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("cacheOverride").build()).build();
private static final SdkField SERVICE_ROLE_OVERRIDE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("serviceRoleOverride").getter(getter(StartBuildRequest::serviceRoleOverride))
.setter(setter(Builder::serviceRoleOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serviceRoleOverride").build())
.build();
private static final SdkField PRIVILEGED_MODE_OVERRIDE_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("privilegedModeOverride").getter(getter(StartBuildRequest::privilegedModeOverride))
.setter(setter(Builder::privilegedModeOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("privilegedModeOverride").build())
.build();
private static final SdkField TIMEOUT_IN_MINUTES_OVERRIDE_FIELD = SdkField
. builder(MarshallingType.INTEGER).memberName("timeoutInMinutesOverride")
.getter(getter(StartBuildRequest::timeoutInMinutesOverride)).setter(setter(Builder::timeoutInMinutesOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("timeoutInMinutesOverride").build())
.build();
private static final SdkField QUEUED_TIMEOUT_IN_MINUTES_OVERRIDE_FIELD = SdkField
. builder(MarshallingType.INTEGER)
.memberName("queuedTimeoutInMinutesOverride")
.getter(getter(StartBuildRequest::queuedTimeoutInMinutesOverride))
.setter(setter(Builder::queuedTimeoutInMinutesOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("queuedTimeoutInMinutesOverride")
.build()).build();
private static final SdkField ENCRYPTION_KEY_OVERRIDE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("encryptionKeyOverride").getter(getter(StartBuildRequest::encryptionKeyOverride))
.setter(setter(Builder::encryptionKeyOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("encryptionKeyOverride").build())
.build();
private static final SdkField IDEMPOTENCY_TOKEN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("idempotencyToken").getter(getter(StartBuildRequest::idempotencyToken))
.setter(setter(Builder::idempotencyToken))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("idempotencyToken").build()).build();
private static final SdkField LOGS_CONFIG_OVERRIDE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("logsConfigOverride")
.getter(getter(StartBuildRequest::logsConfigOverride)).setter(setter(Builder::logsConfigOverride))
.constructor(LogsConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("logsConfigOverride").build())
.build();
private static final SdkField REGISTRY_CREDENTIAL_OVERRIDE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("registryCredentialOverride")
.getter(getter(StartBuildRequest::registryCredentialOverride))
.setter(setter(Builder::registryCredentialOverride))
.constructor(RegistryCredential::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("registryCredentialOverride").build())
.build();
private static final SdkField IMAGE_PULL_CREDENTIALS_TYPE_OVERRIDE_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("imagePullCredentialsTypeOverride")
.getter(getter(StartBuildRequest::imagePullCredentialsTypeOverrideAsString))
.setter(setter(Builder::imagePullCredentialsTypeOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("imagePullCredentialsTypeOverride")
.build()).build();
private static final SdkField DEBUG_SESSION_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("debugSessionEnabled").getter(getter(StartBuildRequest::debugSessionEnabled))
.setter(setter(Builder::debugSessionEnabled))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("debugSessionEnabled").build())
.build();
private static final SdkField FLEET_OVERRIDE_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("fleetOverride").getter(getter(StartBuildRequest::fleetOverride)).setter(setter(Builder::fleetOverride))
.constructor(ProjectFleet::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fleetOverride").build()).build();
private static final SdkField AUTO_RETRY_LIMIT_OVERRIDE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("autoRetryLimitOverride").getter(getter(StartBuildRequest::autoRetryLimitOverride))
.setter(setter(Builder::autoRetryLimitOverride))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("autoRetryLimitOverride").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(PROJECT_NAME_FIELD,
SECONDARY_SOURCES_OVERRIDE_FIELD, SECONDARY_SOURCES_VERSION_OVERRIDE_FIELD, SOURCE_VERSION_FIELD,
ARTIFACTS_OVERRIDE_FIELD, SECONDARY_ARTIFACTS_OVERRIDE_FIELD, ENVIRONMENT_VARIABLES_OVERRIDE_FIELD,
SOURCE_TYPE_OVERRIDE_FIELD, SOURCE_LOCATION_OVERRIDE_FIELD, SOURCE_AUTH_OVERRIDE_FIELD,
GIT_CLONE_DEPTH_OVERRIDE_FIELD, GIT_SUBMODULES_CONFIG_OVERRIDE_FIELD, BUILDSPEC_OVERRIDE_FIELD,
INSECURE_SSL_OVERRIDE_FIELD, REPORT_BUILD_STATUS_OVERRIDE_FIELD, BUILD_STATUS_CONFIG_OVERRIDE_FIELD,
ENVIRONMENT_TYPE_OVERRIDE_FIELD, IMAGE_OVERRIDE_FIELD, COMPUTE_TYPE_OVERRIDE_FIELD, CERTIFICATE_OVERRIDE_FIELD,
CACHE_OVERRIDE_FIELD, SERVICE_ROLE_OVERRIDE_FIELD, PRIVILEGED_MODE_OVERRIDE_FIELD, TIMEOUT_IN_MINUTES_OVERRIDE_FIELD,
QUEUED_TIMEOUT_IN_MINUTES_OVERRIDE_FIELD, ENCRYPTION_KEY_OVERRIDE_FIELD, IDEMPOTENCY_TOKEN_FIELD,
LOGS_CONFIG_OVERRIDE_FIELD, REGISTRY_CREDENTIAL_OVERRIDE_FIELD, IMAGE_PULL_CREDENTIALS_TYPE_OVERRIDE_FIELD,
DEBUG_SESSION_ENABLED_FIELD, FLEET_OVERRIDE_FIELD, AUTO_RETRY_LIMIT_OVERRIDE_FIELD));
private static final Map> SDK_NAME_TO_FIELD = Collections
.unmodifiableMap(new HashMap>() {
{
put("projectName", PROJECT_NAME_FIELD);
put("secondarySourcesOverride", SECONDARY_SOURCES_OVERRIDE_FIELD);
put("secondarySourcesVersionOverride", SECONDARY_SOURCES_VERSION_OVERRIDE_FIELD);
put("sourceVersion", SOURCE_VERSION_FIELD);
put("artifactsOverride", ARTIFACTS_OVERRIDE_FIELD);
put("secondaryArtifactsOverride", SECONDARY_ARTIFACTS_OVERRIDE_FIELD);
put("environmentVariablesOverride", ENVIRONMENT_VARIABLES_OVERRIDE_FIELD);
put("sourceTypeOverride", SOURCE_TYPE_OVERRIDE_FIELD);
put("sourceLocationOverride", SOURCE_LOCATION_OVERRIDE_FIELD);
put("sourceAuthOverride", SOURCE_AUTH_OVERRIDE_FIELD);
put("gitCloneDepthOverride", GIT_CLONE_DEPTH_OVERRIDE_FIELD);
put("gitSubmodulesConfigOverride", GIT_SUBMODULES_CONFIG_OVERRIDE_FIELD);
put("buildspecOverride", BUILDSPEC_OVERRIDE_FIELD);
put("insecureSslOverride", INSECURE_SSL_OVERRIDE_FIELD);
put("reportBuildStatusOverride", REPORT_BUILD_STATUS_OVERRIDE_FIELD);
put("buildStatusConfigOverride", BUILD_STATUS_CONFIG_OVERRIDE_FIELD);
put("environmentTypeOverride", ENVIRONMENT_TYPE_OVERRIDE_FIELD);
put("imageOverride", IMAGE_OVERRIDE_FIELD);
put("computeTypeOverride", COMPUTE_TYPE_OVERRIDE_FIELD);
put("certificateOverride", CERTIFICATE_OVERRIDE_FIELD);
put("cacheOverride", CACHE_OVERRIDE_FIELD);
put("serviceRoleOverride", SERVICE_ROLE_OVERRIDE_FIELD);
put("privilegedModeOverride", PRIVILEGED_MODE_OVERRIDE_FIELD);
put("timeoutInMinutesOverride", TIMEOUT_IN_MINUTES_OVERRIDE_FIELD);
put("queuedTimeoutInMinutesOverride", QUEUED_TIMEOUT_IN_MINUTES_OVERRIDE_FIELD);
put("encryptionKeyOverride", ENCRYPTION_KEY_OVERRIDE_FIELD);
put("idempotencyToken", IDEMPOTENCY_TOKEN_FIELD);
put("logsConfigOverride", LOGS_CONFIG_OVERRIDE_FIELD);
put("registryCredentialOverride", REGISTRY_CREDENTIAL_OVERRIDE_FIELD);
put("imagePullCredentialsTypeOverride", IMAGE_PULL_CREDENTIALS_TYPE_OVERRIDE_FIELD);
put("debugSessionEnabled", DEBUG_SESSION_ENABLED_FIELD);
put("fleetOverride", FLEET_OVERRIDE_FIELD);
put("autoRetryLimitOverride", AUTO_RETRY_LIMIT_OVERRIDE_FIELD);
}
});
private final String projectName;
private final List secondarySourcesOverride;
private final List secondarySourcesVersionOverride;
private final String sourceVersion;
private final ProjectArtifacts artifactsOverride;
private final List secondaryArtifactsOverride;
private final List environmentVariablesOverride;
private final String sourceTypeOverride;
private final String sourceLocationOverride;
private final SourceAuth sourceAuthOverride;
private final Integer gitCloneDepthOverride;
private final GitSubmodulesConfig gitSubmodulesConfigOverride;
private final String buildspecOverride;
private final Boolean insecureSslOverride;
private final Boolean reportBuildStatusOverride;
private final BuildStatusConfig buildStatusConfigOverride;
private final String environmentTypeOverride;
private final String imageOverride;
private final String computeTypeOverride;
private final String certificateOverride;
private final ProjectCache cacheOverride;
private final String serviceRoleOverride;
private final Boolean privilegedModeOverride;
private final Integer timeoutInMinutesOverride;
private final Integer queuedTimeoutInMinutesOverride;
private final String encryptionKeyOverride;
private final String idempotencyToken;
private final LogsConfig logsConfigOverride;
private final RegistryCredential registryCredentialOverride;
private final String imagePullCredentialsTypeOverride;
private final Boolean debugSessionEnabled;
private final ProjectFleet fleetOverride;
private final Integer autoRetryLimitOverride;
private StartBuildRequest(BuilderImpl builder) {
super(builder);
this.projectName = builder.projectName;
this.secondarySourcesOverride = builder.secondarySourcesOverride;
this.secondarySourcesVersionOverride = builder.secondarySourcesVersionOverride;
this.sourceVersion = builder.sourceVersion;
this.artifactsOverride = builder.artifactsOverride;
this.secondaryArtifactsOverride = builder.secondaryArtifactsOverride;
this.environmentVariablesOverride = builder.environmentVariablesOverride;
this.sourceTypeOverride = builder.sourceTypeOverride;
this.sourceLocationOverride = builder.sourceLocationOverride;
this.sourceAuthOverride = builder.sourceAuthOverride;
this.gitCloneDepthOverride = builder.gitCloneDepthOverride;
this.gitSubmodulesConfigOverride = builder.gitSubmodulesConfigOverride;
this.buildspecOverride = builder.buildspecOverride;
this.insecureSslOverride = builder.insecureSslOverride;
this.reportBuildStatusOverride = builder.reportBuildStatusOverride;
this.buildStatusConfigOverride = builder.buildStatusConfigOverride;
this.environmentTypeOverride = builder.environmentTypeOverride;
this.imageOverride = builder.imageOverride;
this.computeTypeOverride = builder.computeTypeOverride;
this.certificateOverride = builder.certificateOverride;
this.cacheOverride = builder.cacheOverride;
this.serviceRoleOverride = builder.serviceRoleOverride;
this.privilegedModeOverride = builder.privilegedModeOverride;
this.timeoutInMinutesOverride = builder.timeoutInMinutesOverride;
this.queuedTimeoutInMinutesOverride = builder.queuedTimeoutInMinutesOverride;
this.encryptionKeyOverride = builder.encryptionKeyOverride;
this.idempotencyToken = builder.idempotencyToken;
this.logsConfigOverride = builder.logsConfigOverride;
this.registryCredentialOverride = builder.registryCredentialOverride;
this.imagePullCredentialsTypeOverride = builder.imagePullCredentialsTypeOverride;
this.debugSessionEnabled = builder.debugSessionEnabled;
this.fleetOverride = builder.fleetOverride;
this.autoRetryLimitOverride = builder.autoRetryLimitOverride;
}
/**
*
* The name of the CodeBuild build project to start running a build.
*
*
* @return The name of the CodeBuild build project to start running a build.
*/
public final String projectName() {
return projectName;
}
/**
* For responses, this returns true if the service returned a value for the SecondarySourcesOverride 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 hasSecondarySourcesOverride() {
return secondarySourcesOverride != null && !(secondarySourcesOverride instanceof SdkAutoConstructList);
}
/**
*
* An array of ProjectSource
objects.
*
*
* 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 #hasSecondarySourcesOverride} method.
*
*
* @return An array of ProjectSource
objects.
*/
public final List secondarySourcesOverride() {
return secondarySourcesOverride;
}
/**
* For responses, this returns true if the service returned a value for the SecondarySourcesVersionOverride
* 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 hasSecondarySourcesVersionOverride() {
return secondarySourcesVersionOverride != null && !(secondarySourcesVersionOverride instanceof SdkAutoConstructList);
}
/**
*
* An array of ProjectSourceVersion
objects that specify one or more versions of the project's
* secondary sources to be used for this build only.
*
*
* 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 #hasSecondarySourcesVersionOverride}
* method.
*
*
* @return An array of ProjectSourceVersion
objects that specify one or more versions of the project's
* secondary sources to be used for this build only.
*/
public final List secondarySourcesVersionOverride() {
return secondarySourcesVersionOverride;
}
/**
*
* The version of the build input to be built, for this build only. If not specified, the latest version is used. If
* specified, the contents depends on the source provider:
*
*
* - CodeCommit
* -
*
* The commit ID, branch, or Git tag to use.
*
*
* - GitHub
* -
*
* The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you
* want to build. If a pull request ID is specified, it must use the format pr/pull-request-ID
(for
* example pr/25
). If a branch name is specified, the branch's HEAD commit ID is used. If not
* specified, the default branch's HEAD commit ID is used.
*
*
* - GitLab
* -
*
* The commit ID, branch, or Git tag to use.
*
*
* - Bitbucket
* -
*
* The commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If
* a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD
* commit ID is used.
*
*
* - Amazon S3
* -
*
* The version ID of the object that represents the build input ZIP file to use.
*
*
*
*
* If sourceVersion
is specified at the project level, then this sourceVersion
(at the
* build level) takes precedence.
*
*
* For more information, see Source Version Sample
* with CodeBuild in the CodeBuild User Guide.
*
*
* @return The version of the build input to be built, for this build only. If not specified, the latest version is
* used. If specified, the contents depends on the source provider:
*
* - CodeCommit
* -
*
* The commit ID, branch, or Git tag to use.
*
*
* - GitHub
* -
*
* The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source
* code you want to build. If a pull request ID is specified, it must use the format
* pr/pull-request-ID
(for example pr/25
). If a branch name is specified, the
* branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
*
*
* - GitLab
* -
*
* The commit ID, branch, or Git tag to use.
*
*
* - Bitbucket
* -
*
* The commit ID, branch name, or tag name that corresponds to the version of the source code you want to
* build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default
* branch's HEAD commit ID is used.
*
*
* - Amazon S3
* -
*
* The version ID of the object that represents the build input ZIP file to use.
*
*
*
*
* If sourceVersion
is specified at the project level, then this sourceVersion
(at
* the build level) takes precedence.
*
*
* For more information, see Source Version
* Sample with CodeBuild in the CodeBuild User Guide.
*/
public final String sourceVersion() {
return sourceVersion;
}
/**
*
* Build output artifact settings that override, for this build only, the latest ones already defined in the build
* project.
*
*
* @return Build output artifact settings that override, for this build only, the latest ones already defined in the
* build project.
*/
public final ProjectArtifacts artifactsOverride() {
return artifactsOverride;
}
/**
* For responses, this returns true if the service returned a value for the SecondaryArtifactsOverride 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 hasSecondaryArtifactsOverride() {
return secondaryArtifactsOverride != null && !(secondaryArtifactsOverride instanceof SdkAutoConstructList);
}
/**
*
* An array of ProjectArtifacts
objects.
*
*
* 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 #hasSecondaryArtifactsOverride} method.
*
*
* @return An array of ProjectArtifacts
objects.
*/
public final List secondaryArtifactsOverride() {
return secondaryArtifactsOverride;
}
/**
* For responses, this returns true if the service returned a value for the EnvironmentVariablesOverride 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 hasEnvironmentVariablesOverride() {
return environmentVariablesOverride != null && !(environmentVariablesOverride instanceof SdkAutoConstructList);
}
/**
*
* A set of environment variables that overrides, for this build only, the latest ones already defined in the build
* project.
*
*
* 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 #hasEnvironmentVariablesOverride} method.
*
*
* @return A set of environment variables that overrides, for this build only, the latest ones already defined in
* the build project.
*/
public final List environmentVariablesOverride() {
return environmentVariablesOverride;
}
/**
*
* A source input type, for this build, that overrides the source input defined in the build project.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #sourceTypeOverride} will return {@link SourceType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the
* service is available from {@link #sourceTypeOverrideAsString}.
*
*
* @return A source input type, for this build, that overrides the source input defined in the build project.
* @see SourceType
*/
public final SourceType sourceTypeOverride() {
return SourceType.fromValue(sourceTypeOverride);
}
/**
*
* A source input type, for this build, that overrides the source input defined in the build project.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #sourceTypeOverride} will return {@link SourceType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the
* service is available from {@link #sourceTypeOverrideAsString}.
*
*
* @return A source input type, for this build, that overrides the source input defined in the build project.
* @see SourceType
*/
public final String sourceTypeOverrideAsString() {
return sourceTypeOverride;
}
/**
*
* A location that overrides, for this build, the source location for the one defined in the build project.
*
*
* @return A location that overrides, for this build, the source location for the one defined in the build project.
*/
public final String sourceLocationOverride() {
return sourceLocationOverride;
}
/**
*
* An authorization type for this build that overrides the one defined in the build project. This override applies
* only if the build project's source is BitBucket, GitHub, GitLab, or GitLab Self Managed.
*
*
* @return An authorization type for this build that overrides the one defined in the build project. This override
* applies only if the build project's source is BitBucket, GitHub, GitLab, or GitLab Self Managed.
*/
public final SourceAuth sourceAuthOverride() {
return sourceAuthOverride;
}
/**
*
* The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any previous
* depth of history defined in the build project.
*
*
* @return The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any
* previous depth of history defined in the build project.
*/
public final Integer gitCloneDepthOverride() {
return gitCloneDepthOverride;
}
/**
*
* Information about the Git submodules configuration for this build of an CodeBuild build project.
*
*
* @return Information about the Git submodules configuration for this build of an CodeBuild build project.
*/
public final GitSubmodulesConfig gitSubmodulesConfigOverride() {
return gitSubmodulesConfigOverride;
}
/**
*
* A buildspec file declaration that overrides the latest one defined in the build project, for this build only. The
* buildspec defined on the project is not changed.
*
*
* If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file
* relative to the value of the built-in CODEBUILD_SRC_DIR
environment variable, or the path to an S3
* bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec
* file using its ARN (for example, arn:aws:s3:::my-codebuild-sample2/buildspec.yml
). If this value is
* not provided or is set to an empty string, the source code must contain a buildspec file in its root directory.
* For more information, see Buildspec File Name and Storage Location.
*
*
*
* Since this property allows you to change the build commands that will run in the container, you should note that
* an IAM principal with the ability to call this API and set this parameter can override the default settings.
* Moreover, we encourage that you use a trustworthy buildspec location like a file in your source repository or a
* Amazon S3 bucket.
*
*
*
* @return A buildspec file declaration that overrides the latest one defined in the build project, for this build
* only. The buildspec defined on the project is not changed.
*
* If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec
* file relative to the value of the built-in CODEBUILD_SRC_DIR
environment variable, or the
* path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project.
* Specify the buildspec file using its ARN (for example,
* arn:aws:s3:::my-codebuild-sample2/buildspec.yml
). If this value is not provided or is set to
* an empty string, the source code must contain a buildspec file in its root directory. For more
* information, see Buildspec File Name and Storage Location.
*
*
*
* Since this property allows you to change the build commands that will run in the container, you should
* note that an IAM principal with the ability to call this API and set this parameter can override the
* default settings. Moreover, we encourage that you use a trustworthy buildspec location like a file in
* your source repository or a Amazon S3 bucket.
*
*/
public final String buildspecOverride() {
return buildspecOverride;
}
/**
*
* Enable this flag to override the insecure SSL setting that is specified in the build project. The insecure SSL
* setting determines whether to ignore SSL warnings while connecting to the project source code. This override
* applies only if the build's source is GitHub Enterprise.
*
*
* @return Enable this flag to override the insecure SSL setting that is specified in the build project. The
* insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source
* code. This override applies only if the build's source is GitHub Enterprise.
*/
public final Boolean insecureSslOverride() {
return insecureSslOverride;
}
/**
*
* Set to true to report to your source provider the status of a build's start and completion. If you use this
* option with a source provider other than GitHub, GitHub Enterprise, or Bitbucket, an
* invalidInputException
is thrown.
*
*
* To be able to report the build status to the source provider, the user associated with the source provider must
* have write access to the repo. If the user does not have write access, the build status cannot be updated. For
* more information, see Source
* provider access in the CodeBuild User Guide.
*
*
*
* The status of a build triggered by a webhook is always reported to your source provider.
*
*
*
* @return Set to true to report to your source provider the status of a build's start and completion. If you use
* this option with a source provider other than GitHub, GitHub Enterprise, or Bitbucket, an
* invalidInputException
is thrown.
*
* To be able to report the build status to the source provider, the user associated with the source
* provider must have write access to the repo. If the user does not have write access, the build status
* cannot be updated. For more information, see Source provider
* access in the CodeBuild User Guide.
*
*
*
* The status of a build triggered by a webhook is always reported to your source provider.
*
*/
public final Boolean reportBuildStatusOverride() {
return reportBuildStatusOverride;
}
/**
*
* Contains information that defines how the build project reports the build status to the source provider. This
* option is only used when the source provider is GITHUB
, GITHUB_ENTERPRISE
, or
* BITBUCKET
.
*
*
* @return Contains information that defines how the build project reports the build status to the source provider.
* This option is only used when the source provider is GITHUB
, GITHUB_ENTERPRISE
,
* or BITBUCKET
.
*/
public final BuildStatusConfig buildStatusConfigOverride() {
return buildStatusConfigOverride;
}
/**
*
* A container type for this build that overrides the one specified in the build project.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #environmentTypeOverride} will return {@link EnvironmentType#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #environmentTypeOverrideAsString}.
*
*
* @return A container type for this build that overrides the one specified in the build project.
* @see EnvironmentType
*/
public final EnvironmentType environmentTypeOverride() {
return EnvironmentType.fromValue(environmentTypeOverride);
}
/**
*
* A container type for this build that overrides the one specified in the build project.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #environmentTypeOverride} will return {@link EnvironmentType#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #environmentTypeOverrideAsString}.
*
*
* @return A container type for this build that overrides the one specified in the build project.
* @see EnvironmentType
*/
public final String environmentTypeOverrideAsString() {
return environmentTypeOverride;
}
/**
*
* The name of an image for this build that overrides the one specified in the build project.
*
*
* @return The name of an image for this build that overrides the one specified in the build project.
*/
public final String imageOverride() {
return imageOverride;
}
/**
*
* The name of a compute type for this build that overrides the one specified in the build project.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #computeTypeOverride} will return {@link ComputeType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by
* the service is available from {@link #computeTypeOverrideAsString}.
*
*
* @return The name of a compute type for this build that overrides the one specified in the build project.
* @see ComputeType
*/
public final ComputeType computeTypeOverride() {
return ComputeType.fromValue(computeTypeOverride);
}
/**
*
* The name of a compute type for this build that overrides the one specified in the build project.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #computeTypeOverride} will return {@link ComputeType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by
* the service is available from {@link #computeTypeOverrideAsString}.
*
*
* @return The name of a compute type for this build that overrides the one specified in the build project.
* @see ComputeType
*/
public final String computeTypeOverrideAsString() {
return computeTypeOverride;
}
/**
*
* The name of a certificate for this build that overrides the one specified in the build project.
*
*
* @return The name of a certificate for this build that overrides the one specified in the build project.
*/
public final String certificateOverride() {
return certificateOverride;
}
/**
*
* A ProjectCache object specified for this build that overrides the one defined in the build project.
*
*
* @return A ProjectCache object specified for this build that overrides the one defined in the build project.
*/
public final ProjectCache cacheOverride() {
return cacheOverride;
}
/**
*
* The name of a service role for this build that overrides the one specified in the build project.
*
*
* @return The name of a service role for this build that overrides the one specified in the build project.
*/
public final String serviceRoleOverride() {
return serviceRoleOverride;
}
/**
*
* Enable this flag to override privileged mode in the build project.
*
*
* @return Enable this flag to override privileged mode in the build project.
*/
public final Boolean privilegedModeOverride() {
return privilegedModeOverride;
}
/**
*
* The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, for this build only, the latest
* setting already defined in the build project.
*
*
* @return The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, for this build only, the
* latest setting already defined in the build project.
*/
public final Integer timeoutInMinutesOverride() {
return timeoutInMinutesOverride;
}
/**
*
* The number of minutes a build is allowed to be queued before it times out.
*
*
* @return The number of minutes a build is allowed to be queued before it times out.
*/
public final Integer queuedTimeoutInMinutesOverride() {
return queuedTimeoutInMinutesOverride;
}
/**
*
* The Key Management Service customer master key (CMK) that overrides the one specified in the build project. The
* CMK key encrypts the build output artifacts.
*
*
*
* You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to
* that key.
*
*
*
* You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the
* format alias/<alias-name>
).
*
*
* @return The Key Management Service customer master key (CMK) that overrides the one specified in the build
* project. The CMK key encrypts the build output artifacts.
*
* You can use a cross-account KMS key to encrypt the build output artifacts if your service role has
* permission to that key.
*
*
*
* You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using
* the format alias/<alias-name>
).
*/
public final String encryptionKeyOverride() {
return encryptionKeyOverride;
}
/**
*
* A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The token is
* included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild request with the same
* token, but change a parameter, CodeBuild returns a parameter mismatch error.
*
*
* @return A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The
* token is included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild
* request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error.
*/
public final String idempotencyToken() {
return idempotencyToken;
}
/**
*
* Log settings for this build that override the log settings defined in the build project.
*
*
* @return Log settings for this build that override the log settings defined in the build project.
*/
public final LogsConfig logsConfigOverride() {
return logsConfigOverride;
}
/**
*
* The credentials for access to a private registry.
*
*
* @return The credentials for access to a private registry.
*/
public final RegistryCredential registryCredentialOverride() {
return registryCredentialOverride;
}
/**
*
* The type of credentials CodeBuild uses to pull images in your build. There are two valid values:
*
*
* - CODEBUILD
* -
*
* Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to
* trust CodeBuild's service principal.
*
*
* - SERVICE_ROLE
* -
*
* Specifies that CodeBuild uses your build project's service role.
*
*
*
*
* When using a cross-account or private registry image, you must use SERVICE_ROLE
credentials. When
* using an CodeBuild curated image, you must use CODEBUILD
credentials.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #imagePullCredentialsTypeOverride} will return {@link ImagePullCredentialsType#UNKNOWN_TO_SDK_VERSION}.
* The raw value returned by the service is available from {@link #imagePullCredentialsTypeOverrideAsString}.
*
*
* @return The type of credentials CodeBuild uses to pull images in your build. There are two valid values:
*
* - CODEBUILD
* -
*
* Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository
* policy to trust CodeBuild's service principal.
*
*
* - SERVICE_ROLE
* -
*
* Specifies that CodeBuild uses your build project's service role.
*
*
*
*
* When using a cross-account or private registry image, you must use SERVICE_ROLE
credentials.
* When using an CodeBuild curated image, you must use CODEBUILD
credentials.
* @see ImagePullCredentialsType
*/
public final ImagePullCredentialsType imagePullCredentialsTypeOverride() {
return ImagePullCredentialsType.fromValue(imagePullCredentialsTypeOverride);
}
/**
*
* The type of credentials CodeBuild uses to pull images in your build. There are two valid values:
*
*
* - CODEBUILD
* -
*
* Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to
* trust CodeBuild's service principal.
*
*
* - SERVICE_ROLE
* -
*
* Specifies that CodeBuild uses your build project's service role.
*
*
*
*
* When using a cross-account or private registry image, you must use SERVICE_ROLE
credentials. When
* using an CodeBuild curated image, you must use CODEBUILD
credentials.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #imagePullCredentialsTypeOverride} will return {@link ImagePullCredentialsType#UNKNOWN_TO_SDK_VERSION}.
* The raw value returned by the service is available from {@link #imagePullCredentialsTypeOverrideAsString}.
*
*
* @return The type of credentials CodeBuild uses to pull images in your build. There are two valid values:
*
* - CODEBUILD
* -
*
* Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository
* policy to trust CodeBuild's service principal.
*
*
* - SERVICE_ROLE
* -
*
* Specifies that CodeBuild uses your build project's service role.
*
*
*
*
* When using a cross-account or private registry image, you must use SERVICE_ROLE
credentials.
* When using an CodeBuild curated image, you must use CODEBUILD
credentials.
* @see ImagePullCredentialsType
*/
public final String imagePullCredentialsTypeOverrideAsString() {
return imagePullCredentialsTypeOverride;
}
/**
*
* Specifies if session debugging is enabled for this build. For more information, see Viewing a running build in
* Session Manager.
*
*
* @return Specifies if session debugging is enabled for this build. For more information, see Viewing a running
* build in Session Manager.
*/
public final Boolean debugSessionEnabled() {
return debugSessionEnabled;
}
/**
*
* A ProjectFleet object specified for this build that overrides the one defined in the build project.
*
*
* @return A ProjectFleet object specified for this build that overrides the one defined in the build project.
*/
public final ProjectFleet fleetOverride() {
return fleetOverride;
}
/**
*
* The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is
* set to 2, CodeBuild will call the RetryBuild
API to automatically retry your build for up to 2
* additional times.
*
*
* @return The maximum number of additional automatic retries after a failed build. For example, if the auto-retry
* limit is set to 2, CodeBuild will call the RetryBuild
API to automatically retry your build
* for up to 2 additional times.
*/
public final Integer autoRetryLimitOverride() {
return autoRetryLimitOverride;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(projectName());
hashCode = 31 * hashCode + Objects.hashCode(hasSecondarySourcesOverride() ? secondarySourcesOverride() : null);
hashCode = 31 * hashCode
+ Objects.hashCode(hasSecondarySourcesVersionOverride() ? secondarySourcesVersionOverride() : null);
hashCode = 31 * hashCode + Objects.hashCode(sourceVersion());
hashCode = 31 * hashCode + Objects.hashCode(artifactsOverride());
hashCode = 31 * hashCode + Objects.hashCode(hasSecondaryArtifactsOverride() ? secondaryArtifactsOverride() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasEnvironmentVariablesOverride() ? environmentVariablesOverride() : null);
hashCode = 31 * hashCode + Objects.hashCode(sourceTypeOverrideAsString());
hashCode = 31 * hashCode + Objects.hashCode(sourceLocationOverride());
hashCode = 31 * hashCode + Objects.hashCode(sourceAuthOverride());
hashCode = 31 * hashCode + Objects.hashCode(gitCloneDepthOverride());
hashCode = 31 * hashCode + Objects.hashCode(gitSubmodulesConfigOverride());
hashCode = 31 * hashCode + Objects.hashCode(buildspecOverride());
hashCode = 31 * hashCode + Objects.hashCode(insecureSslOverride());
hashCode = 31 * hashCode + Objects.hashCode(reportBuildStatusOverride());
hashCode = 31 * hashCode + Objects.hashCode(buildStatusConfigOverride());
hashCode = 31 * hashCode + Objects.hashCode(environmentTypeOverrideAsString());
hashCode = 31 * hashCode + Objects.hashCode(imageOverride());
hashCode = 31 * hashCode + Objects.hashCode(computeTypeOverrideAsString());
hashCode = 31 * hashCode + Objects.hashCode(certificateOverride());
hashCode = 31 * hashCode + Objects.hashCode(cacheOverride());
hashCode = 31 * hashCode + Objects.hashCode(serviceRoleOverride());
hashCode = 31 * hashCode + Objects.hashCode(privilegedModeOverride());
hashCode = 31 * hashCode + Objects.hashCode(timeoutInMinutesOverride());
hashCode = 31 * hashCode + Objects.hashCode(queuedTimeoutInMinutesOverride());
hashCode = 31 * hashCode + Objects.hashCode(encryptionKeyOverride());
hashCode = 31 * hashCode + Objects.hashCode(idempotencyToken());
hashCode = 31 * hashCode + Objects.hashCode(logsConfigOverride());
hashCode = 31 * hashCode + Objects.hashCode(registryCredentialOverride());
hashCode = 31 * hashCode + Objects.hashCode(imagePullCredentialsTypeOverrideAsString());
hashCode = 31 * hashCode + Objects.hashCode(debugSessionEnabled());
hashCode = 31 * hashCode + Objects.hashCode(fleetOverride());
hashCode = 31 * hashCode + Objects.hashCode(autoRetryLimitOverride());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof StartBuildRequest)) {
return false;
}
StartBuildRequest other = (StartBuildRequest) obj;
return Objects.equals(projectName(), other.projectName())
&& hasSecondarySourcesOverride() == other.hasSecondarySourcesOverride()
&& Objects.equals(secondarySourcesOverride(), other.secondarySourcesOverride())
&& hasSecondarySourcesVersionOverride() == other.hasSecondarySourcesVersionOverride()
&& Objects.equals(secondarySourcesVersionOverride(), other.secondarySourcesVersionOverride())
&& Objects.equals(sourceVersion(), other.sourceVersion())
&& Objects.equals(artifactsOverride(), other.artifactsOverride())
&& hasSecondaryArtifactsOverride() == other.hasSecondaryArtifactsOverride()
&& Objects.equals(secondaryArtifactsOverride(), other.secondaryArtifactsOverride())
&& hasEnvironmentVariablesOverride() == other.hasEnvironmentVariablesOverride()
&& Objects.equals(environmentVariablesOverride(), other.environmentVariablesOverride())
&& Objects.equals(sourceTypeOverrideAsString(), other.sourceTypeOverrideAsString())
&& Objects.equals(sourceLocationOverride(), other.sourceLocationOverride())
&& Objects.equals(sourceAuthOverride(), other.sourceAuthOverride())
&& Objects.equals(gitCloneDepthOverride(), other.gitCloneDepthOverride())
&& Objects.equals(gitSubmodulesConfigOverride(), other.gitSubmodulesConfigOverride())
&& Objects.equals(buildspecOverride(), other.buildspecOverride())
&& Objects.equals(insecureSslOverride(), other.insecureSslOverride())
&& Objects.equals(reportBuildStatusOverride(), other.reportBuildStatusOverride())
&& Objects.equals(buildStatusConfigOverride(), other.buildStatusConfigOverride())
&& Objects.equals(environmentTypeOverrideAsString(), other.environmentTypeOverrideAsString())
&& Objects.equals(imageOverride(), other.imageOverride())
&& Objects.equals(computeTypeOverrideAsString(), other.computeTypeOverrideAsString())
&& Objects.equals(certificateOverride(), other.certificateOverride())
&& Objects.equals(cacheOverride(), other.cacheOverride())
&& Objects.equals(serviceRoleOverride(), other.serviceRoleOverride())
&& Objects.equals(privilegedModeOverride(), other.privilegedModeOverride())
&& Objects.equals(timeoutInMinutesOverride(), other.timeoutInMinutesOverride())
&& Objects.equals(queuedTimeoutInMinutesOverride(), other.queuedTimeoutInMinutesOverride())
&& Objects.equals(encryptionKeyOverride(), other.encryptionKeyOverride())
&& Objects.equals(idempotencyToken(), other.idempotencyToken())
&& Objects.equals(logsConfigOverride(), other.logsConfigOverride())
&& Objects.equals(registryCredentialOverride(), other.registryCredentialOverride())
&& Objects.equals(imagePullCredentialsTypeOverrideAsString(), other.imagePullCredentialsTypeOverrideAsString())
&& Objects.equals(debugSessionEnabled(), other.debugSessionEnabled())
&& Objects.equals(fleetOverride(), other.fleetOverride())
&& Objects.equals(autoRetryLimitOverride(), other.autoRetryLimitOverride());
}
/**
* 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("StartBuildRequest")
.add("ProjectName", projectName())
.add("SecondarySourcesOverride", hasSecondarySourcesOverride() ? secondarySourcesOverride() : null)
.add("SecondarySourcesVersionOverride",
hasSecondarySourcesVersionOverride() ? secondarySourcesVersionOverride() : null)
.add("SourceVersion", sourceVersion()).add("ArtifactsOverride", artifactsOverride())
.add("SecondaryArtifactsOverride", hasSecondaryArtifactsOverride() ? secondaryArtifactsOverride() : null)
.add("EnvironmentVariablesOverride", hasEnvironmentVariablesOverride() ? environmentVariablesOverride() : null)
.add("SourceTypeOverride", sourceTypeOverrideAsString()).add("SourceLocationOverride", sourceLocationOverride())
.add("SourceAuthOverride", sourceAuthOverride()).add("GitCloneDepthOverride", gitCloneDepthOverride())
.add("GitSubmodulesConfigOverride", gitSubmodulesConfigOverride()).add("BuildspecOverride", buildspecOverride())
.add("InsecureSslOverride", insecureSslOverride()).add("ReportBuildStatusOverride", reportBuildStatusOverride())
.add("BuildStatusConfigOverride", buildStatusConfigOverride())
.add("EnvironmentTypeOverride", environmentTypeOverrideAsString()).add("ImageOverride", imageOverride())
.add("ComputeTypeOverride", computeTypeOverrideAsString()).add("CertificateOverride", certificateOverride())
.add("CacheOverride", cacheOverride()).add("ServiceRoleOverride", serviceRoleOverride())
.add("PrivilegedModeOverride", privilegedModeOverride())
.add("TimeoutInMinutesOverride", timeoutInMinutesOverride())
.add("QueuedTimeoutInMinutesOverride", queuedTimeoutInMinutesOverride())
.add("EncryptionKeyOverride", encryptionKeyOverride()).add("IdempotencyToken", idempotencyToken())
.add("LogsConfigOverride", logsConfigOverride()).add("RegistryCredentialOverride", registryCredentialOverride())
.add("ImagePullCredentialsTypeOverride", imagePullCredentialsTypeOverrideAsString())
.add("DebugSessionEnabled", debugSessionEnabled()).add("FleetOverride", fleetOverride())
.add("AutoRetryLimitOverride", autoRetryLimitOverride()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "projectName":
return Optional.ofNullable(clazz.cast(projectName()));
case "secondarySourcesOverride":
return Optional.ofNullable(clazz.cast(secondarySourcesOverride()));
case "secondarySourcesVersionOverride":
return Optional.ofNullable(clazz.cast(secondarySourcesVersionOverride()));
case "sourceVersion":
return Optional.ofNullable(clazz.cast(sourceVersion()));
case "artifactsOverride":
return Optional.ofNullable(clazz.cast(artifactsOverride()));
case "secondaryArtifactsOverride":
return Optional.ofNullable(clazz.cast(secondaryArtifactsOverride()));
case "environmentVariablesOverride":
return Optional.ofNullable(clazz.cast(environmentVariablesOverride()));
case "sourceTypeOverride":
return Optional.ofNullable(clazz.cast(sourceTypeOverrideAsString()));
case "sourceLocationOverride":
return Optional.ofNullable(clazz.cast(sourceLocationOverride()));
case "sourceAuthOverride":
return Optional.ofNullable(clazz.cast(sourceAuthOverride()));
case "gitCloneDepthOverride":
return Optional.ofNullable(clazz.cast(gitCloneDepthOverride()));
case "gitSubmodulesConfigOverride":
return Optional.ofNullable(clazz.cast(gitSubmodulesConfigOverride()));
case "buildspecOverride":
return Optional.ofNullable(clazz.cast(buildspecOverride()));
case "insecureSslOverride":
return Optional.ofNullable(clazz.cast(insecureSslOverride()));
case "reportBuildStatusOverride":
return Optional.ofNullable(clazz.cast(reportBuildStatusOverride()));
case "buildStatusConfigOverride":
return Optional.ofNullable(clazz.cast(buildStatusConfigOverride()));
case "environmentTypeOverride":
return Optional.ofNullable(clazz.cast(environmentTypeOverrideAsString()));
case "imageOverride":
return Optional.ofNullable(clazz.cast(imageOverride()));
case "computeTypeOverride":
return Optional.ofNullable(clazz.cast(computeTypeOverrideAsString()));
case "certificateOverride":
return Optional.ofNullable(clazz.cast(certificateOverride()));
case "cacheOverride":
return Optional.ofNullable(clazz.cast(cacheOverride()));
case "serviceRoleOverride":
return Optional.ofNullable(clazz.cast(serviceRoleOverride()));
case "privilegedModeOverride":
return Optional.ofNullable(clazz.cast(privilegedModeOverride()));
case "timeoutInMinutesOverride":
return Optional.ofNullable(clazz.cast(timeoutInMinutesOverride()));
case "queuedTimeoutInMinutesOverride":
return Optional.ofNullable(clazz.cast(queuedTimeoutInMinutesOverride()));
case "encryptionKeyOverride":
return Optional.ofNullable(clazz.cast(encryptionKeyOverride()));
case "idempotencyToken":
return Optional.ofNullable(clazz.cast(idempotencyToken()));
case "logsConfigOverride":
return Optional.ofNullable(clazz.cast(logsConfigOverride()));
case "registryCredentialOverride":
return Optional.ofNullable(clazz.cast(registryCredentialOverride()));
case "imagePullCredentialsTypeOverride":
return Optional.ofNullable(clazz.cast(imagePullCredentialsTypeOverrideAsString()));
case "debugSessionEnabled":
return Optional.ofNullable(clazz.cast(debugSessionEnabled()));
case "fleetOverride":
return Optional.ofNullable(clazz.cast(fleetOverride()));
case "autoRetryLimitOverride":
return Optional.ofNullable(clazz.cast(autoRetryLimitOverride()));
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