
com.google.cloud.compute.v1.Errors Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-compute-v1 Show documentation
Show all versions of proto-google-cloud-compute-v1 Show documentation
Proto library for google-cloud-compute
/*
* 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/cloud/compute/v1/compute.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.compute.v1;
/**
*
*
*
*
*
* Protobuf type {@code google.cloud.compute.v1.Errors}
*/
public final class Errors extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.compute.v1.Errors)
ErrorsOrBuilder {
private static final long serialVersionUID = 0L;
// Use Errors.newBuilder() to construct.
private Errors(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Errors() {
code_ = "";
errorDetails_ = java.util.Collections.emptyList();
location_ = "";
message_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Errors();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_Errors_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_Errors_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.Errors.class,
com.google.cloud.compute.v1.Errors.Builder.class);
}
private int bitField0_;
public static final int CODE_FIELD_NUMBER = 3059181;
@SuppressWarnings("serial")
private volatile java.lang.Object code_ = "";
/**
*
*
*
* [Output Only] The error type identifier for this error.
*
*
* optional string code = 3059181;
*
* @return Whether the code field is set.
*/
@java.lang.Override
public boolean hasCode() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* [Output Only] The error type identifier for this error.
*
*
* optional string code = 3059181;
*
* @return The code.
*/
@java.lang.Override
public java.lang.String getCode() {
java.lang.Object ref = code_;
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();
code_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] The error type identifier for this error.
*
*
* optional string code = 3059181;
*
* @return The bytes for code.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCodeBytes() {
java.lang.Object ref = code_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
code_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ERROR_DETAILS_FIELD_NUMBER = 274653963;
@SuppressWarnings("serial")
private java.util.List errorDetails_;
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
@java.lang.Override
public java.util.List getErrorDetailsList() {
return errorDetails_;
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
@java.lang.Override
public java.util.List extends com.google.cloud.compute.v1.ErrorDetailsOrBuilder>
getErrorDetailsOrBuilderList() {
return errorDetails_;
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
@java.lang.Override
public int getErrorDetailsCount() {
return errorDetails_.size();
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
@java.lang.Override
public com.google.cloud.compute.v1.ErrorDetails getErrorDetails(int index) {
return errorDetails_.get(index);
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
@java.lang.Override
public com.google.cloud.compute.v1.ErrorDetailsOrBuilder getErrorDetailsOrBuilder(int index) {
return errorDetails_.get(index);
}
public static final int LOCATION_FIELD_NUMBER = 290430901;
@SuppressWarnings("serial")
private volatile java.lang.Object location_ = "";
/**
*
*
*
* [Output Only] Indicates the field in the request that caused the error. This property is optional.
*
*
* optional string location = 290430901;
*
* @return Whether the location field is set.
*/
@java.lang.Override
public boolean hasLocation() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* [Output Only] Indicates the field in the request that caused the error. This property is optional.
*
*
* optional string location = 290430901;
*
* @return The location.
*/
@java.lang.Override
public java.lang.String getLocation() {
java.lang.Object ref = location_;
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();
location_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] Indicates the field in the request that caused the error. This property is optional.
*
*
* optional string location = 290430901;
*
* @return The bytes for location.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLocationBytes() {
java.lang.Object ref = location_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
location_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MESSAGE_FIELD_NUMBER = 418054151;
@SuppressWarnings("serial")
private volatile java.lang.Object message_ = "";
/**
*
*
*
* [Output Only] An optional, human-readable error message.
*
*
* optional string message = 418054151;
*
* @return Whether the message field is set.
*/
@java.lang.Override
public boolean hasMessage() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* [Output Only] An optional, human-readable error message.
*
*
* optional string message = 418054151;
*
* @return The message.
*/
@java.lang.Override
public java.lang.String getMessage() {
java.lang.Object ref = message_;
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();
message_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] An optional, human-readable error message.
*
*
* optional string message = 418054151;
*
* @return The bytes for message.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMessageBytes() {
java.lang.Object ref = message_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
message_ = 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 (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3059181, code_);
}
for (int i = 0; i < errorDetails_.size(); i++) {
output.writeMessage(274653963, errorDetails_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 290430901, location_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 418054151, message_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3059181, code_);
}
for (int i = 0; i < errorDetails_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(274653963, errorDetails_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(290430901, location_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(418054151, message_);
}
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.cloud.compute.v1.Errors)) {
return super.equals(obj);
}
com.google.cloud.compute.v1.Errors other = (com.google.cloud.compute.v1.Errors) obj;
if (hasCode() != other.hasCode()) return false;
if (hasCode()) {
if (!getCode().equals(other.getCode())) return false;
}
if (!getErrorDetailsList().equals(other.getErrorDetailsList())) return false;
if (hasLocation() != other.hasLocation()) return false;
if (hasLocation()) {
if (!getLocation().equals(other.getLocation())) return false;
}
if (hasMessage() != other.hasMessage()) return false;
if (hasMessage()) {
if (!getMessage().equals(other.getMessage())) 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 (hasCode()) {
hash = (37 * hash) + CODE_FIELD_NUMBER;
hash = (53 * hash) + getCode().hashCode();
}
if (getErrorDetailsCount() > 0) {
hash = (37 * hash) + ERROR_DETAILS_FIELD_NUMBER;
hash = (53 * hash) + getErrorDetailsList().hashCode();
}
if (hasLocation()) {
hash = (37 * hash) + LOCATION_FIELD_NUMBER;
hash = (53 * hash) + getLocation().hashCode();
}
if (hasMessage()) {
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getMessage().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.compute.v1.Errors parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.Errors parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.compute.v1.Errors parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.Errors 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.cloud.compute.v1.Errors parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.Errors parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.compute.v1.Errors parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.Errors 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.cloud.compute.v1.Errors parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.Errors 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.cloud.compute.v1.Errors parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.Errors 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.cloud.compute.v1.Errors 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;
}
/**
*
*
*
*
*
* Protobuf type {@code google.cloud.compute.v1.Errors}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.Errors)
com.google.cloud.compute.v1.ErrorsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_Errors_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_Errors_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.Errors.class,
com.google.cloud.compute.v1.Errors.Builder.class);
}
// Construct using com.google.cloud.compute.v1.Errors.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
code_ = "";
if (errorDetailsBuilder_ == null) {
errorDetails_ = java.util.Collections.emptyList();
} else {
errorDetails_ = null;
errorDetailsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
location_ = "";
message_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_Errors_descriptor;
}
@java.lang.Override
public com.google.cloud.compute.v1.Errors getDefaultInstanceForType() {
return com.google.cloud.compute.v1.Errors.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.compute.v1.Errors build() {
com.google.cloud.compute.v1.Errors result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.compute.v1.Errors buildPartial() {
com.google.cloud.compute.v1.Errors result = new com.google.cloud.compute.v1.Errors(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.compute.v1.Errors result) {
if (errorDetailsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
errorDetails_ = java.util.Collections.unmodifiableList(errorDetails_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.errorDetails_ = errorDetails_;
} else {
result.errorDetails_ = errorDetailsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.compute.v1.Errors result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.code_ = code_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.location_ = location_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.message_ = message_;
to_bitField0_ |= 0x00000004;
}
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.cloud.compute.v1.Errors) {
return mergeFrom((com.google.cloud.compute.v1.Errors) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.compute.v1.Errors other) {
if (other == com.google.cloud.compute.v1.Errors.getDefaultInstance()) return this;
if (other.hasCode()) {
code_ = other.code_;
bitField0_ |= 0x00000001;
onChanged();
}
if (errorDetailsBuilder_ == null) {
if (!other.errorDetails_.isEmpty()) {
if (errorDetails_.isEmpty()) {
errorDetails_ = other.errorDetails_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureErrorDetailsIsMutable();
errorDetails_.addAll(other.errorDetails_);
}
onChanged();
}
} else {
if (!other.errorDetails_.isEmpty()) {
if (errorDetailsBuilder_.isEmpty()) {
errorDetailsBuilder_.dispose();
errorDetailsBuilder_ = null;
errorDetails_ = other.errorDetails_;
bitField0_ = (bitField0_ & ~0x00000002);
errorDetailsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getErrorDetailsFieldBuilder()
: null;
} else {
errorDetailsBuilder_.addAllMessages(other.errorDetails_);
}
}
}
if (other.hasLocation()) {
location_ = other.location_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasMessage()) {
message_ = other.message_;
bitField0_ |= 0x00000008;
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 24473450:
{
code_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 24473450
case -2097735590:
{
com.google.cloud.compute.v1.ErrorDetails m =
input.readMessage(
com.google.cloud.compute.v1.ErrorDetails.parser(), extensionRegistry);
if (errorDetailsBuilder_ == null) {
ensureErrorDetailsIsMutable();
errorDetails_.add(m);
} else {
errorDetailsBuilder_.addMessage(m);
}
break;
} // case -2097735590
case -1971520086:
{
location_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case -1971520086
case -950534086:
{
message_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case -950534086
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 code_ = "";
/**
*
*
*
* [Output Only] The error type identifier for this error.
*
*
* optional string code = 3059181;
*
* @return Whether the code field is set.
*/
public boolean hasCode() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* [Output Only] The error type identifier for this error.
*
*
* optional string code = 3059181;
*
* @return The code.
*/
public java.lang.String getCode() {
java.lang.Object ref = code_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
code_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] The error type identifier for this error.
*
*
* optional string code = 3059181;
*
* @return The bytes for code.
*/
public com.google.protobuf.ByteString getCodeBytes() {
java.lang.Object ref = code_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
code_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] The error type identifier for this error.
*
*
* optional string code = 3059181;
*
* @param value The code to set.
* @return This builder for chaining.
*/
public Builder setCode(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
code_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The error type identifier for this error.
*
*
* optional string code = 3059181;
*
* @return This builder for chaining.
*/
public Builder clearCode() {
code_ = getDefaultInstance().getCode();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The error type identifier for this error.
*
*
* optional string code = 3059181;
*
* @param value The bytes for code to set.
* @return This builder for chaining.
*/
public Builder setCodeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
code_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List errorDetails_ =
java.util.Collections.emptyList();
private void ensureErrorDetailsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
errorDetails_ =
new java.util.ArrayList(errorDetails_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.ErrorDetails,
com.google.cloud.compute.v1.ErrorDetails.Builder,
com.google.cloud.compute.v1.ErrorDetailsOrBuilder>
errorDetailsBuilder_;
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public java.util.List getErrorDetailsList() {
if (errorDetailsBuilder_ == null) {
return java.util.Collections.unmodifiableList(errorDetails_);
} else {
return errorDetailsBuilder_.getMessageList();
}
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public int getErrorDetailsCount() {
if (errorDetailsBuilder_ == null) {
return errorDetails_.size();
} else {
return errorDetailsBuilder_.getCount();
}
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public com.google.cloud.compute.v1.ErrorDetails getErrorDetails(int index) {
if (errorDetailsBuilder_ == null) {
return errorDetails_.get(index);
} else {
return errorDetailsBuilder_.getMessage(index);
}
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public Builder setErrorDetails(int index, com.google.cloud.compute.v1.ErrorDetails value) {
if (errorDetailsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorDetailsIsMutable();
errorDetails_.set(index, value);
onChanged();
} else {
errorDetailsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public Builder setErrorDetails(
int index, com.google.cloud.compute.v1.ErrorDetails.Builder builderForValue) {
if (errorDetailsBuilder_ == null) {
ensureErrorDetailsIsMutable();
errorDetails_.set(index, builderForValue.build());
onChanged();
} else {
errorDetailsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public Builder addErrorDetails(com.google.cloud.compute.v1.ErrorDetails value) {
if (errorDetailsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorDetailsIsMutable();
errorDetails_.add(value);
onChanged();
} else {
errorDetailsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public Builder addErrorDetails(int index, com.google.cloud.compute.v1.ErrorDetails value) {
if (errorDetailsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorDetailsIsMutable();
errorDetails_.add(index, value);
onChanged();
} else {
errorDetailsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public Builder addErrorDetails(
com.google.cloud.compute.v1.ErrorDetails.Builder builderForValue) {
if (errorDetailsBuilder_ == null) {
ensureErrorDetailsIsMutable();
errorDetails_.add(builderForValue.build());
onChanged();
} else {
errorDetailsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public Builder addErrorDetails(
int index, com.google.cloud.compute.v1.ErrorDetails.Builder builderForValue) {
if (errorDetailsBuilder_ == null) {
ensureErrorDetailsIsMutable();
errorDetails_.add(index, builderForValue.build());
onChanged();
} else {
errorDetailsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public Builder addAllErrorDetails(
java.lang.Iterable extends com.google.cloud.compute.v1.ErrorDetails> values) {
if (errorDetailsBuilder_ == null) {
ensureErrorDetailsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorDetails_);
onChanged();
} else {
errorDetailsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public Builder clearErrorDetails() {
if (errorDetailsBuilder_ == null) {
errorDetails_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
errorDetailsBuilder_.clear();
}
return this;
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public Builder removeErrorDetails(int index) {
if (errorDetailsBuilder_ == null) {
ensureErrorDetailsIsMutable();
errorDetails_.remove(index);
onChanged();
} else {
errorDetailsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public com.google.cloud.compute.v1.ErrorDetails.Builder getErrorDetailsBuilder(int index) {
return getErrorDetailsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public com.google.cloud.compute.v1.ErrorDetailsOrBuilder getErrorDetailsOrBuilder(int index) {
if (errorDetailsBuilder_ == null) {
return errorDetails_.get(index);
} else {
return errorDetailsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public java.util.List extends com.google.cloud.compute.v1.ErrorDetailsOrBuilder>
getErrorDetailsOrBuilderList() {
if (errorDetailsBuilder_ != null) {
return errorDetailsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(errorDetails_);
}
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public com.google.cloud.compute.v1.ErrorDetails.Builder addErrorDetailsBuilder() {
return getErrorDetailsFieldBuilder()
.addBuilder(com.google.cloud.compute.v1.ErrorDetails.getDefaultInstance());
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public com.google.cloud.compute.v1.ErrorDetails.Builder addErrorDetailsBuilder(int index) {
return getErrorDetailsFieldBuilder()
.addBuilder(index, com.google.cloud.compute.v1.ErrorDetails.getDefaultInstance());
}
/**
*
*
*
* [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
*
*
* repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;
*/
public java.util.List
getErrorDetailsBuilderList() {
return getErrorDetailsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.ErrorDetails,
com.google.cloud.compute.v1.ErrorDetails.Builder,
com.google.cloud.compute.v1.ErrorDetailsOrBuilder>
getErrorDetailsFieldBuilder() {
if (errorDetailsBuilder_ == null) {
errorDetailsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.ErrorDetails,
com.google.cloud.compute.v1.ErrorDetails.Builder,
com.google.cloud.compute.v1.ErrorDetailsOrBuilder>(
errorDetails_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
errorDetails_ = null;
}
return errorDetailsBuilder_;
}
private java.lang.Object location_ = "";
/**
*
*
*
* [Output Only] Indicates the field in the request that caused the error. This property is optional.
*
*
* optional string location = 290430901;
*
* @return Whether the location field is set.
*/
public boolean hasLocation() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* [Output Only] Indicates the field in the request that caused the error. This property is optional.
*
*
* optional string location = 290430901;
*
* @return The location.
*/
public java.lang.String getLocation() {
java.lang.Object ref = location_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
location_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] Indicates the field in the request that caused the error. This property is optional.
*
*
* optional string location = 290430901;
*
* @return The bytes for location.
*/
public com.google.protobuf.ByteString getLocationBytes() {
java.lang.Object ref = location_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
location_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] Indicates the field in the request that caused the error. This property is optional.
*
*
* optional string location = 290430901;
*
* @param value The location to set.
* @return This builder for chaining.
*/
public Builder setLocation(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
location_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Indicates the field in the request that caused the error. This property is optional.
*
*
* optional string location = 290430901;
*
* @return This builder for chaining.
*/
public Builder clearLocation() {
location_ = getDefaultInstance().getLocation();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Indicates the field in the request that caused the error. This property is optional.
*
*
* optional string location = 290430901;
*
* @param value The bytes for location to set.
* @return This builder for chaining.
*/
public Builder setLocationBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
location_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object message_ = "";
/**
*
*
*
* [Output Only] An optional, human-readable error message.
*
*
* optional string message = 418054151;
*
* @return Whether the message field is set.
*/
public boolean hasMessage() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* [Output Only] An optional, human-readable error message.
*
*
* optional string message = 418054151;
*
* @return The message.
*/
public java.lang.String getMessage() {
java.lang.Object ref = message_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
message_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] An optional, human-readable error message.
*
*
* optional string message = 418054151;
*
* @return The bytes for message.
*/
public com.google.protobuf.ByteString getMessageBytes() {
java.lang.Object ref = message_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
message_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] An optional, human-readable error message.
*
*
* optional string message = 418054151;
*
* @param value The message to set.
* @return This builder for chaining.
*/
public Builder setMessage(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] An optional, human-readable error message.
*
*
* optional string message = 418054151;
*
* @return This builder for chaining.
*/
public Builder clearMessage() {
message_ = getDefaultInstance().getMessage();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] An optional, human-readable error message.
*
*
* optional string message = 418054151;
*
* @param value The bytes for message to set.
* @return This builder for chaining.
*/
public Builder setMessageBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
message_ = 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:google.cloud.compute.v1.Errors)
}
// @@protoc_insertion_point(class_scope:google.cloud.compute.v1.Errors)
private static final com.google.cloud.compute.v1.Errors DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Errors();
}
public static com.google.cloud.compute.v1.Errors getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Errors 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.cloud.compute.v1.Errors getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy