com.google.cloud.compute.v1.Region 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
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/cloud/compute/v1/compute.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.compute.v1;
/**
*
*
*
* Represents a Region resource. A region is a geographical area where a resource is located. For more information, read Regions and Zones.
*
*
* Protobuf type {@code google.cloud.compute.v1.Region}
*/
public final class Region extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.compute.v1.Region)
RegionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Region.newBuilder() to construct.
private Region(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Region() {
creationTimestamp_ = "";
description_ = "";
kind_ = "";
name_ = "";
quotas_ = java.util.Collections.emptyList();
selfLink_ = "";
status_ = "";
zones_ = com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Region();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_Region_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_Region_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.Region.class,
com.google.cloud.compute.v1.Region.Builder.class);
}
/**
*
*
*
* [Output Only] Status of the region, either UP or DOWN.
*
*
* Protobuf enum {@code google.cloud.compute.v1.Region.Status}
*/
public enum Status implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_STATUS = 0;
*/
UNDEFINED_STATUS(0),
/** DOWN = 2104482;
*/
DOWN(2104482),
/** UP = 2715;
*/
UP(2715),
UNRECOGNIZED(-1),
;
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_STATUS = 0;
*/
public static final int UNDEFINED_STATUS_VALUE = 0;
/** DOWN = 2104482;
*/
public static final int DOWN_VALUE = 2104482;
/** UP = 2715;
*/
public static final int UP_VALUE = 2715;
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 Status 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 Status forNumber(int value) {
switch (value) {
case 0:
return UNDEFINED_STATUS;
case 2104482:
return DOWN;
case 2715:
return UP;
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 Status findValueByNumber(int number) {
return Status.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.cloud.compute.v1.Region.getDescriptor().getEnumTypes().get(0);
}
private static final Status[] VALUES = values();
public static Status 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 Status(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.Region.Status)
}
private int bitField0_;
public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366;
@SuppressWarnings("serial")
private volatile java.lang.Object creationTimestamp_ = "";
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return Whether the creationTimestamp field is set.
*/
@java.lang.Override
public boolean hasCreationTimestamp() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The creationTimestamp.
*/
@java.lang.Override
public java.lang.String getCreationTimestamp() {
java.lang.Object ref = creationTimestamp_;
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();
creationTimestamp_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The bytes for creationTimestamp.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCreationTimestampBytes() {
java.lang.Object ref = creationTimestamp_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
creationTimestamp_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEPRECATED_FIELD_NUMBER = 515138995;
private com.google.cloud.compute.v1.DeprecationStatus deprecated_;
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*
* @return Whether the deprecated field is set.
*/
@java.lang.Override
public boolean hasDeprecated() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*
* @return The deprecated.
*/
@java.lang.Override
public com.google.cloud.compute.v1.DeprecationStatus getDeprecated() {
return deprecated_ == null
? com.google.cloud.compute.v1.DeprecationStatus.getDefaultInstance()
: deprecated_;
}
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*/
@java.lang.Override
public com.google.cloud.compute.v1.DeprecationStatusOrBuilder getDeprecatedOrBuilder() {
return deprecated_ == null
? com.google.cloud.compute.v1.DeprecationStatus.getDefaultInstance()
: deprecated_;
}
public static final int DESCRIPTION_FIELD_NUMBER = 422937596;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* [Output Only] Textual description of the resource.
*
*
* optional string description = 422937596;
*
* @return Whether the description field is set.
*/
@java.lang.Override
public boolean hasDescription() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* [Output Only] Textual description of the resource.
*
*
* optional string description = 422937596;
*
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] Textual description of the resource.
*
*
* optional string description = 422937596;
*
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ID_FIELD_NUMBER = 3355;
private long id_ = 0L;
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
public static final int KIND_FIELD_NUMBER = 3292052;
@SuppressWarnings("serial")
private volatile java.lang.Object kind_ = "";
/**
*
*
*
* [Output Only] Type of the resource. Always compute#region for regions.
*
*
* optional string kind = 3292052;
*
* @return Whether the kind field is set.
*/
@java.lang.Override
public boolean hasKind() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* [Output Only] Type of the resource. Always compute#region for regions.
*
*
* optional string kind = 3292052;
*
* @return The kind.
*/
@java.lang.Override
public java.lang.String getKind() {
java.lang.Object ref = kind_;
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();
kind_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] Type of the resource. Always compute#region for regions.
*
*
* optional string kind = 3292052;
*
* @return The bytes for kind.
*/
@java.lang.Override
public com.google.protobuf.ByteString getKindBytes() {
java.lang.Object ref = kind_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 3373707;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* [Output Only] Name of the resource.
*
*
* optional string name = 3373707;
*
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* [Output Only] Name of the resource.
*
*
* optional string name = 3373707;
*
* @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;
}
}
/**
*
*
*
* [Output Only] Name of the resource.
*
*
* optional string name = 3373707;
*
* @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;
}
}
public static final int QUOTA_STATUS_WARNING_FIELD_NUMBER = 302941430;
private com.google.cloud.compute.v1.QuotaStatusWarning quotaStatusWarning_;
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*
* @return Whether the quotaStatusWarning field is set.
*/
@java.lang.Override
public boolean hasQuotaStatusWarning() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*
* @return The quotaStatusWarning.
*/
@java.lang.Override
public com.google.cloud.compute.v1.QuotaStatusWarning getQuotaStatusWarning() {
return quotaStatusWarning_ == null
? com.google.cloud.compute.v1.QuotaStatusWarning.getDefaultInstance()
: quotaStatusWarning_;
}
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*/
@java.lang.Override
public com.google.cloud.compute.v1.QuotaStatusWarningOrBuilder getQuotaStatusWarningOrBuilder() {
return quotaStatusWarning_ == null
? com.google.cloud.compute.v1.QuotaStatusWarning.getDefaultInstance()
: quotaStatusWarning_;
}
public static final int QUOTAS_FIELD_NUMBER = 125341947;
@SuppressWarnings("serial")
private java.util.List quotas_;
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
@java.lang.Override
public java.util.List getQuotasList() {
return quotas_;
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
@java.lang.Override
public java.util.List extends com.google.cloud.compute.v1.QuotaOrBuilder>
getQuotasOrBuilderList() {
return quotas_;
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
@java.lang.Override
public int getQuotasCount() {
return quotas_.size();
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
@java.lang.Override
public com.google.cloud.compute.v1.Quota getQuotas(int index) {
return quotas_.get(index);
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
@java.lang.Override
public com.google.cloud.compute.v1.QuotaOrBuilder getQuotasOrBuilder(int index) {
return quotas_.get(index);
}
public static final int SELF_LINK_FIELD_NUMBER = 456214797;
@SuppressWarnings("serial")
private volatile java.lang.Object selfLink_ = "";
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return Whether the selfLink field is set.
*/
@java.lang.Override
public boolean hasSelfLink() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return The selfLink.
*/
@java.lang.Override
public java.lang.String getSelfLink() {
java.lang.Object ref = selfLink_;
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();
selfLink_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return The bytes for selfLink.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSelfLinkBytes() {
java.lang.Object ref = selfLink_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selfLink_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_FIELD_NUMBER = 181260274;
@SuppressWarnings("serial")
private volatile java.lang.Object status_ = "";
/**
*
*
*
* [Output Only] Status of the region, either UP or DOWN.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* [Output Only] Status of the region, either UP or DOWN.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return The status.
*/
@java.lang.Override
public java.lang.String getStatus() {
java.lang.Object ref = status_;
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();
status_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] Status of the region, either UP or DOWN.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return The bytes for status.
*/
@java.lang.Override
public com.google.protobuf.ByteString getStatusBytes() {
java.lang.Object ref = status_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
status_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SUPPORTS_PZS_FIELD_NUMBER = 83983214;
private boolean supportsPzs_ = false;
/**
*
*
*
* [Output Only] Reserved for future use.
*
*
* optional bool supports_pzs = 83983214;
*
* @return Whether the supportsPzs field is set.
*/
@java.lang.Override
public boolean hasSupportsPzs() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* [Output Only] Reserved for future use.
*
*
* optional bool supports_pzs = 83983214;
*
* @return The supportsPzs.
*/
@java.lang.Override
public boolean getSupportsPzs() {
return supportsPzs_;
}
public static final int ZONES_FIELD_NUMBER = 116085319;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList zones_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @return A list containing the zones.
*/
public com.google.protobuf.ProtocolStringList getZonesList() {
return zones_;
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @return The count of zones.
*/
public int getZonesCount() {
return zones_.size();
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @param index The index of the element to return.
* @return The zones at the given index.
*/
public java.lang.String getZones(int index) {
return zones_.get(index);
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @param index The index of the value to return.
* @return The bytes of the zones at the given index.
*/
public com.google.protobuf.ByteString getZonesBytes(int index) {
return zones_.getByteString(index);
}
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_ & 0x00000008) != 0)) {
output.writeUInt64(3355, id_);
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_);
}
if (((bitField0_ & 0x00000020) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_);
}
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_);
}
if (((bitField0_ & 0x00000200) != 0)) {
output.writeBool(83983214, supportsPzs_);
}
for (int i = 0; i < zones_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 116085319, zones_.getRaw(i));
}
for (int i = 0; i < quotas_.size(); i++) {
output.writeMessage(125341947, quotas_.get(i));
}
if (((bitField0_ & 0x00000100) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 181260274, status_);
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeMessage(302941430, getQuotaStatusWarning());
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_);
}
if (((bitField0_ & 0x00000080) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(515138995, getDeprecated());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size +=
com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_);
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(83983214, supportsPzs_);
}
{
int dataSize = 0;
for (int i = 0; i < zones_.size(); i++) {
dataSize += computeStringSizeNoTag(zones_.getRaw(i));
}
size += dataSize;
size += 5 * getZonesList().size();
}
for (int i = 0; i < quotas_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(125341947, quotas_.get(i));
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(181260274, status_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
302941430, getQuotaStatusWarning());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(515138995, getDeprecated());
}
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.Region)) {
return super.equals(obj);
}
com.google.cloud.compute.v1.Region other = (com.google.cloud.compute.v1.Region) obj;
if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false;
if (hasCreationTimestamp()) {
if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false;
}
if (hasDeprecated() != other.hasDeprecated()) return false;
if (hasDeprecated()) {
if (!getDeprecated().equals(other.getDeprecated())) return false;
}
if (hasDescription() != other.hasDescription()) return false;
if (hasDescription()) {
if (!getDescription().equals(other.getDescription())) return false;
}
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (getId() != other.getId()) return false;
}
if (hasKind() != other.hasKind()) return false;
if (hasKind()) {
if (!getKind().equals(other.getKind())) return false;
}
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName().equals(other.getName())) return false;
}
if (hasQuotaStatusWarning() != other.hasQuotaStatusWarning()) return false;
if (hasQuotaStatusWarning()) {
if (!getQuotaStatusWarning().equals(other.getQuotaStatusWarning())) return false;
}
if (!getQuotasList().equals(other.getQuotasList())) return false;
if (hasSelfLink() != other.hasSelfLink()) return false;
if (hasSelfLink()) {
if (!getSelfLink().equals(other.getSelfLink())) return false;
}
if (hasStatus() != other.hasStatus()) return false;
if (hasStatus()) {
if (!getStatus().equals(other.getStatus())) return false;
}
if (hasSupportsPzs() != other.hasSupportsPzs()) return false;
if (hasSupportsPzs()) {
if (getSupportsPzs() != other.getSupportsPzs()) return false;
}
if (!getZonesList().equals(other.getZonesList())) 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 (hasCreationTimestamp()) {
hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getCreationTimestamp().hashCode();
}
if (hasDeprecated()) {
hash = (37 * hash) + DEPRECATED_FIELD_NUMBER;
hash = (53 * hash) + getDeprecated().hashCode();
}
if (hasDescription()) {
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
}
if (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId());
}
if (hasKind()) {
hash = (37 * hash) + KIND_FIELD_NUMBER;
hash = (53 * hash) + getKind().hashCode();
}
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasQuotaStatusWarning()) {
hash = (37 * hash) + QUOTA_STATUS_WARNING_FIELD_NUMBER;
hash = (53 * hash) + getQuotaStatusWarning().hashCode();
}
if (getQuotasCount() > 0) {
hash = (37 * hash) + QUOTAS_FIELD_NUMBER;
hash = (53 * hash) + getQuotasList().hashCode();
}
if (hasSelfLink()) {
hash = (37 * hash) + SELF_LINK_FIELD_NUMBER;
hash = (53 * hash) + getSelfLink().hashCode();
}
if (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
if (hasSupportsPzs()) {
hash = (37 * hash) + SUPPORTS_PZS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSupportsPzs());
}
if (getZonesCount() > 0) {
hash = (37 * hash) + ZONES_FIELD_NUMBER;
hash = (53 * hash) + getZonesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.compute.v1.Region parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.Region 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.Region parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.Region 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.Region parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.Region 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.Region parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.Region 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.Region parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.Region 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.Region 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.Region 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.Region 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;
}
/**
*
*
*
* Represents a Region resource. A region is a geographical area where a resource is located. For more information, read Regions and Zones.
*
*
* Protobuf type {@code google.cloud.compute.v1.Region}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.Region)
com.google.cloud.compute.v1.RegionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_Region_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_Region_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.Region.class,
com.google.cloud.compute.v1.Region.Builder.class);
}
// Construct using com.google.cloud.compute.v1.Region.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getDeprecatedFieldBuilder();
getQuotaStatusWarningFieldBuilder();
getQuotasFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
creationTimestamp_ = "";
deprecated_ = null;
if (deprecatedBuilder_ != null) {
deprecatedBuilder_.dispose();
deprecatedBuilder_ = null;
}
description_ = "";
id_ = 0L;
kind_ = "";
name_ = "";
quotaStatusWarning_ = null;
if (quotaStatusWarningBuilder_ != null) {
quotaStatusWarningBuilder_.dispose();
quotaStatusWarningBuilder_ = null;
}
if (quotasBuilder_ == null) {
quotas_ = java.util.Collections.emptyList();
} else {
quotas_ = null;
quotasBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000080);
selfLink_ = "";
status_ = "";
supportsPzs_ = false;
zones_ = com.google.protobuf.LazyStringArrayList.emptyList();
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_Region_descriptor;
}
@java.lang.Override
public com.google.cloud.compute.v1.Region getDefaultInstanceForType() {
return com.google.cloud.compute.v1.Region.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.compute.v1.Region build() {
com.google.cloud.compute.v1.Region result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.compute.v1.Region buildPartial() {
com.google.cloud.compute.v1.Region result = new com.google.cloud.compute.v1.Region(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.compute.v1.Region result) {
if (quotasBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)) {
quotas_ = java.util.Collections.unmodifiableList(quotas_);
bitField0_ = (bitField0_ & ~0x00000080);
}
result.quotas_ = quotas_;
} else {
result.quotas_ = quotasBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.compute.v1.Region result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.creationTimestamp_ = creationTimestamp_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.deprecated_ = deprecatedBuilder_ == null ? deprecated_ : deprecatedBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.description_ = description_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.kind_ = kind_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.quotaStatusWarning_ =
quotaStatusWarningBuilder_ == null
? quotaStatusWarning_
: quotaStatusWarningBuilder_.build();
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.selfLink_ = selfLink_;
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.status_ = status_;
to_bitField0_ |= 0x00000100;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.supportsPzs_ = supportsPzs_;
to_bitField0_ |= 0x00000200;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
zones_.makeImmutable();
result.zones_ = zones_;
}
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.Region) {
return mergeFrom((com.google.cloud.compute.v1.Region) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.compute.v1.Region other) {
if (other == com.google.cloud.compute.v1.Region.getDefaultInstance()) return this;
if (other.hasCreationTimestamp()) {
creationTimestamp_ = other.creationTimestamp_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasDeprecated()) {
mergeDeprecated(other.getDeprecated());
}
if (other.hasDescription()) {
description_ = other.description_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasId()) {
setId(other.getId());
}
if (other.hasKind()) {
kind_ = other.kind_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000020;
onChanged();
}
if (other.hasQuotaStatusWarning()) {
mergeQuotaStatusWarning(other.getQuotaStatusWarning());
}
if (quotasBuilder_ == null) {
if (!other.quotas_.isEmpty()) {
if (quotas_.isEmpty()) {
quotas_ = other.quotas_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureQuotasIsMutable();
quotas_.addAll(other.quotas_);
}
onChanged();
}
} else {
if (!other.quotas_.isEmpty()) {
if (quotasBuilder_.isEmpty()) {
quotasBuilder_.dispose();
quotasBuilder_ = null;
quotas_ = other.quotas_;
bitField0_ = (bitField0_ & ~0x00000080);
quotasBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getQuotasFieldBuilder()
: null;
} else {
quotasBuilder_.addAllMessages(other.quotas_);
}
}
}
if (other.hasSelfLink()) {
selfLink_ = other.selfLink_;
bitField0_ |= 0x00000100;
onChanged();
}
if (other.hasStatus()) {
status_ = other.status_;
bitField0_ |= 0x00000200;
onChanged();
}
if (other.hasSupportsPzs()) {
setSupportsPzs(other.getSupportsPzs());
}
if (!other.zones_.isEmpty()) {
if (zones_.isEmpty()) {
zones_ = other.zones_;
bitField0_ |= 0x00000800;
} else {
ensureZonesIsMutable();
zones_.addAll(other.zones_);
}
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 26840:
{
id_ = input.readUInt64();
bitField0_ |= 0x00000008;
break;
} // case 26840
case 26336418:
{
kind_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 26336418
case 26989658:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 26989658
case 244202930:
{
creationTimestamp_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 244202930
case 671865712:
{
supportsPzs_ = input.readBool();
bitField0_ |= 0x00000400;
break;
} // case 671865712
case 928682554:
{
java.lang.String s = input.readStringRequireUtf8();
ensureZonesIsMutable();
zones_.add(s);
break;
} // case 928682554
case 1002735578:
{
com.google.cloud.compute.v1.Quota m =
input.readMessage(
com.google.cloud.compute.v1.Quota.parser(), extensionRegistry);
if (quotasBuilder_ == null) {
ensureQuotasIsMutable();
quotas_.add(m);
} else {
quotasBuilder_.addMessage(m);
}
break;
} // case 1002735578
case 1450082194:
{
status_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000200;
break;
} // case 1450082194
case -1871435854:
{
input.readMessage(
getQuotaStatusWarningFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case -1871435854
case -911466526:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case -911466526
case -645248918:
{
selfLink_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case -645248918
case -173855334:
{
input.readMessage(getDeprecatedFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case -173855334
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 creationTimestamp_ = "";
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return Whether the creationTimestamp field is set.
*/
public boolean hasCreationTimestamp() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The creationTimestamp.
*/
public java.lang.String getCreationTimestamp() {
java.lang.Object ref = creationTimestamp_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
creationTimestamp_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The bytes for creationTimestamp.
*/
public com.google.protobuf.ByteString getCreationTimestampBytes() {
java.lang.Object ref = creationTimestamp_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
creationTimestamp_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @param value The creationTimestamp to set.
* @return This builder for chaining.
*/
public Builder setCreationTimestamp(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
creationTimestamp_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return This builder for chaining.
*/
public Builder clearCreationTimestamp() {
creationTimestamp_ = getDefaultInstance().getCreationTimestamp();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @param value The bytes for creationTimestamp to set.
* @return This builder for chaining.
*/
public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
creationTimestamp_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.cloud.compute.v1.DeprecationStatus deprecated_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.compute.v1.DeprecationStatus,
com.google.cloud.compute.v1.DeprecationStatus.Builder,
com.google.cloud.compute.v1.DeprecationStatusOrBuilder>
deprecatedBuilder_;
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*
* @return Whether the deprecated field is set.
*/
public boolean hasDeprecated() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*
* @return The deprecated.
*/
public com.google.cloud.compute.v1.DeprecationStatus getDeprecated() {
if (deprecatedBuilder_ == null) {
return deprecated_ == null
? com.google.cloud.compute.v1.DeprecationStatus.getDefaultInstance()
: deprecated_;
} else {
return deprecatedBuilder_.getMessage();
}
}
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*/
public Builder setDeprecated(com.google.cloud.compute.v1.DeprecationStatus value) {
if (deprecatedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
deprecated_ = value;
} else {
deprecatedBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*/
public Builder setDeprecated(
com.google.cloud.compute.v1.DeprecationStatus.Builder builderForValue) {
if (deprecatedBuilder_ == null) {
deprecated_ = builderForValue.build();
} else {
deprecatedBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*/
public Builder mergeDeprecated(com.google.cloud.compute.v1.DeprecationStatus value) {
if (deprecatedBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& deprecated_ != null
&& deprecated_ != com.google.cloud.compute.v1.DeprecationStatus.getDefaultInstance()) {
getDeprecatedBuilder().mergeFrom(value);
} else {
deprecated_ = value;
}
} else {
deprecatedBuilder_.mergeFrom(value);
}
if (deprecated_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*/
public Builder clearDeprecated() {
bitField0_ = (bitField0_ & ~0x00000002);
deprecated_ = null;
if (deprecatedBuilder_ != null) {
deprecatedBuilder_.dispose();
deprecatedBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*/
public com.google.cloud.compute.v1.DeprecationStatus.Builder getDeprecatedBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getDeprecatedFieldBuilder().getBuilder();
}
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*/
public com.google.cloud.compute.v1.DeprecationStatusOrBuilder getDeprecatedOrBuilder() {
if (deprecatedBuilder_ != null) {
return deprecatedBuilder_.getMessageOrBuilder();
} else {
return deprecated_ == null
? com.google.cloud.compute.v1.DeprecationStatus.getDefaultInstance()
: deprecated_;
}
}
/**
*
*
*
* [Output Only] The deprecation status associated with this region.
*
*
* optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.compute.v1.DeprecationStatus,
com.google.cloud.compute.v1.DeprecationStatus.Builder,
com.google.cloud.compute.v1.DeprecationStatusOrBuilder>
getDeprecatedFieldBuilder() {
if (deprecatedBuilder_ == null) {
deprecatedBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.compute.v1.DeprecationStatus,
com.google.cloud.compute.v1.DeprecationStatus.Builder,
com.google.cloud.compute.v1.DeprecationStatusOrBuilder>(
getDeprecated(), getParentForChildren(), isClean());
deprecated_ = null;
}
return deprecatedBuilder_;
}
private java.lang.Object description_ = "";
/**
*
*
*
* [Output Only] Textual description of the resource.
*
*
* optional string description = 422937596;
*
* @return Whether the description field is set.
*/
public boolean hasDescription() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* [Output Only] Textual description of the resource.
*
*
* optional string description = 422937596;
*
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] Textual description of the resource.
*
*
* optional string description = 422937596;
*
* @return The bytes for description.
*/
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] Textual description of the resource.
*
*
* optional string description = 422937596;
*
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Textual description of the resource.
*
*
* optional string description = 422937596;
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Textual description of the resource.
*
*
* optional string description = 422937596;
*
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private long id_;
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(long value) {
id_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @return This builder for chaining.
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000008);
id_ = 0L;
onChanged();
return this;
}
private java.lang.Object kind_ = "";
/**
*
*
*
* [Output Only] Type of the resource. Always compute#region for regions.
*
*
* optional string kind = 3292052;
*
* @return Whether the kind field is set.
*/
public boolean hasKind() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* [Output Only] Type of the resource. Always compute#region for regions.
*
*
* optional string kind = 3292052;
*
* @return The kind.
*/
public java.lang.String getKind() {
java.lang.Object ref = kind_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
kind_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] Type of the resource. Always compute#region for regions.
*
*
* optional string kind = 3292052;
*
* @return The bytes for kind.
*/
public com.google.protobuf.ByteString getKindBytes() {
java.lang.Object ref = kind_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] Type of the resource. Always compute#region for regions.
*
*
* optional string kind = 3292052;
*
* @param value The kind to set.
* @return This builder for chaining.
*/
public Builder setKind(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Type of the resource. Always compute#region for regions.
*
*
* optional string kind = 3292052;
*
* @return This builder for chaining.
*/
public Builder clearKind() {
kind_ = getDefaultInstance().getKind();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Type of the resource. Always compute#region for regions.
*
*
* optional string kind = 3292052;
*
* @param value The bytes for kind to set.
* @return This builder for chaining.
*/
public Builder setKindBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
kind_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
*
*
* [Output Only] Name of the resource.
*
*
* optional string name = 3373707;
*
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* [Output Only] Name of the resource.
*
*
* optional string name = 3373707;
*
* @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;
}
}
/**
*
*
*
* [Output Only] Name of the resource.
*
*
* optional string name = 3373707;
*
* @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;
}
}
/**
*
*
*
* [Output Only] Name of the resource.
*
*
* optional string name = 3373707;
*
* @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_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Name of the resource.
*
*
* optional string name = 3373707;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Name of the resource.
*
*
* optional string name = 3373707;
*
* @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_ |= 0x00000020;
onChanged();
return this;
}
private com.google.cloud.compute.v1.QuotaStatusWarning quotaStatusWarning_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.compute.v1.QuotaStatusWarning,
com.google.cloud.compute.v1.QuotaStatusWarning.Builder,
com.google.cloud.compute.v1.QuotaStatusWarningOrBuilder>
quotaStatusWarningBuilder_;
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*
* @return Whether the quotaStatusWarning field is set.
*/
public boolean hasQuotaStatusWarning() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*
* @return The quotaStatusWarning.
*/
public com.google.cloud.compute.v1.QuotaStatusWarning getQuotaStatusWarning() {
if (quotaStatusWarningBuilder_ == null) {
return quotaStatusWarning_ == null
? com.google.cloud.compute.v1.QuotaStatusWarning.getDefaultInstance()
: quotaStatusWarning_;
} else {
return quotaStatusWarningBuilder_.getMessage();
}
}
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*/
public Builder setQuotaStatusWarning(com.google.cloud.compute.v1.QuotaStatusWarning value) {
if (quotaStatusWarningBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
quotaStatusWarning_ = value;
} else {
quotaStatusWarningBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*/
public Builder setQuotaStatusWarning(
com.google.cloud.compute.v1.QuotaStatusWarning.Builder builderForValue) {
if (quotaStatusWarningBuilder_ == null) {
quotaStatusWarning_ = builderForValue.build();
} else {
quotaStatusWarningBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*/
public Builder mergeQuotaStatusWarning(com.google.cloud.compute.v1.QuotaStatusWarning value) {
if (quotaStatusWarningBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)
&& quotaStatusWarning_ != null
&& quotaStatusWarning_
!= com.google.cloud.compute.v1.QuotaStatusWarning.getDefaultInstance()) {
getQuotaStatusWarningBuilder().mergeFrom(value);
} else {
quotaStatusWarning_ = value;
}
} else {
quotaStatusWarningBuilder_.mergeFrom(value);
}
if (quotaStatusWarning_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*/
public Builder clearQuotaStatusWarning() {
bitField0_ = (bitField0_ & ~0x00000040);
quotaStatusWarning_ = null;
if (quotaStatusWarningBuilder_ != null) {
quotaStatusWarningBuilder_.dispose();
quotaStatusWarningBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*/
public com.google.cloud.compute.v1.QuotaStatusWarning.Builder getQuotaStatusWarningBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getQuotaStatusWarningFieldBuilder().getBuilder();
}
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*/
public com.google.cloud.compute.v1.QuotaStatusWarningOrBuilder
getQuotaStatusWarningOrBuilder() {
if (quotaStatusWarningBuilder_ != null) {
return quotaStatusWarningBuilder_.getMessageOrBuilder();
} else {
return quotaStatusWarning_ == null
? com.google.cloud.compute.v1.QuotaStatusWarning.getDefaultInstance()
: quotaStatusWarning_;
}
}
/**
*
*
*
* [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails.
*
*
* optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.compute.v1.QuotaStatusWarning,
com.google.cloud.compute.v1.QuotaStatusWarning.Builder,
com.google.cloud.compute.v1.QuotaStatusWarningOrBuilder>
getQuotaStatusWarningFieldBuilder() {
if (quotaStatusWarningBuilder_ == null) {
quotaStatusWarningBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.compute.v1.QuotaStatusWarning,
com.google.cloud.compute.v1.QuotaStatusWarning.Builder,
com.google.cloud.compute.v1.QuotaStatusWarningOrBuilder>(
getQuotaStatusWarning(), getParentForChildren(), isClean());
quotaStatusWarning_ = null;
}
return quotaStatusWarningBuilder_;
}
private java.util.List quotas_ =
java.util.Collections.emptyList();
private void ensureQuotasIsMutable() {
if (!((bitField0_ & 0x00000080) != 0)) {
quotas_ = new java.util.ArrayList(quotas_);
bitField0_ |= 0x00000080;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.Quota,
com.google.cloud.compute.v1.Quota.Builder,
com.google.cloud.compute.v1.QuotaOrBuilder>
quotasBuilder_;
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public java.util.List getQuotasList() {
if (quotasBuilder_ == null) {
return java.util.Collections.unmodifiableList(quotas_);
} else {
return quotasBuilder_.getMessageList();
}
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public int getQuotasCount() {
if (quotasBuilder_ == null) {
return quotas_.size();
} else {
return quotasBuilder_.getCount();
}
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public com.google.cloud.compute.v1.Quota getQuotas(int index) {
if (quotasBuilder_ == null) {
return quotas_.get(index);
} else {
return quotasBuilder_.getMessage(index);
}
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public Builder setQuotas(int index, com.google.cloud.compute.v1.Quota value) {
if (quotasBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureQuotasIsMutable();
quotas_.set(index, value);
onChanged();
} else {
quotasBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public Builder setQuotas(int index, com.google.cloud.compute.v1.Quota.Builder builderForValue) {
if (quotasBuilder_ == null) {
ensureQuotasIsMutable();
quotas_.set(index, builderForValue.build());
onChanged();
} else {
quotasBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public Builder addQuotas(com.google.cloud.compute.v1.Quota value) {
if (quotasBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureQuotasIsMutable();
quotas_.add(value);
onChanged();
} else {
quotasBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public Builder addQuotas(int index, com.google.cloud.compute.v1.Quota value) {
if (quotasBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureQuotasIsMutable();
quotas_.add(index, value);
onChanged();
} else {
quotasBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public Builder addQuotas(com.google.cloud.compute.v1.Quota.Builder builderForValue) {
if (quotasBuilder_ == null) {
ensureQuotasIsMutable();
quotas_.add(builderForValue.build());
onChanged();
} else {
quotasBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public Builder addQuotas(int index, com.google.cloud.compute.v1.Quota.Builder builderForValue) {
if (quotasBuilder_ == null) {
ensureQuotasIsMutable();
quotas_.add(index, builderForValue.build());
onChanged();
} else {
quotasBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public Builder addAllQuotas(
java.lang.Iterable extends com.google.cloud.compute.v1.Quota> values) {
if (quotasBuilder_ == null) {
ensureQuotasIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, quotas_);
onChanged();
} else {
quotasBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public Builder clearQuotas() {
if (quotasBuilder_ == null) {
quotas_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
} else {
quotasBuilder_.clear();
}
return this;
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public Builder removeQuotas(int index) {
if (quotasBuilder_ == null) {
ensureQuotasIsMutable();
quotas_.remove(index);
onChanged();
} else {
quotasBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public com.google.cloud.compute.v1.Quota.Builder getQuotasBuilder(int index) {
return getQuotasFieldBuilder().getBuilder(index);
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public com.google.cloud.compute.v1.QuotaOrBuilder getQuotasOrBuilder(int index) {
if (quotasBuilder_ == null) {
return quotas_.get(index);
} else {
return quotasBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public java.util.List extends com.google.cloud.compute.v1.QuotaOrBuilder>
getQuotasOrBuilderList() {
if (quotasBuilder_ != null) {
return quotasBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(quotas_);
}
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public com.google.cloud.compute.v1.Quota.Builder addQuotasBuilder() {
return getQuotasFieldBuilder()
.addBuilder(com.google.cloud.compute.v1.Quota.getDefaultInstance());
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public com.google.cloud.compute.v1.Quota.Builder addQuotasBuilder(int index) {
return getQuotasFieldBuilder()
.addBuilder(index, com.google.cloud.compute.v1.Quota.getDefaultInstance());
}
/**
*
*
*
* [Output Only] Quotas assigned to this region.
*
*
* repeated .google.cloud.compute.v1.Quota quotas = 125341947;
*/
public java.util.List getQuotasBuilderList() {
return getQuotasFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.Quota,
com.google.cloud.compute.v1.Quota.Builder,
com.google.cloud.compute.v1.QuotaOrBuilder>
getQuotasFieldBuilder() {
if (quotasBuilder_ == null) {
quotasBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.Quota,
com.google.cloud.compute.v1.Quota.Builder,
com.google.cloud.compute.v1.QuotaOrBuilder>(
quotas_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean());
quotas_ = null;
}
return quotasBuilder_;
}
private java.lang.Object selfLink_ = "";
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return Whether the selfLink field is set.
*/
public boolean hasSelfLink() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return The selfLink.
*/
public java.lang.String getSelfLink() {
java.lang.Object ref = selfLink_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
selfLink_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return The bytes for selfLink.
*/
public com.google.protobuf.ByteString getSelfLinkBytes() {
java.lang.Object ref = selfLink_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selfLink_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @param value The selfLink to set.
* @return This builder for chaining.
*/
public Builder setSelfLink(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
selfLink_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return This builder for chaining.
*/
public Builder clearSelfLink() {
selfLink_ = getDefaultInstance().getSelfLink();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @param value The bytes for selfLink to set.
* @return This builder for chaining.
*/
public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
selfLink_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
private java.lang.Object status_ = "";
/**
*
*
*
* [Output Only] Status of the region, either UP or DOWN.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return Whether the status field is set.
*/
public boolean hasStatus() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* [Output Only] Status of the region, either UP or DOWN.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return The status.
*/
public java.lang.String getStatus() {
java.lang.Object ref = status_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
status_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] Status of the region, either UP or DOWN.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return The bytes for status.
*/
public com.google.protobuf.ByteString getStatusBytes() {
java.lang.Object ref = status_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
status_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] Status of the region, either UP or DOWN.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Status of the region, either UP or DOWN.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = getDefaultInstance().getStatus();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Status of the region, either UP or DOWN.
* Check the Status enum for the list of possible values.
*
*
* optional string status = 181260274;
*
* @param value The bytes for status to set.
* @return This builder for chaining.
*/
public Builder setStatusBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
status_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
private boolean supportsPzs_;
/**
*
*
*
* [Output Only] Reserved for future use.
*
*
* optional bool supports_pzs = 83983214;
*
* @return Whether the supportsPzs field is set.
*/
@java.lang.Override
public boolean hasSupportsPzs() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
*
*
* [Output Only] Reserved for future use.
*
*
* optional bool supports_pzs = 83983214;
*
* @return The supportsPzs.
*/
@java.lang.Override
public boolean getSupportsPzs() {
return supportsPzs_;
}
/**
*
*
*
* [Output Only] Reserved for future use.
*
*
* optional bool supports_pzs = 83983214;
*
* @param value The supportsPzs to set.
* @return This builder for chaining.
*/
public Builder setSupportsPzs(boolean value) {
supportsPzs_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Reserved for future use.
*
*
* optional bool supports_pzs = 83983214;
*
* @return This builder for chaining.
*/
public Builder clearSupportsPzs() {
bitField0_ = (bitField0_ & ~0x00000400);
supportsPzs_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList zones_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureZonesIsMutable() {
if (!zones_.isModifiable()) {
zones_ = new com.google.protobuf.LazyStringArrayList(zones_);
}
bitField0_ |= 0x00000800;
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @return A list containing the zones.
*/
public com.google.protobuf.ProtocolStringList getZonesList() {
zones_.makeImmutable();
return zones_;
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @return The count of zones.
*/
public int getZonesCount() {
return zones_.size();
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @param index The index of the element to return.
* @return The zones at the given index.
*/
public java.lang.String getZones(int index) {
return zones_.get(index);
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @param index The index of the value to return.
* @return The bytes of the zones at the given index.
*/
public com.google.protobuf.ByteString getZonesBytes(int index) {
return zones_.getByteString(index);
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @param index The index to set the value at.
* @param value The zones to set.
* @return This builder for chaining.
*/
public Builder setZones(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureZonesIsMutable();
zones_.set(index, value);
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @param value The zones to add.
* @return This builder for chaining.
*/
public Builder addZones(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureZonesIsMutable();
zones_.add(value);
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @param values The zones to add.
* @return This builder for chaining.
*/
public Builder addAllZones(java.lang.Iterable values) {
ensureZonesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, zones_);
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @return This builder for chaining.
*/
public Builder clearZones() {
zones_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000800);
;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] A list of zones available in this region, in the form of resource URLs.
*
*
* repeated string zones = 116085319;
*
* @param value The bytes of the zones to add.
* @return This builder for chaining.
*/
public Builder addZonesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureZonesIsMutable();
zones_.add(value);
bitField0_ |= 0x00000800;
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.Region)
}
// @@protoc_insertion_point(class_scope:google.cloud.compute.v1.Region)
private static final com.google.cloud.compute.v1.Region DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Region();
}
public static com.google.cloud.compute.v1.Region getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Region 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.Region getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy