All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.baremetalsolution.v2.Volume Maven / Gradle / Ivy

There is a newer version: 0.54.0
Show newest version
/*
 * Copyright 2023 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/volume.proto

package com.google.cloud.baremetalsolution.v2;

/**
 *
 *
 * 
 * A storage volume.
 * 
* * Protobuf type {@code google.cloud.baremetalsolution.v2.Volume} */ public final class Volume extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.Volume) VolumeOrBuilder { private static final long serialVersionUID = 0L; // Use Volume.newBuilder() to construct. private Volume(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Volume() { name_ = ""; id_ = ""; storageType_ = 0; state_ = 0; snapshotAutoDeleteBehavior_ = 0; pod_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Volume(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 12: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Volume.class, com.google.cloud.baremetalsolution.v2.Volume.Builder.class); } /** * * *
   * The storage type for a volume.
   * 
* * Protobuf enum {@code google.cloud.baremetalsolution.v2.Volume.StorageType} */ public enum StorageType implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * The storage type for this volume is unknown.
     * 
* * STORAGE_TYPE_UNSPECIFIED = 0; */ STORAGE_TYPE_UNSPECIFIED(0), /** * * *
     * The storage type for this volume is SSD.
     * 
* * SSD = 1; */ SSD(1), /** * * *
     * This storage type for this volume is HDD.
     * 
* * HDD = 2; */ HDD(2), UNRECOGNIZED(-1), ; /** * * *
     * The storage type for this volume is unknown.
     * 
* * STORAGE_TYPE_UNSPECIFIED = 0; */ public static final int STORAGE_TYPE_UNSPECIFIED_VALUE = 0; /** * * *
     * The storage type for this volume is SSD.
     * 
* * SSD = 1; */ public static final int SSD_VALUE = 1; /** * * *
     * This storage type for this volume is HDD.
     * 
* * HDD = 2; */ public static final int HDD_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static StorageType 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 StorageType forNumber(int value) { switch (value) { case 0: return STORAGE_TYPE_UNSPECIFIED; case 1: return SSD; case 2: return HDD; 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 StorageType findValueByNumber(int number) { return StorageType.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.Volume.getDescriptor().getEnumTypes().get(0); } private static final StorageType[] VALUES = values(); public static StorageType 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 StorageType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.Volume.StorageType) } /** * * *
   * The possible states for a storage volume.
   * 
* * Protobuf enum {@code google.cloud.baremetalsolution.v2.Volume.State} */ public enum State implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * The storage volume is in an unknown state.
     * 
* * STATE_UNSPECIFIED = 0; */ STATE_UNSPECIFIED(0), /** * * *
     * The storage volume is being created.
     * 
* * CREATING = 1; */ CREATING(1), /** * * *
     * The storage volume is ready for use.
     * 
* * READY = 2; */ READY(2), /** * * *
     * The storage volume has been requested to be deleted.
     * 
* * DELETING = 3; */ DELETING(3), UNRECOGNIZED(-1), ; /** * * *
     * The storage volume is in an unknown state.
     * 
* * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; /** * * *
     * The storage volume is being created.
     * 
* * CREATING = 1; */ public static final int CREATING_VALUE = 1; /** * * *
     * The storage volume is ready for use.
     * 
* * READY = 2; */ public static final int READY_VALUE = 2; /** * * *
     * The storage volume has been requested to be deleted.
     * 
* * DELETING = 3; */ public static final int DELETING_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 State 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 State forNumber(int value) { switch (value) { case 0: return STATE_UNSPECIFIED; case 1: return CREATING; case 2: return READY; case 3: return DELETING; 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 State findValueByNumber(int number) { return State.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.Volume.getDescriptor().getEnumTypes().get(1); } private static final State[] VALUES = values(); public static State 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 State(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.Volume.State) } /** * * *
   * The kinds of auto delete behavior to use when snapshot reserved space is
   * full.
   * 
* * Protobuf enum {@code google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior} */ public enum SnapshotAutoDeleteBehavior implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * The unspecified behavior.
     * 
* * SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0; */ SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED(0), /** * * *
     * Don't delete any snapshots. This disables new snapshot creation, as
     * long as the snapshot reserved space is full.
     * 
* * DISABLED = 1; */ DISABLED(1), /** * * *
     * Delete the oldest snapshots first.
     * 
* * OLDEST_FIRST = 2; */ OLDEST_FIRST(2), /** * * *
     * Delete the newest snapshots first.
     * 
* * NEWEST_FIRST = 3; */ NEWEST_FIRST(3), UNRECOGNIZED(-1), ; /** * * *
     * The unspecified behavior.
     * 
* * SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED = 0; */ public static final int SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED_VALUE = 0; /** * * *
     * Don't delete any snapshots. This disables new snapshot creation, as
     * long as the snapshot reserved space is full.
     * 
* * DISABLED = 1; */ public static final int DISABLED_VALUE = 1; /** * * *
     * Delete the oldest snapshots first.
     * 
* * OLDEST_FIRST = 2; */ public static final int OLDEST_FIRST_VALUE = 2; /** * * *
     * Delete the newest snapshots first.
     * 
* * NEWEST_FIRST = 3; */ public static final int NEWEST_FIRST_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 SnapshotAutoDeleteBehavior 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 SnapshotAutoDeleteBehavior forNumber(int value) { switch (value) { case 0: return SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED; case 1: return DISABLED; case 2: return OLDEST_FIRST; case 3: return NEWEST_FIRST; 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 SnapshotAutoDeleteBehavior findValueByNumber(int number) { return SnapshotAutoDeleteBehavior.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.Volume.getDescriptor().getEnumTypes().get(2); } private static final SnapshotAutoDeleteBehavior[] VALUES = values(); public static SnapshotAutoDeleteBehavior 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 SnapshotAutoDeleteBehavior(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior) } public interface SnapshotReservationDetailOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail) com.google.protobuf.MessageOrBuilder { /** * * *
     * The space on this storage volume reserved for snapshots, shown in GiB.
     * 
* * int64 reserved_space_gib = 1; * * @return The reservedSpaceGib. */ long getReservedSpaceGib(); /** * * *
     * The percent of snapshot space on this storage volume actually being used
     * by the snapshot copies. This value might be higher than 100% if the
     * snapshot copies have overflowed into the data portion of the storage
     * volume.
     * 
* * int32 reserved_space_used_percent = 2; * * @return The reservedSpaceUsedPercent. */ int getReservedSpaceUsedPercent(); /** * * *
     * The amount, in GiB, of available space in this storage volume's reserved
     * snapshot space.
     * 
* * int64 reserved_space_remaining_gib = 3; * * @return The reservedSpaceRemainingGib. */ long getReservedSpaceRemainingGib(); /** * * *
     * Percent of the total Volume size reserved for snapshot copies.
     * Enabling snapshots requires reserving 20% or more of
     * the storage volume space for snapshots. Maximum reserved space for
     * snapshots is 40%.
     * Setting this field will effectively set snapshot_enabled to true.
     * 
* * int32 reserved_space_percent = 4; * * @return The reservedSpacePercent. */ int getReservedSpacePercent(); } /** * * *
   * Details about snapshot space reservation and usage on the storage volume.
   * 
* * Protobuf type {@code google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail} */ public static final class SnapshotReservationDetail extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail) SnapshotReservationDetailOrBuilder { private static final long serialVersionUID = 0L; // Use SnapshotReservationDetail.newBuilder() to construct. private SnapshotReservationDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SnapshotReservationDetail() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new SnapshotReservationDetail(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.class, com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.Builder.class); } public static final int RESERVED_SPACE_GIB_FIELD_NUMBER = 1; private long reservedSpaceGib_ = 0L; /** * * *
     * The space on this storage volume reserved for snapshots, shown in GiB.
     * 
* * int64 reserved_space_gib = 1; * * @return The reservedSpaceGib. */ @java.lang.Override public long getReservedSpaceGib() { return reservedSpaceGib_; } public static final int RESERVED_SPACE_USED_PERCENT_FIELD_NUMBER = 2; private int reservedSpaceUsedPercent_ = 0; /** * * *
     * The percent of snapshot space on this storage volume actually being used
     * by the snapshot copies. This value might be higher than 100% if the
     * snapshot copies have overflowed into the data portion of the storage
     * volume.
     * 
* * int32 reserved_space_used_percent = 2; * * @return The reservedSpaceUsedPercent. */ @java.lang.Override public int getReservedSpaceUsedPercent() { return reservedSpaceUsedPercent_; } public static final int RESERVED_SPACE_REMAINING_GIB_FIELD_NUMBER = 3; private long reservedSpaceRemainingGib_ = 0L; /** * * *
     * The amount, in GiB, of available space in this storage volume's reserved
     * snapshot space.
     * 
* * int64 reserved_space_remaining_gib = 3; * * @return The reservedSpaceRemainingGib. */ @java.lang.Override public long getReservedSpaceRemainingGib() { return reservedSpaceRemainingGib_; } public static final int RESERVED_SPACE_PERCENT_FIELD_NUMBER = 4; private int reservedSpacePercent_ = 0; /** * * *
     * Percent of the total Volume size reserved for snapshot copies.
     * Enabling snapshots requires reserving 20% or more of
     * the storage volume space for snapshots. Maximum reserved space for
     * snapshots is 40%.
     * Setting this field will effectively set snapshot_enabled to true.
     * 
* * int32 reserved_space_percent = 4; * * @return The reservedSpacePercent. */ @java.lang.Override public int getReservedSpacePercent() { return reservedSpacePercent_; } 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 (reservedSpaceGib_ != 0L) { output.writeInt64(1, reservedSpaceGib_); } if (reservedSpaceUsedPercent_ != 0) { output.writeInt32(2, reservedSpaceUsedPercent_); } if (reservedSpaceRemainingGib_ != 0L) { output.writeInt64(3, reservedSpaceRemainingGib_); } if (reservedSpacePercent_ != 0) { output.writeInt32(4, reservedSpacePercent_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (reservedSpaceGib_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, reservedSpaceGib_); } if (reservedSpaceUsedPercent_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, reservedSpaceUsedPercent_); } if (reservedSpaceRemainingGib_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, reservedSpaceRemainingGib_); } if (reservedSpacePercent_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, reservedSpacePercent_); } 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.Volume.SnapshotReservationDetail)) { return super.equals(obj); } com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail other = (com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail) obj; if (getReservedSpaceGib() != other.getReservedSpaceGib()) return false; if (getReservedSpaceUsedPercent() != other.getReservedSpaceUsedPercent()) return false; if (getReservedSpaceRemainingGib() != other.getReservedSpaceRemainingGib()) return false; if (getReservedSpacePercent() != other.getReservedSpacePercent()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + RESERVED_SPACE_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReservedSpaceGib()); hash = (37 * hash) + RESERVED_SPACE_USED_PERCENT_FIELD_NUMBER; hash = (53 * hash) + getReservedSpaceUsedPercent(); hash = (37 * hash) + RESERVED_SPACE_REMAINING_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReservedSpaceRemainingGib()); hash = (37 * hash) + RESERVED_SPACE_PERCENT_FIELD_NUMBER; hash = (53 * hash) + getReservedSpacePercent(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail 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.Volume.SnapshotReservationDetail parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail 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.Volume.SnapshotReservationDetail parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail 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.Volume.SnapshotReservationDetail parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail 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.Volume.SnapshotReservationDetail parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail 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.Volume.SnapshotReservationDetail 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.Volume.SnapshotReservationDetail 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.Volume.SnapshotReservationDetail prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * Details about snapshot space reservation and usage on the storage volume.
     * 
* * Protobuf type {@code google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail) com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetailOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.class, com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.Builder .class); } // Construct using // com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; reservedSpaceGib_ = 0L; reservedSpaceUsedPercent_ = 0; reservedSpaceRemainingGib_ = 0L; reservedSpacePercent_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_SnapshotReservationDetail_descriptor; } @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail getDefaultInstanceForType() { return com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail .getDefaultInstance(); } @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail build() { com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail buildPartial() { com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail result = new com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.reservedSpaceGib_ = reservedSpaceGib_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.reservedSpaceUsedPercent_ = reservedSpaceUsedPercent_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.reservedSpaceRemainingGib_ = reservedSpaceRemainingGib_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.reservedSpacePercent_ = reservedSpacePercent_; } } @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.Volume.SnapshotReservationDetail) { return mergeFrom( (com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail other) { if (other == com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail .getDefaultInstance()) return this; if (other.getReservedSpaceGib() != 0L) { setReservedSpaceGib(other.getReservedSpaceGib()); } if (other.getReservedSpaceUsedPercent() != 0) { setReservedSpaceUsedPercent(other.getReservedSpaceUsedPercent()); } if (other.getReservedSpaceRemainingGib() != 0L) { setReservedSpaceRemainingGib(other.getReservedSpaceRemainingGib()); } if (other.getReservedSpacePercent() != 0) { setReservedSpacePercent(other.getReservedSpacePercent()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { reservedSpaceGib_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 case 16: { reservedSpaceUsedPercent_ = input.readInt32(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { reservedSpaceRemainingGib_ = input.readInt64(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { reservedSpacePercent_ = input.readInt32(); bitField0_ |= 0x00000008; break; } // case 32 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 long reservedSpaceGib_; /** * * *
       * The space on this storage volume reserved for snapshots, shown in GiB.
       * 
