com.google.cloud.baremetalsolution.v2.ProvisioningQuota Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-bare-metal-solution-v2 Show documentation
Show all versions of proto-google-cloud-bare-metal-solution-v2 Show documentation
Proto library for google-cloud-bare-metal-solution
/*
* 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/baremetalsolution/v2/provisioning.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.baremetalsolution.v2;
/**
*
*
*
* A provisioning quota for a given project.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.ProvisioningQuota}
*/
public final class ProvisioningQuota extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.ProvisioningQuota)
ProvisioningQuotaOrBuilder {
private static final long serialVersionUID = 0L;
// Use ProvisioningQuota.newBuilder() to construct.
private ProvisioningQuota(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ProvisioningQuota() {
name_ = "";
assetType_ = 0;
gcpService_ = "";
location_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ProvisioningQuota();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_ProvisioningQuota_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_ProvisioningQuota_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.ProvisioningQuota.class,
com.google.cloud.baremetalsolution.v2.ProvisioningQuota.Builder.class);
}
/**
*
*
*
* The available asset types for intake.
*
*
* Protobuf enum {@code google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType}
*/
public enum AssetType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* The unspecified type.
*
*
* ASSET_TYPE_UNSPECIFIED = 0;
*/
ASSET_TYPE_UNSPECIFIED(0),
/**
*
*
*
* The server asset type.
*
*
* ASSET_TYPE_SERVER = 1;
*/
ASSET_TYPE_SERVER(1),
/**
*
*
*
* The storage asset type.
*
*
* ASSET_TYPE_STORAGE = 2;
*/
ASSET_TYPE_STORAGE(2),
/**
*
*
*
* The network asset type.
*
*
* ASSET_TYPE_NETWORK = 3;
*/
ASSET_TYPE_NETWORK(3),
UNRECOGNIZED(-1),
;
/**
*
*
*
* The unspecified type.
*
*
* ASSET_TYPE_UNSPECIFIED = 0;
*/
public static final int ASSET_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The server asset type.
*
*
* ASSET_TYPE_SERVER = 1;
*/
public static final int ASSET_TYPE_SERVER_VALUE = 1;
/**
*
*
*
* The storage asset type.
*
*
* ASSET_TYPE_STORAGE = 2;
*/
public static final int ASSET_TYPE_STORAGE_VALUE = 2;
/**
*
*
*
* The network asset type.
*
*
* ASSET_TYPE_NETWORK = 3;
*/
public static final int ASSET_TYPE_NETWORK_VALUE = 3;
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 AssetType 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 AssetType forNumber(int value) {
switch (value) {
case 0:
return ASSET_TYPE_UNSPECIFIED;
case 1:
return ASSET_TYPE_SERVER;
case 2:
return ASSET_TYPE_STORAGE;
case 3:
return ASSET_TYPE_NETWORK;
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 AssetType findValueByNumber(int number) {
return AssetType.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.baremetalsolution.v2.ProvisioningQuota.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final AssetType[] VALUES = values();
public static AssetType 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 AssetType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType)
}
private int quotaCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object quota_;
public enum QuotaCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
INSTANCE_QUOTA(6),
QUOTA_NOT_SET(0);
private final int value;
private QuotaCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static QuotaCase valueOf(int value) {
return forNumber(value);
}
public static QuotaCase forNumber(int value) {
switch (value) {
case 6:
return INSTANCE_QUOTA;
case 0:
return QUOTA_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public QuotaCase getQuotaCase() {
return QuotaCase.forNumber(quotaCase_);
}
private int availabilityCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object availability_;
public enum AvailabilityCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SERVER_COUNT(7),
NETWORK_BANDWIDTH(8),
STORAGE_GIB(9),
AVAILABILITY_NOT_SET(0);
private final int value;
private AvailabilityCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static AvailabilityCase valueOf(int value) {
return forNumber(value);
}
public static AvailabilityCase forNumber(int value) {
switch (value) {
case 7:
return SERVER_COUNT;
case 8:
return NETWORK_BANDWIDTH;
case 9:
return STORAGE_GIB;
case 0:
return AVAILABILITY_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public AvailabilityCase getAvailabilityCase() {
return AvailabilityCase.forNumber(availabilityCase_);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Output only. The name of the provisioning quota.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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. The name of the provisioning quota.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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 ASSET_TYPE_FIELD_NUMBER = 2;
private int assetType_ = 0;
/**
*
*
*
* The asset type of this provisioning quota.
*
*
* .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2;
*
* @return The enum numeric value on the wire for assetType.
*/
@java.lang.Override
public int getAssetTypeValue() {
return assetType_;
}
/**
*
*
*
* The asset type of this provisioning quota.
*
*
* .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2;
*
* @return The assetType.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType getAssetType() {
com.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType result =
com.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType.forNumber(assetType_);
return result == null
? com.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType.UNRECOGNIZED
: result;
}
public static final int GCP_SERVICE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object gcpService_ = "";
/**
*
*
*
* The gcp service of the provisioning quota.
*
*
* string gcp_service = 3;
*
* @return The gcpService.
*/
@java.lang.Override
public java.lang.String getGcpService() {
java.lang.Object ref = gcpService_;
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();
gcpService_ = s;
return s;
}
}
/**
*
*
*
* The gcp service of the provisioning quota.
*
*
* string gcp_service = 3;
*
* @return The bytes for gcpService.
*/
@java.lang.Override
public com.google.protobuf.ByteString getGcpServiceBytes() {
java.lang.Object ref = gcpService_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
gcpService_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LOCATION_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object location_ = "";
/**
*
*
*
* The specific location of the provisioining quota.
*
*
* string location = 4;
*
* @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;
}
}
/**
*
*
*
* The specific location of the provisioining quota.
*
*
* string location = 4;
*
* @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 AVAILABLE_COUNT_FIELD_NUMBER = 5;
private int availableCount_ = 0;
/**
*
*
*
* The available count of the provisioning quota.
*
*
* int32 available_count = 5;
*
* @return The availableCount.
*/
@java.lang.Override
public int getAvailableCount() {
return availableCount_;
}
public static final int INSTANCE_QUOTA_FIELD_NUMBER = 6;
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*
* @return Whether the instanceQuota field is set.
*/
@java.lang.Override
public boolean hasInstanceQuota() {
return quotaCase_ == 6;
}
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*
* @return The instanceQuota.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceQuota getInstanceQuota() {
if (quotaCase_ == 6) {
return (com.google.cloud.baremetalsolution.v2.InstanceQuota) quota_;
}
return com.google.cloud.baremetalsolution.v2.InstanceQuota.getDefaultInstance();
}
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceQuotaOrBuilder getInstanceQuotaOrBuilder() {
if (quotaCase_ == 6) {
return (com.google.cloud.baremetalsolution.v2.InstanceQuota) quota_;
}
return com.google.cloud.baremetalsolution.v2.InstanceQuota.getDefaultInstance();
}
public static final int SERVER_COUNT_FIELD_NUMBER = 7;
/**
*
*
*
* Server count.
*
*
* int64 server_count = 7;
*
* @return Whether the serverCount field is set.
*/
@java.lang.Override
public boolean hasServerCount() {
return availabilityCase_ == 7;
}
/**
*
*
*
* Server count.
*
*
* int64 server_count = 7;
*
* @return The serverCount.
*/
@java.lang.Override
public long getServerCount() {
if (availabilityCase_ == 7) {
return (java.lang.Long) availability_;
}
return 0L;
}
public static final int NETWORK_BANDWIDTH_FIELD_NUMBER = 8;
/**
*
*
*
* Network bandwidth, Gbps
*
*
* int64 network_bandwidth = 8;
*
* @return Whether the networkBandwidth field is set.
*/
@java.lang.Override
public boolean hasNetworkBandwidth() {
return availabilityCase_ == 8;
}
/**
*
*
*
* Network bandwidth, Gbps
*
*
* int64 network_bandwidth = 8;
*
* @return The networkBandwidth.
*/
@java.lang.Override
public long getNetworkBandwidth() {
if (availabilityCase_ == 8) {
return (java.lang.Long) availability_;
}
return 0L;
}
public static final int STORAGE_GIB_FIELD_NUMBER = 9;
/**
*
*
*
* Storage size (GB).
*
*
* int64 storage_gib = 9;
*
* @return Whether the storageGib field is set.
*/
@java.lang.Override
public boolean hasStorageGib() {
return availabilityCase_ == 9;
}
/**
*
*
*
* Storage size (GB).
*
*
* int64 storage_gib = 9;
*
* @return The storageGib.
*/
@java.lang.Override
public long getStorageGib() {
if (availabilityCase_ == 9) {
return (java.lang.Long) availability_;
}
return 0L;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (assetType_
!= com.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType.ASSET_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(2, assetType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcpService_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, gcpService_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, location_);
}
if (availableCount_ != 0) {
output.writeInt32(5, availableCount_);
}
if (quotaCase_ == 6) {
output.writeMessage(6, (com.google.cloud.baremetalsolution.v2.InstanceQuota) quota_);
}
if (availabilityCase_ == 7) {
output.writeInt64(7, (long) ((java.lang.Long) availability_));
}
if (availabilityCase_ == 8) {
output.writeInt64(8, (long) ((java.lang.Long) availability_));
}
if (availabilityCase_ == 9) {
output.writeInt64(9, (long) ((java.lang.Long) availability_));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (assetType_
!= com.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType.ASSET_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, assetType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcpService_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, gcpService_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, location_);
}
if (availableCount_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, availableCount_);
}
if (quotaCase_ == 6) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
6, (com.google.cloud.baremetalsolution.v2.InstanceQuota) quota_);
}
if (availabilityCase_ == 7) {
size +=
com.google.protobuf.CodedOutputStream.computeInt64Size(
7, (long) ((java.lang.Long) availability_));
}
if (availabilityCase_ == 8) {
size +=
com.google.protobuf.CodedOutputStream.computeInt64Size(
8, (long) ((java.lang.Long) availability_));
}
if (availabilityCase_ == 9) {
size +=
com.google.protobuf.CodedOutputStream.computeInt64Size(
9, (long) ((java.lang.Long) availability_));
}
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.baremetalsolution.v2.ProvisioningQuota)) {
return super.equals(obj);
}
com.google.cloud.baremetalsolution.v2.ProvisioningQuota other =
(com.google.cloud.baremetalsolution.v2.ProvisioningQuota) obj;
if (!getName().equals(other.getName())) return false;
if (assetType_ != other.assetType_) return false;
if (!getGcpService().equals(other.getGcpService())) return false;
if (!getLocation().equals(other.getLocation())) return false;
if (getAvailableCount() != other.getAvailableCount()) return false;
if (!getQuotaCase().equals(other.getQuotaCase())) return false;
switch (quotaCase_) {
case 6:
if (!getInstanceQuota().equals(other.getInstanceQuota())) return false;
break;
case 0:
default:
}
if (!getAvailabilityCase().equals(other.getAvailabilityCase())) return false;
switch (availabilityCase_) {
case 7:
if (getServerCount() != other.getServerCount()) return false;
break;
case 8:
if (getNetworkBandwidth() != other.getNetworkBandwidth()) return false;
break;
case 9:
if (getStorageGib() != other.getStorageGib()) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER;
hash = (53 * hash) + assetType_;
hash = (37 * hash) + GCP_SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getGcpService().hashCode();
hash = (37 * hash) + LOCATION_FIELD_NUMBER;
hash = (53 * hash) + getLocation().hashCode();
hash = (37 * hash) + AVAILABLE_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getAvailableCount();
switch (quotaCase_) {
case 6:
hash = (37 * hash) + INSTANCE_QUOTA_FIELD_NUMBER;
hash = (53 * hash) + getInstanceQuota().hashCode();
break;
case 0:
default:
}
switch (availabilityCase_) {
case 7:
hash = (37 * hash) + SERVER_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getServerCount());
break;
case 8:
hash = (37 * hash) + NETWORK_BANDWIDTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getNetworkBandwidth());
break;
case 9:
hash = (37 * hash) + STORAGE_GIB_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStorageGib());
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.baremetalsolution.v2.ProvisioningQuota parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.ProvisioningQuota 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.baremetalsolution.v2.ProvisioningQuota parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.ProvisioningQuota 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.baremetalsolution.v2.ProvisioningQuota parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.ProvisioningQuota parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.baremetalsolution.v2.ProvisioningQuota parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.ProvisioningQuota 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.baremetalsolution.v2.ProvisioningQuota parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.ProvisioningQuota 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.baremetalsolution.v2.ProvisioningQuota parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.ProvisioningQuota 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.baremetalsolution.v2.ProvisioningQuota 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;
}
/**
*
*
*
* A provisioning quota for a given project.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.ProvisioningQuota}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.ProvisioningQuota)
com.google.cloud.baremetalsolution.v2.ProvisioningQuotaOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_ProvisioningQuota_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_ProvisioningQuota_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.ProvisioningQuota.class,
com.google.cloud.baremetalsolution.v2.ProvisioningQuota.Builder.class);
}
// Construct using com.google.cloud.baremetalsolution.v2.ProvisioningQuota.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
assetType_ = 0;
gcpService_ = "";
location_ = "";
availableCount_ = 0;
if (instanceQuotaBuilder_ != null) {
instanceQuotaBuilder_.clear();
}
quotaCase_ = 0;
quota_ = null;
availabilityCase_ = 0;
availability_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_ProvisioningQuota_descriptor;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.ProvisioningQuota getDefaultInstanceForType() {
return com.google.cloud.baremetalsolution.v2.ProvisioningQuota.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.ProvisioningQuota build() {
com.google.cloud.baremetalsolution.v2.ProvisioningQuota result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.ProvisioningQuota buildPartial() {
com.google.cloud.baremetalsolution.v2.ProvisioningQuota result =
new com.google.cloud.baremetalsolution.v2.ProvisioningQuota(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.baremetalsolution.v2.ProvisioningQuota result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.assetType_ = assetType_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.gcpService_ = gcpService_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.location_ = location_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.availableCount_ = availableCount_;
}
}
private void buildPartialOneofs(
com.google.cloud.baremetalsolution.v2.ProvisioningQuota result) {
result.quotaCase_ = quotaCase_;
result.quota_ = this.quota_;
if (quotaCase_ == 6 && instanceQuotaBuilder_ != null) {
result.quota_ = instanceQuotaBuilder_.build();
}
result.availabilityCase_ = availabilityCase_;
result.availability_ = this.availability_;
}
@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.baremetalsolution.v2.ProvisioningQuota) {
return mergeFrom((com.google.cloud.baremetalsolution.v2.ProvisioningQuota) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.ProvisioningQuota other) {
if (other == com.google.cloud.baremetalsolution.v2.ProvisioningQuota.getDefaultInstance())
return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.assetType_ != 0) {
setAssetTypeValue(other.getAssetTypeValue());
}
if (!other.getGcpService().isEmpty()) {
gcpService_ = other.gcpService_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getLocation().isEmpty()) {
location_ = other.location_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.getAvailableCount() != 0) {
setAvailableCount(other.getAvailableCount());
}
switch (other.getQuotaCase()) {
case INSTANCE_QUOTA:
{
mergeInstanceQuota(other.getInstanceQuota());
break;
}
case QUOTA_NOT_SET:
{
break;
}
}
switch (other.getAvailabilityCase()) {
case SERVER_COUNT:
{
setServerCount(other.getServerCount());
break;
}
case NETWORK_BANDWIDTH:
{
setNetworkBandwidth(other.getNetworkBandwidth());
break;
}
case STORAGE_GIB:
{
setStorageGib(other.getStorageGib());
break;
}
case AVAILABILITY_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16:
{
assetType_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
gcpService_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
location_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 40:
{
availableCount_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
case 50:
{
input.readMessage(getInstanceQuotaFieldBuilder().getBuilder(), extensionRegistry);
quotaCase_ = 6;
break;
} // case 50
case 56:
{
availability_ = input.readInt64();
availabilityCase_ = 7;
break;
} // case 56
case 64:
{
availability_ = input.readInt64();
availabilityCase_ = 8;
break;
} // case 64
case 72:
{
availability_ = input.readInt64();
availabilityCase_ = 9;
break;
} // case 72
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 quotaCase_ = 0;
private java.lang.Object quota_;
public QuotaCase getQuotaCase() {
return QuotaCase.forNumber(quotaCase_);
}
public Builder clearQuota() {
quotaCase_ = 0;
quota_ = null;
onChanged();
return this;
}
private int availabilityCase_ = 0;
private java.lang.Object availability_;
public AvailabilityCase getAvailabilityCase() {
return AvailabilityCase.forNumber(availabilityCase_);
}
public Builder clearAvailability() {
availabilityCase_ = 0;
availability_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* Output only. The name of the provisioning quota.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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. The name of the provisioning quota.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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. The name of the provisioning quota.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. The name of the provisioning quota.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Output only. The name of the provisioning quota.
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int assetType_ = 0;
/**
*
*
*
* The asset type of this provisioning quota.
*
*
* .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2;
*
* @return The enum numeric value on the wire for assetType.
*/
@java.lang.Override
public int getAssetTypeValue() {
return assetType_;
}
/**
*
*
*
* The asset type of this provisioning quota.
*
*
* .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2;
*
* @param value The enum numeric value on the wire for assetType to set.
* @return This builder for chaining.
*/
public Builder setAssetTypeValue(int value) {
assetType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The asset type of this provisioning quota.
*
*
* .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2;
*
* @return The assetType.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType getAssetType() {
com.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType result =
com.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType.forNumber(assetType_);
return result == null
? com.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType.UNRECOGNIZED
: result;
}
/**
*
*
*
* The asset type of this provisioning quota.
*
*
* .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2;
*
* @param value The assetType to set.
* @return This builder for chaining.
*/
public Builder setAssetType(
com.google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
assetType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The asset type of this provisioning quota.
*
*
* .google.cloud.baremetalsolution.v2.ProvisioningQuota.AssetType asset_type = 2;
*
* @return This builder for chaining.
*/
public Builder clearAssetType() {
bitField0_ = (bitField0_ & ~0x00000002);
assetType_ = 0;
onChanged();
return this;
}
private java.lang.Object gcpService_ = "";
/**
*
*
*
* The gcp service of the provisioning quota.
*
*
* string gcp_service = 3;
*
* @return The gcpService.
*/
public java.lang.String getGcpService() {
java.lang.Object ref = gcpService_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
gcpService_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The gcp service of the provisioning quota.
*
*
* string gcp_service = 3;
*
* @return The bytes for gcpService.
*/
public com.google.protobuf.ByteString getGcpServiceBytes() {
java.lang.Object ref = gcpService_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
gcpService_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The gcp service of the provisioning quota.
*
*
* string gcp_service = 3;
*
* @param value The gcpService to set.
* @return This builder for chaining.
*/
public Builder setGcpService(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
gcpService_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The gcp service of the provisioning quota.
*
*
* string gcp_service = 3;
*
* @return This builder for chaining.
*/
public Builder clearGcpService() {
gcpService_ = getDefaultInstance().getGcpService();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* The gcp service of the provisioning quota.
*
*
* string gcp_service = 3;
*
* @param value The bytes for gcpService to set.
* @return This builder for chaining.
*/
public Builder setGcpServiceBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
gcpService_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object location_ = "";
/**
*
*
*
* The specific location of the provisioining quota.
*
*
* string location = 4;
*
* @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;
}
}
/**
*
*
*
* The specific location of the provisioining quota.
*
*
* string location = 4;
*
* @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;
}
}
/**
*
*
*
* The specific location of the provisioining quota.
*
*
* string location = 4;
*
* @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_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The specific location of the provisioining quota.
*
*
* string location = 4;
*
* @return This builder for chaining.
*/
public Builder clearLocation() {
location_ = getDefaultInstance().getLocation();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* The specific location of the provisioining quota.
*
*
* string location = 4;
*
* @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_ |= 0x00000008;
onChanged();
return this;
}
private int availableCount_;
/**
*
*
*
* The available count of the provisioning quota.
*
*
* int32 available_count = 5;
*
* @return The availableCount.
*/
@java.lang.Override
public int getAvailableCount() {
return availableCount_;
}
/**
*
*
*
* The available count of the provisioning quota.
*
*
* int32 available_count = 5;
*
* @param value The availableCount to set.
* @return This builder for chaining.
*/
public Builder setAvailableCount(int value) {
availableCount_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The available count of the provisioning quota.
*
*
* int32 available_count = 5;
*
* @return This builder for chaining.
*/
public Builder clearAvailableCount() {
bitField0_ = (bitField0_ & ~0x00000010);
availableCount_ = 0;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.InstanceQuota,
com.google.cloud.baremetalsolution.v2.InstanceQuota.Builder,
com.google.cloud.baremetalsolution.v2.InstanceQuotaOrBuilder>
instanceQuotaBuilder_;
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*
* @return Whether the instanceQuota field is set.
*/
@java.lang.Override
public boolean hasInstanceQuota() {
return quotaCase_ == 6;
}
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*
* @return The instanceQuota.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceQuota getInstanceQuota() {
if (instanceQuotaBuilder_ == null) {
if (quotaCase_ == 6) {
return (com.google.cloud.baremetalsolution.v2.InstanceQuota) quota_;
}
return com.google.cloud.baremetalsolution.v2.InstanceQuota.getDefaultInstance();
} else {
if (quotaCase_ == 6) {
return instanceQuotaBuilder_.getMessage();
}
return com.google.cloud.baremetalsolution.v2.InstanceQuota.getDefaultInstance();
}
}
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*/
public Builder setInstanceQuota(com.google.cloud.baremetalsolution.v2.InstanceQuota value) {
if (instanceQuotaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
quota_ = value;
onChanged();
} else {
instanceQuotaBuilder_.setMessage(value);
}
quotaCase_ = 6;
return this;
}
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*/
public Builder setInstanceQuota(
com.google.cloud.baremetalsolution.v2.InstanceQuota.Builder builderForValue) {
if (instanceQuotaBuilder_ == null) {
quota_ = builderForValue.build();
onChanged();
} else {
instanceQuotaBuilder_.setMessage(builderForValue.build());
}
quotaCase_ = 6;
return this;
}
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*/
public Builder mergeInstanceQuota(com.google.cloud.baremetalsolution.v2.InstanceQuota value) {
if (instanceQuotaBuilder_ == null) {
if (quotaCase_ == 6
&& quota_ != com.google.cloud.baremetalsolution.v2.InstanceQuota.getDefaultInstance()) {
quota_ =
com.google.cloud.baremetalsolution.v2.InstanceQuota.newBuilder(
(com.google.cloud.baremetalsolution.v2.InstanceQuota) quota_)
.mergeFrom(value)
.buildPartial();
} else {
quota_ = value;
}
onChanged();
} else {
if (quotaCase_ == 6) {
instanceQuotaBuilder_.mergeFrom(value);
} else {
instanceQuotaBuilder_.setMessage(value);
}
}
quotaCase_ = 6;
return this;
}
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*/
public Builder clearInstanceQuota() {
if (instanceQuotaBuilder_ == null) {
if (quotaCase_ == 6) {
quotaCase_ = 0;
quota_ = null;
onChanged();
}
} else {
if (quotaCase_ == 6) {
quotaCase_ = 0;
quota_ = null;
}
instanceQuotaBuilder_.clear();
}
return this;
}
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*/
public com.google.cloud.baremetalsolution.v2.InstanceQuota.Builder getInstanceQuotaBuilder() {
return getInstanceQuotaFieldBuilder().getBuilder();
}
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceQuotaOrBuilder
getInstanceQuotaOrBuilder() {
if ((quotaCase_ == 6) && (instanceQuotaBuilder_ != null)) {
return instanceQuotaBuilder_.getMessageOrBuilder();
} else {
if (quotaCase_ == 6) {
return (com.google.cloud.baremetalsolution.v2.InstanceQuota) quota_;
}
return com.google.cloud.baremetalsolution.v2.InstanceQuota.getDefaultInstance();
}
}
/**
*
*
*
* Instance quota.
*
*
* .google.cloud.baremetalsolution.v2.InstanceQuota instance_quota = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.InstanceQuota,
com.google.cloud.baremetalsolution.v2.InstanceQuota.Builder,
com.google.cloud.baremetalsolution.v2.InstanceQuotaOrBuilder>
getInstanceQuotaFieldBuilder() {
if (instanceQuotaBuilder_ == null) {
if (!(quotaCase_ == 6)) {
quota_ = com.google.cloud.baremetalsolution.v2.InstanceQuota.getDefaultInstance();
}
instanceQuotaBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.InstanceQuota,
com.google.cloud.baremetalsolution.v2.InstanceQuota.Builder,
com.google.cloud.baremetalsolution.v2.InstanceQuotaOrBuilder>(
(com.google.cloud.baremetalsolution.v2.InstanceQuota) quota_,
getParentForChildren(),
isClean());
quota_ = null;
}
quotaCase_ = 6;
onChanged();
return instanceQuotaBuilder_;
}
/**
*
*
*
* Server count.
*
*
* int64 server_count = 7;
*
* @return Whether the serverCount field is set.
*/
public boolean hasServerCount() {
return availabilityCase_ == 7;
}
/**
*
*
*
* Server count.
*
*
* int64 server_count = 7;
*
* @return The serverCount.
*/
public long getServerCount() {
if (availabilityCase_ == 7) {
return (java.lang.Long) availability_;
}
return 0L;
}
/**
*
*
*
* Server count.
*
*
* int64 server_count = 7;
*
* @param value The serverCount to set.
* @return This builder for chaining.
*/
public Builder setServerCount(long value) {
availabilityCase_ = 7;
availability_ = value;
onChanged();
return this;
}
/**
*
*
*
* Server count.
*
*
* int64 server_count = 7;
*
* @return This builder for chaining.
*/
public Builder clearServerCount() {
if (availabilityCase_ == 7) {
availabilityCase_ = 0;
availability_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* Network bandwidth, Gbps
*
*
* int64 network_bandwidth = 8;
*
* @return Whether the networkBandwidth field is set.
*/
public boolean hasNetworkBandwidth() {
return availabilityCase_ == 8;
}
/**
*
*
*
* Network bandwidth, Gbps
*
*
* int64 network_bandwidth = 8;
*
* @return The networkBandwidth.
*/
public long getNetworkBandwidth() {
if (availabilityCase_ == 8) {
return (java.lang.Long) availability_;
}
return 0L;
}
/**
*
*
*
* Network bandwidth, Gbps
*
*
* int64 network_bandwidth = 8;
*
* @param value The networkBandwidth to set.
* @return This builder for chaining.
*/
public Builder setNetworkBandwidth(long value) {
availabilityCase_ = 8;
availability_ = value;
onChanged();
return this;
}
/**
*
*
*
* Network bandwidth, Gbps
*
*
* int64 network_bandwidth = 8;
*
* @return This builder for chaining.
*/
public Builder clearNetworkBandwidth() {
if (availabilityCase_ == 8) {
availabilityCase_ = 0;
availability_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* Storage size (GB).
*
*
* int64 storage_gib = 9;
*
* @return Whether the storageGib field is set.
*/
public boolean hasStorageGib() {
return availabilityCase_ == 9;
}
/**
*
*
*
* Storage size (GB).
*
*
* int64 storage_gib = 9;
*
* @return The storageGib.
*/
public long getStorageGib() {
if (availabilityCase_ == 9) {
return (java.lang.Long) availability_;
}
return 0L;
}
/**
*
*
*
* Storage size (GB).
*
*
* int64 storage_gib = 9;
*
* @param value The storageGib to set.
* @return This builder for chaining.
*/
public Builder setStorageGib(long value) {
availabilityCase_ = 9;
availability_ = value;
onChanged();
return this;
}
/**
*
*
*
* Storage size (GB).
*
*
* int64 storage_gib = 9;
*
* @return This builder for chaining.
*/
public Builder clearStorageGib() {
if (availabilityCase_ == 9) {
availabilityCase_ = 0;
availability_ = null;
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.baremetalsolution.v2.ProvisioningQuota)
}
// @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.ProvisioningQuota)
private static final com.google.cloud.baremetalsolution.v2.ProvisioningQuota DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.ProvisioningQuota();
}
public static com.google.cloud.baremetalsolution.v2.ProvisioningQuota getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ProvisioningQuota 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.baremetalsolution.v2.ProvisioningQuota getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}