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_ = ""; protocol_ = 0; performanceTier_ = 0; notes_ = ""; workloadProfile_ = 0; instances_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @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), /** * * *
     * The storage volume is being updated.
     * 
* * UPDATING = 4; */ UPDATING(4), /** * * *
     * The storage volume is in cool off state. It will be deleted after
     * `expire_time`.
     * 
* * COOL_OFF = 5; */ COOL_OFF(5), 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; /** * * *
     * The storage volume is being updated.
     * 
* * UPDATING = 4; */ public static final int UPDATING_VALUE = 4; /** * * *
     * The storage volume is in cool off state. It will be deleted after
     * `expire_time`.
     * 
* * COOL_OFF = 5; */ public static final int COOL_OFF_VALUE = 5; 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; case 4: return UPDATING; case 5: return COOL_OFF; 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) } /** * * *
   * Storage protocol.
   * 
* * Protobuf enum {@code google.cloud.baremetalsolution.v2.Volume.Protocol} */ public enum Protocol implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Value is not specified.
     * 
* * PROTOCOL_UNSPECIFIED = 0; */ PROTOCOL_UNSPECIFIED(0), /** * * *
     * Fibre Channel protocol.
     * 
* * FIBRE_CHANNEL = 1; */ FIBRE_CHANNEL(1), /** * * *
     * NFS protocol means Volume is a NFS Share volume.
     * Such volumes cannot be manipulated via Volumes API.
     * 
* * NFS = 2; */ NFS(2), UNRECOGNIZED(-1), ; /** * * *
     * Value is not specified.
     * 
* * PROTOCOL_UNSPECIFIED = 0; */ public static final int PROTOCOL_UNSPECIFIED_VALUE = 0; /** * * *
     * Fibre Channel protocol.
     * 
* * FIBRE_CHANNEL = 1; */ public static final int FIBRE_CHANNEL_VALUE = 1; /** * * *
     * NFS protocol means Volume is a NFS Share volume.
     * Such volumes cannot be manipulated via Volumes API.
     * 
* * NFS = 2; */ public static final int NFS_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 Protocol 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 Protocol forNumber(int value) { switch (value) { case 0: return PROTOCOL_UNSPECIFIED; case 1: return FIBRE_CHANNEL; case 2: return NFS; 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 Protocol findValueByNumber(int number) { return Protocol.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(3); } private static final Protocol[] VALUES = values(); public static Protocol 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 Protocol(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.Volume.Protocol) } /** * * *
   * The possible values for a workload profile.
   * 
* * Protobuf enum {@code google.cloud.baremetalsolution.v2.Volume.WorkloadProfile} */ public enum WorkloadProfile implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * The workload profile is in an unknown state.
     * 
* * WORKLOAD_PROFILE_UNSPECIFIED = 0; */ WORKLOAD_PROFILE_UNSPECIFIED(0), /** * * *
     * The workload profile is generic.
     * 
* * GENERIC = 1; */ GENERIC(1), /** * * *
     * The workload profile is hana.
     * 
* * HANA = 2; */ HANA(2), UNRECOGNIZED(-1), ; /** * * *
     * The workload profile is in an unknown state.
     * 
* * WORKLOAD_PROFILE_UNSPECIFIED = 0; */ public static final int WORKLOAD_PROFILE_UNSPECIFIED_VALUE = 0; /** * * *
     * The workload profile is generic.
     * 
* * GENERIC = 1; */ public static final int GENERIC_VALUE = 1; /** * * *
     * The workload profile is hana.
     * 
* * HANA = 2; */ public static final int HANA_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 WorkloadProfile 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 WorkloadProfile forNumber(int value) { switch (value) { case 0: return WORKLOAD_PROFILE_UNSPECIFIED; case 1: return GENERIC; case 2: return HANA; 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 WorkloadProfile findValueByNumber(int number) { return WorkloadProfile.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(4); } private static final WorkloadProfile[] VALUES = values(); public static WorkloadProfile 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 WorkloadProfile(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.Volume.WorkloadProfile) } 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 ORIGINALLY_REQUESTED_SIZE_GIB_FIELD_NUMBER = 16; private long originallyRequestedSizeGib_ = 0L; /** * * *
   * Originally requested size, in GiB.
   * 
* * int64 originally_requested_size_gib = 16; * * @return The originallyRequestedSizeGib. */ @java.lang.Override public long getOriginallyRequestedSizeGib() { return originallyRequestedSizeGib_; } 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 MAX_SIZE_GIB_FIELD_NUMBER = 17; private long maxSizeGib_ = 0L; /** * * *
   * Maximum size volume can be expanded to in case of evergency, in GiB.
   * 
* * int64 max_size_gib = 17; * * @return The maxSizeGib. */ @java.lang.Override public long getMaxSizeGib() { return maxSizeGib_; } 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; } } public static final int PROTOCOL_FIELD_NUMBER = 18; private int protocol_ = 0; /** * * *
   * Output only. Storage protocol for the Volume.
   * 
* * * .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The enum numeric value on the wire for protocol. */ @java.lang.Override public int getProtocolValue() { return protocol_; } /** * * *
   * Output only. Storage protocol for the Volume.
   * 
* * * .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The protocol. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.Protocol getProtocol() { com.google.cloud.baremetalsolution.v2.Volume.Protocol result = com.google.cloud.baremetalsolution.v2.Volume.Protocol.forNumber(protocol_); return result == null ? com.google.cloud.baremetalsolution.v2.Volume.Protocol.UNRECOGNIZED : result; } public static final int BOOT_VOLUME_FIELD_NUMBER = 19; private boolean bootVolume_ = false; /** * * *
   * Output only. Whether this volume is a boot volume. A boot volume is one
   * which contains a boot LUN.
   * 
* * bool boot_volume = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bootVolume. */ @java.lang.Override public boolean getBootVolume() { return bootVolume_; } public static final int PERFORMANCE_TIER_FIELD_NUMBER = 20; private int performanceTier_ = 0; /** * * *
   * Immutable. Performance tier of the Volume.
   * Default is SHARED.
   * 
* * * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The enum numeric value on the wire for performanceTier. */ @java.lang.Override public int getPerformanceTierValue() { return performanceTier_; } /** * * *
   * Immutable. Performance tier of the Volume.
   * Default is SHARED.
   * 
* * * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The performanceTier. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumePerformanceTier getPerformanceTier() { com.google.cloud.baremetalsolution.v2.VolumePerformanceTier result = com.google.cloud.baremetalsolution.v2.VolumePerformanceTier.forNumber(performanceTier_); return result == null ? com.google.cloud.baremetalsolution.v2.VolumePerformanceTier.UNRECOGNIZED : result; } public static final int NOTES_FIELD_NUMBER = 21; @SuppressWarnings("serial") private volatile java.lang.Object notes_ = ""; /** * * *
   * Input only. User-specified notes for new Volume.
   * Used to provision Volumes that require manual intervention.
   * 
* * string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; * * @return The notes. */ @java.lang.Override public java.lang.String getNotes() { java.lang.Object ref = notes_; 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(); notes_ = s; return s; } } /** * * *
   * Input only. User-specified notes for new Volume.
   * Used to provision Volumes that require manual intervention.
   * 
* * string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; * * @return The bytes for notes. */ @java.lang.Override public com.google.protobuf.ByteString getNotesBytes() { java.lang.Object ref = notes_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); notes_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int WORKLOAD_PROFILE_FIELD_NUMBER = 22; private int workloadProfile_ = 0; /** * * *
   * The workload profile for the volume.
   * 
* * .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; * * @return The enum numeric value on the wire for workloadProfile. */ @java.lang.Override public int getWorkloadProfileValue() { return workloadProfile_; } /** * * *
   * The workload profile for the volume.
   * 
* * .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; * * @return The workloadProfile. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile getWorkloadProfile() { com.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile result = com.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile.forNumber(workloadProfile_); return result == null ? com.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile.UNRECOGNIZED : result; } public static final int EXPIRE_TIME_FIELD_NUMBER = 24; private com.google.protobuf.Timestamp expireTime_; /** * * *
   * Output only. Time after which volume will be fully deleted.
   * It is filled only for volumes in COOLOFF state.
   * 
* * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the expireTime field is set. */ @java.lang.Override public boolean hasExpireTime() { return expireTime_ != null; } /** * * *
   * Output only. Time after which volume will be fully deleted.
   * It is filled only for volumes in COOLOFF state.
   * 
* * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The expireTime. */ @java.lang.Override public com.google.protobuf.Timestamp getExpireTime() { return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; } /** * * *
   * Output only. Time after which volume will be fully deleted.
   * It is filled only for volumes in COOLOFF state.
   * 
* * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; } public static final int INSTANCES_FIELD_NUMBER = 25; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList instances_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * Output only. Instances this Volume is attached to.
   * This field is set only in Get requests.
   * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @return A list containing the instances. */ public com.google.protobuf.ProtocolStringList getInstancesList() { return instances_; } /** * * *
   * Output only. Instances this Volume is attached to.
   * This field is set only in Get requests.
   * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @return The count of instances. */ public int getInstancesCount() { return instances_.size(); } /** * * *
   * Output only. Instances this Volume is attached to.
   * This field is set only in Get requests.
   * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @param index The index of the element to return. * @return The instances at the given index. */ public java.lang.String getInstances(int index) { return instances_.get(index); } /** * * *
   * Output only. Instances this Volume is attached to.
   * This field is set only in Get requests.
   * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @param index The index of the value to return. * @return The bytes of the instances at the given index. */ public com.google.protobuf.ByteString getInstancesBytes(int index) { return instances_.getByteString(index); } public static final int ATTACHED_FIELD_NUMBER = 26; private boolean attached_ = false; /** * * *
   * Output only. Is the Volume attached at at least one instance.
   * This field is a lightweight counterpart of `instances` field.
   * It is filled in List responses as well.
   * 
* * bool attached = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The attached. */ @java.lang.Override public boolean getAttached() { return attached_; } 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_); } if (originallyRequestedSizeGib_ != 0L) { output.writeInt64(16, originallyRequestedSizeGib_); } if (maxSizeGib_ != 0L) { output.writeInt64(17, maxSizeGib_); } if (protocol_ != com.google.cloud.baremetalsolution.v2.Volume.Protocol.PROTOCOL_UNSPECIFIED.getNumber()) { output.writeEnum(18, protocol_); } if (bootVolume_ != false) { output.writeBool(19, bootVolume_); } if (performanceTier_ != com.google.cloud.baremetalsolution.v2.VolumePerformanceTier .VOLUME_PERFORMANCE_TIER_UNSPECIFIED .getNumber()) { output.writeEnum(20, performanceTier_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notes_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 21, notes_); } if (workloadProfile_ != com.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile.WORKLOAD_PROFILE_UNSPECIFIED .getNumber()) { output.writeEnum(22, workloadProfile_); } if (expireTime_ != null) { output.writeMessage(24, getExpireTime()); } for (int i = 0; i < instances_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 25, instances_.getRaw(i)); } if (attached_ != false) { output.writeBool(26, attached_); } 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_); } if (originallyRequestedSizeGib_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(16, originallyRequestedSizeGib_); } if (maxSizeGib_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(17, maxSizeGib_); } if (protocol_ != com.google.cloud.baremetalsolution.v2.Volume.Protocol.PROTOCOL_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(18, protocol_); } if (bootVolume_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(19, bootVolume_); } if (performanceTier_ != com.google.cloud.baremetalsolution.v2.VolumePerformanceTier .VOLUME_PERFORMANCE_TIER_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(20, performanceTier_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notes_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, notes_); } if (workloadProfile_ != com.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile.WORKLOAD_PROFILE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, workloadProfile_); } if (expireTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getExpireTime()); } { int dataSize = 0; for (int i = 0; i < instances_.size(); i++) { dataSize += computeStringSizeNoTag(instances_.getRaw(i)); } size += dataSize; size += 2 * getInstancesList().size(); } if (attached_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(26, attached_); } 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 (getOriginallyRequestedSizeGib() != other.getOriginallyRequestedSizeGib()) return false; if (getCurrentSizeGib() != other.getCurrentSizeGib()) return false; if (getEmergencySizeGib() != other.getEmergencySizeGib()) return false; if (getMaxSizeGib() != other.getMaxSizeGib()) 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 (protocol_ != other.protocol_) return false; if (getBootVolume() != other.getBootVolume()) return false; if (performanceTier_ != other.performanceTier_) return false; if (!getNotes().equals(other.getNotes())) return false; if (workloadProfile_ != other.workloadProfile_) return false; if (hasExpireTime() != other.hasExpireTime()) return false; if (hasExpireTime()) { if (!getExpireTime().equals(other.getExpireTime())) return false; } if (!getInstancesList().equals(other.getInstancesList())) return false; if (getAttached() != other.getAttached()) 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) + ORIGINALLY_REQUESTED_SIZE_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOriginallyRequestedSizeGib()); 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) + MAX_SIZE_GIB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxSizeGib()); 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 = (37 * hash) + PROTOCOL_FIELD_NUMBER; hash = (53 * hash) + protocol_; hash = (37 * hash) + BOOT_VOLUME_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBootVolume()); hash = (37 * hash) + PERFORMANCE_TIER_FIELD_NUMBER; hash = (53 * hash) + performanceTier_; hash = (37 * hash) + NOTES_FIELD_NUMBER; hash = (53 * hash) + getNotes().hashCode(); hash = (37 * hash) + WORKLOAD_PROFILE_FIELD_NUMBER; hash = (53 * hash) + workloadProfile_; if (hasExpireTime()) { hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; hash = (53 * hash) + getExpireTime().hashCode(); } if (getInstancesCount() > 0) { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } hash = (37 * hash) + ATTACHED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAttached()); 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; originallyRequestedSizeGib_ = 0L; currentSizeGib_ = 0L; emergencySizeGib_ = 0L; maxSizeGib_ = 0L; autoGrownSizeGib_ = 0L; remainingSpaceGib_ = 0L; snapshotReservationDetail_ = null; if (snapshotReservationDetailBuilder_ != null) { snapshotReservationDetailBuilder_.dispose(); snapshotReservationDetailBuilder_ = null; } snapshotAutoDeleteBehavior_ = 0; internalGetMutableLabels().clear(); snapshotEnabled_ = false; pod_ = ""; protocol_ = 0; bootVolume_ = false; performanceTier_ = 0; notes_ = ""; workloadProfile_ = 0; expireTime_ = null; if (expireTimeBuilder_ != null) { expireTimeBuilder_.dispose(); expireTimeBuilder_ = null; } instances_ = com.google.protobuf.LazyStringArrayList.emptyList(); attached_ = false; 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.originallyRequestedSizeGib_ = originallyRequestedSizeGib_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.currentSizeGib_ = currentSizeGib_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.emergencySizeGib_ = emergencySizeGib_; } if (((from_bitField0_ & 0x00000100) != 0)) { result.maxSizeGib_ = maxSizeGib_; } if (((from_bitField0_ & 0x00000200) != 0)) { result.autoGrownSizeGib_ = autoGrownSizeGib_; } if (((from_bitField0_ & 0x00000400) != 0)) { result.remainingSpaceGib_ = remainingSpaceGib_; } if (((from_bitField0_ & 0x00000800) != 0)) { result.snapshotReservationDetail_ = snapshotReservationDetailBuilder_ == null ? snapshotReservationDetail_ : snapshotReservationDetailBuilder_.build(); } if (((from_bitField0_ & 0x00001000) != 0)) { result.snapshotAutoDeleteBehavior_ = snapshotAutoDeleteBehavior_; } if (((from_bitField0_ & 0x00002000) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } if (((from_bitField0_ & 0x00004000) != 0)) { result.snapshotEnabled_ = snapshotEnabled_; } if (((from_bitField0_ & 0x00008000) != 0)) { result.pod_ = pod_; } if (((from_bitField0_ & 0x00010000) != 0)) { result.protocol_ = protocol_; } if (((from_bitField0_ & 0x00020000) != 0)) { result.bootVolume_ = bootVolume_; } if (((from_bitField0_ & 0x00040000) != 0)) { result.performanceTier_ = performanceTier_; } if (((from_bitField0_ & 0x00080000) != 0)) { result.notes_ = notes_; } if (((from_bitField0_ & 0x00100000) != 0)) { result.workloadProfile_ = workloadProfile_; } if (((from_bitField0_ & 0x00200000) != 0)) { result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.build(); } if (((from_bitField0_ & 0x00400000) != 0)) { instances_.makeImmutable(); result.instances_ = instances_; } if (((from_bitField0_ & 0x00800000) != 0)) { result.attached_ = attached_; } } @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.getOriginallyRequestedSizeGib() != 0L) { setOriginallyRequestedSizeGib(other.getOriginallyRequestedSizeGib()); } if (other.getCurrentSizeGib() != 0L) { setCurrentSizeGib(other.getCurrentSizeGib()); } if (other.getEmergencySizeGib() != 0L) { setEmergencySizeGib(other.getEmergencySizeGib()); } if (other.getMaxSizeGib() != 0L) { setMaxSizeGib(other.getMaxSizeGib()); } 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_ |= 0x00002000; if (other.getSnapshotEnabled() != false) { setSnapshotEnabled(other.getSnapshotEnabled()); } if (!other.getPod().isEmpty()) { pod_ = other.pod_; bitField0_ |= 0x00008000; onChanged(); } if (other.protocol_ != 0) { setProtocolValue(other.getProtocolValue()); } if (other.getBootVolume() != false) { setBootVolume(other.getBootVolume()); } if (other.performanceTier_ != 0) { setPerformanceTierValue(other.getPerformanceTierValue()); } if (!other.getNotes().isEmpty()) { notes_ = other.notes_; bitField0_ |= 0x00080000; onChanged(); } if (other.workloadProfile_ != 0) { setWorkloadProfileValue(other.getWorkloadProfileValue()); } if (other.hasExpireTime()) { mergeExpireTime(other.getExpireTime()); } if (!other.instances_.isEmpty()) { if (instances_.isEmpty()) { instances_ = other.instances_; bitField0_ |= 0x00400000; } else { ensureInstancesIsMutable(); instances_.addAll(other.instances_); } onChanged(); } if (other.getAttached() != false) { setAttached(other.getAttached()); } 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_ |= 0x00000040; break; } // case 40 case 48: { autoGrownSizeGib_ = input.readInt64(); bitField0_ |= 0x00000200; break; } // case 48 case 56: { remainingSpaceGib_ = input.readInt64(); bitField0_ |= 0x00000400; break; } // case 56 case 66: { input.readMessage( getSnapshotReservationDetailFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000800; break; } // case 66 case 72: { snapshotAutoDeleteBehavior_ = input.readEnum(); bitField0_ |= 0x00001000; 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_ |= 0x00002000; break; } // case 98 case 104: { snapshotEnabled_ = input.readBool(); bitField0_ |= 0x00004000; break; } // case 104 case 112: { emergencySizeGib_ = input.readInt64(); bitField0_ |= 0x00000080; break; } // case 112 case 122: { pod_ = input.readStringRequireUtf8(); bitField0_ |= 0x00008000; break; } // case 122 case 128: { originallyRequestedSizeGib_ = input.readInt64(); bitField0_ |= 0x00000020; break; } // case 128 case 136: { maxSizeGib_ = input.readInt64(); bitField0_ |= 0x00000100; break; } // case 136 case 144: { protocol_ = input.readEnum(); bitField0_ |= 0x00010000; break; } // case 144 case 152: { bootVolume_ = input.readBool(); bitField0_ |= 0x00020000; break; } // case 152 case 160: { performanceTier_ = input.readEnum(); bitField0_ |= 0x00040000; break; } // case 160 case 170: { notes_ = input.readStringRequireUtf8(); bitField0_ |= 0x00080000; break; } // case 170 case 176: { workloadProfile_ = input.readEnum(); bitField0_ |= 0x00100000; break; } // case 176 case 194: { input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00200000; break; } // case 194 case 202: { java.lang.String s = input.readStringRequireUtf8(); ensureInstancesIsMutable(); instances_.add(s); break; } // case 202 case 208: { attached_ = input.readBool(); bitField0_ |= 0x00800000; break; } // case 208 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 originallyRequestedSizeGib_; /** * * *
     * Originally requested size, in GiB.
     * 