* * int64 reserved_space_gib = 1; * * @return The reservedSpaceGib. */ @java.lang.Override public long getReservedSpaceGib() { return reservedSpaceGib_; } /** * * *
       * The space on this storage volume reserved for snapshots, shown in GiB.
       * 
* * int64 reserved_space_gib = 1; * * @param value The reservedSpaceGib to set. * @return This builder for chaining. */ public Builder setReservedSpaceGib(long value) { reservedSpaceGib_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * The space on this storage volume reserved for snapshots, shown in GiB.
       * 
* * int64 reserved_space_gib = 1; * * @return This builder for chaining. */ public Builder clearReservedSpaceGib() { bitField0_ = (bitField0_ & ~0x00000001); reservedSpaceGib_ = 0L; onChanged(); return this; } private int reservedSpaceUsedPercent_; /** * * *
       * The percent of snapshot space on this storage volume actually being used
       * by the snapshot copies. This value might be higher than 100% if the
       * snapshot copies have overflowed into the data portion of the storage
       * volume.
       * 
* * int32 reserved_space_used_percent = 2; * * @return The reservedSpaceUsedPercent. */ @java.lang.Override public int getReservedSpaceUsedPercent() { return reservedSpaceUsedPercent_; } /** * * *
       * The percent of snapshot space on this storage volume actually being used
       * by the snapshot copies. This value might be higher than 100% if the
       * snapshot copies have overflowed into the data portion of the storage
       * volume.
       * 
* * int32 reserved_space_used_percent = 2; * * @param value The reservedSpaceUsedPercent to set. * @return This builder for chaining. */ public Builder setReservedSpaceUsedPercent(int value) { reservedSpaceUsedPercent_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * The percent of snapshot space on this storage volume actually being used
       * by the snapshot copies. This value might be higher than 100% if the
       * snapshot copies have overflowed into the data portion of the storage
       * volume.
       * 
* * int32 reserved_space_used_percent = 2; * * @return This builder for chaining. */ public Builder clearReservedSpaceUsedPercent() { bitField0_ = (bitField0_ & ~0x00000002); reservedSpaceUsedPercent_ = 0; onChanged(); return this; } private long reservedSpaceRemainingGib_; /** * * *
       * The amount, in GiB, of available space in this storage volume's reserved
       * snapshot space.
       * 
* * int64 reserved_space_remaining_gib = 3; * * @return The reservedSpaceRemainingGib. */ @java.lang.Override public long getReservedSpaceRemainingGib() { return reservedSpaceRemainingGib_; } /** * * *
       * The amount, in GiB, of available space in this storage volume's reserved
       * snapshot space.
       * 
* * int64 reserved_space_remaining_gib = 3; * * @param value The reservedSpaceRemainingGib to set. * @return This builder for chaining. */ public Builder setReservedSpaceRemainingGib(long value) { reservedSpaceRemainingGib_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * The amount, in GiB, of available space in this storage volume's reserved
       * snapshot space.
       * 
* * int64 reserved_space_remaining_gib = 3; * * @return This builder for chaining. */ public Builder clearReservedSpaceRemainingGib() { bitField0_ = (bitField0_ & ~0x00000004); reservedSpaceRemainingGib_ = 0L; onChanged(); return this; } private int reservedSpacePercent_; /** * * *
       * Percent of the total Volume size reserved for snapshot copies.
       * Enabling snapshots requires reserving 20% or more of
       * the storage volume space for snapshots. Maximum reserved space for
       * snapshots is 40%.
       * Setting this field will effectively set snapshot_enabled to true.
       * 
* * int32 reserved_space_percent = 4; * * @return The reservedSpacePercent. */ @java.lang.Override public int getReservedSpacePercent() { return reservedSpacePercent_; } /** * * *
       * Percent of the total Volume size reserved for snapshot copies.
       * Enabling snapshots requires reserving 20% or more of
       * the storage volume space for snapshots. Maximum reserved space for
       * snapshots is 40%.
       * Setting this field will effectively set snapshot_enabled to true.
       * 
* * int32 reserved_space_percent = 4; * * @param value The reservedSpacePercent to set. * @return This builder for chaining. */ public Builder setReservedSpacePercent(int value) { reservedSpacePercent_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
       * Percent of the total Volume size reserved for snapshot copies.
       * Enabling snapshots requires reserving 20% or more of
       * the storage volume space for snapshots. Maximum reserved space for
       * snapshots is 40%.
       * Setting this field will effectively set snapshot_enabled to true.
       * 
* * int32 reserved_space_percent = 4; * * @return This builder for chaining. */ public Builder clearReservedSpacePercent() { bitField0_ = (bitField0_ & ~0x00000008); reservedSpacePercent_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail) } // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail) private static final com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail(); } public static com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SnapshotReservationDetail 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.Volume.SnapshotReservationDetail getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Output only. The resource name of this `Volume`.
   * Resource names are schemeless URIs that follow the conventions in
   * https://cloud.google.com/apis/design/resource_names.
   * Format:
   * `projects/{project}/locations/{location}/volumes/{volume}`
   * 
* * 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 resource name of this `Volume`.
   * Resource names are schemeless URIs that follow the conventions in
   * https://cloud.google.com/apis/design/resource_names.
   * Format:
   * `projects/{project}/locations/{location}/volumes/{volume}`
   * 
* * 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 ID_FIELD_NUMBER = 11; @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** * * *
   * An identifier for the `Volume`, generated by the backend.
   * 
* * string id = 11; * * @return The id. */ @java.lang.Override public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** * * *
   * An identifier for the `Volume`, generated by the backend.
   * 
* * string id = 11; * * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int STORAGE_TYPE_FIELD_NUMBER = 2; private int storageType_ = 0; /** * * *
   * The storage type for this volume.
   * 
* * .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; * * @return The enum numeric value on the wire for storageType. */ @java.lang.Override public int getStorageTypeValue() { return storageType_; } /** * * *
   * The storage type for this volume.
   * 
* * .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; * * @return The storageType. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.StorageType getStorageType() { com.google.cloud.baremetalsolution.v2.Volume.StorageType result = com.google.cloud.baremetalsolution.v2.Volume.StorageType.forNumber(storageType_); return result == null ? com.google.cloud.baremetalsolution.v2.Volume.StorageType.UNRECOGNIZED : result; } public static final int STATE_FIELD_NUMBER = 3; private int state_ = 0; /** * * *
   * The state of this storage volume.
   * 
* * .google.cloud.baremetalsolution.v2.Volume.State state = 3; * * @return The enum numeric value on the wire for state. */ @java.lang.Override public int getStateValue() { return state_; } /** * * *
   * The state of this storage volume.
   * 
* * .google.cloud.baremetalsolution.v2.Volume.State state = 3; * * @return The state. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.State getState() { com.google.cloud.baremetalsolution.v2.Volume.State result = com.google.cloud.baremetalsolution.v2.Volume.State.forNumber(state_); return result == null ? com.google.cloud.baremetalsolution.v2.Volume.State.UNRECOGNIZED : result; } public static final int REQUESTED_SIZE_GIB_FIELD_NUMBER = 4; private long requestedSizeGib_ = 0L; /** * * *
   * The requested size of this storage volume, in GiB.
   * 
* * int64 requested_size_gib = 4; * * @return The requestedSizeGib. */ @java.lang.Override public long getRequestedSizeGib() { return requestedSizeGib_; } public static final int CURRENT_SIZE_GIB_FIELD_NUMBER = 5; private long currentSizeGib_ = 0L; /** * * *
   * The current size of this storage volume, in GiB, including space reserved
   * for snapshots. This size might be different than the requested size if the
   * storage volume has been configured with auto grow or auto shrink.
   * 
* * int64 current_size_gib = 5; * * @return The currentSizeGib. */ @java.lang.Override public long getCurrentSizeGib() { return currentSizeGib_; } public static final int EMERGENCY_SIZE_GIB_FIELD_NUMBER = 14; private long emergencySizeGib_ = 0L; /** * * *
   * Additional emergency size that was requested for this Volume, in GiB.
   * current_size_gib includes this value.
   * 
* * int64 emergency_size_gib = 14; * * @return The emergencySizeGib. */ @java.lang.Override public long getEmergencySizeGib() { return emergencySizeGib_; } public static final int AUTO_GROWN_SIZE_GIB_FIELD_NUMBER = 6; private long autoGrownSizeGib_ = 0L; /** * * *
   * The size, in GiB, that this storage volume has expanded as a result of an
   * auto grow policy. In the absence of auto-grow, the value is 0.
   * 
* * int64 auto_grown_size_gib = 6; * * @return The autoGrownSizeGib. */ @java.lang.Override public long getAutoGrownSizeGib() { return autoGrownSizeGib_; } public static final int REMAINING_SPACE_GIB_FIELD_NUMBER = 7; private long remainingSpaceGib_ = 0L; /** * * *
   * The space remaining in the storage volume for new LUNs, in GiB, excluding
   * space reserved for snapshots.
   * 
* * int64 remaining_space_gib = 7; * * @return The remainingSpaceGib. */ @java.lang.Override public long getRemainingSpaceGib() { return remainingSpaceGib_; } public static final int SNAPSHOT_RESERVATION_DETAIL_FIELD_NUMBER = 8; private com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshotReservationDetail_; /** * * *
   * Details about snapshot space reservation and usage on the storage volume.
   * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * * * @return Whether the snapshotReservationDetail field is set. */ @java.lang.Override public boolean hasSnapshotReservationDetail() { return snapshotReservationDetail_ != null; } /** * * *
   * Details about snapshot space reservation and usage on the storage volume.
   * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * * * @return The snapshotReservationDetail. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail getSnapshotReservationDetail() { return snapshotReservationDetail_ == null ? com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail .getDefaultInstance() : snapshotReservationDetail_; } /** * * *
   * Details about snapshot space reservation and usage on the storage volume.
   * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetailOrBuilder getSnapshotReservationDetailOrBuilder() { return snapshotReservationDetail_ == null ? com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail .getDefaultInstance() : snapshotReservationDetail_; } public static final int SNAPSHOT_AUTO_DELETE_BEHAVIOR_FIELD_NUMBER = 9; private int snapshotAutoDeleteBehavior_ = 0; /** * * *
   * The behavior to use when snapshot reserved space is full.
   * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; * * * @return The enum numeric value on the wire for snapshotAutoDeleteBehavior. */ @java.lang.Override public int getSnapshotAutoDeleteBehaviorValue() { return snapshotAutoDeleteBehavior_; } /** * * *
   * The behavior to use when snapshot reserved space is full.
   * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; * * * @return The snapshotAutoDeleteBehavior. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior getSnapshotAutoDeleteBehavior() { com.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior result = com.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior.forNumber( snapshotAutoDeleteBehavior_); return result == null ? com.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior.UNRECOGNIZED : result; } public static final int LABELS_FIELD_NUMBER = 12; private static final class LabelsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
   * Labels as key value pairs.
   * 
* * map<string, string> labels = 12; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
   * Labels as key value pairs.
   * 
* * map<string, string> labels = 12; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
   * Labels as key value pairs.
   * 
* * map<string, string> labels = 12; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * Labels as key value pairs.
   * 
* * map<string, string> labels = 12; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int SNAPSHOT_ENABLED_FIELD_NUMBER = 13; private boolean snapshotEnabled_ = false; /** * * *
   * Whether snapshots are enabled.
   * 
* * bool snapshot_enabled = 13; * * @return The snapshotEnabled. */ @java.lang.Override public boolean getSnapshotEnabled() { return snapshotEnabled_; } public static final int POD_FIELD_NUMBER = 15; @SuppressWarnings("serial") private volatile java.lang.Object pod_ = ""; /** * * *
   * Immutable. Pod name.
   * 
* * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * * @return The pod. */ @java.lang.Override public java.lang.String getPod() { java.lang.Object ref = pod_; 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(); pod_ = s; return s; } } /** * * *
   * Immutable. Pod name.
   * 
* * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * * @return The bytes for pod. */ @java.lang.Override public com.google.protobuf.ByteString getPodBytes() { java.lang.Object ref = pod_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); pod_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (storageType_ != com.google.cloud.baremetalsolution.v2.Volume.StorageType.STORAGE_TYPE_UNSPECIFIED .getNumber()) { output.writeEnum(2, storageType_); } if (state_ != com.google.cloud.baremetalsolution.v2.Volume.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(3, state_); } if (requestedSizeGib_ != 0L) { output.writeInt64(4, requestedSizeGib_); } if (currentSizeGib_ != 0L) { output.writeInt64(5, currentSizeGib_); } if (autoGrownSizeGib_ != 0L) { output.writeInt64(6, autoGrownSizeGib_); } if (remainingSpaceGib_ != 0L) { output.writeInt64(7, remainingSpaceGib_); } if (snapshotReservationDetail_ != null) { output.writeMessage(8, getSnapshotReservationDetail()); } if (snapshotAutoDeleteBehavior_ != com.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior .SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED .getNumber()) { output.writeEnum(9, snapshotAutoDeleteBehavior_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, id_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 12); if (snapshotEnabled_ != false) { output.writeBool(13, snapshotEnabled_); } if (emergencySizeGib_ != 0L) { output.writeInt64(14, emergencySizeGib_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 15, pod_); } 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 (storageType_ != com.google.cloud.baremetalsolution.v2.Volume.StorageType.STORAGE_TYPE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, storageType_); } if (state_ != com.google.cloud.baremetalsolution.v2.Volume.State.STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); } if (requestedSizeGib_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, requestedSizeGib_); } if (currentSizeGib_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, currentSizeGib_); } if (autoGrownSizeGib_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, autoGrownSizeGib_); } if (remainingSpaceGib_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, remainingSpaceGib_); } if (snapshotReservationDetail_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 8, getSnapshotReservationDetail()); } if (snapshotAutoDeleteBehavior_ != com.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior .SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, snapshotAutoDeleteBehavior_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, id_); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry labels__ = LabelsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, labels__); } if (snapshotEnabled_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, snapshotEnabled_); } if (emergencySizeGib_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, emergencySizeGib_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, pod_); } 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.Volume)) { return super.equals(obj); } com.google.cloud.baremetalsolution.v2.Volume other = (com.google.cloud.baremetalsolution.v2.Volume) obj; if (!getName().equals(other.getName())) return false; if (!getId().equals(other.getId())) return false; if (storageType_ != other.storageType_) return false; if (state_ != other.state_) return false; if (getRequestedSizeGib() != other.getRequestedSizeGib()) return false; if (getCurrentSizeGib() != other.getCurrentSizeGib()) return false; if (getEmergencySizeGib() != other.getEmergencySizeGib()) return false; if (getAutoGrownSizeGib() != other.getAutoGrownSizeGib()) return false; if (getRemainingSpaceGib() != other.getRemainingSpaceGib()) return false; if (hasSnapshotReservationDetail() != other.hasSnapshotReservationDetail()) return false; if (hasSnapshotReservationDetail()) { if (!getSnapshotReservationDetail().equals(other.getSnapshotReservationDetail())) return false; } if (snapshotAutoDeleteBehavior_ != other.snapshotAutoDeleteBehavior_) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (getSnapshotEnabled() != other.getSnapshotEnabled()) return false; if (!getPod().equals(other.getPod())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + STORAGE_TYPE_FIELD_NUMBER; hash = (53 * hash) + storageType_; hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; hash = (37 * hash) + REQUESTED_SIZE_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRequestedSizeGib()); hash = (37 * hash) + CURRENT_SIZE_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCurrentSizeGib()); hash = (37 * hash) + EMERGENCY_SIZE_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEmergencySizeGib()); hash = (37 * hash) + AUTO_GROWN_SIZE_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAutoGrownSizeGib()); hash = (37 * hash) + REMAINING_SPACE_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRemainingSpaceGib()); if (hasSnapshotReservationDetail()) { hash = (37 * hash) + SNAPSHOT_RESERVATION_DETAIL_FIELD_NUMBER; hash = (53 * hash) + getSnapshotReservationDetail().hashCode(); } hash = (37 * hash) + SNAPSHOT_AUTO_DELETE_BEHAVIOR_FIELD_NUMBER; hash = (53 * hash) + snapshotAutoDeleteBehavior_; if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (37 * hash) + SNAPSHOT_ENABLED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSnapshotEnabled()); hash = (37 * hash) + POD_FIELD_NUMBER; hash = (53 * hash) + getPod().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.baremetalsolution.v2.Volume parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.Volume 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.Volume parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.Volume 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.Volume parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.Volume 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.Volume parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.baremetalsolution.v2.Volume 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.Volume parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.baremetalsolution.v2.Volume 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.Volume 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.Volume 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.Volume 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 storage volume.
   * 
