implements
// @@protoc_insertion_point(builder_implements:build.bazel.remote.execution.v2.ExecutionCapabilities)
build.bazel.remote.execution.v2.ExecutionCapabilitiesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_ExecutionCapabilities_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_ExecutionCapabilities_fieldAccessorTable
.ensureFieldAccessorsInitialized(
build.bazel.remote.execution.v2.ExecutionCapabilities.class, build.bazel.remote.execution.v2.ExecutionCapabilities.Builder.class);
}
// Construct using build.bazel.remote.execution.v2.ExecutionCapabilities.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getExecutionPriorityCapabilitiesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
digestFunction_ = 0;
execEnabled_ = false;
executionPriorityCapabilities_ = null;
if (executionPriorityCapabilitiesBuilder_ != null) {
executionPriorityCapabilitiesBuilder_.dispose();
executionPriorityCapabilitiesBuilder_ = null;
}
supportedNodeProperties_ =
com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_ExecutionCapabilities_descriptor;
}
@java.lang.Override
public build.bazel.remote.execution.v2.ExecutionCapabilities getDefaultInstanceForType() {
return build.bazel.remote.execution.v2.ExecutionCapabilities.getDefaultInstance();
}
@java.lang.Override
public build.bazel.remote.execution.v2.ExecutionCapabilities build() {
build.bazel.remote.execution.v2.ExecutionCapabilities result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public build.bazel.remote.execution.v2.ExecutionCapabilities buildPartial() {
build.bazel.remote.execution.v2.ExecutionCapabilities result = new build.bazel.remote.execution.v2.ExecutionCapabilities(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(build.bazel.remote.execution.v2.ExecutionCapabilities result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.digestFunction_ = digestFunction_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.execEnabled_ = execEnabled_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.executionPriorityCapabilities_ = executionPriorityCapabilitiesBuilder_ == null
? executionPriorityCapabilities_
: executionPriorityCapabilitiesBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
supportedNodeProperties_.makeImmutable();
result.supportedNodeProperties_ = supportedNodeProperties_;
}
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 build.bazel.remote.execution.v2.ExecutionCapabilities) {
return mergeFrom((build.bazel.remote.execution.v2.ExecutionCapabilities)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(build.bazel.remote.execution.v2.ExecutionCapabilities other) {
if (other == build.bazel.remote.execution.v2.ExecutionCapabilities.getDefaultInstance()) return this;
if (other.digestFunction_ != 0) {
setDigestFunctionValue(other.getDigestFunctionValue());
}
if (other.getExecEnabled() != false) {
setExecEnabled(other.getExecEnabled());
}
if (other.hasExecutionPriorityCapabilities()) {
mergeExecutionPriorityCapabilities(other.getExecutionPriorityCapabilities());
}
if (!other.supportedNodeProperties_.isEmpty()) {
if (supportedNodeProperties_.isEmpty()) {
supportedNodeProperties_ = other.supportedNodeProperties_;
bitField0_ |= 0x00000008;
} else {
ensureSupportedNodePropertiesIsMutable();
supportedNodeProperties_.addAll(other.supportedNodeProperties_);
}
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 8: {
digestFunction_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
execEnabled_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
input.readMessage(
getExecutionPriorityCapabilitiesFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
java.lang.String s = input.readStringRequireUtf8();
ensureSupportedNodePropertiesIsMutable();
supportedNodeProperties_.add(s);
break;
} // case 34
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 int digestFunction_ = 0;
/**
*
* Remote execution may only support a single digest function.
*
*
* .build.bazel.remote.execution.v2.DigestFunction.Value digest_function = 1;
* @return The enum numeric value on the wire for digestFunction.
*/
@java.lang.Override public int getDigestFunctionValue() {
return digestFunction_;
}
/**
*
* Remote execution may only support a single digest function.
*
*
* .build.bazel.remote.execution.v2.DigestFunction.Value digest_function = 1;
* @param value The enum numeric value on the wire for digestFunction to set.
* @return This builder for chaining.
*/
public Builder setDigestFunctionValue(int value) {
digestFunction_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Remote execution may only support a single digest function.
*
*
* .build.bazel.remote.execution.v2.DigestFunction.Value digest_function = 1;
* @return The digestFunction.
*/
@java.lang.Override
public build.bazel.remote.execution.v2.DigestFunction.Value getDigestFunction() {
build.bazel.remote.execution.v2.DigestFunction.Value result = build.bazel.remote.execution.v2.DigestFunction.Value.forNumber(digestFunction_);
return result == null ? build.bazel.remote.execution.v2.DigestFunction.Value.UNRECOGNIZED : result;
}
/**
*
* Remote execution may only support a single digest function.
*
*
* .build.bazel.remote.execution.v2.DigestFunction.Value digest_function = 1;
* @param value The digestFunction to set.
* @return This builder for chaining.
*/
public Builder setDigestFunction(build.bazel.remote.execution.v2.DigestFunction.Value value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
digestFunction_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Remote execution may only support a single digest function.
*
*
* .build.bazel.remote.execution.v2.DigestFunction.Value digest_function = 1;
* @return This builder for chaining.
*/
public Builder clearDigestFunction() {
bitField0_ = (bitField0_ & ~0x00000001);
digestFunction_ = 0;
onChanged();
return this;
}
private boolean execEnabled_ ;
/**
*
* Whether remote execution is enabled for the particular server/instance.
*
*
* bool exec_enabled = 2;
* @return The execEnabled.
*/
@java.lang.Override
public boolean getExecEnabled() {
return execEnabled_;
}
/**
*
* Whether remote execution is enabled for the particular server/instance.
*
*
* bool exec_enabled = 2;
* @param value The execEnabled to set.
* @return This builder for chaining.
*/
public Builder setExecEnabled(boolean value) {
execEnabled_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Whether remote execution is enabled for the particular server/instance.
*
*
* bool exec_enabled = 2;
* @return This builder for chaining.
*/
public Builder clearExecEnabled() {
bitField0_ = (bitField0_ & ~0x00000002);
execEnabled_ = false;
onChanged();
return this;
}
private build.bazel.remote.execution.v2.PriorityCapabilities executionPriorityCapabilities_;
private com.google.protobuf.SingleFieldBuilderV3<
build.bazel.remote.execution.v2.PriorityCapabilities, build.bazel.remote.execution.v2.PriorityCapabilities.Builder, build.bazel.remote.execution.v2.PriorityCapabilitiesOrBuilder> executionPriorityCapabilitiesBuilder_;
/**
*
* Supported execution priority range.
*
*
* .build.bazel.remote.execution.v2.PriorityCapabilities execution_priority_capabilities = 3;
* @return Whether the executionPriorityCapabilities field is set.
*/
public boolean hasExecutionPriorityCapabilities() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Supported execution priority range.
*
*
* .build.bazel.remote.execution.v2.PriorityCapabilities execution_priority_capabilities = 3;
* @return The executionPriorityCapabilities.
*/
public build.bazel.remote.execution.v2.PriorityCapabilities getExecutionPriorityCapabilities() {
if (executionPriorityCapabilitiesBuilder_ == null) {
return executionPriorityCapabilities_ == null ? build.bazel.remote.execution.v2.PriorityCapabilities.getDefaultInstance() : executionPriorityCapabilities_;
} else {
return executionPriorityCapabilitiesBuilder_.getMessage();
}
}
/**
*
* Supported execution priority range.
*
*
* .build.bazel.remote.execution.v2.PriorityCapabilities execution_priority_capabilities = 3;
*/
public Builder setExecutionPriorityCapabilities(build.bazel.remote.execution.v2.PriorityCapabilities value) {
if (executionPriorityCapabilitiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
executionPriorityCapabilities_ = value;
} else {
executionPriorityCapabilitiesBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Supported execution priority range.
*
*
* .build.bazel.remote.execution.v2.PriorityCapabilities execution_priority_capabilities = 3;
*/
public Builder setExecutionPriorityCapabilities(
build.bazel.remote.execution.v2.PriorityCapabilities.Builder builderForValue) {
if (executionPriorityCapabilitiesBuilder_ == null) {
executionPriorityCapabilities_ = builderForValue.build();
} else {
executionPriorityCapabilitiesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Supported execution priority range.
*
*
* .build.bazel.remote.execution.v2.PriorityCapabilities execution_priority_capabilities = 3;
*/
public Builder mergeExecutionPriorityCapabilities(build.bazel.remote.execution.v2.PriorityCapabilities value) {
if (executionPriorityCapabilitiesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
executionPriorityCapabilities_ != null &&
executionPriorityCapabilities_ != build.bazel.remote.execution.v2.PriorityCapabilities.getDefaultInstance()) {
getExecutionPriorityCapabilitiesBuilder().mergeFrom(value);
} else {
executionPriorityCapabilities_ = value;
}
} else {
executionPriorityCapabilitiesBuilder_.mergeFrom(value);
}
if (executionPriorityCapabilities_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* Supported execution priority range.
*
*
* .build.bazel.remote.execution.v2.PriorityCapabilities execution_priority_capabilities = 3;
*/
public Builder clearExecutionPriorityCapabilities() {
bitField0_ = (bitField0_ & ~0x00000004);
executionPriorityCapabilities_ = null;
if (executionPriorityCapabilitiesBuilder_ != null) {
executionPriorityCapabilitiesBuilder_.dispose();
executionPriorityCapabilitiesBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Supported execution priority range.
*
*
* .build.bazel.remote.execution.v2.PriorityCapabilities execution_priority_capabilities = 3;
*/
public build.bazel.remote.execution.v2.PriorityCapabilities.Builder getExecutionPriorityCapabilitiesBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getExecutionPriorityCapabilitiesFieldBuilder().getBuilder();
}
/**
*
* Supported execution priority range.
*
*
* .build.bazel.remote.execution.v2.PriorityCapabilities execution_priority_capabilities = 3;
*/
public build.bazel.remote.execution.v2.PriorityCapabilitiesOrBuilder getExecutionPriorityCapabilitiesOrBuilder() {
if (executionPriorityCapabilitiesBuilder_ != null) {
return executionPriorityCapabilitiesBuilder_.getMessageOrBuilder();
} else {
return executionPriorityCapabilities_ == null ?
build.bazel.remote.execution.v2.PriorityCapabilities.getDefaultInstance() : executionPriorityCapabilities_;
}
}
/**
*
* Supported execution priority range.
*
*
* .build.bazel.remote.execution.v2.PriorityCapabilities execution_priority_capabilities = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
build.bazel.remote.execution.v2.PriorityCapabilities, build.bazel.remote.execution.v2.PriorityCapabilities.Builder, build.bazel.remote.execution.v2.PriorityCapabilitiesOrBuilder>
getExecutionPriorityCapabilitiesFieldBuilder() {
if (executionPriorityCapabilitiesBuilder_ == null) {
executionPriorityCapabilitiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
build.bazel.remote.execution.v2.PriorityCapabilities, build.bazel.remote.execution.v2.PriorityCapabilities.Builder, build.bazel.remote.execution.v2.PriorityCapabilitiesOrBuilder>(
getExecutionPriorityCapabilities(),
getParentForChildren(),
isClean());
executionPriorityCapabilities_ = null;
}
return executionPriorityCapabilitiesBuilder_;
}
private com.google.protobuf.LazyStringArrayList supportedNodeProperties_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureSupportedNodePropertiesIsMutable() {
if (!supportedNodeProperties_.isModifiable()) {
supportedNodeProperties_ = new com.google.protobuf.LazyStringArrayList(supportedNodeProperties_);
}
bitField0_ |= 0x00000008;
}
/**
*
* Supported node properties.
*
*
* repeated string supported_node_properties = 4;
* @return A list containing the supportedNodeProperties.
*/
public com.google.protobuf.ProtocolStringList
getSupportedNodePropertiesList() {
supportedNodeProperties_.makeImmutable();
return supportedNodeProperties_;
}
/**
*
* Supported node properties.
*
*
* repeated string supported_node_properties = 4;
* @return The count of supportedNodeProperties.
*/
public int getSupportedNodePropertiesCount() {
return supportedNodeProperties_.size();
}
/**
*
* Supported node properties.
*
*
* repeated string supported_node_properties = 4;
* @param index The index of the element to return.
* @return The supportedNodeProperties at the given index.
*/
public java.lang.String getSupportedNodeProperties(int index) {
return supportedNodeProperties_.get(index);
}
/**
*
* Supported node properties.
*
*
* repeated string supported_node_properties = 4;
* @param index The index of the value to return.
* @return The bytes of the supportedNodeProperties at the given index.
*/
public com.google.protobuf.ByteString
getSupportedNodePropertiesBytes(int index) {
return supportedNodeProperties_.getByteString(index);
}
/**
*
* Supported node properties.
*
*
* repeated string supported_node_properties = 4;
* @param index The index to set the value at.
* @param value The supportedNodeProperties to set.
* @return This builder for chaining.
*/
public Builder setSupportedNodeProperties(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureSupportedNodePropertiesIsMutable();
supportedNodeProperties_.set(index, value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Supported node properties.
*
*
* repeated string supported_node_properties = 4;
* @param value The supportedNodeProperties to add.
* @return This builder for chaining.
*/
public Builder addSupportedNodeProperties(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureSupportedNodePropertiesIsMutable();
supportedNodeProperties_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Supported node properties.
*
*
* repeated string supported_node_properties = 4;
* @param values The supportedNodeProperties to add.
* @return This builder for chaining.
*/
public Builder addAllSupportedNodeProperties(
java.lang.Iterable values) {
ensureSupportedNodePropertiesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, supportedNodeProperties_);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Supported node properties.
*
*
* repeated string supported_node_properties = 4;
* @return This builder for chaining.
*/
public Builder clearSupportedNodeProperties() {
supportedNodeProperties_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);;
onChanged();
return this;
}
/**
*
* Supported node properties.
*
*
* repeated string supported_node_properties = 4;
* @param value The bytes of the supportedNodeProperties to add.
* @return This builder for chaining.
*/
public Builder addSupportedNodePropertiesBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureSupportedNodePropertiesIsMutable();
supportedNodeProperties_.add(value);
bitField0_ |= 0x00000008;
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:build.bazel.remote.execution.v2.ExecutionCapabilities)
}
// @@protoc_insertion_point(class_scope:build.bazel.remote.execution.v2.ExecutionCapabilities)
private static final build.bazel.remote.execution.v2.ExecutionCapabilities DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new build.bazel.remote.execution.v2.ExecutionCapabilities();
}
public static build.bazel.remote.execution.v2.ExecutionCapabilities getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExecutionCapabilities 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 build.bazel.remote.execution.v2.ExecutionCapabilities getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}