* * int64 originally_requested_size_gib = 16; * * @return The originallyRequestedSizeGib. */ @java.lang.Override public long getOriginallyRequestedSizeGib() { return originallyRequestedSizeGib_; } /** * * *
     * Originally requested size, in GiB.
     * 
* * int64 originally_requested_size_gib = 16; * * @param value The originallyRequestedSizeGib to set. * @return This builder for chaining. */ public Builder setOriginallyRequestedSizeGib(long value) { originallyRequestedSizeGib_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Originally requested size, in GiB.
     * 
* * int64 originally_requested_size_gib = 16; * * @return This builder for chaining. */ public Builder clearOriginallyRequestedSizeGib() { bitField0_ = (bitField0_ & ~0x00000020); originallyRequestedSizeGib_ = 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_ |= 0x00000040; 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_ & ~0x00000040); 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_ |= 0x00000080; 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_ & ~0x00000080); emergencySizeGib_ = 0L; onChanged(); return this; } private long maxSizeGib_; /** * * *
     * Maximum size volume can be expanded to in case of evergency, in GiB.
     * 
* * int64 max_size_gib = 17; * * @return The maxSizeGib. */ @java.lang.Override public long getMaxSizeGib() { return maxSizeGib_; } /** * * *
     * Maximum size volume can be expanded to in case of evergency, in GiB.
     * 
* * int64 max_size_gib = 17; * * @param value The maxSizeGib to set. * @return This builder for chaining. */ public Builder setMaxSizeGib(long value) { maxSizeGib_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * Maximum size volume can be expanded to in case of evergency, in GiB.
     * 
* * int64 max_size_gib = 17; * * @return This builder for chaining. */ public Builder clearMaxSizeGib() { bitField0_ = (bitField0_ & ~0x00000100); maxSizeGib_ = 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_ |= 0x00000200; 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_ & ~0x00000200); 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_ |= 0x00000400; 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_ & ~0x00000400); 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_ & 0x00000800) != 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_ |= 0x00000800; 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_ |= 0x00000800; 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_ & 0x00000800) != 0) && snapshotReservationDetail_ != null && snapshotReservationDetail_ != com.google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail .getDefaultInstance()) { getSnapshotReservationDetailBuilder().mergeFrom(value); } else { snapshotReservationDetail_ = value; } } else { snapshotReservationDetailBuilder_.mergeFrom(value); } bitField0_ |= 0x00000800; 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_ & ~0x00000800); 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_ |= 0x00000800; 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_ |= 0x00001000; 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_ |= 0x00001000; 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_ & ~0x00001000); 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_ |= 0x00002000; 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_ & ~0x00002000); 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_ |= 0x00002000; 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_ |= 0x00002000; return this; } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 12; */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); bitField0_ |= 0x00002000; 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_ |= 0x00004000; onChanged(); return this; } /** * * *
     * Whether snapshots are enabled.
     * 
* * bool snapshot_enabled = 13; * * @return This builder for chaining. */ public Builder clearSnapshotEnabled() { bitField0_ = (bitField0_ & ~0x00004000); 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_ |= 0x00008000; 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_ & ~0x00008000); 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_ |= 0x00008000; onChanged(); return this; } private int protocol_ = 0; /** * * *
     * Output only. Storage protocol for the Volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The enum numeric value on the wire for protocol. */ @java.lang.Override public int getProtocolValue() { return protocol_; } /** * * *
     * Output only. Storage protocol for the Volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @param value The enum numeric value on the wire for protocol to set. * @return This builder for chaining. */ public Builder setProtocolValue(int value) { protocol_ = value; bitField0_ |= 0x00010000; onChanged(); return this; } /** * * *
     * Output only. Storage protocol for the Volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The protocol. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.Protocol getProtocol() { com.google.cloud.baremetalsolution.v2.Volume.Protocol result = com.google.cloud.baremetalsolution.v2.Volume.Protocol.forNumber(protocol_); return result == null ? com.google.cloud.baremetalsolution.v2.Volume.Protocol.UNRECOGNIZED : result; } /** * * *
     * Output only. Storage protocol for the Volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @param value The protocol to set. * @return This builder for chaining. */ public Builder setProtocol(com.google.cloud.baremetalsolution.v2.Volume.Protocol value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00010000; protocol_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Output only. Storage protocol for the Volume.
     * 
* * * .google.cloud.baremetalsolution.v2.Volume.Protocol protocol = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return This builder for chaining. */ public Builder clearProtocol() { bitField0_ = (bitField0_ & ~0x00010000); protocol_ = 0; onChanged(); return this; } private boolean bootVolume_; /** * * *
     * Output only. Whether this volume is a boot volume. A boot volume is one
     * which contains a boot LUN.
     * 
* * bool boot_volume = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bootVolume. */ @java.lang.Override public boolean getBootVolume() { return bootVolume_; } /** * * *
     * Output only. Whether this volume is a boot volume. A boot volume is one
     * which contains a boot LUN.
     * 
* * bool boot_volume = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bootVolume to set. * @return This builder for chaining. */ public Builder setBootVolume(boolean value) { bootVolume_ = value; bitField0_ |= 0x00020000; onChanged(); return this; } /** * * *
     * Output only. Whether this volume is a boot volume. A boot volume is one
     * which contains a boot LUN.
     * 
* * bool boot_volume = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearBootVolume() { bitField0_ = (bitField0_ & ~0x00020000); bootVolume_ = false; onChanged(); return this; } private int performanceTier_ = 0; /** * * *
     * Immutable. Performance tier of the Volume.
     * Default is SHARED.
     * 
* * * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The enum numeric value on the wire for performanceTier. */ @java.lang.Override public int getPerformanceTierValue() { return performanceTier_; } /** * * *
     * Immutable. Performance tier of the Volume.
     * Default is SHARED.
     * 
* * * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; * * * @param value The enum numeric value on the wire for performanceTier to set. * @return This builder for chaining. */ public Builder setPerformanceTierValue(int value) { performanceTier_ = value; bitField0_ |= 0x00040000; onChanged(); return this; } /** * * *
     * Immutable. Performance tier of the Volume.
     * Default is SHARED.
     * 
* * * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return The performanceTier. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumePerformanceTier getPerformanceTier() { com.google.cloud.baremetalsolution.v2.VolumePerformanceTier result = com.google.cloud.baremetalsolution.v2.VolumePerformanceTier.forNumber(performanceTier_); return result == null ? com.google.cloud.baremetalsolution.v2.VolumePerformanceTier.UNRECOGNIZED : result; } /** * * *
     * Immutable. Performance tier of the Volume.
     * Default is SHARED.
     * 
* * * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; * * * @param value The performanceTier to set. * @return This builder for chaining. */ public Builder setPerformanceTier( com.google.cloud.baremetalsolution.v2.VolumePerformanceTier value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00040000; performanceTier_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Immutable. Performance tier of the Volume.
     * Default is SHARED.
     * 
* * * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 20 [(.google.api.field_behavior) = IMMUTABLE]; * * * @return This builder for chaining. */ public Builder clearPerformanceTier() { bitField0_ = (bitField0_ & ~0x00040000); performanceTier_ = 0; onChanged(); return this; } private java.lang.Object notes_ = ""; /** * * *
     * Input only. User-specified notes for new Volume.
     * Used to provision Volumes that require manual intervention.
     * 
* * string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; * * @return The notes. */ public java.lang.String getNotes() { java.lang.Object ref = notes_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); notes_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Input only. User-specified notes for new Volume.
     * Used to provision Volumes that require manual intervention.
     * 
* * string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; * * @return The bytes for notes. */ public com.google.protobuf.ByteString getNotesBytes() { java.lang.Object ref = notes_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); notes_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Input only. User-specified notes for new Volume.
     * Used to provision Volumes that require manual intervention.
     * 
* * string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; * * @param value The notes to set. * @return This builder for chaining. */ public Builder setNotes(java.lang.String value) { if (value == null) { throw new NullPointerException(); } notes_ = value; bitField0_ |= 0x00080000; onChanged(); return this; } /** * * *
     * Input only. User-specified notes for new Volume.
     * Used to provision Volumes that require manual intervention.
     * 
* * string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearNotes() { notes_ = getDefaultInstance().getNotes(); bitField0_ = (bitField0_ & ~0x00080000); onChanged(); return this; } /** * * *
     * Input only. User-specified notes for new Volume.
     * Used to provision Volumes that require manual intervention.
     * 
* * string notes = 21 [(.google.api.field_behavior) = INPUT_ONLY]; * * @param value The bytes for notes to set. * @return This builder for chaining. */ public Builder setNotesBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); notes_ = value; bitField0_ |= 0x00080000; onChanged(); return this; } private int workloadProfile_ = 0; /** * * *
     * The workload profile for the volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; * * @return The enum numeric value on the wire for workloadProfile. */ @java.lang.Override public int getWorkloadProfileValue() { return workloadProfile_; } /** * * *
     * The workload profile for the volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; * * @param value The enum numeric value on the wire for workloadProfile to set. * @return This builder for chaining. */ public Builder setWorkloadProfileValue(int value) { workloadProfile_ = value; bitField0_ |= 0x00100000; onChanged(); return this; } /** * * *
     * The workload profile for the volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; * * @return The workloadProfile. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile getWorkloadProfile() { com.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile result = com.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile.forNumber(workloadProfile_); return result == null ? com.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile.UNRECOGNIZED : result; } /** * * *
     * The workload profile for the volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; * * @param value The workloadProfile to set. * @return This builder for chaining. */ public Builder setWorkloadProfile( com.google.cloud.baremetalsolution.v2.Volume.WorkloadProfile value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00100000; workloadProfile_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The workload profile for the volume.
     * 
* * .google.cloud.baremetalsolution.v2.Volume.WorkloadProfile workload_profile = 22; * * @return This builder for chaining. */ public Builder clearWorkloadProfile() { bitField0_ = (bitField0_ & ~0x00100000); workloadProfile_ = 0; onChanged(); return this; } private com.google.protobuf.Timestamp expireTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expireTimeBuilder_; /** * * *
     * Output only. Time after which volume will be fully deleted.
     * It is filled only for volumes in COOLOFF state.
     * 
* * * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the expireTime field is set. */ public boolean hasExpireTime() { return ((bitField0_ & 0x00200000) != 0); } /** * * *
     * Output only. Time after which volume will be fully deleted.
     * It is filled only for volumes in COOLOFF state.
     * 
* * * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The expireTime. */ public com.google.protobuf.Timestamp getExpireTime() { if (expireTimeBuilder_ == null) { return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; } else { return expireTimeBuilder_.getMessage(); } } /** * * *
     * Output only. Time after which volume will be fully deleted.
     * It is filled only for volumes in COOLOFF state.
     * 
* * * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setExpireTime(com.google.protobuf.Timestamp value) { if (expireTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } expireTime_ = value; } else { expireTimeBuilder_.setMessage(value); } bitField0_ |= 0x00200000; onChanged(); return this; } /** * * *
     * Output only. Time after which volume will be fully deleted.
     * It is filled only for volumes in COOLOFF state.
     * 
* * * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (expireTimeBuilder_ == null) { expireTime_ = builderForValue.build(); } else { expireTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00200000; onChanged(); return this; } /** * * *
     * Output only. Time after which volume will be fully deleted.
     * It is filled only for volumes in COOLOFF state.
     * 
* * * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { if (expireTimeBuilder_ == null) { if (((bitField0_ & 0x00200000) != 0) && expireTime_ != null && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getExpireTimeBuilder().mergeFrom(value); } else { expireTime_ = value; } } else { expireTimeBuilder_.mergeFrom(value); } bitField0_ |= 0x00200000; onChanged(); return this; } /** * * *
     * Output only. Time after which volume will be fully deleted.
     * It is filled only for volumes in COOLOFF state.
     * 
* * * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearExpireTime() { bitField0_ = (bitField0_ & ~0x00200000); expireTime_ = null; if (expireTimeBuilder_ != null) { expireTimeBuilder_.dispose(); expireTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. Time after which volume will be fully deleted.
     * It is filled only for volumes in COOLOFF state.
     * 
* * * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { bitField0_ |= 0x00200000; onChanged(); return getExpireTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. Time after which volume will be fully deleted.
     * It is filled only for volumes in COOLOFF state.
     * 
* * * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { if (expireTimeBuilder_ != null) { return expireTimeBuilder_.getMessageOrBuilder(); } else { return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; } } /** * * *
     * Output only. Time after which volume will be fully deleted.
     * It is filled only for volumes in COOLOFF state.
     * 
* * * .google.protobuf.Timestamp expire_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getExpireTimeFieldBuilder() { if (expireTimeBuilder_ == null) { expireTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getExpireTime(), getParentForChildren(), isClean()); expireTime_ = null; } return expireTimeBuilder_; } private com.google.protobuf.LazyStringArrayList instances_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureInstancesIsMutable() { if (!instances_.isModifiable()) { instances_ = new com.google.protobuf.LazyStringArrayList(instances_); } bitField0_ |= 0x00400000; } /** * * *
     * Output only. Instances this Volume is attached to.
     * This field is set only in Get requests.
     * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @return A list containing the instances. */ public com.google.protobuf.ProtocolStringList getInstancesList() { instances_.makeImmutable(); return instances_; } /** * * *
     * Output only. Instances this Volume is attached to.
     * This field is set only in Get requests.
     * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @return The count of instances. */ public int getInstancesCount() { return instances_.size(); } /** * * *
     * Output only. Instances this Volume is attached to.
     * This field is set only in Get requests.
     * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @param index The index of the element to return. * @return The instances at the given index. */ public java.lang.String getInstances(int index) { return instances_.get(index); } /** * * *
     * Output only. Instances this Volume is attached to.
     * This field is set only in Get requests.
     * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @param index The index of the value to return. * @return The bytes of the instances at the given index. */ public com.google.protobuf.ByteString getInstancesBytes(int index) { return instances_.getByteString(index); } /** * * *
     * Output only. Instances this Volume is attached to.
     * This field is set only in Get requests.
     * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @param index The index to set the value at. * @param value The instances to set. * @return This builder for chaining. */ public Builder setInstances(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureInstancesIsMutable(); instances_.set(index, value); bitField0_ |= 0x00400000; onChanged(); return this; } /** * * *
     * Output only. Instances this Volume is attached to.
     * This field is set only in Get requests.
     * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @param value The instances to add. * @return This builder for chaining. */ public Builder addInstances(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureInstancesIsMutable(); instances_.add(value); bitField0_ |= 0x00400000; onChanged(); return this; } /** * * *
     * Output only. Instances this Volume is attached to.
     * This field is set only in Get requests.
     * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @param values The instances to add. * @return This builder for chaining. */ public Builder addAllInstances(java.lang.Iterable values) { ensureInstancesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); bitField0_ |= 0x00400000; onChanged(); return this; } /** * * *
     * Output only. Instances this Volume is attached to.
     * This field is set only in Get requests.
     * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @return This builder for chaining. */ public Builder clearInstances() { instances_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00400000); ; onChanged(); return this; } /** * * *
     * Output only. Instances this Volume is attached to.
     * This field is set only in Get requests.
     * 
* * * repeated string instances = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } * * * @param value The bytes of the instances to add. * @return This builder for chaining. */ public Builder addInstancesBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureInstancesIsMutable(); instances_.add(value); bitField0_ |= 0x00400000; onChanged(); return this; } private boolean attached_; /** * * *
     * Output only. Is the Volume attached at at least one instance.
     * This field is a lightweight counterpart of `instances` field.
     * It is filled in List responses as well.
     * 
* * bool attached = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The attached. */ @java.lang.Override public boolean getAttached() { return attached_; } /** * * *
     * Output only. Is the Volume attached at at least one instance.
     * This field is a lightweight counterpart of `instances` field.
     * It is filled in List responses as well.
     * 
* * bool attached = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The attached to set. * @return This builder for chaining. */ public Builder setAttached(boolean value) { attached_ = value; bitField0_ |= 0x00800000; onChanged(); return this; } /** * * *
     * Output only. Is the Volume attached at at least one instance.
     * This field is a lightweight counterpart of `instances` field.
     * It is filled in List responses as well.
     * 
* * bool attached = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearAttached() { bitField0_ = (bitField0_ & ~0x00800000); attached_ = false; 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