* * Protobuf type {@code google.cloud.baremetalsolution.v2.Volume} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.Volume) com.google.cloud.baremetalsolution.v2.VolumeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 12: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField(int number) { switch (number) { case 12: return internalGetMutableLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.Volume.class, com.google.cloud.baremetalsolution.v2.Volume.Builder.class); } // Construct using com.google.cloud.baremetalsolution.v2.Volume.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; id_ = ""; storageType_ = 0; state_ = 0; requestedSizeGib_ = 0L; currentSizeGib_ = 0L; emergencySizeGib_ = 0L; autoGrownSizeGib_ = 0L; remainingSpaceGib_ = 0L; snapshotReservationDetail_ = null; if (snapshotReservationDetailBuilder_ != null) { snapshotReservationDetailBuilder_.dispose(); snapshotReservationDetailBuilder_ = null; } snapshotAutoDeleteBehavior_ = 0; internalGetMutableLabels().clear(); snapshotEnabled_ = false; pod_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.baremetalsolution.v2.VolumeProto .internal_static_google_cloud_baremetalsolution_v2_Volume_descriptor; } @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume getDefaultInstanceForType() { return com.google.cloud.baremetalsolution.v2.Volume.getDefaultInstance(); } @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume build() { com.google.cloud.baremetalsolution.v2.Volume result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume buildPartial() { com.google.cloud.baremetalsolution.v2.Volume result = new com.google.cloud.baremetalsolution.v2.Volume(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.baremetalsolution.v2.Volume result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.id_ = id_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.storageType_ = storageType_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.state_ = state_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.requestedSizeGib_ = requestedSizeGib_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.currentSizeGib_ = currentSizeGib_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.emergencySizeGib_ = emergencySizeGib_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.autoGrownSizeGib_ = autoGrownSizeGib_; } if (((from_bitField0_ & 0x00000100) != 0)) { result.remainingSpaceGib_ = remainingSpaceGib_; } if (((from_bitField0_ & 0x00000200) != 0)) { result.snapshotReservationDetail_ = snapshotReservationDetailBuilder_ == null ? snapshotReservationDetail_ : snapshotReservationDetailBuilder_.build(); } if (((from_bitField0_ & 0x00000400) != 0)) { result.snapshotAutoDeleteBehavior_ = snapshotAutoDeleteBehavior_; } if (((from_bitField0_ & 0x00000800) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } if (((from_bitField0_ & 0x00001000) != 0)) { result.snapshotEnabled_ = snapshotEnabled_; } if (((from_bitField0_ & 0x00002000) != 0)) { result.pod_ = pod_; } } @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.Volume) { return mergeFrom((com.google.cloud.baremetalsolution.v2.Volume) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Volume other) { if (other == com.google.cloud.baremetalsolution.v2.Volume.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getId().isEmpty()) { id_ = other.id_; bitField0_ |= 0x00000002; onChanged(); } if (other.storageType_ != 0) { setStorageTypeValue(other.getStorageTypeValue()); } if (other.state_ != 0) { setStateValue(other.getStateValue()); } if (other.getRequestedSizeGib() != 0L) { setRequestedSizeGib(other.getRequestedSizeGib()); } if (other.getCurrentSizeGib() != 0L) { setCurrentSizeGib(other.getCurrentSizeGib()); } if (other.getEmergencySizeGib() != 0L) { setEmergencySizeGib(other.getEmergencySizeGib()); } if (other.getAutoGrownSizeGib() != 0L) { setAutoGrownSizeGib(other.getAutoGrownSizeGib()); } if (other.getRemainingSpaceGib() != 0L) { setRemainingSpaceGib(other.getRemainingSpaceGib()); } if (other.hasSnapshotReservationDetail()) { mergeSnapshotReservationDetail(other.getSnapshotReservationDetail()); } if (other.snapshotAutoDeleteBehavior_ != 0) { setSnapshotAutoDeleteBehaviorValue(other.getSnapshotAutoDeleteBehaviorValue()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); bitField0_ |= 0x00000800; if (other.getSnapshotEnabled() != false) { setSnapshotEnabled(other.getSnapshotEnabled()); } if (!other.getPod().isEmpty()) { pod_ = other.pod_; bitField0_ |= 0x00002000; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { storageType_ = input.readEnum(); bitField0_ |= 0x00000004; break; } // case 16 case 24: { state_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 24 case 32: { requestedSizeGib_ = input.readInt64(); bitField0_ |= 0x00000010; break; } // case 32 case 40: { currentSizeGib_ = input.readInt64(); bitField0_ |= 0x00000020; break; } // case 40 case 48: { autoGrownSizeGib_ = input.readInt64(); bitField0_ |= 0x00000080; break; } // case 48 case 56: { remainingSpaceGib_ = input.readInt64(); bitField0_ |= 0x00000100; break; } // case 56 case 66: { input.readMessage( getSnapshotReservationDetailFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000200; break; } // case 66 case 72: { snapshotAutoDeleteBehavior_ = input.readEnum(); bitField0_ |= 0x00000400; break; } // case 72 case 90: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 90 case 98: { com.google.protobuf.MapEntry labels__ = input.readMessage( LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); bitField0_ |= 0x00000800; break; } // case 98 case 104: { snapshotEnabled_ = input.readBool(); bitField0_ |= 0x00001000; break; } // case 104 case 112: { emergencySizeGib_ = input.readInt64(); bitField0_ |= 0x00000040; break; } // case 112 case 122: { pod_ = input.readStringRequireUtf8(); bitField0_ |= 0x00002000; break; } // case 122 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * * *
     * Output only. The resource name of this `Volume`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/volumes/{volume}`
     * 
* * 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 resource name of this `Volume`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/volumes/{volume}`
     * 
