com.google.cloudbuild.v1.BuildOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-build-v1 Show documentation
Show all versions of proto-google-cloud-build-v1 Show documentation
PROTO library for proto-google-cloud-build-v1
The newest version!
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License 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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/devtools/cloudbuild/v1/cloudbuild.proto
// Protobuf Java Version: 3.25.4
package com.google.cloudbuild.v1;
/**
*
*
*
* Optional arguments to enable specific features of builds.
*
*
* Protobuf type {@code google.devtools.cloudbuild.v1.BuildOptions}
*/
public final class BuildOptions extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.BuildOptions)
BuildOptionsOrBuilder {
private static final long serialVersionUID = 0L;
// Use BuildOptions.newBuilder() to construct.
private BuildOptions(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BuildOptions() {
sourceProvenanceHash_ = java.util.Collections.emptyList();
requestedVerifyOption_ = 0;
machineType_ = 0;
substitutionOption_ = 0;
logStreamingOption_ = 0;
workerPool_ = "";
logging_ = 0;
env_ = com.google.protobuf.LazyStringArrayList.emptyList();
secretEnv_ = com.google.protobuf.LazyStringArrayList.emptyList();
volumes_ = java.util.Collections.emptyList();
defaultLogsBucketBehavior_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new BuildOptions();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloudbuild.v1.Cloudbuild
.internal_static_google_devtools_cloudbuild_v1_BuildOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloudbuild.v1.Cloudbuild
.internal_static_google_devtools_cloudbuild_v1_BuildOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloudbuild.v1.BuildOptions.class,
com.google.cloudbuild.v1.BuildOptions.Builder.class);
}
/**
*
*
*
* Specifies the manner in which the build should be verified, if at all.
*
* If a verified build is requested, and any part of the process to generate
* and upload provenance fails, the build will also fail.
*
* If the build does not request verification then that process may occur, but
* is not guaranteed to. If it does occur and fails, the build will not fail.
*
* For more information, see [Viewing Build
* Provenance](https://cloud.google.com/build/docs/securing-builds/view-build-provenance).
*
*
* Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.VerifyOption}
*/
public enum VerifyOption implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Not a verifiable build (the default).
*
*
* NOT_VERIFIED = 0;
*/
NOT_VERIFIED(0),
/**
*
*
*
* Build must be verified.
*
*
* VERIFIED = 1;
*/
VERIFIED(1),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Not a verifiable build (the default).
*
*
* NOT_VERIFIED = 0;
*/
public static final int NOT_VERIFIED_VALUE = 0;
/**
*
*
*
* Build must be verified.
*
*
* VERIFIED = 1;
*/
public static final int VERIFIED_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static VerifyOption valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static VerifyOption forNumber(int value) {
switch (value) {
case 0:
return NOT_VERIFIED;
case 1:
return VERIFIED;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public VerifyOption findValueByNumber(int number) {
return VerifyOption.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(0);
}
private static final VerifyOption[] VALUES = values();
public static VerifyOption valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private VerifyOption(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.VerifyOption)
}
/**
*
*
*
* Supported Compute Engine machine types.
* For more information, see [Machine
* types](https://cloud.google.com/compute/docs/machine-types).
*
*
* Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.MachineType}
*/
public enum MachineType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Standard machine type.
*
*
* UNSPECIFIED = 0;
*/
UNSPECIFIED(0),
/**
*
*
*
* Highcpu machine with 8 CPUs.
*
*
* N1_HIGHCPU_8 = 1;
*/
N1_HIGHCPU_8(1),
/**
*
*
*
* Highcpu machine with 32 CPUs.
*
*
* N1_HIGHCPU_32 = 2;
*/
N1_HIGHCPU_32(2),
/**
*
*
*
* Highcpu e2 machine with 8 CPUs.
*
*
* E2_HIGHCPU_8 = 5;
*/
E2_HIGHCPU_8(5),
/**
*
*
*
* Highcpu e2 machine with 32 CPUs.
*
*
* E2_HIGHCPU_32 = 6;
*/
E2_HIGHCPU_32(6),
/**
*
*
*
* E2 machine with 1 CPU.
*
*
* E2_MEDIUM = 7;
*/
E2_MEDIUM(7),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Standard machine type.
*
*
* UNSPECIFIED = 0;
*/
public static final int UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Highcpu machine with 8 CPUs.
*
*
* N1_HIGHCPU_8 = 1;
*/
public static final int N1_HIGHCPU_8_VALUE = 1;
/**
*
*
*
* Highcpu machine with 32 CPUs.
*
*
* N1_HIGHCPU_32 = 2;
*/
public static final int N1_HIGHCPU_32_VALUE = 2;
/**
*
*
*
* Highcpu e2 machine with 8 CPUs.
*
*
* E2_HIGHCPU_8 = 5;
*/
public static final int E2_HIGHCPU_8_VALUE = 5;
/**
*
*
*
* Highcpu e2 machine with 32 CPUs.
*
*
* E2_HIGHCPU_32 = 6;
*/
public static final int E2_HIGHCPU_32_VALUE = 6;
/**
*
*
*
* E2 machine with 1 CPU.
*
*
* E2_MEDIUM = 7;
*/
public static final int E2_MEDIUM_VALUE = 7;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static MachineType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static MachineType forNumber(int value) {
switch (value) {
case 0:
return UNSPECIFIED;
case 1:
return N1_HIGHCPU_8;
case 2:
return N1_HIGHCPU_32;
case 5:
return E2_HIGHCPU_8;
case 6:
return E2_HIGHCPU_32;
case 7:
return E2_MEDIUM;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public MachineType findValueByNumber(int number) {
return MachineType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(1);
}
private static final MachineType[] VALUES = values();
public static MachineType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private MachineType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.MachineType)
}
/**
*
*
*
* Specifies the behavior when there is an error in the substitution checks.
*
*
* Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption}
*/
public enum SubstitutionOption implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Fails the build if error in substitutions checks, like missing
* a substitution in the template or in the map.
*
*
* MUST_MATCH = 0;
*/
MUST_MATCH(0),
/**
*
*
*
* Do not fail the build if error in substitutions checks.
*
*
* ALLOW_LOOSE = 1;
*/
ALLOW_LOOSE(1),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Fails the build if error in substitutions checks, like missing
* a substitution in the template or in the map.
*
*
* MUST_MATCH = 0;
*/
public static final int MUST_MATCH_VALUE = 0;
/**
*
*
*
* Do not fail the build if error in substitutions checks.
*
*
* ALLOW_LOOSE = 1;
*/
public static final int ALLOW_LOOSE_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SubstitutionOption valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static SubstitutionOption forNumber(int value) {
switch (value) {
case 0:
return MUST_MATCH;
case 1:
return ALLOW_LOOSE;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SubstitutionOption findValueByNumber(int number) {
return SubstitutionOption.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(2);
}
private static final SubstitutionOption[] VALUES = values();
public static SubstitutionOption valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private SubstitutionOption(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption)
}
/**
*
*
*
* Specifies the behavior when writing build logs to Cloud Storage.
*
*
* Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption}
*/
public enum LogStreamingOption implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Service may automatically determine build log streaming behavior.
*
*
* STREAM_DEFAULT = 0;
*/
STREAM_DEFAULT(0),
/**
*
*
*
* Build logs should be streamed to Cloud Storage.
*
*
* STREAM_ON = 1;
*/
STREAM_ON(1),
/**
*
*
*
* Build logs should not be streamed to Cloud Storage; they will be
* written when the build is completed.
*
*
* STREAM_OFF = 2;
*/
STREAM_OFF(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Service may automatically determine build log streaming behavior.
*
*
* STREAM_DEFAULT = 0;
*/
public static final int STREAM_DEFAULT_VALUE = 0;
/**
*
*
*
* Build logs should be streamed to Cloud Storage.
*
*
* STREAM_ON = 1;
*/
public static final int STREAM_ON_VALUE = 1;
/**
*
*
*
* Build logs should not be streamed to Cloud Storage; they will be
* written when the build is completed.
*
*
* STREAM_OFF = 2;
*/
public static final int STREAM_OFF_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static LogStreamingOption valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static LogStreamingOption forNumber(int value) {
switch (value) {
case 0:
return STREAM_DEFAULT;
case 1:
return STREAM_ON;
case 2:
return STREAM_OFF;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public LogStreamingOption findValueByNumber(int number) {
return LogStreamingOption.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(3);
}
private static final LogStreamingOption[] VALUES = values();
public static LogStreamingOption valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private LogStreamingOption(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption)
}
/**
*
*
*
* Specifies the logging mode.
*
*
* Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.LoggingMode}
*/
public enum LoggingMode implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* The service determines the logging mode. The default is `LEGACY`. Do not
* rely on the default logging behavior as it may change in the future.
*
*
* LOGGING_UNSPECIFIED = 0;
*/
LOGGING_UNSPECIFIED(0),
/**
*
*
*
* Build logs are stored in Cloud Logging and Cloud Storage.
*
*
* LEGACY = 1;
*/
LEGACY(1),
/**
*
*
*
* Build logs are stored in Cloud Storage.
*
*
* GCS_ONLY = 2;
*/
GCS_ONLY(2),
/**
*
*
*
* This option is the same as CLOUD_LOGGING_ONLY.
*
*
* STACKDRIVER_ONLY = 3 [deprecated = true];
*/
@java.lang.Deprecated
STACKDRIVER_ONLY(3),
/**
*
*
*
* Build logs are stored in Cloud Logging. Selecting this option will not
* allow [logs
* streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log).
*
*
* CLOUD_LOGGING_ONLY = 5;
*/
CLOUD_LOGGING_ONLY(5),
/**
*
*
*
* Turn off all logging. No build logs will be captured.
*
*
* NONE = 4;
*/
NONE(4),
UNRECOGNIZED(-1),
;
/**
*
*
*
* The service determines the logging mode. The default is `LEGACY`. Do not
* rely on the default logging behavior as it may change in the future.
*
*
* LOGGING_UNSPECIFIED = 0;
*/
public static final int LOGGING_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Build logs are stored in Cloud Logging and Cloud Storage.
*
*
* LEGACY = 1;
*/
public static final int LEGACY_VALUE = 1;
/**
*
*
*
* Build logs are stored in Cloud Storage.
*
*
* GCS_ONLY = 2;
*/
public static final int GCS_ONLY_VALUE = 2;
/**
*
*
*
* This option is the same as CLOUD_LOGGING_ONLY.
*
*
* STACKDRIVER_ONLY = 3 [deprecated = true];
*/
@java.lang.Deprecated public static final int STACKDRIVER_ONLY_VALUE = 3;
/**
*
*
*
* Build logs are stored in Cloud Logging. Selecting this option will not
* allow [logs
* streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log).
*
*
* CLOUD_LOGGING_ONLY = 5;
*/
public static final int CLOUD_LOGGING_ONLY_VALUE = 5;
/**
*
*
*
* Turn off all logging. No build logs will be captured.
*
*
* NONE = 4;
*/
public static final int NONE_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static LoggingMode valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static LoggingMode forNumber(int value) {
switch (value) {
case 0:
return LOGGING_UNSPECIFIED;
case 1:
return LEGACY;
case 2:
return GCS_ONLY;
case 3:
return STACKDRIVER_ONLY;
case 5:
return CLOUD_LOGGING_ONLY;
case 4:
return NONE;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public LoggingMode findValueByNumber(int number) {
return LoggingMode.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(4);
}
private static final LoggingMode[] VALUES = values();
public static LoggingMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private LoggingMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.LoggingMode)
}
/**
*
*
*
* Default Cloud Storage log bucket behavior options.
*
*
* Protobuf enum {@code google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior}
*/
public enum DefaultLogsBucketBehavior implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Unspecified.
*
*
* DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED = 0;
*/
DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED(0),
/**
*
*
*
* Bucket is located in user-owned project in the same region as the
* build. The builder service account must have access to create and write
* to Cloud Storage buckets in the build project.
*
*
* REGIONAL_USER_OWNED_BUCKET = 1;
*/
REGIONAL_USER_OWNED_BUCKET(1),
/**
*
*
*
* Bucket is located in a Google-owned project and is not regionalized.
*
*
* LEGACY_BUCKET = 2;
*/
LEGACY_BUCKET(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Unspecified.
*
*
* DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED = 0;
*/
public static final int DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Bucket is located in user-owned project in the same region as the
* build. The builder service account must have access to create and write
* to Cloud Storage buckets in the build project.
*
*
* REGIONAL_USER_OWNED_BUCKET = 1;
*/
public static final int REGIONAL_USER_OWNED_BUCKET_VALUE = 1;
/**
*
*
*
* Bucket is located in a Google-owned project and is not regionalized.
*
*
* LEGACY_BUCKET = 2;
*/
public static final int LEGACY_BUCKET_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static DefaultLogsBucketBehavior valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static DefaultLogsBucketBehavior forNumber(int value) {
switch (value) {
case 0:
return DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED;
case 1:
return REGIONAL_USER_OWNED_BUCKET;
case 2:
return LEGACY_BUCKET;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public DefaultLogsBucketBehavior findValueByNumber(int number) {
return DefaultLogsBucketBehavior.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloudbuild.v1.BuildOptions.getDescriptor().getEnumTypes().get(5);
}
private static final DefaultLogsBucketBehavior[] VALUES = values();
public static DefaultLogsBucketBehavior valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private DefaultLogsBucketBehavior(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior)
}
public interface PoolOptionOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.devtools.cloudbuild.v1.BuildOptions.PoolOption)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The `WorkerPool` resource to execute the build on.
* You must have `cloudbuild.workerpools.use` on the project hosting the
* WorkerPool.
*
* Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
*
*
* string name = 1 [(.google.api.resource_reference) = { ... }
*
* @return The name.
*/
java.lang.String getName();
/**
*
*
*
* The `WorkerPool` resource to execute the build on.
* You must have `cloudbuild.workerpools.use` on the project hosting the
* WorkerPool.
*
* Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
*
*
* string name = 1 [(.google.api.resource_reference) = { ... }
*
* @return The bytes for name.
*/
com.google.protobuf.ByteString getNameBytes();
}
/**
*
*
*
* Details about how a build should be executed on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
* Protobuf type {@code google.devtools.cloudbuild.v1.BuildOptions.PoolOption}
*/
public static final class PoolOption extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.devtools.cloudbuild.v1.BuildOptions.PoolOption)
PoolOptionOrBuilder {
private static final long serialVersionUID = 0L;
// Use PoolOption.newBuilder() to construct.
private PoolOption(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PoolOption() {
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new PoolOption();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloudbuild.v1.Cloudbuild
.internal_static_google_devtools_cloudbuild_v1_BuildOptions_PoolOption_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloudbuild.v1.Cloudbuild
.internal_static_google_devtools_cloudbuild_v1_BuildOptions_PoolOption_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloudbuild.v1.BuildOptions.PoolOption.class,
com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* The `WorkerPool` resource to execute the build on.
* You must have `cloudbuild.workerpools.use` on the project hosting the
* WorkerPool.
*
* Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
*
*
* string name = 1 [(.google.api.resource_reference) = { ... }
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
*
*
* The `WorkerPool` resource to execute the build on.
* You must have `cloudbuild.workerpools.use` on the project hosting the
* WorkerPool.
*
* Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
*
*
* string name = 1 [(.google.api.resource_reference) = { ... }
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloudbuild.v1.BuildOptions.PoolOption)) {
return super.equals(obj);
}
com.google.cloudbuild.v1.BuildOptions.PoolOption other =
(com.google.cloudbuild.v1.BuildOptions.PoolOption) obj;
if (!getName().equals(other.getName())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloudbuild.v1.BuildOptions.PoolOption prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Details about how a build should be executed on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
* Protobuf type {@code google.devtools.cloudbuild.v1.BuildOptions.PoolOption}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.BuildOptions.PoolOption)
com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloudbuild.v1.Cloudbuild
.internal_static_google_devtools_cloudbuild_v1_BuildOptions_PoolOption_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloudbuild.v1.Cloudbuild
.internal_static_google_devtools_cloudbuild_v1_BuildOptions_PoolOption_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloudbuild.v1.BuildOptions.PoolOption.class,
com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder.class);
}
// Construct using com.google.cloudbuild.v1.BuildOptions.PoolOption.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloudbuild.v1.Cloudbuild
.internal_static_google_devtools_cloudbuild_v1_BuildOptions_PoolOption_descriptor;
}
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.PoolOption getDefaultInstanceForType() {
return com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance();
}
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.PoolOption build() {
com.google.cloudbuild.v1.BuildOptions.PoolOption result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.PoolOption buildPartial() {
com.google.cloudbuild.v1.BuildOptions.PoolOption result =
new com.google.cloudbuild.v1.BuildOptions.PoolOption(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloudbuild.v1.BuildOptions.PoolOption result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloudbuild.v1.BuildOptions.PoolOption) {
return mergeFrom((com.google.cloudbuild.v1.BuildOptions.PoolOption) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloudbuild.v1.BuildOptions.PoolOption other) {
if (other == com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance())
return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* The `WorkerPool` resource to execute the build on.
* You must have `cloudbuild.workerpools.use` on the project hosting the
* WorkerPool.
*
* Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
*
*
* string name = 1 [(.google.api.resource_reference) = { ... }
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The `WorkerPool` resource to execute the build on.
* You must have `cloudbuild.workerpools.use` on the project hosting the
* WorkerPool.
*
* Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
*
*
* string name = 1 [(.google.api.resource_reference) = { ... }
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The `WorkerPool` resource to execute the build on.
* You must have `cloudbuild.workerpools.use` on the project hosting the
* WorkerPool.
*
* Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
*
*
* string name = 1 [(.google.api.resource_reference) = { ... }
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The `WorkerPool` resource to execute the build on.
* You must have `cloudbuild.workerpools.use` on the project hosting the
* WorkerPool.
*
* Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
*
*
* string name = 1 [(.google.api.resource_reference) = { ... }
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The `WorkerPool` resource to execute the build on.
* You must have `cloudbuild.workerpools.use` on the project hosting the
* WorkerPool.
*
* Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
*
*
* string name = 1 [(.google.api.resource_reference) = { ... }
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.BuildOptions.PoolOption)
}
// @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.BuildOptions.PoolOption)
private static final com.google.cloudbuild.v1.BuildOptions.PoolOption DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloudbuild.v1.BuildOptions.PoolOption();
}
public static com.google.cloudbuild.v1.BuildOptions.PoolOption getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PoolOption parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.PoolOption getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int SOURCE_PROVENANCE_HASH_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List sourceProvenanceHash_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.cloudbuild.v1.Hash.HashType>
sourceProvenanceHash_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.cloudbuild.v1.Hash.HashType>() {
public com.google.cloudbuild.v1.Hash.HashType convert(java.lang.Integer from) {
com.google.cloudbuild.v1.Hash.HashType result =
com.google.cloudbuild.v1.Hash.HashType.forNumber(from);
return result == null ? com.google.cloudbuild.v1.Hash.HashType.UNRECOGNIZED : result;
}
};
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
* @return A list containing the sourceProvenanceHash.
*/
@java.lang.Override
public java.util.List getSourceProvenanceHashList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.cloudbuild.v1.Hash.HashType>(
sourceProvenanceHash_, sourceProvenanceHash_converter_);
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
* @return The count of sourceProvenanceHash.
*/
@java.lang.Override
public int getSourceProvenanceHashCount() {
return sourceProvenanceHash_.size();
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
* @param index The index of the element to return.
* @return The sourceProvenanceHash at the given index.
*/
@java.lang.Override
public com.google.cloudbuild.v1.Hash.HashType getSourceProvenanceHash(int index) {
return sourceProvenanceHash_converter_.convert(sourceProvenanceHash_.get(index));
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
* @return A list containing the enum numeric values on the wire for sourceProvenanceHash.
*/
@java.lang.Override
public java.util.List getSourceProvenanceHashValueList() {
return sourceProvenanceHash_;
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of sourceProvenanceHash at the given index.
*/
@java.lang.Override
public int getSourceProvenanceHashValue(int index) {
return sourceProvenanceHash_.get(index);
}
private int sourceProvenanceHashMemoizedSerializedSize;
public static final int REQUESTED_VERIFY_OPTION_FIELD_NUMBER = 2;
private int requestedVerifyOption_ = 0;
/**
*
*
*
* Requested verifiability options.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;
*
*
* @return The enum numeric value on the wire for requestedVerifyOption.
*/
@java.lang.Override
public int getRequestedVerifyOptionValue() {
return requestedVerifyOption_;
}
/**
*
*
*
* Requested verifiability options.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;
*
*
* @return The requestedVerifyOption.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.VerifyOption getRequestedVerifyOption() {
com.google.cloudbuild.v1.BuildOptions.VerifyOption result =
com.google.cloudbuild.v1.BuildOptions.VerifyOption.forNumber(requestedVerifyOption_);
return result == null
? com.google.cloudbuild.v1.BuildOptions.VerifyOption.UNRECOGNIZED
: result;
}
public static final int MACHINE_TYPE_FIELD_NUMBER = 3;
private int machineType_ = 0;
/**
*
*
*
* Compute Engine machine type on which to run the build.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;
*
* @return The enum numeric value on the wire for machineType.
*/
@java.lang.Override
public int getMachineTypeValue() {
return machineType_;
}
/**
*
*
*
* Compute Engine machine type on which to run the build.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;
*
* @return The machineType.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.MachineType getMachineType() {
com.google.cloudbuild.v1.BuildOptions.MachineType result =
com.google.cloudbuild.v1.BuildOptions.MachineType.forNumber(machineType_);
return result == null ? com.google.cloudbuild.v1.BuildOptions.MachineType.UNRECOGNIZED : result;
}
public static final int DISK_SIZE_GB_FIELD_NUMBER = 6;
private long diskSizeGb_ = 0L;
/**
*
*
*
* Requested disk size for the VM that runs the build. Note that this is *NOT*
* "disk free"; some of the space will be used by the operating system and
* build utilities. Also note that this is the minimum disk size that will be
* allocated for the build -- the build may run with a larger disk than
* requested. At present, the maximum disk size is 2000GB; builds that request
* more than the maximum are rejected with an error.
*
*
* int64 disk_size_gb = 6;
*
* @return The diskSizeGb.
*/
@java.lang.Override
public long getDiskSizeGb() {
return diskSizeGb_;
}
public static final int SUBSTITUTION_OPTION_FIELD_NUMBER = 4;
private int substitutionOption_ = 0;
/**
*
*
*
* Option to specify behavior when there is an error in the substitution
* checks.
*
* NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
* be overridden in the build configuration file.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;
*
*
* @return The enum numeric value on the wire for substitutionOption.
*/
@java.lang.Override
public int getSubstitutionOptionValue() {
return substitutionOption_;
}
/**
*
*
*
* Option to specify behavior when there is an error in the substitution
* checks.
*
* NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
* be overridden in the build configuration file.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;
*
*
* @return The substitutionOption.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.SubstitutionOption getSubstitutionOption() {
com.google.cloudbuild.v1.BuildOptions.SubstitutionOption result =
com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.forNumber(substitutionOption_);
return result == null
? com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.UNRECOGNIZED
: result;
}
public static final int DYNAMIC_SUBSTITUTIONS_FIELD_NUMBER = 17;
private boolean dynamicSubstitutions_ = false;
/**
*
*
*
* Option to specify whether or not to apply bash style string
* operations to the substitutions.
*
* NOTE: this is always enabled for triggered builds and cannot be
* overridden in the build configuration file.
*
*
* bool dynamic_substitutions = 17;
*
* @return The dynamicSubstitutions.
*/
@java.lang.Override
public boolean getDynamicSubstitutions() {
return dynamicSubstitutions_;
}
public static final int AUTOMAP_SUBSTITUTIONS_FIELD_NUMBER = 22;
private boolean automapSubstitutions_ = false;
/**
*
*
*
* Option to include built-in and custom substitutions as env variables
* for all build steps.
*
*
* bool automap_substitutions = 22;
*
* @return The automapSubstitutions.
*/
@java.lang.Override
public boolean getAutomapSubstitutions() {
return automapSubstitutions_;
}
public static final int LOG_STREAMING_OPTION_FIELD_NUMBER = 5;
private int logStreamingOption_ = 0;
/**
*
*
*
* Option to define build log streaming behavior to Cloud
* Storage.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;
*
*
* @return The enum numeric value on the wire for logStreamingOption.
*/
@java.lang.Override
public int getLogStreamingOptionValue() {
return logStreamingOption_;
}
/**
*
*
*
* Option to define build log streaming behavior to Cloud
* Storage.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;
*
*
* @return The logStreamingOption.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.LogStreamingOption getLogStreamingOption() {
com.google.cloudbuild.v1.BuildOptions.LogStreamingOption result =
com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.forNumber(logStreamingOption_);
return result == null
? com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.UNRECOGNIZED
: result;
}
public static final int WORKER_POOL_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object workerPool_ = "";
/**
*
*
*
* This field deprecated; please use `pool.name` instead.
*
*
* string worker_pool = 7 [deprecated = true];
*
* @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See
* google/devtools/cloudbuild/v1/cloudbuild.proto;l=2284
* @return The workerPool.
*/
@java.lang.Override
@java.lang.Deprecated
public java.lang.String getWorkerPool() {
java.lang.Object ref = workerPool_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
workerPool_ = s;
return s;
}
}
/**
*
*
*
* This field deprecated; please use `pool.name` instead.
*
*
* string worker_pool = 7 [deprecated = true];
*
* @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See
* google/devtools/cloudbuild/v1/cloudbuild.proto;l=2284
* @return The bytes for workerPool.
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.protobuf.ByteString getWorkerPoolBytes() {
java.lang.Object ref = workerPool_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
workerPool_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int POOL_FIELD_NUMBER = 19;
private com.google.cloudbuild.v1.BuildOptions.PoolOption pool_;
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the pool field is set.
*/
@java.lang.Override
public boolean hasPool() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The pool.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.PoolOption getPool() {
return pool_ == null
? com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance()
: pool_;
}
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder getPoolOrBuilder() {
return pool_ == null
? com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance()
: pool_;
}
public static final int LOGGING_FIELD_NUMBER = 11;
private int logging_ = 0;
/**
*
*
*
* Option to specify the logging mode, which determines if and where build
* logs are stored.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;
*
* @return The enum numeric value on the wire for logging.
*/
@java.lang.Override
public int getLoggingValue() {
return logging_;
}
/**
*
*
*
* Option to specify the logging mode, which determines if and where build
* logs are stored.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;
*
* @return The logging.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.LoggingMode getLogging() {
com.google.cloudbuild.v1.BuildOptions.LoggingMode result =
com.google.cloudbuild.v1.BuildOptions.LoggingMode.forNumber(logging_);
return result == null ? com.google.cloudbuild.v1.BuildOptions.LoggingMode.UNRECOGNIZED : result;
}
public static final int ENV_FIELD_NUMBER = 12;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList env_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @return A list containing the env.
*/
public com.google.protobuf.ProtocolStringList getEnvList() {
return env_;
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @return The count of env.
*/
public int getEnvCount() {
return env_.size();
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @param index The index of the element to return.
* @return The env at the given index.
*/
public java.lang.String getEnv(int index) {
return env_.get(index);
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @param index The index of the value to return.
* @return The bytes of the env at the given index.
*/
public com.google.protobuf.ByteString getEnvBytes(int index) {
return env_.getByteString(index);
}
public static final int SECRET_ENV_FIELD_NUMBER = 13;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList secretEnv_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @return A list containing the secretEnv.
*/
public com.google.protobuf.ProtocolStringList getSecretEnvList() {
return secretEnv_;
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @return The count of secretEnv.
*/
public int getSecretEnvCount() {
return secretEnv_.size();
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @param index The index of the element to return.
* @return The secretEnv at the given index.
*/
public java.lang.String getSecretEnv(int index) {
return secretEnv_.get(index);
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @param index The index of the value to return.
* @return The bytes of the secretEnv at the given index.
*/
public com.google.protobuf.ByteString getSecretEnvBytes(int index) {
return secretEnv_.getByteString(index);
}
public static final int VOLUMES_FIELD_NUMBER = 14;
@SuppressWarnings("serial")
private java.util.List volumes_;
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
@java.lang.Override
public java.util.List getVolumesList() {
return volumes_;
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
@java.lang.Override
public java.util.List extends com.google.cloudbuild.v1.VolumeOrBuilder>
getVolumesOrBuilderList() {
return volumes_;
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
@java.lang.Override
public int getVolumesCount() {
return volumes_.size();
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
@java.lang.Override
public com.google.cloudbuild.v1.Volume getVolumes(int index) {
return volumes_.get(index);
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
@java.lang.Override
public com.google.cloudbuild.v1.VolumeOrBuilder getVolumesOrBuilder(int index) {
return volumes_.get(index);
}
public static final int DEFAULT_LOGS_BUCKET_BEHAVIOR_FIELD_NUMBER = 21;
private int defaultLogsBucketBehavior_ = 0;
/**
*
*
*
* Optional. Option to specify how default logs buckets are setup.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for defaultLogsBucketBehavior.
*/
@java.lang.Override
public int getDefaultLogsBucketBehaviorValue() {
return defaultLogsBucketBehavior_;
}
/**
*
*
*
* Optional. Option to specify how default logs buckets are setup.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The defaultLogsBucketBehavior.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior
getDefaultLogsBucketBehavior() {
com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior result =
com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior.forNumber(
defaultLogsBucketBehavior_);
return result == null
? com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior.UNRECOGNIZED
: result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
getSerializedSize();
if (getSourceProvenanceHashList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(sourceProvenanceHashMemoizedSerializedSize);
}
for (int i = 0; i < sourceProvenanceHash_.size(); i++) {
output.writeEnumNoTag(sourceProvenanceHash_.get(i));
}
if (requestedVerifyOption_
!= com.google.cloudbuild.v1.BuildOptions.VerifyOption.NOT_VERIFIED.getNumber()) {
output.writeEnum(2, requestedVerifyOption_);
}
if (machineType_ != com.google.cloudbuild.v1.BuildOptions.MachineType.UNSPECIFIED.getNumber()) {
output.writeEnum(3, machineType_);
}
if (substitutionOption_
!= com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.MUST_MATCH.getNumber()) {
output.writeEnum(4, substitutionOption_);
}
if (logStreamingOption_
!= com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.STREAM_DEFAULT.getNumber()) {
output.writeEnum(5, logStreamingOption_);
}
if (diskSizeGb_ != 0L) {
output.writeInt64(6, diskSizeGb_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerPool_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, workerPool_);
}
if (logging_
!= com.google.cloudbuild.v1.BuildOptions.LoggingMode.LOGGING_UNSPECIFIED.getNumber()) {
output.writeEnum(11, logging_);
}
for (int i = 0; i < env_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, env_.getRaw(i));
}
for (int i = 0; i < secretEnv_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, secretEnv_.getRaw(i));
}
for (int i = 0; i < volumes_.size(); i++) {
output.writeMessage(14, volumes_.get(i));
}
if (dynamicSubstitutions_ != false) {
output.writeBool(17, dynamicSubstitutions_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(19, getPool());
}
if (defaultLogsBucketBehavior_
!= com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior
.DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED
.getNumber()) {
output.writeEnum(21, defaultLogsBucketBehavior_);
}
if (automapSubstitutions_ != false) {
output.writeBool(22, automapSubstitutions_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < sourceProvenanceHash_.size(); i++) {
dataSize +=
com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(
sourceProvenanceHash_.get(i));
}
size += dataSize;
if (!getSourceProvenanceHashList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
}
sourceProvenanceHashMemoizedSerializedSize = dataSize;
}
if (requestedVerifyOption_
!= com.google.cloudbuild.v1.BuildOptions.VerifyOption.NOT_VERIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, requestedVerifyOption_);
}
if (machineType_ != com.google.cloudbuild.v1.BuildOptions.MachineType.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, machineType_);
}
if (substitutionOption_
!= com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.MUST_MATCH.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, substitutionOption_);
}
if (logStreamingOption_
!= com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.STREAM_DEFAULT.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, logStreamingOption_);
}
if (diskSizeGb_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, diskSizeGb_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerPool_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, workerPool_);
}
if (logging_
!= com.google.cloudbuild.v1.BuildOptions.LoggingMode.LOGGING_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, logging_);
}
{
int dataSize = 0;
for (int i = 0; i < env_.size(); i++) {
dataSize += computeStringSizeNoTag(env_.getRaw(i));
}
size += dataSize;
size += 1 * getEnvList().size();
}
{
int dataSize = 0;
for (int i = 0; i < secretEnv_.size(); i++) {
dataSize += computeStringSizeNoTag(secretEnv_.getRaw(i));
}
size += dataSize;
size += 1 * getSecretEnvList().size();
}
for (int i = 0; i < volumes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, volumes_.get(i));
}
if (dynamicSubstitutions_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(17, dynamicSubstitutions_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getPool());
}
if (defaultLogsBucketBehavior_
!= com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior
.DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(21, defaultLogsBucketBehavior_);
}
if (automapSubstitutions_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(22, automapSubstitutions_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloudbuild.v1.BuildOptions)) {
return super.equals(obj);
}
com.google.cloudbuild.v1.BuildOptions other = (com.google.cloudbuild.v1.BuildOptions) obj;
if (!sourceProvenanceHash_.equals(other.sourceProvenanceHash_)) return false;
if (requestedVerifyOption_ != other.requestedVerifyOption_) return false;
if (machineType_ != other.machineType_) return false;
if (getDiskSizeGb() != other.getDiskSizeGb()) return false;
if (substitutionOption_ != other.substitutionOption_) return false;
if (getDynamicSubstitutions() != other.getDynamicSubstitutions()) return false;
if (getAutomapSubstitutions() != other.getAutomapSubstitutions()) return false;
if (logStreamingOption_ != other.logStreamingOption_) return false;
if (!getWorkerPool().equals(other.getWorkerPool())) return false;
if (hasPool() != other.hasPool()) return false;
if (hasPool()) {
if (!getPool().equals(other.getPool())) return false;
}
if (logging_ != other.logging_) return false;
if (!getEnvList().equals(other.getEnvList())) return false;
if (!getSecretEnvList().equals(other.getSecretEnvList())) return false;
if (!getVolumesList().equals(other.getVolumesList())) return false;
if (defaultLogsBucketBehavior_ != other.defaultLogsBucketBehavior_) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getSourceProvenanceHashCount() > 0) {
hash = (37 * hash) + SOURCE_PROVENANCE_HASH_FIELD_NUMBER;
hash = (53 * hash) + sourceProvenanceHash_.hashCode();
}
hash = (37 * hash) + REQUESTED_VERIFY_OPTION_FIELD_NUMBER;
hash = (53 * hash) + requestedVerifyOption_;
hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + machineType_;
hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDiskSizeGb());
hash = (37 * hash) + SUBSTITUTION_OPTION_FIELD_NUMBER;
hash = (53 * hash) + substitutionOption_;
hash = (37 * hash) + DYNAMIC_SUBSTITUTIONS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDynamicSubstitutions());
hash = (37 * hash) + AUTOMAP_SUBSTITUTIONS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutomapSubstitutions());
hash = (37 * hash) + LOG_STREAMING_OPTION_FIELD_NUMBER;
hash = (53 * hash) + logStreamingOption_;
hash = (37 * hash) + WORKER_POOL_FIELD_NUMBER;
hash = (53 * hash) + getWorkerPool().hashCode();
if (hasPool()) {
hash = (37 * hash) + POOL_FIELD_NUMBER;
hash = (53 * hash) + getPool().hashCode();
}
hash = (37 * hash) + LOGGING_FIELD_NUMBER;
hash = (53 * hash) + logging_;
if (getEnvCount() > 0) {
hash = (37 * hash) + ENV_FIELD_NUMBER;
hash = (53 * hash) + getEnvList().hashCode();
}
if (getSecretEnvCount() > 0) {
hash = (37 * hash) + SECRET_ENV_FIELD_NUMBER;
hash = (53 * hash) + getSecretEnvList().hashCode();
}
if (getVolumesCount() > 0) {
hash = (37 * hash) + VOLUMES_FIELD_NUMBER;
hash = (53 * hash) + getVolumesList().hashCode();
}
hash = (37 * hash) + DEFAULT_LOGS_BUCKET_BEHAVIOR_FIELD_NUMBER;
hash = (53 * hash) + defaultLogsBucketBehavior_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloudbuild.v1.BuildOptions parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloudbuild.v1.BuildOptions parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloudbuild.v1.BuildOptions parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloudbuild.v1.BuildOptions parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloudbuild.v1.BuildOptions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloudbuild.v1.BuildOptions parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloudbuild.v1.BuildOptions parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloudbuild.v1.BuildOptions parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloudbuild.v1.BuildOptions parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloudbuild.v1.BuildOptions parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloudbuild.v1.BuildOptions parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloudbuild.v1.BuildOptions parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloudbuild.v1.BuildOptions prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Optional arguments to enable specific features of builds.
*
*
* Protobuf type {@code google.devtools.cloudbuild.v1.BuildOptions}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.devtools.cloudbuild.v1.BuildOptions)
com.google.cloudbuild.v1.BuildOptionsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloudbuild.v1.Cloudbuild
.internal_static_google_devtools_cloudbuild_v1_BuildOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloudbuild.v1.Cloudbuild
.internal_static_google_devtools_cloudbuild_v1_BuildOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloudbuild.v1.BuildOptions.class,
com.google.cloudbuild.v1.BuildOptions.Builder.class);
}
// Construct using com.google.cloudbuild.v1.BuildOptions.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getPoolFieldBuilder();
getVolumesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
sourceProvenanceHash_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
requestedVerifyOption_ = 0;
machineType_ = 0;
diskSizeGb_ = 0L;
substitutionOption_ = 0;
dynamicSubstitutions_ = false;
automapSubstitutions_ = false;
logStreamingOption_ = 0;
workerPool_ = "";
pool_ = null;
if (poolBuilder_ != null) {
poolBuilder_.dispose();
poolBuilder_ = null;
}
logging_ = 0;
env_ = com.google.protobuf.LazyStringArrayList.emptyList();
secretEnv_ = com.google.protobuf.LazyStringArrayList.emptyList();
if (volumesBuilder_ == null) {
volumes_ = java.util.Collections.emptyList();
} else {
volumes_ = null;
volumesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00002000);
defaultLogsBucketBehavior_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloudbuild.v1.Cloudbuild
.internal_static_google_devtools_cloudbuild_v1_BuildOptions_descriptor;
}
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions getDefaultInstanceForType() {
return com.google.cloudbuild.v1.BuildOptions.getDefaultInstance();
}
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions build() {
com.google.cloudbuild.v1.BuildOptions result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions buildPartial() {
com.google.cloudbuild.v1.BuildOptions result =
new com.google.cloudbuild.v1.BuildOptions(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloudbuild.v1.BuildOptions result) {
if (((bitField0_ & 0x00000001) != 0)) {
sourceProvenanceHash_ = java.util.Collections.unmodifiableList(sourceProvenanceHash_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.sourceProvenanceHash_ = sourceProvenanceHash_;
if (volumesBuilder_ == null) {
if (((bitField0_ & 0x00002000) != 0)) {
volumes_ = java.util.Collections.unmodifiableList(volumes_);
bitField0_ = (bitField0_ & ~0x00002000);
}
result.volumes_ = volumes_;
} else {
result.volumes_ = volumesBuilder_.build();
}
}
private void buildPartial0(com.google.cloudbuild.v1.BuildOptions result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.requestedVerifyOption_ = requestedVerifyOption_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.machineType_ = machineType_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.diskSizeGb_ = diskSizeGb_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.substitutionOption_ = substitutionOption_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.dynamicSubstitutions_ = dynamicSubstitutions_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.automapSubstitutions_ = automapSubstitutions_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.logStreamingOption_ = logStreamingOption_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.workerPool_ = workerPool_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000200) != 0)) {
result.pool_ = poolBuilder_ == null ? pool_ : poolBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.logging_ = logging_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
env_.makeImmutable();
result.env_ = env_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
secretEnv_.makeImmutable();
result.secretEnv_ = secretEnv_;
}
if (((from_bitField0_ & 0x00004000) != 0)) {
result.defaultLogsBucketBehavior_ = defaultLogsBucketBehavior_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloudbuild.v1.BuildOptions) {
return mergeFrom((com.google.cloudbuild.v1.BuildOptions) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloudbuild.v1.BuildOptions other) {
if (other == com.google.cloudbuild.v1.BuildOptions.getDefaultInstance()) return this;
if (!other.sourceProvenanceHash_.isEmpty()) {
if (sourceProvenanceHash_.isEmpty()) {
sourceProvenanceHash_ = other.sourceProvenanceHash_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSourceProvenanceHashIsMutable();
sourceProvenanceHash_.addAll(other.sourceProvenanceHash_);
}
onChanged();
}
if (other.requestedVerifyOption_ != 0) {
setRequestedVerifyOptionValue(other.getRequestedVerifyOptionValue());
}
if (other.machineType_ != 0) {
setMachineTypeValue(other.getMachineTypeValue());
}
if (other.getDiskSizeGb() != 0L) {
setDiskSizeGb(other.getDiskSizeGb());
}
if (other.substitutionOption_ != 0) {
setSubstitutionOptionValue(other.getSubstitutionOptionValue());
}
if (other.getDynamicSubstitutions() != false) {
setDynamicSubstitutions(other.getDynamicSubstitutions());
}
if (other.getAutomapSubstitutions() != false) {
setAutomapSubstitutions(other.getAutomapSubstitutions());
}
if (other.logStreamingOption_ != 0) {
setLogStreamingOptionValue(other.getLogStreamingOptionValue());
}
if (!other.getWorkerPool().isEmpty()) {
workerPool_ = other.workerPool_;
bitField0_ |= 0x00000100;
onChanged();
}
if (other.hasPool()) {
mergePool(other.getPool());
}
if (other.logging_ != 0) {
setLoggingValue(other.getLoggingValue());
}
if (!other.env_.isEmpty()) {
if (env_.isEmpty()) {
env_ = other.env_;
bitField0_ |= 0x00000800;
} else {
ensureEnvIsMutable();
env_.addAll(other.env_);
}
onChanged();
}
if (!other.secretEnv_.isEmpty()) {
if (secretEnv_.isEmpty()) {
secretEnv_ = other.secretEnv_;
bitField0_ |= 0x00001000;
} else {
ensureSecretEnvIsMutable();
secretEnv_.addAll(other.secretEnv_);
}
onChanged();
}
if (volumesBuilder_ == null) {
if (!other.volumes_.isEmpty()) {
if (volumes_.isEmpty()) {
volumes_ = other.volumes_;
bitField0_ = (bitField0_ & ~0x00002000);
} else {
ensureVolumesIsMutable();
volumes_.addAll(other.volumes_);
}
onChanged();
}
} else {
if (!other.volumes_.isEmpty()) {
if (volumesBuilder_.isEmpty()) {
volumesBuilder_.dispose();
volumesBuilder_ = null;
volumes_ = other.volumes_;
bitField0_ = (bitField0_ & ~0x00002000);
volumesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getVolumesFieldBuilder()
: null;
} else {
volumesBuilder_.addAllMessages(other.volumes_);
}
}
}
if (other.defaultLogsBucketBehavior_ != 0) {
setDefaultLogsBucketBehaviorValue(other.getDefaultLogsBucketBehaviorValue());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
int tmpRaw = input.readEnum();
ensureSourceProvenanceHashIsMutable();
sourceProvenanceHash_.add(tmpRaw);
break;
} // case 8
case 10:
{
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
ensureSourceProvenanceHashIsMutable();
sourceProvenanceHash_.add(tmpRaw);
}
input.popLimit(oldLimit);
break;
} // case 10
case 16:
{
requestedVerifyOption_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24:
{
machineType_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32:
{
substitutionOption_ = input.readEnum();
bitField0_ |= 0x00000010;
break;
} // case 32
case 40:
{
logStreamingOption_ = input.readEnum();
bitField0_ |= 0x00000080;
break;
} // case 40
case 48:
{
diskSizeGb_ = input.readInt64();
bitField0_ |= 0x00000008;
break;
} // case 48
case 58:
{
workerPool_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 58
case 88:
{
logging_ = input.readEnum();
bitField0_ |= 0x00000400;
break;
} // case 88
case 98:
{
java.lang.String s = input.readStringRequireUtf8();
ensureEnvIsMutable();
env_.add(s);
break;
} // case 98
case 106:
{
java.lang.String s = input.readStringRequireUtf8();
ensureSecretEnvIsMutable();
secretEnv_.add(s);
break;
} // case 106
case 114:
{
com.google.cloudbuild.v1.Volume m =
input.readMessage(com.google.cloudbuild.v1.Volume.parser(), extensionRegistry);
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
volumes_.add(m);
} else {
volumesBuilder_.addMessage(m);
}
break;
} // case 114
case 136:
{
dynamicSubstitutions_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 136
case 154:
{
input.readMessage(getPoolFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000200;
break;
} // case 154
case 168:
{
defaultLogsBucketBehavior_ = input.readEnum();
bitField0_ |= 0x00004000;
break;
} // case 168
case 176:
{
automapSubstitutions_ = input.readBool();
bitField0_ |= 0x00000040;
break;
} // case 176
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List sourceProvenanceHash_ =
java.util.Collections.emptyList();
private void ensureSourceProvenanceHashIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
sourceProvenanceHash_ = new java.util.ArrayList(sourceProvenanceHash_);
bitField0_ |= 0x00000001;
}
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @return A list containing the sourceProvenanceHash.
*/
public java.util.List getSourceProvenanceHashList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.cloudbuild.v1.Hash.HashType>(
sourceProvenanceHash_, sourceProvenanceHash_converter_);
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @return The count of sourceProvenanceHash.
*/
public int getSourceProvenanceHashCount() {
return sourceProvenanceHash_.size();
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @param index The index of the element to return.
* @return The sourceProvenanceHash at the given index.
*/
public com.google.cloudbuild.v1.Hash.HashType getSourceProvenanceHash(int index) {
return sourceProvenanceHash_converter_.convert(sourceProvenanceHash_.get(index));
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @param index The index to set the value at.
* @param value The sourceProvenanceHash to set.
* @return This builder for chaining.
*/
public Builder setSourceProvenanceHash(
int index, com.google.cloudbuild.v1.Hash.HashType value) {
if (value == null) {
throw new NullPointerException();
}
ensureSourceProvenanceHashIsMutable();
sourceProvenanceHash_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @param value The sourceProvenanceHash to add.
* @return This builder for chaining.
*/
public Builder addSourceProvenanceHash(com.google.cloudbuild.v1.Hash.HashType value) {
if (value == null) {
throw new NullPointerException();
}
ensureSourceProvenanceHashIsMutable();
sourceProvenanceHash_.add(value.getNumber());
onChanged();
return this;
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @param values The sourceProvenanceHash to add.
* @return This builder for chaining.
*/
public Builder addAllSourceProvenanceHash(
java.lang.Iterable extends com.google.cloudbuild.v1.Hash.HashType> values) {
ensureSourceProvenanceHashIsMutable();
for (com.google.cloudbuild.v1.Hash.HashType value : values) {
sourceProvenanceHash_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @return This builder for chaining.
*/
public Builder clearSourceProvenanceHash() {
sourceProvenanceHash_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @return A list containing the enum numeric values on the wire for sourceProvenanceHash.
*/
public java.util.List getSourceProvenanceHashValueList() {
return java.util.Collections.unmodifiableList(sourceProvenanceHash_);
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of sourceProvenanceHash at the given index.
*/
public int getSourceProvenanceHashValue(int index) {
return sourceProvenanceHash_.get(index);
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for sourceProvenanceHash to set.
* @return This builder for chaining.
*/
public Builder setSourceProvenanceHashValue(int index, int value) {
ensureSourceProvenanceHashIsMutable();
sourceProvenanceHash_.set(index, value);
onChanged();
return this;
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @param value The enum numeric value on the wire for sourceProvenanceHash to add.
* @return This builder for chaining.
*/
public Builder addSourceProvenanceHashValue(int value) {
ensureSourceProvenanceHashIsMutable();
sourceProvenanceHash_.add(value);
onChanged();
return this;
}
/**
*
*
*
* Requested hash for SourceProvenance.
*
*
* repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;
*
*
* @param values The enum numeric values on the wire for sourceProvenanceHash to add.
* @return This builder for chaining.
*/
public Builder addAllSourceProvenanceHashValue(java.lang.Iterable values) {
ensureSourceProvenanceHashIsMutable();
for (int value : values) {
sourceProvenanceHash_.add(value);
}
onChanged();
return this;
}
private int requestedVerifyOption_ = 0;
/**
*
*
*
* Requested verifiability options.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;
*
*
* @return The enum numeric value on the wire for requestedVerifyOption.
*/
@java.lang.Override
public int getRequestedVerifyOptionValue() {
return requestedVerifyOption_;
}
/**
*
*
*
* Requested verifiability options.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;
*
*
* @param value The enum numeric value on the wire for requestedVerifyOption to set.
* @return This builder for chaining.
*/
public Builder setRequestedVerifyOptionValue(int value) {
requestedVerifyOption_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Requested verifiability options.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;
*
*
* @return The requestedVerifyOption.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.VerifyOption getRequestedVerifyOption() {
com.google.cloudbuild.v1.BuildOptions.VerifyOption result =
com.google.cloudbuild.v1.BuildOptions.VerifyOption.forNumber(requestedVerifyOption_);
return result == null
? com.google.cloudbuild.v1.BuildOptions.VerifyOption.UNRECOGNIZED
: result;
}
/**
*
*
*
* Requested verifiability options.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;
*
*
* @param value The requestedVerifyOption to set.
* @return This builder for chaining.
*/
public Builder setRequestedVerifyOption(
com.google.cloudbuild.v1.BuildOptions.VerifyOption value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
requestedVerifyOption_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Requested verifiability options.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;
*
*
* @return This builder for chaining.
*/
public Builder clearRequestedVerifyOption() {
bitField0_ = (bitField0_ & ~0x00000002);
requestedVerifyOption_ = 0;
onChanged();
return this;
}
private int machineType_ = 0;
/**
*
*
*
* Compute Engine machine type on which to run the build.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;
*
* @return The enum numeric value on the wire for machineType.
*/
@java.lang.Override
public int getMachineTypeValue() {
return machineType_;
}
/**
*
*
*
* Compute Engine machine type on which to run the build.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;
*
* @param value The enum numeric value on the wire for machineType to set.
* @return This builder for chaining.
*/
public Builder setMachineTypeValue(int value) {
machineType_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Compute Engine machine type on which to run the build.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;
*
* @return The machineType.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.MachineType getMachineType() {
com.google.cloudbuild.v1.BuildOptions.MachineType result =
com.google.cloudbuild.v1.BuildOptions.MachineType.forNumber(machineType_);
return result == null
? com.google.cloudbuild.v1.BuildOptions.MachineType.UNRECOGNIZED
: result;
}
/**
*
*
*
* Compute Engine machine type on which to run the build.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;
*
* @param value The machineType to set.
* @return This builder for chaining.
*/
public Builder setMachineType(com.google.cloudbuild.v1.BuildOptions.MachineType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
machineType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Compute Engine machine type on which to run the build.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;
*
* @return This builder for chaining.
*/
public Builder clearMachineType() {
bitField0_ = (bitField0_ & ~0x00000004);
machineType_ = 0;
onChanged();
return this;
}
private long diskSizeGb_;
/**
*
*
*
* Requested disk size for the VM that runs the build. Note that this is *NOT*
* "disk free"; some of the space will be used by the operating system and
* build utilities. Also note that this is the minimum disk size that will be
* allocated for the build -- the build may run with a larger disk than
* requested. At present, the maximum disk size is 2000GB; builds that request
* more than the maximum are rejected with an error.
*
*
* int64 disk_size_gb = 6;
*
* @return The diskSizeGb.
*/
@java.lang.Override
public long getDiskSizeGb() {
return diskSizeGb_;
}
/**
*
*
*
* Requested disk size for the VM that runs the build. Note that this is *NOT*
* "disk free"; some of the space will be used by the operating system and
* build utilities. Also note that this is the minimum disk size that will be
* allocated for the build -- the build may run with a larger disk than
* requested. At present, the maximum disk size is 2000GB; builds that request
* more than the maximum are rejected with an error.
*
*
* int64 disk_size_gb = 6;
*
* @param value The diskSizeGb to set.
* @return This builder for chaining.
*/
public Builder setDiskSizeGb(long value) {
diskSizeGb_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Requested disk size for the VM that runs the build. Note that this is *NOT*
* "disk free"; some of the space will be used by the operating system and
* build utilities. Also note that this is the minimum disk size that will be
* allocated for the build -- the build may run with a larger disk than
* requested. At present, the maximum disk size is 2000GB; builds that request
* more than the maximum are rejected with an error.
*
*
* int64 disk_size_gb = 6;
*
* @return This builder for chaining.
*/
public Builder clearDiskSizeGb() {
bitField0_ = (bitField0_ & ~0x00000008);
diskSizeGb_ = 0L;
onChanged();
return this;
}
private int substitutionOption_ = 0;
/**
*
*
*
* Option to specify behavior when there is an error in the substitution
* checks.
*
* NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
* be overridden in the build configuration file.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;
*
*
* @return The enum numeric value on the wire for substitutionOption.
*/
@java.lang.Override
public int getSubstitutionOptionValue() {
return substitutionOption_;
}
/**
*
*
*
* Option to specify behavior when there is an error in the substitution
* checks.
*
* NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
* be overridden in the build configuration file.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;
*
*
* @param value The enum numeric value on the wire for substitutionOption to set.
* @return This builder for chaining.
*/
public Builder setSubstitutionOptionValue(int value) {
substitutionOption_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Option to specify behavior when there is an error in the substitution
* checks.
*
* NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
* be overridden in the build configuration file.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;
*
*
* @return The substitutionOption.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.SubstitutionOption getSubstitutionOption() {
com.google.cloudbuild.v1.BuildOptions.SubstitutionOption result =
com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.forNumber(substitutionOption_);
return result == null
? com.google.cloudbuild.v1.BuildOptions.SubstitutionOption.UNRECOGNIZED
: result;
}
/**
*
*
*
* Option to specify behavior when there is an error in the substitution
* checks.
*
* NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
* be overridden in the build configuration file.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;
*
*
* @param value The substitutionOption to set.
* @return This builder for chaining.
*/
public Builder setSubstitutionOption(
com.google.cloudbuild.v1.BuildOptions.SubstitutionOption value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
substitutionOption_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Option to specify behavior when there is an error in the substitution
* checks.
*
* NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
* be overridden in the build configuration file.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;
*
*
* @return This builder for chaining.
*/
public Builder clearSubstitutionOption() {
bitField0_ = (bitField0_ & ~0x00000010);
substitutionOption_ = 0;
onChanged();
return this;
}
private boolean dynamicSubstitutions_;
/**
*
*
*
* Option to specify whether or not to apply bash style string
* operations to the substitutions.
*
* NOTE: this is always enabled for triggered builds and cannot be
* overridden in the build configuration file.
*
*
* bool dynamic_substitutions = 17;
*
* @return The dynamicSubstitutions.
*/
@java.lang.Override
public boolean getDynamicSubstitutions() {
return dynamicSubstitutions_;
}
/**
*
*
*
* Option to specify whether or not to apply bash style string
* operations to the substitutions.
*
* NOTE: this is always enabled for triggered builds and cannot be
* overridden in the build configuration file.
*
*
* bool dynamic_substitutions = 17;
*
* @param value The dynamicSubstitutions to set.
* @return This builder for chaining.
*/
public Builder setDynamicSubstitutions(boolean value) {
dynamicSubstitutions_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Option to specify whether or not to apply bash style string
* operations to the substitutions.
*
* NOTE: this is always enabled for triggered builds and cannot be
* overridden in the build configuration file.
*
*
* bool dynamic_substitutions = 17;
*
* @return This builder for chaining.
*/
public Builder clearDynamicSubstitutions() {
bitField0_ = (bitField0_ & ~0x00000020);
dynamicSubstitutions_ = false;
onChanged();
return this;
}
private boolean automapSubstitutions_;
/**
*
*
*
* Option to include built-in and custom substitutions as env variables
* for all build steps.
*
*
* bool automap_substitutions = 22;
*
* @return The automapSubstitutions.
*/
@java.lang.Override
public boolean getAutomapSubstitutions() {
return automapSubstitutions_;
}
/**
*
*
*
* Option to include built-in and custom substitutions as env variables
* for all build steps.
*
*
* bool automap_substitutions = 22;
*
* @param value The automapSubstitutions to set.
* @return This builder for chaining.
*/
public Builder setAutomapSubstitutions(boolean value) {
automapSubstitutions_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Option to include built-in and custom substitutions as env variables
* for all build steps.
*
*
* bool automap_substitutions = 22;
*
* @return This builder for chaining.
*/
public Builder clearAutomapSubstitutions() {
bitField0_ = (bitField0_ & ~0x00000040);
automapSubstitutions_ = false;
onChanged();
return this;
}
private int logStreamingOption_ = 0;
/**
*
*
*
* Option to define build log streaming behavior to Cloud
* Storage.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;
*
*
* @return The enum numeric value on the wire for logStreamingOption.
*/
@java.lang.Override
public int getLogStreamingOptionValue() {
return logStreamingOption_;
}
/**
*
*
*
* Option to define build log streaming behavior to Cloud
* Storage.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;
*
*
* @param value The enum numeric value on the wire for logStreamingOption to set.
* @return This builder for chaining.
*/
public Builder setLogStreamingOptionValue(int value) {
logStreamingOption_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Option to define build log streaming behavior to Cloud
* Storage.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;
*
*
* @return The logStreamingOption.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.LogStreamingOption getLogStreamingOption() {
com.google.cloudbuild.v1.BuildOptions.LogStreamingOption result =
com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.forNumber(logStreamingOption_);
return result == null
? com.google.cloudbuild.v1.BuildOptions.LogStreamingOption.UNRECOGNIZED
: result;
}
/**
*
*
*
* Option to define build log streaming behavior to Cloud
* Storage.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;
*
*
* @param value The logStreamingOption to set.
* @return This builder for chaining.
*/
public Builder setLogStreamingOption(
com.google.cloudbuild.v1.BuildOptions.LogStreamingOption value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
logStreamingOption_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Option to define build log streaming behavior to Cloud
* Storage.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;
*
*
* @return This builder for chaining.
*/
public Builder clearLogStreamingOption() {
bitField0_ = (bitField0_ & ~0x00000080);
logStreamingOption_ = 0;
onChanged();
return this;
}
private java.lang.Object workerPool_ = "";
/**
*
*
*
* This field deprecated; please use `pool.name` instead.
*
*
* string worker_pool = 7 [deprecated = true];
*
* @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See
* google/devtools/cloudbuild/v1/cloudbuild.proto;l=2284
* @return The workerPool.
*/
@java.lang.Deprecated
public java.lang.String getWorkerPool() {
java.lang.Object ref = workerPool_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
workerPool_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* This field deprecated; please use `pool.name` instead.
*
*
* string worker_pool = 7 [deprecated = true];
*
* @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See
* google/devtools/cloudbuild/v1/cloudbuild.proto;l=2284
* @return The bytes for workerPool.
*/
@java.lang.Deprecated
public com.google.protobuf.ByteString getWorkerPoolBytes() {
java.lang.Object ref = workerPool_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
workerPool_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* This field deprecated; please use `pool.name` instead.
*
*
* string worker_pool = 7 [deprecated = true];
*
* @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See
* google/devtools/cloudbuild/v1/cloudbuild.proto;l=2284
* @param value The workerPool to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder setWorkerPool(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
workerPool_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* This field deprecated; please use `pool.name` instead.
*
*
* string worker_pool = 7 [deprecated = true];
*
* @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See
* google/devtools/cloudbuild/v1/cloudbuild.proto;l=2284
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder clearWorkerPool() {
workerPool_ = getDefaultInstance().getWorkerPool();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
/**
*
*
*
* This field deprecated; please use `pool.name` instead.
*
*
* string worker_pool = 7 [deprecated = true];
*
* @deprecated google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See
* google/devtools/cloudbuild/v1/cloudbuild.proto;l=2284
* @param value The bytes for workerPool to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder setWorkerPoolBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
workerPool_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
private com.google.cloudbuild.v1.BuildOptions.PoolOption pool_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloudbuild.v1.BuildOptions.PoolOption,
com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder,
com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder>
poolBuilder_;
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the pool field is set.
*/
public boolean hasPool() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The pool.
*/
public com.google.cloudbuild.v1.BuildOptions.PoolOption getPool() {
if (poolBuilder_ == null) {
return pool_ == null
? com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance()
: pool_;
} else {
return poolBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setPool(com.google.cloudbuild.v1.BuildOptions.PoolOption value) {
if (poolBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
pool_ = value;
} else {
poolBuilder_.setMessage(value);
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setPool(
com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder builderForValue) {
if (poolBuilder_ == null) {
pool_ = builderForValue.build();
} else {
poolBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergePool(com.google.cloudbuild.v1.BuildOptions.PoolOption value) {
if (poolBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0)
&& pool_ != null
&& pool_ != com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance()) {
getPoolBuilder().mergeFrom(value);
} else {
pool_ = value;
}
} else {
poolBuilder_.mergeFrom(value);
}
if (pool_ != null) {
bitField0_ |= 0x00000200;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearPool() {
bitField0_ = (bitField0_ & ~0x00000200);
pool_ = null;
if (poolBuilder_ != null) {
poolBuilder_.dispose();
poolBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder getPoolBuilder() {
bitField0_ |= 0x00000200;
onChanged();
return getPoolFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder getPoolOrBuilder() {
if (poolBuilder_ != null) {
return poolBuilder_.getMessageOrBuilder();
} else {
return pool_ == null
? com.google.cloudbuild.v1.BuildOptions.PoolOption.getDefaultInstance()
: pool_;
}
}
/**
*
*
*
* Optional. Specification for execution on a `WorkerPool`.
*
* See [running builds in a private
* pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
* for more information.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloudbuild.v1.BuildOptions.PoolOption,
com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder,
com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder>
getPoolFieldBuilder() {
if (poolBuilder_ == null) {
poolBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloudbuild.v1.BuildOptions.PoolOption,
com.google.cloudbuild.v1.BuildOptions.PoolOption.Builder,
com.google.cloudbuild.v1.BuildOptions.PoolOptionOrBuilder>(
getPool(), getParentForChildren(), isClean());
pool_ = null;
}
return poolBuilder_;
}
private int logging_ = 0;
/**
*
*
*
* Option to specify the logging mode, which determines if and where build
* logs are stored.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;
*
* @return The enum numeric value on the wire for logging.
*/
@java.lang.Override
public int getLoggingValue() {
return logging_;
}
/**
*
*
*
* Option to specify the logging mode, which determines if and where build
* logs are stored.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;
*
* @param value The enum numeric value on the wire for logging to set.
* @return This builder for chaining.
*/
public Builder setLoggingValue(int value) {
logging_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* Option to specify the logging mode, which determines if and where build
* logs are stored.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;
*
* @return The logging.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.LoggingMode getLogging() {
com.google.cloudbuild.v1.BuildOptions.LoggingMode result =
com.google.cloudbuild.v1.BuildOptions.LoggingMode.forNumber(logging_);
return result == null
? com.google.cloudbuild.v1.BuildOptions.LoggingMode.UNRECOGNIZED
: result;
}
/**
*
*
*
* Option to specify the logging mode, which determines if and where build
* logs are stored.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;
*
* @param value The logging to set.
* @return This builder for chaining.
*/
public Builder setLogging(com.google.cloudbuild.v1.BuildOptions.LoggingMode value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000400;
logging_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Option to specify the logging mode, which determines if and where build
* logs are stored.
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;
*
* @return This builder for chaining.
*/
public Builder clearLogging() {
bitField0_ = (bitField0_ & ~0x00000400);
logging_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList env_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureEnvIsMutable() {
if (!env_.isModifiable()) {
env_ = new com.google.protobuf.LazyStringArrayList(env_);
}
bitField0_ |= 0x00000800;
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @return A list containing the env.
*/
public com.google.protobuf.ProtocolStringList getEnvList() {
env_.makeImmutable();
return env_;
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @return The count of env.
*/
public int getEnvCount() {
return env_.size();
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @param index The index of the element to return.
* @return The env at the given index.
*/
public java.lang.String getEnv(int index) {
return env_.get(index);
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @param index The index of the value to return.
* @return The bytes of the env at the given index.
*/
public com.google.protobuf.ByteString getEnvBytes(int index) {
return env_.getByteString(index);
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @param index The index to set the value at.
* @param value The env to set.
* @return This builder for chaining.
*/
public Builder setEnv(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureEnvIsMutable();
env_.set(index, value);
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @param value The env to add.
* @return This builder for chaining.
*/
public Builder addEnv(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureEnvIsMutable();
env_.add(value);
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @param values The env to add.
* @return This builder for chaining.
*/
public Builder addAllEnv(java.lang.Iterable values) {
ensureEnvIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, env_);
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @return This builder for chaining.
*/
public Builder clearEnv() {
env_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000800);
;
onChanged();
return this;
}
/**
*
*
*
* A list of global environment variable definitions that will exist for all
* build steps in this build. If a variable is defined in both globally and in
* a build step, the variable will use the build step value.
*
* The elements are of the form "KEY=VALUE" for the environment variable "KEY"
* being given the value "VALUE".
*
*
* repeated string env = 12;
*
* @param value The bytes of the env to add.
* @return This builder for chaining.
*/
public Builder addEnvBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureEnvIsMutable();
env_.add(value);
bitField0_ |= 0x00000800;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList secretEnv_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureSecretEnvIsMutable() {
if (!secretEnv_.isModifiable()) {
secretEnv_ = new com.google.protobuf.LazyStringArrayList(secretEnv_);
}
bitField0_ |= 0x00001000;
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @return A list containing the secretEnv.
*/
public com.google.protobuf.ProtocolStringList getSecretEnvList() {
secretEnv_.makeImmutable();
return secretEnv_;
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @return The count of secretEnv.
*/
public int getSecretEnvCount() {
return secretEnv_.size();
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @param index The index of the element to return.
* @return The secretEnv at the given index.
*/
public java.lang.String getSecretEnv(int index) {
return secretEnv_.get(index);
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @param index The index of the value to return.
* @return The bytes of the secretEnv at the given index.
*/
public com.google.protobuf.ByteString getSecretEnvBytes(int index) {
return secretEnv_.getByteString(index);
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @param index The index to set the value at.
* @param value The secretEnv to set.
* @return This builder for chaining.
*/
public Builder setSecretEnv(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSecretEnvIsMutable();
secretEnv_.set(index, value);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @param value The secretEnv to add.
* @return This builder for chaining.
*/
public Builder addSecretEnv(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSecretEnvIsMutable();
secretEnv_.add(value);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @param values The secretEnv to add.
* @return This builder for chaining.
*/
public Builder addAllSecretEnv(java.lang.Iterable values) {
ensureSecretEnvIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, secretEnv_);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @return This builder for chaining.
*/
public Builder clearSecretEnv() {
secretEnv_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00001000);
;
onChanged();
return this;
}
/**
*
*
*
* A list of global environment variables, which are encrypted using a Cloud
* Key Management Service crypto key. These values must be specified in the
* build's `Secret`. These variables will be available to all build steps
* in this build.
*
*
* repeated string secret_env = 13;
*
* @param value The bytes of the secretEnv to add.
* @return This builder for chaining.
*/
public Builder addSecretEnvBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureSecretEnvIsMutable();
secretEnv_.add(value);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
private java.util.List volumes_ =
java.util.Collections.emptyList();
private void ensureVolumesIsMutable() {
if (!((bitField0_ & 0x00002000) != 0)) {
volumes_ = new java.util.ArrayList(volumes_);
bitField0_ |= 0x00002000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloudbuild.v1.Volume,
com.google.cloudbuild.v1.Volume.Builder,
com.google.cloudbuild.v1.VolumeOrBuilder>
volumesBuilder_;
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public java.util.List getVolumesList() {
if (volumesBuilder_ == null) {
return java.util.Collections.unmodifiableList(volumes_);
} else {
return volumesBuilder_.getMessageList();
}
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public int getVolumesCount() {
if (volumesBuilder_ == null) {
return volumes_.size();
} else {
return volumesBuilder_.getCount();
}
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public com.google.cloudbuild.v1.Volume getVolumes(int index) {
if (volumesBuilder_ == null) {
return volumes_.get(index);
} else {
return volumesBuilder_.getMessage(index);
}
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public Builder setVolumes(int index, com.google.cloudbuild.v1.Volume value) {
if (volumesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVolumesIsMutable();
volumes_.set(index, value);
onChanged();
} else {
volumesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public Builder setVolumes(int index, com.google.cloudbuild.v1.Volume.Builder builderForValue) {
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
volumes_.set(index, builderForValue.build());
onChanged();
} else {
volumesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public Builder addVolumes(com.google.cloudbuild.v1.Volume value) {
if (volumesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVolumesIsMutable();
volumes_.add(value);
onChanged();
} else {
volumesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public Builder addVolumes(int index, com.google.cloudbuild.v1.Volume value) {
if (volumesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVolumesIsMutable();
volumes_.add(index, value);
onChanged();
} else {
volumesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public Builder addVolumes(com.google.cloudbuild.v1.Volume.Builder builderForValue) {
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
volumes_.add(builderForValue.build());
onChanged();
} else {
volumesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public Builder addVolumes(int index, com.google.cloudbuild.v1.Volume.Builder builderForValue) {
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
volumes_.add(index, builderForValue.build());
onChanged();
} else {
volumesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public Builder addAllVolumes(
java.lang.Iterable extends com.google.cloudbuild.v1.Volume> values) {
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, volumes_);
onChanged();
} else {
volumesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public Builder clearVolumes() {
if (volumesBuilder_ == null) {
volumes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00002000);
onChanged();
} else {
volumesBuilder_.clear();
}
return this;
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public Builder removeVolumes(int index) {
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
volumes_.remove(index);
onChanged();
} else {
volumesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public com.google.cloudbuild.v1.Volume.Builder getVolumesBuilder(int index) {
return getVolumesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public com.google.cloudbuild.v1.VolumeOrBuilder getVolumesOrBuilder(int index) {
if (volumesBuilder_ == null) {
return volumes_.get(index);
} else {
return volumesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public java.util.List extends com.google.cloudbuild.v1.VolumeOrBuilder>
getVolumesOrBuilderList() {
if (volumesBuilder_ != null) {
return volumesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(volumes_);
}
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public com.google.cloudbuild.v1.Volume.Builder addVolumesBuilder() {
return getVolumesFieldBuilder()
.addBuilder(com.google.cloudbuild.v1.Volume.getDefaultInstance());
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public com.google.cloudbuild.v1.Volume.Builder addVolumesBuilder(int index) {
return getVolumesFieldBuilder()
.addBuilder(index, com.google.cloudbuild.v1.Volume.getDefaultInstance());
}
/**
*
*
*
* Global list of volumes to mount for ALL build steps
*
* Each volume is created as an empty volume prior to starting the build
* process. Upon completion of the build, volumes and their contents are
* discarded. Global volume names and paths cannot conflict with the volumes
* defined a build step.
*
* Using a global volume in a build with only one step is not valid as
* it is indicative of a build request with an incorrect configuration.
*
*
* repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;
*/
public java.util.List getVolumesBuilderList() {
return getVolumesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloudbuild.v1.Volume,
com.google.cloudbuild.v1.Volume.Builder,
com.google.cloudbuild.v1.VolumeOrBuilder>
getVolumesFieldBuilder() {
if (volumesBuilder_ == null) {
volumesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloudbuild.v1.Volume,
com.google.cloudbuild.v1.Volume.Builder,
com.google.cloudbuild.v1.VolumeOrBuilder>(
volumes_, ((bitField0_ & 0x00002000) != 0), getParentForChildren(), isClean());
volumes_ = null;
}
return volumesBuilder_;
}
private int defaultLogsBucketBehavior_ = 0;
/**
*
*
*
* Optional. Option to specify how default logs buckets are setup.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for defaultLogsBucketBehavior.
*/
@java.lang.Override
public int getDefaultLogsBucketBehaviorValue() {
return defaultLogsBucketBehavior_;
}
/**
*
*
*
* Optional. Option to specify how default logs buckets are setup.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for defaultLogsBucketBehavior to set.
* @return This builder for chaining.
*/
public Builder setDefaultLogsBucketBehaviorValue(int value) {
defaultLogsBucketBehavior_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Option to specify how default logs buckets are setup.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The defaultLogsBucketBehavior.
*/
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior
getDefaultLogsBucketBehavior() {
com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior result =
com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior.forNumber(
defaultLogsBucketBehavior_);
return result == null
? com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Option to specify how default logs buckets are setup.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The defaultLogsBucketBehavior to set.
* @return This builder for chaining.
*/
public Builder setDefaultLogsBucketBehavior(
com.google.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00004000;
defaultLogsBucketBehavior_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Option to specify how default logs buckets are setup.
*
*
*
* .google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearDefaultLogsBucketBehavior() {
bitField0_ = (bitField0_ & ~0x00004000);
defaultLogsBucketBehavior_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.devtools.cloudbuild.v1.BuildOptions)
}
// @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.BuildOptions)
private static final com.google.cloudbuild.v1.BuildOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloudbuild.v1.BuildOptions();
}
public static com.google.cloudbuild.v1.BuildOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BuildOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloudbuild.v1.BuildOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}