* * 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 resource name of this `Volume`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/volumes/{volume}`
     * 
* * 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 resource name of this `Volume`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/volumes/{volume}`
     * 
* * 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 resource name of this `Volume`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/volumes/{volume}`
     * 
* * 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 java.lang.Object id_ = ""; /** * * *
     * An identifier for the `Volume`, generated by the backend.
     * 
* * string id = 11; * * @return The id. */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * An identifier for the `Volume`, generated by the backend.
     * 
* * string id = 11; * * @return The bytes for id. */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * An identifier for the `Volume`, generated by the backend.
     * 
* * string id = 11; * * @param value The id to set. * @return This builder for chaining. */ public Builder setId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * An identifier for the `Volume`, generated by the backend.
     * 
* * string id = 11; * * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * An identifier for the `Volume`, generated by the backend.
     * 
* * string id = 11; * * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private int storageType_ = 0; /** * * *
     * The storage type for this volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; * * @return The enum numeric value on the wire for storageType. */ @java.lang.Override public int getStorageTypeValue() { return storageType_; } /** * * *
     * The storage type for this volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; * * @param value The enum numeric value on the wire for storageType to set. * @return This builder for chaining. */ public Builder setStorageTypeValue(int value) { storageType_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The storage type for this volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; * * @return The storageType. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.StorageType getStorageType() { com.google.cloud.baremetalsolution.v2.Volume.StorageType result = com.google.cloud.baremetalsolution.v2.Volume.StorageType.forNumber(storageType_); return result == null ? com.google.cloud.baremetalsolution.v2.Volume.StorageType.UNRECOGNIZED : result; } /** * * *
     * The storage type for this volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; * * @param value The storageType to set. * @return This builder for chaining. */ public Builder setStorageType(com.google.cloud.baremetalsolution.v2.Volume.StorageType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; storageType_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The storage type for this volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.StorageType storage_type = 2; * * @return This builder for chaining. */ public Builder clearStorageType() { bitField0_ = (bitField0_ & ~0x00000004); storageType_ = 0; onChanged(); return this; } private int state_ = 0; /** * * *
     * The state of this storage volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.State state = 3; * * @return The enum numeric value on the wire for state. */ @java.lang.Override public int getStateValue() { return state_; } /** * * *
     * The state of this storage volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.State state = 3; * * @param value The enum numeric value on the wire for state to set. * @return This builder for chaining. */ public Builder setStateValue(int value) { state_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * The state of this storage volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.State state = 3; * * @return The state. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.State getState() { com.google.cloud.baremetalsolution.v2.Volume.State result = com.google.cloud.baremetalsolution.v2.Volume.State.forNumber(state_); return result == null ? com.google.cloud.baremetalsolution.v2.Volume.State.UNRECOGNIZED : result; } /** * * *
     * The state of this storage volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.State state = 3; * * @param value The state to set. * @return This builder for chaining. */ public Builder setState(com.google.cloud.baremetalsolution.v2.Volume.State value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; state_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The state of this storage volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.State state = 3; * * @return This builder for chaining. */ public Builder clearState() { bitField0_ = (bitField0_ & ~0x00000008); state_ = 0; onChanged(); return this; } private long requestedSizeGib_; /** * * *
     * The requested size of this storage volume, in GiB.
     * 
* * int64 requested_size_gib = 4; * * @return The requestedSizeGib. */ @java.lang.Override public long getRequestedSizeGib() { return requestedSizeGib_; } /** * * *
     * The requested size of this storage volume, in GiB.
     * 
* * int64 requested_size_gib = 4; * * @param value The requestedSizeGib to set. * @return This builder for chaining. */ public Builder setRequestedSizeGib(long value) { requestedSizeGib_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * The requested size of this storage volume, in GiB.
     * 
* * int64 requested_size_gib = 4; * * @return This builder for chaining. */ public Builder clearRequestedSizeGib() { bitField0_ = (bitField0_ & ~0x00000010); requestedSizeGib_ = 0L; onChanged(); return this; } private long currentSizeGib_; /** * * *
     * The current size of this storage volume, in GiB, including space reserved
     * for snapshots. This size might be different than the requested size if the
     * storage volume has been configured with auto grow or auto shrink.
     * 
* * int64 current_size_gib = 5; * * @return The currentSizeGib. */ @java.lang.Override public long getCurrentSizeGib() { return currentSizeGib_; } /** * * *
     * The current size of this storage volume, in GiB, including space reserved
     * for snapshots. This size might be different than the requested size if the
     * storage volume has been configured with auto grow or auto shrink.
     * 
* * int64 current_size_gib = 5; * * @param value The currentSizeGib to set. * @return This builder for chaining. */ public Builder setCurrentSizeGib(long value) { currentSizeGib_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * The current size of this storage volume, in GiB, including space reserved
     * for snapshots. This size might be different than the requested size if the
     * storage volume has been configured with auto grow or auto shrink.
     * 
* * int64 current_size_gib = 5; * * @return This builder for chaining. */ public Builder clearCurrentSizeGib() { bitField0_ = (bitField0_ & ~0x00000020); currentSizeGib_ = 0L; onChanged(); return this; } private long emergencySizeGib_; /** * * *
     * Additional emergency size that was requested for this Volume, in GiB.
     * current_size_gib includes this value.
     * 
* * int64 emergency_size_gib = 14; * * @return The emergencySizeGib. */ @java.lang.Override public long getEmergencySizeGib() { return emergencySizeGib_; } /** * * *
     * Additional emergency size that was requested for this Volume, in GiB.
     * current_size_gib includes this value.
     * 
* * int64 emergency_size_gib = 14; * * @param value The emergencySizeGib to set. * @return This builder for chaining. */ public Builder setEmergencySizeGib(long value) { emergencySizeGib_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * Additional emergency size that was requested for this Volume, in GiB.
     * current_size_gib includes this value.
     * 
* * int64 emergency_size_gib = 14; * * @return This builder for chaining. */ public Builder clearEmergencySizeGib() { bitField0_ = (bitField0_ & ~0x00000040); emergencySizeGib_ = 0L; onChanged(); return this; } private long autoGrownSizeGib_; /** * * *
     * The size, in GiB, that this storage volume has expanded as a result of an
     * auto grow policy. In the absence of auto-grow, the value is 0.
     * 
* * int64 auto_grown_size_gib = 6; * * @return The autoGrownSizeGib. */ @java.lang.Override public long getAutoGrownSizeGib() { return autoGrownSizeGib_; } /** * * *
     * The size, in GiB, that this storage volume has expanded as a result of an
     * auto grow policy. In the absence of auto-grow, the value is 0.
     * 
* * int64 auto_grown_size_gib = 6; * * @param value The autoGrownSizeGib to set. * @return This builder for chaining. */ public Builder setAutoGrownSizeGib(long value) { autoGrownSizeGib_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * The size, in GiB, that this storage volume has expanded as a result of an
     * auto grow policy. In the absence of auto-grow, the value is 0.
     * 
* * int64 auto_grown_size_gib = 6; * * @return This builder for chaining. */ public Builder clearAutoGrownSizeGib() { bitField0_ = (bitField0_ & ~0x00000080); autoGrownSizeGib_ = 0L; onChanged(); return this; } private long remainingSpaceGib_; /** * * *
     * The space remaining in the storage volume for new LUNs, in GiB, excluding
     * space reserved for snapshots.
     * 
* * int64 remaining_space_gib = 7; * * @return The remainingSpaceGib. */ @java.lang.Override public long getRemainingSpaceGib() { return remainingSpaceGib_; } /** * * *
     * The space remaining in the storage volume for new LUNs, in GiB, excluding
     * space reserved for snapshots.
     * 
* * int64 remaining_space_gib = 7; * * @param value The remainingSpaceGib to set. * @return This builder for chaining. */ public Builder setRemainingSpaceGib(long value) { remainingSpaceGib_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * The space remaining in the storage volume for new LUNs, in GiB, excluding
     * space reserved for snapshots.
     * 
* * int64 remaining_space_gib = 7; * * @return This builder for chaining. */ public Builder clearRemainingSpaceGib() { bitField0_ = (bitField0_ & ~0x00000100); remainingSpaceGib_ = 0L; onChanged(); return this; } private com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshotReservationDetail_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail, com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.Builder, com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetailOrBuilder> snapshotReservationDetailBuilder_; /** * * *
     * Details about snapshot space reservation and usage on the storage volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * * * @return Whether the snapshotReservationDetail field is set. */ public boolean hasSnapshotReservationDetail() { return ((bitField0_ & 0x00000200) != 0); } /** * * *
     * Details about snapshot space reservation and usage on the storage volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * * * @return The snapshotReservationDetail. */ public com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail getSnapshotReservationDetail() { if (snapshotReservationDetailBuilder_ == null) { return snapshotReservationDetail_ == null ? com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail .getDefaultInstance() : snapshotReservationDetail_; } else { return snapshotReservationDetailBuilder_.getMessage(); } } /** * * *
     * Details about snapshot space reservation and usage on the storage volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * */ public Builder setSnapshotReservationDetail( com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail value) { if (snapshotReservationDetailBuilder_ == null) { if (value == null) { throw new NullPointerException(); } snapshotReservationDetail_ = value; } else { snapshotReservationDetailBuilder_.setMessage(value); } bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * Details about snapshot space reservation and usage on the storage volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * */ public Builder setSnapshotReservationDetail( com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.Builder builderForValue) { if (snapshotReservationDetailBuilder_ == null) { snapshotReservationDetail_ = builderForValue.build(); } else { snapshotReservationDetailBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * Details about snapshot space reservation and usage on the storage volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * */ public Builder mergeSnapshotReservationDetail( com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail value) { if (snapshotReservationDetailBuilder_ == null) { if (((bitField0_ & 0x00000200) != 0) && snapshotReservationDetail_ != null && snapshotReservationDetail_ != com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail .getDefaultInstance()) { getSnapshotReservationDetailBuilder().mergeFrom(value); } else { snapshotReservationDetail_ = value; } } else { snapshotReservationDetailBuilder_.mergeFrom(value); } bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * Details about snapshot space reservation and usage on the storage volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * */ public Builder clearSnapshotReservationDetail() { bitField0_ = (bitField0_ & ~0x00000200); snapshotReservationDetail_ = null; if (snapshotReservationDetailBuilder_ != null) { snapshotReservationDetailBuilder_.dispose(); snapshotReservationDetailBuilder_ = null; } onChanged(); return this; } /** * * *
     * Details about snapshot space reservation and usage on the storage volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * */ public com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.Builder getSnapshotReservationDetailBuilder() { bitField0_ |= 0x00000200; onChanged(); return getSnapshotReservationDetailFieldBuilder().getBuilder(); } /** * * *
     * Details about snapshot space reservation and usage on the storage volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * */ public com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetailOrBuilder getSnapshotReservationDetailOrBuilder() { if (snapshotReservationDetailBuilder_ != null) { return snapshotReservationDetailBuilder_.getMessageOrBuilder(); } else { return snapshotReservationDetail_ == null ? com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail .getDefaultInstance() : snapshotReservationDetail_; } } /** * * *
     * Details about snapshot space reservation and usage on the storage volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail snapshot_reservation_detail = 8; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail, com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.Builder, com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetailOrBuilder> getSnapshotReservationDetailFieldBuilder() { if (snapshotReservationDetailBuilder_ == null) { snapshotReservationDetailBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail, com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail.Builder, com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetailOrBuilder>( getSnapshotReservationDetail(), getParentForChildren(), isClean()); snapshotReservationDetail_ = null; } return snapshotReservationDetailBuilder_; } private int snapshotAutoDeleteBehavior_ = 0; /** * * *
     * The behavior to use when snapshot reserved space is full.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; * * * @return The enum numeric value on the wire for snapshotAutoDeleteBehavior. */ @java.lang.Override public int getSnapshotAutoDeleteBehaviorValue() { return snapshotAutoDeleteBehavior_; } /** * * *
     * The behavior to use when snapshot reserved space is full.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; * * * @param value The enum numeric value on the wire for snapshotAutoDeleteBehavior to set. * @return This builder for chaining. */ public Builder setSnapshotAutoDeleteBehaviorValue(int value) { snapshotAutoDeleteBehavior_ = value; bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * The behavior to use when snapshot reserved space is full.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; * * * @return The snapshotAutoDeleteBehavior. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior getSnapshotAutoDeleteBehavior() { com.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior result = com.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior.forNumber( snapshotAutoDeleteBehavior_); return result == null ? com.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior.UNRECOGNIZED : result; } /** * * *
     * The behavior to use when snapshot reserved space is full.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; * * * @param value The snapshotAutoDeleteBehavior to set. * @return This builder for chaining. */ public Builder setSnapshotAutoDeleteBehavior( com.google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000400; snapshotAutoDeleteBehavior_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The behavior to use when snapshot reserved space is full.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior snapshot_auto_delete_behavior = 9; * * * @return This builder for chaining. */ public Builder clearSnapshotAutoDeleteBehavior() { bitField0_ = (bitField0_ & ~0x00000400); snapshotAutoDeleteBehavior_ = 0; onChanged(); return this; } private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } private com.google.protobuf.MapField internalGetMutableLabels() { if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } bitField0_ |= 0x00000800; onChanged(); return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 12; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 12; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 12; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 12; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearLabels() { bitField0_ = (bitField0_ & ~0x00000800); internalGetMutableLabels().getMutableMap().clear(); return this; } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 12; */ public Builder removeLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableLabels().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { bitField0_ |= 0x00000800; return internalGetMutableLabels().getMutableMap(); } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 12; */ public Builder putLabels(java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap().put(key, value); bitField0_ |= 0x00000800; return this; } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 12; */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); bitField0_ |= 0x00000800; return this; } private boolean snapshotEnabled_; /** * * *
     * Whether snapshots are enabled.
     * 
* * bool snapshot_enabled = 13; * * @return The snapshotEnabled. */ @java.lang.Override public boolean getSnapshotEnabled() { return snapshotEnabled_; } /** * * *
     * Whether snapshots are enabled.
     * 
* * bool snapshot_enabled = 13; * * @param value The snapshotEnabled to set. * @return This builder for chaining. */ public Builder setSnapshotEnabled(boolean value) { snapshotEnabled_ = value; bitField0_ |= 0x00001000; onChanged(); return this; } /** * * *
     * Whether snapshots are enabled.
     * 
* * bool snapshot_enabled = 13; * * @return This builder for chaining. */ public Builder clearSnapshotEnabled() { bitField0_ = (bitField0_ & ~0x00001000); snapshotEnabled_ = false; onChanged(); return this; } private java.lang.Object pod_ = ""; /** * * *
     * Immutable. Pod name.
     * 
* * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * * @return The pod. */ public java.lang.String getPod() { java.lang.Object ref = pod_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pod_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Immutable. Pod name.
     * 
* * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * * @return The bytes for pod. */ public com.google.protobuf.ByteString getPodBytes() { java.lang.Object ref = pod_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); pod_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Immutable. Pod name.
     * 
* * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * * @param value The pod to set. * @return This builder for chaining. */ public Builder setPod(java.lang.String value) { if (value == null) { throw new NullPointerException(); } pod_ = value; bitField0_ |= 0x00002000; onChanged(); return this; } /** * * *
     * Immutable. Pod name.
     * 
* * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * * @return This builder for chaining. */ public Builder clearPod() { pod_ = getDefaultInstance().getPod(); bitField0_ = (bitField0_ & ~0x00002000); onChanged(); return this; } /** * * *
     * Immutable. Pod name.
     * 
* * string pod = 15 [(.google.api.field_behavior) = IMMUTABLE]; * * @param value The bytes for pod to set. * @return This builder for chaining. */ public Builder setPodBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); pod_ = value; bitField0_ |= 0x00002000; 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.Volume) } // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.Volume) private static final com.google.cloud.baremetalsolution.v2.Volume DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.Volume(); } public static com.google.cloud.baremetalsolution.v2.Volume getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Volume 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.Volume getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy