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

com.google.cloud.baremetalsolution.v2.VolumeConfig 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/provisioning.proto

package com.google.cloud.baremetalsolution.v2;

/**
 *
 *
 * 
 * Configuration parameters for a new volume.
 * 
* * Protobuf type {@code google.cloud.baremetalsolution.v2.VolumeConfig} */ public final class VolumeConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.VolumeConfig) VolumeConfigOrBuilder { private static final long serialVersionUID = 0L; // Use VolumeConfig.newBuilder() to construct. private VolumeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private VolumeConfig() { name_ = ""; id_ = ""; type_ = 0; protocol_ = 0; lunRanges_ = java.util.Collections.emptyList(); machineIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); nfsExports_ = java.util.Collections.emptyList(); userNote_ = ""; gcpService_ = ""; performanceTier_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new VolumeConfig(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VolumeConfig.class, com.google.cloud.baremetalsolution.v2.VolumeConfig.Builder.class); } /** * * *
   * The types of Volumes.
   * 
* * Protobuf enum {@code google.cloud.baremetalsolution.v2.VolumeConfig.Type} */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * The unspecified type.
     * 
* * TYPE_UNSPECIFIED = 0; */ TYPE_UNSPECIFIED(0), /** * * *
     * This Volume is on flash.
     * 
* * FLASH = 1; */ FLASH(1), /** * * *
     * This Volume is on disk.
     * 
* * DISK = 2; */ DISK(2), UNRECOGNIZED(-1), ; /** * * *
     * The unspecified type.
     * 
* * TYPE_UNSPECIFIED = 0; */ public static final int TYPE_UNSPECIFIED_VALUE = 0; /** * * *
     * This Volume is on flash.
     * 
* * FLASH = 1; */ public static final int FLASH_VALUE = 1; /** * * *
     * This Volume is on disk.
     * 
* * DISK = 2; */ public static final int DISK_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 Type 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 Type forNumber(int value) { switch (value) { case 0: return TYPE_UNSPECIFIED; case 1: return FLASH; case 2: return DISK; 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 Type findValueByNumber(int number) { return Type.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.VolumeConfig.getDescriptor() .getEnumTypes() .get(0); } private static final Type[] VALUES = values(); public static Type 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 Type(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.VolumeConfig.Type) } /** * * *
   * The protocol used to access the volume.
   * 
* * Protobuf enum {@code google.cloud.baremetalsolution.v2.VolumeConfig.Protocol} */ public enum Protocol implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Unspecified value.
     * 
* * PROTOCOL_UNSPECIFIED = 0; */ PROTOCOL_UNSPECIFIED(0), /** * * *
     * Fibre channel.
     * 
* * PROTOCOL_FC = 1; */ PROTOCOL_FC(1), /** * * *
     * Network file system.
     * 
* * PROTOCOL_NFS = 2; */ PROTOCOL_NFS(2), UNRECOGNIZED(-1), ; /** * * *
     * Unspecified value.
     * 
* * PROTOCOL_UNSPECIFIED = 0; */ public static final int PROTOCOL_UNSPECIFIED_VALUE = 0; /** * * *
     * Fibre channel.
     * 
* * PROTOCOL_FC = 1; */ public static final int PROTOCOL_FC_VALUE = 1; /** * * *
     * Network file system.
     * 
* * PROTOCOL_NFS = 2; */ public static final int PROTOCOL_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 PROTOCOL_FC; case 2: return PROTOCOL_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.VolumeConfig.getDescriptor() .getEnumTypes() .get(1); } 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.VolumeConfig.Protocol) } public interface LunRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.VolumeConfig.LunRange) com.google.protobuf.MessageOrBuilder { /** * * *
     * Number of LUNs to create.
     * 
* * int32 quantity = 1; * * @return The quantity. */ int getQuantity(); /** * * *
     * The requested size of each LUN, in GB.
     * 
* * int32 size_gb = 2; * * @return The sizeGb. */ int getSizeGb(); } /** * * *
   * A LUN(Logical Unit Number) range.
   * 
* * Protobuf type {@code google.cloud.baremetalsolution.v2.VolumeConfig.LunRange} */ public static final class LunRange extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.VolumeConfig.LunRange) LunRangeOrBuilder { private static final long serialVersionUID = 0L; // Use LunRange.newBuilder() to construct. private LunRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private LunRange() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new LunRange(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_LunRange_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_LunRange_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.class, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.Builder.class); } public static final int QUANTITY_FIELD_NUMBER = 1; private int quantity_ = 0; /** * * *
     * Number of LUNs to create.
     * 
* * int32 quantity = 1; * * @return The quantity. */ @java.lang.Override public int getQuantity() { return quantity_; } public static final int SIZE_GB_FIELD_NUMBER = 2; private int sizeGb_ = 0; /** * * *
     * The requested size of each LUN, in GB.
     * 
* * int32 size_gb = 2; * * @return The sizeGb. */ @java.lang.Override public int getSizeGb() { return sizeGb_; } 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 (quantity_ != 0) { output.writeInt32(1, quantity_); } if (sizeGb_ != 0) { output.writeInt32(2, sizeGb_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (quantity_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, quantity_); } if (sizeGb_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, sizeGb_); } 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.VolumeConfig.LunRange)) { return super.equals(obj); } com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange other = (com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange) obj; if (getQuantity() != other.getQuantity()) return false; if (getSizeGb() != other.getSizeGb()) 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) + QUANTITY_FIELD_NUMBER; hash = (53 * hash) + getQuantity(); hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; hash = (53 * hash) + getSizeGb(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange 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.VolumeConfig.LunRange parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange 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.VolumeConfig.LunRange parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange 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.VolumeConfig.LunRange parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange 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.VolumeConfig.LunRange parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange 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.VolumeConfig.LunRange 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.VolumeConfig.LunRange 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.VolumeConfig.LunRange 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 LUN(Logical Unit Number) range.
     * 
* * Protobuf type {@code google.cloud.baremetalsolution.v2.VolumeConfig.LunRange} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.VolumeConfig.LunRange) com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_LunRange_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_LunRange_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.class, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.Builder.class); } // Construct using com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; quantity_ = 0; sizeGb_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_LunRange_descriptor; } @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange getDefaultInstanceForType() { return com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.getDefaultInstance(); } @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange build() { com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange buildPartial() { com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange result = new com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.quantity_ = quantity_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.sizeGb_ = sizeGb_; } } @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.VolumeConfig.LunRange) { return mergeFrom((com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange other) { if (other == com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.getDefaultInstance()) return this; if (other.getQuantity() != 0) { setQuantity(other.getQuantity()); } if (other.getSizeGb() != 0) { setSizeGb(other.getSizeGb()); } 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: { quantity_ = input.readInt32(); bitField0_ |= 0x00000001; break; } // case 8 case 16: { sizeGb_ = input.readInt32(); bitField0_ |= 0x00000002; break; } // case 16 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 int quantity_; /** * * *
       * Number of LUNs to create.
       * 
* * int32 quantity = 1; * * @return The quantity. */ @java.lang.Override public int getQuantity() { return quantity_; } /** * * *
       * Number of LUNs to create.
       * 
* * int32 quantity = 1; * * @param value The quantity to set. * @return This builder for chaining. */ public Builder setQuantity(int value) { quantity_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Number of LUNs to create.
       * 
* * int32 quantity = 1; * * @return This builder for chaining. */ public Builder clearQuantity() { bitField0_ = (bitField0_ & ~0x00000001); quantity_ = 0; onChanged(); return this; } private int sizeGb_; /** * * *
       * The requested size of each LUN, in GB.
       * 
* * int32 size_gb = 2; * * @return The sizeGb. */ @java.lang.Override public int getSizeGb() { return sizeGb_; } /** * * *
       * The requested size of each LUN, in GB.
       * 
* * int32 size_gb = 2; * * @param value The sizeGb to set. * @return This builder for chaining. */ public Builder setSizeGb(int value) { sizeGb_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * The requested size of each LUN, in GB.
       * 
* * int32 size_gb = 2; * * @return This builder for chaining. */ public Builder clearSizeGb() { bitField0_ = (bitField0_ & ~0x00000002); sizeGb_ = 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.VolumeConfig.LunRange) } // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.VolumeConfig.LunRange) private static final com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange(); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public LunRange 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.VolumeConfig.LunRange getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface NfsExportOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport) com.google.protobuf.MessageOrBuilder { /** * * *
     * Network to use to publish the export.
     * 
* * string network_id = 1; * * @return The networkId. */ java.lang.String getNetworkId(); /** * * *
     * Network to use to publish the export.
     * 
* * string network_id = 1; * * @return The bytes for networkId. */ com.google.protobuf.ByteString getNetworkIdBytes(); /** * * *
     * Either a single machine, identified by an ID, or a comma-separated
     * list of machine IDs.
     * 
* * string machine_id = 2; * * @return Whether the machineId field is set. */ boolean hasMachineId(); /** * * *
     * Either a single machine, identified by an ID, or a comma-separated
     * list of machine IDs.
     * 
* * string machine_id = 2; * * @return The machineId. */ java.lang.String getMachineId(); /** * * *
     * Either a single machine, identified by an ID, or a comma-separated
     * list of machine IDs.
     * 
* * string machine_id = 2; * * @return The bytes for machineId. */ com.google.protobuf.ByteString getMachineIdBytes(); /** * * *
     * A CIDR range.
     * 
* * string cidr = 3; * * @return Whether the cidr field is set. */ boolean hasCidr(); /** * * *
     * A CIDR range.
     * 
* * string cidr = 3; * * @return The cidr. */ java.lang.String getCidr(); /** * * *
     * A CIDR range.
     * 
* * string cidr = 3; * * @return The bytes for cidr. */ com.google.protobuf.ByteString getCidrBytes(); /** * * *
     * Export permissions.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; * * * @return The enum numeric value on the wire for permissions. */ int getPermissionsValue(); /** * * *
     * Export permissions.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; * * * @return The permissions. */ com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions getPermissions(); /** * * *
     * Disable root squashing, which is a feature of NFS.
     * Root squash is a special mapping of the remote superuser (root) identity
     * when using identity authentication.
     * 
* * bool no_root_squash = 5; * * @return The noRootSquash. */ boolean getNoRootSquash(); /** * * *
     * Allow the setuid flag.
     * 
* * bool allow_suid = 6; * * @return The allowSuid. */ boolean getAllowSuid(); /** * * *
     * Allow dev flag in NfsShare AllowedClientsRequest.
     * 
* * bool allow_dev = 7; * * @return The allowDev. */ boolean getAllowDev(); com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.ClientCase getClientCase(); } /** * * *
   * A NFS export entry.
   * 
* * Protobuf type {@code google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport} */ public static final class NfsExport extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport) NfsExportOrBuilder { private static final long serialVersionUID = 0L; // Use NfsExport.newBuilder() to construct. private NfsExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private NfsExport() { networkId_ = ""; permissions_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new NfsExport(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_NfsExport_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_NfsExport_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.class, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Builder.class); } /** * * *
     * Permissions that can granted for an export.
     * 
* * Protobuf enum {@code google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions} */ public enum Permissions implements com.google.protobuf.ProtocolMessageEnum { /** * * *
       * Unspecified value.
       * 
* * PERMISSIONS_UNSPECIFIED = 0; */ PERMISSIONS_UNSPECIFIED(0), /** * * *
       * Read-only permission.
       * 
* * READ_ONLY = 1; */ READ_ONLY(1), /** * * *
       * Read-write permission.
       * 
* * READ_WRITE = 2; */ READ_WRITE(2), UNRECOGNIZED(-1), ; /** * * *
       * Unspecified value.
       * 
* * PERMISSIONS_UNSPECIFIED = 0; */ public static final int PERMISSIONS_UNSPECIFIED_VALUE = 0; /** * * *
       * Read-only permission.
       * 
* * READ_ONLY = 1; */ public static final int READ_ONLY_VALUE = 1; /** * * *
       * Read-write permission.
       * 
* * READ_WRITE = 2; */ public static final int READ_WRITE_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 Permissions 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 Permissions forNumber(int value) { switch (value) { case 0: return PERMISSIONS_UNSPECIFIED; case 1: return READ_ONLY; case 2: return READ_WRITE; 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 Permissions findValueByNumber(int number) { return Permissions.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.VolumeConfig.NfsExport.getDescriptor() .getEnumTypes() .get(0); } private static final Permissions[] VALUES = values(); public static Permissions 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 Permissions(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions) } private int clientCase_ = 0; @SuppressWarnings("serial") private java.lang.Object client_; public enum ClientCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { MACHINE_ID(2), CIDR(3), CLIENT_NOT_SET(0); private final int value; private ClientCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ClientCase valueOf(int value) { return forNumber(value); } public static ClientCase forNumber(int value) { switch (value) { case 2: return MACHINE_ID; case 3: return CIDR; case 0: return CLIENT_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ClientCase getClientCase() { return ClientCase.forNumber(clientCase_); } public static final int NETWORK_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object networkId_ = ""; /** * * *
     * Network to use to publish the export.
     * 
* * string network_id = 1; * * @return The networkId. */ @java.lang.Override public java.lang.String getNetworkId() { java.lang.Object ref = networkId_; 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(); networkId_ = s; return s; } } /** * * *
     * Network to use to publish the export.
     * 
* * string network_id = 1; * * @return The bytes for networkId. */ @java.lang.Override public com.google.protobuf.ByteString getNetworkIdBytes() { java.lang.Object ref = networkId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); networkId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MACHINE_ID_FIELD_NUMBER = 2; /** * * *
     * Either a single machine, identified by an ID, or a comma-separated
     * list of machine IDs.
     * 
* * string machine_id = 2; * * @return Whether the machineId field is set. */ public boolean hasMachineId() { return clientCase_ == 2; } /** * * *
     * Either a single machine, identified by an ID, or a comma-separated
     * list of machine IDs.
     * 
* * string machine_id = 2; * * @return The machineId. */ public java.lang.String getMachineId() { java.lang.Object ref = ""; if (clientCase_ == 2) { ref = client_; } 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(); if (clientCase_ == 2) { client_ = s; } return s; } } /** * * *
     * Either a single machine, identified by an ID, or a comma-separated
     * list of machine IDs.
     * 
* * string machine_id = 2; * * @return The bytes for machineId. */ public com.google.protobuf.ByteString getMachineIdBytes() { java.lang.Object ref = ""; if (clientCase_ == 2) { ref = client_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (clientCase_ == 2) { client_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CIDR_FIELD_NUMBER = 3; /** * * *
     * A CIDR range.
     * 
* * string cidr = 3; * * @return Whether the cidr field is set. */ public boolean hasCidr() { return clientCase_ == 3; } /** * * *
     * A CIDR range.
     * 
* * string cidr = 3; * * @return The cidr. */ public java.lang.String getCidr() { java.lang.Object ref = ""; if (clientCase_ == 3) { ref = client_; } 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(); if (clientCase_ == 3) { client_ = s; } return s; } } /** * * *
     * A CIDR range.
     * 
* * string cidr = 3; * * @return The bytes for cidr. */ public com.google.protobuf.ByteString getCidrBytes() { java.lang.Object ref = ""; if (clientCase_ == 3) { ref = client_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (clientCase_ == 3) { client_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PERMISSIONS_FIELD_NUMBER = 4; private int permissions_ = 0; /** * * *
     * Export permissions.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; * * * @return The enum numeric value on the wire for permissions. */ @java.lang.Override public int getPermissionsValue() { return permissions_; } /** * * *
     * Export permissions.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; * * * @return The permissions. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions getPermissions() { com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions result = com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions.forNumber( permissions_); return result == null ? com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions.UNRECOGNIZED : result; } public static final int NO_ROOT_SQUASH_FIELD_NUMBER = 5; private boolean noRootSquash_ = false; /** * * *
     * Disable root squashing, which is a feature of NFS.
     * Root squash is a special mapping of the remote superuser (root) identity
     * when using identity authentication.
     * 
* * bool no_root_squash = 5; * * @return The noRootSquash. */ @java.lang.Override public boolean getNoRootSquash() { return noRootSquash_; } public static final int ALLOW_SUID_FIELD_NUMBER = 6; private boolean allowSuid_ = false; /** * * *
     * Allow the setuid flag.
     * 
* * bool allow_suid = 6; * * @return The allowSuid. */ @java.lang.Override public boolean getAllowSuid() { return allowSuid_; } public static final int ALLOW_DEV_FIELD_NUMBER = 7; private boolean allowDev_ = false; /** * * *
     * Allow dev flag in NfsShare AllowedClientsRequest.
     * 
* * bool allow_dev = 7; * * @return The allowDev. */ @java.lang.Override public boolean getAllowDev() { return allowDev_; } 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(networkId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, networkId_); } if (clientCase_ == 2) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, client_); } if (clientCase_ == 3) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, client_); } if (permissions_ != com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions .PERMISSIONS_UNSPECIFIED .getNumber()) { output.writeEnum(4, permissions_); } if (noRootSquash_ != false) { output.writeBool(5, noRootSquash_); } if (allowSuid_ != false) { output.writeBool(6, allowSuid_); } if (allowDev_ != false) { output.writeBool(7, allowDev_); } 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(networkId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, networkId_); } if (clientCase_ == 2) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, client_); } if (clientCase_ == 3) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, client_); } if (permissions_ != com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions .PERMISSIONS_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, permissions_); } if (noRootSquash_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, noRootSquash_); } if (allowSuid_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, allowSuid_); } if (allowDev_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, allowDev_); } 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.VolumeConfig.NfsExport)) { return super.equals(obj); } com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport other = (com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport) obj; if (!getNetworkId().equals(other.getNetworkId())) return false; if (permissions_ != other.permissions_) return false; if (getNoRootSquash() != other.getNoRootSquash()) return false; if (getAllowSuid() != other.getAllowSuid()) return false; if (getAllowDev() != other.getAllowDev()) return false; if (!getClientCase().equals(other.getClientCase())) return false; switch (clientCase_) { case 2: if (!getMachineId().equals(other.getMachineId())) return false; break; case 3: if (!getCidr().equals(other.getCidr())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NETWORK_ID_FIELD_NUMBER; hash = (53 * hash) + getNetworkId().hashCode(); hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + permissions_; hash = (37 * hash) + NO_ROOT_SQUASH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoRootSquash()); hash = (37 * hash) + ALLOW_SUID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowSuid()); hash = (37 * hash) + ALLOW_DEV_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowDev()); switch (clientCase_) { case 2: hash = (37 * hash) + MACHINE_ID_FIELD_NUMBER; hash = (53 * hash) + getMachineId().hashCode(); break; case 3: hash = (37 * hash) + CIDR_FIELD_NUMBER; hash = (53 * hash) + getCidr().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport 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.VolumeConfig.NfsExport parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport 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.VolumeConfig.NfsExport parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport 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.VolumeConfig.NfsExport parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport 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.VolumeConfig.NfsExport parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport 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.VolumeConfig.NfsExport 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.VolumeConfig.NfsExport 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.VolumeConfig.NfsExport 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 NFS export entry.
     * 
* * Protobuf type {@code google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport) com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExportOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_NfsExport_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_NfsExport_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.class, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Builder.class); } // Construct using com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; networkId_ = ""; permissions_ = 0; noRootSquash_ = false; allowSuid_ = false; allowDev_ = false; clientCase_ = 0; client_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_NfsExport_descriptor; } @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport getDefaultInstanceForType() { return com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.getDefaultInstance(); } @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport build() { com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport buildPartial() { com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport result = new com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0( com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.networkId_ = networkId_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.permissions_ = permissions_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.noRootSquash_ = noRootSquash_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.allowSuid_ = allowSuid_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.allowDev_ = allowDev_; } } private void buildPartialOneofs( com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport result) { result.clientCase_ = clientCase_; result.client_ = this.client_; } @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.VolumeConfig.NfsExport) { return mergeFrom((com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport other) { if (other == com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.getDefaultInstance()) return this; if (!other.getNetworkId().isEmpty()) { networkId_ = other.networkId_; bitField0_ |= 0x00000001; onChanged(); } if (other.permissions_ != 0) { setPermissionsValue(other.getPermissionsValue()); } if (other.getNoRootSquash() != false) { setNoRootSquash(other.getNoRootSquash()); } if (other.getAllowSuid() != false) { setAllowSuid(other.getAllowSuid()); } if (other.getAllowDev() != false) { setAllowDev(other.getAllowDev()); } switch (other.getClientCase()) { case MACHINE_ID: { clientCase_ = 2; client_ = other.client_; onChanged(); break; } case CIDR: { clientCase_ = 3; client_ = other.client_; onChanged(); break; } case CLIENT_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { networkId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { java.lang.String s = input.readStringRequireUtf8(); clientCase_ = 2; client_ = s; break; } // case 18 case 26: { java.lang.String s = input.readStringRequireUtf8(); clientCase_ = 3; client_ = s; break; } // case 26 case 32: { permissions_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 32 case 40: { noRootSquash_ = input.readBool(); bitField0_ |= 0x00000010; break; } // case 40 case 48: { allowSuid_ = input.readBool(); bitField0_ |= 0x00000020; break; } // case 48 case 56: { allowDev_ = input.readBool(); bitField0_ |= 0x00000040; break; } // case 56 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 clientCase_ = 0; private java.lang.Object client_; public ClientCase getClientCase() { return ClientCase.forNumber(clientCase_); } public Builder clearClient() { clientCase_ = 0; client_ = null; onChanged(); return this; } private int bitField0_; private java.lang.Object networkId_ = ""; /** * * *
       * Network to use to publish the export.
       * 
* * string network_id = 1; * * @return The networkId. */ public java.lang.String getNetworkId() { java.lang.Object ref = networkId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); networkId_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Network to use to publish the export.
       * 
* * string network_id = 1; * * @return The bytes for networkId. */ public com.google.protobuf.ByteString getNetworkIdBytes() { java.lang.Object ref = networkId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); networkId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Network to use to publish the export.
       * 
* * string network_id = 1; * * @param value The networkId to set. * @return This builder for chaining. */ public Builder setNetworkId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } networkId_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Network to use to publish the export.
       * 
* * string network_id = 1; * * @return This builder for chaining. */ public Builder clearNetworkId() { networkId_ = getDefaultInstance().getNetworkId(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * Network to use to publish the export.
       * 
* * string network_id = 1; * * @param value The bytes for networkId to set. * @return This builder for chaining. */ public Builder setNetworkIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); networkId_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Either a single machine, identified by an ID, or a comma-separated
       * list of machine IDs.
       * 
* * string machine_id = 2; * * @return Whether the machineId field is set. */ @java.lang.Override public boolean hasMachineId() { return clientCase_ == 2; } /** * * *
       * Either a single machine, identified by an ID, or a comma-separated
       * list of machine IDs.
       * 
* * string machine_id = 2; * * @return The machineId. */ @java.lang.Override public java.lang.String getMachineId() { java.lang.Object ref = ""; if (clientCase_ == 2) { ref = client_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (clientCase_ == 2) { client_ = s; } return s; } else { return (java.lang.String) ref; } } /** * * *
       * Either a single machine, identified by an ID, or a comma-separated
       * list of machine IDs.
       * 
* * string machine_id = 2; * * @return The bytes for machineId. */ @java.lang.Override public com.google.protobuf.ByteString getMachineIdBytes() { java.lang.Object ref = ""; if (clientCase_ == 2) { ref = client_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (clientCase_ == 2) { client_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Either a single machine, identified by an ID, or a comma-separated
       * list of machine IDs.
       * 
* * string machine_id = 2; * * @param value The machineId to set. * @return This builder for chaining. */ public Builder setMachineId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } clientCase_ = 2; client_ = value; onChanged(); return this; } /** * * *
       * Either a single machine, identified by an ID, or a comma-separated
       * list of machine IDs.
       * 
* * string machine_id = 2; * * @return This builder for chaining. */ public Builder clearMachineId() { if (clientCase_ == 2) { clientCase_ = 0; client_ = null; onChanged(); } return this; } /** * * *
       * Either a single machine, identified by an ID, or a comma-separated
       * list of machine IDs.
       * 
* * string machine_id = 2; * * @param value The bytes for machineId to set. * @return This builder for chaining. */ public Builder setMachineIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); clientCase_ = 2; client_ = value; onChanged(); return this; } /** * * *
       * A CIDR range.
       * 
* * string cidr = 3; * * @return Whether the cidr field is set. */ @java.lang.Override public boolean hasCidr() { return clientCase_ == 3; } /** * * *
       * A CIDR range.
       * 
* * string cidr = 3; * * @return The cidr. */ @java.lang.Override public java.lang.String getCidr() { java.lang.Object ref = ""; if (clientCase_ == 3) { ref = client_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (clientCase_ == 3) { client_ = s; } return s; } else { return (java.lang.String) ref; } } /** * * *
       * A CIDR range.
       * 
* * string cidr = 3; * * @return The bytes for cidr. */ @java.lang.Override public com.google.protobuf.ByteString getCidrBytes() { java.lang.Object ref = ""; if (clientCase_ == 3) { ref = client_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (clientCase_ == 3) { client_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * A CIDR range.
       * 
* * string cidr = 3; * * @param value The cidr to set. * @return This builder for chaining. */ public Builder setCidr(java.lang.String value) { if (value == null) { throw new NullPointerException(); } clientCase_ = 3; client_ = value; onChanged(); return this; } /** * * *
       * A CIDR range.
       * 
* * string cidr = 3; * * @return This builder for chaining. */ public Builder clearCidr() { if (clientCase_ == 3) { clientCase_ = 0; client_ = null; onChanged(); } return this; } /** * * *
       * A CIDR range.
       * 
* * string cidr = 3; * * @param value The bytes for cidr to set. * @return This builder for chaining. */ public Builder setCidrBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); clientCase_ = 3; client_ = value; onChanged(); return this; } private int permissions_ = 0; /** * * *
       * Export permissions.
       * 
* * * .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; * * * @return The enum numeric value on the wire for permissions. */ @java.lang.Override public int getPermissionsValue() { return permissions_; } /** * * *
       * Export permissions.
       * 
* * * .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; * * * @param value The enum numeric value on the wire for permissions to set. * @return This builder for chaining. */ public Builder setPermissionsValue(int value) { permissions_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
       * Export permissions.
       * 
* * * .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; * * * @return The permissions. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions getPermissions() { com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions result = com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions.forNumber( permissions_); return result == null ? com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions.UNRECOGNIZED : result; } /** * * *
       * Export permissions.
       * 
* * * .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; * * * @param value The permissions to set. * @return This builder for chaining. */ public Builder setPermissions( com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; permissions_ = value.getNumber(); onChanged(); return this; } /** * * *
       * Export permissions.
       * 
* * * .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Permissions permissions = 4; * * * @return This builder for chaining. */ public Builder clearPermissions() { bitField0_ = (bitField0_ & ~0x00000008); permissions_ = 0; onChanged(); return this; } private boolean noRootSquash_; /** * * *
       * Disable root squashing, which is a feature of NFS.
       * Root squash is a special mapping of the remote superuser (root) identity
       * when using identity authentication.
       * 
* * bool no_root_squash = 5; * * @return The noRootSquash. */ @java.lang.Override public boolean getNoRootSquash() { return noRootSquash_; } /** * * *
       * Disable root squashing, which is a feature of NFS.
       * Root squash is a special mapping of the remote superuser (root) identity
       * when using identity authentication.
       * 
* * bool no_root_squash = 5; * * @param value The noRootSquash to set. * @return This builder for chaining. */ public Builder setNoRootSquash(boolean value) { noRootSquash_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
       * Disable root squashing, which is a feature of NFS.
       * Root squash is a special mapping of the remote superuser (root) identity
       * when using identity authentication.
       * 
* * bool no_root_squash = 5; * * @return This builder for chaining. */ public Builder clearNoRootSquash() { bitField0_ = (bitField0_ & ~0x00000010); noRootSquash_ = false; onChanged(); return this; } private boolean allowSuid_; /** * * *
       * Allow the setuid flag.
       * 
* * bool allow_suid = 6; * * @return The allowSuid. */ @java.lang.Override public boolean getAllowSuid() { return allowSuid_; } /** * * *
       * Allow the setuid flag.
       * 
* * bool allow_suid = 6; * * @param value The allowSuid to set. * @return This builder for chaining. */ public Builder setAllowSuid(boolean value) { allowSuid_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
       * Allow the setuid flag.
       * 
* * bool allow_suid = 6; * * @return This builder for chaining. */ public Builder clearAllowSuid() { bitField0_ = (bitField0_ & ~0x00000020); allowSuid_ = false; onChanged(); return this; } private boolean allowDev_; /** * * *
       * Allow dev flag in NfsShare AllowedClientsRequest.
       * 
* * bool allow_dev = 7; * * @return The allowDev. */ @java.lang.Override public boolean getAllowDev() { return allowDev_; } /** * * *
       * Allow dev flag in NfsShare AllowedClientsRequest.
       * 
* * bool allow_dev = 7; * * @param value The allowDev to set. * @return This builder for chaining. */ public Builder setAllowDev(boolean value) { allowDev_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
       * Allow dev flag in NfsShare AllowedClientsRequest.
       * 
* * bool allow_dev = 7; * * @return This builder for chaining. */ public Builder clearAllowDev() { bitField0_ = (bitField0_ & ~0x00000040); allowDev_ = 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.VolumeConfig.NfsExport) } // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport) private static final com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport(); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public NfsExport 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.VolumeConfig.NfsExport getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Output only. The name of the volume config.
   * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * * *
   * Output only. The name of the volume config.
   * 
* * 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 = 2; @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** * * *
   * A transient unique identifier to identify a volume within an
   * ProvisioningConfig request.
   * 
* * string id = 2; * * @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; } } /** * * *
   * A transient unique identifier to identify a volume within an
   * ProvisioningConfig request.
   * 
* * string id = 2; * * @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 SNAPSHOTS_ENABLED_FIELD_NUMBER = 3; private boolean snapshotsEnabled_ = false; /** * * *
   * Whether snapshots should be enabled.
   * 
* * bool snapshots_enabled = 3; * * @return The snapshotsEnabled. */ @java.lang.Override public boolean getSnapshotsEnabled() { return snapshotsEnabled_; } public static final int TYPE_FIELD_NUMBER = 4; private int type_ = 0; /** * * *
   * The type of this Volume.
   * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; * * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * * *
   * The type of this Volume.
   * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; * * @return The type. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.Type getType() { com.google.cloud.baremetalsolution.v2.VolumeConfig.Type result = com.google.cloud.baremetalsolution.v2.VolumeConfig.Type.forNumber(type_); return result == null ? com.google.cloud.baremetalsolution.v2.VolumeConfig.Type.UNRECOGNIZED : result; } public static final int PROTOCOL_FIELD_NUMBER = 5; private int protocol_ = 0; /** * * *
   * Volume protocol.
   * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; * * @return The enum numeric value on the wire for protocol. */ @java.lang.Override public int getProtocolValue() { return protocol_; } /** * * *
   * Volume protocol.
   * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; * * @return The protocol. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol getProtocol() { com.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol result = com.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol.forNumber(protocol_); return result == null ? com.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol.UNRECOGNIZED : result; } public static final int SIZE_GB_FIELD_NUMBER = 6; private int sizeGb_ = 0; /** * * *
   * The requested size of this volume, in GB.
   * 
* * int32 size_gb = 6; * * @return The sizeGb. */ @java.lang.Override public int getSizeGb() { return sizeGb_; } public static final int LUN_RANGES_FIELD_NUMBER = 7; @SuppressWarnings("serial") private java.util.List lunRanges_; /** * * *
   * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
   * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; */ @java.lang.Override public java.util.List getLunRangesList() { return lunRanges_; } /** * * *
   * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
   * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; */ @java.lang.Override public java.util.List< ? extends com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRangeOrBuilder> getLunRangesOrBuilderList() { return lunRanges_; } /** * * *
   * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
   * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; */ @java.lang.Override public int getLunRangesCount() { return lunRanges_.size(); } /** * * *
   * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
   * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange getLunRanges(int index) { return lunRanges_.get(index); } /** * * *
   * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
   * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRangeOrBuilder getLunRangesOrBuilder( int index) { return lunRanges_.get(index); } public static final int MACHINE_IDS_FIELD_NUMBER = 8; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList machineIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * Machine ids connected to this volume. Set only when protocol is
   * PROTOCOL_FC.
   * 
* * repeated string machine_ids = 8; * * @return A list containing the machineIds. */ public com.google.protobuf.ProtocolStringList getMachineIdsList() { return machineIds_; } /** * * *
   * Machine ids connected to this volume. Set only when protocol is
   * PROTOCOL_FC.
   * 
* * repeated string machine_ids = 8; * * @return The count of machineIds. */ public int getMachineIdsCount() { return machineIds_.size(); } /** * * *
   * Machine ids connected to this volume. Set only when protocol is
   * PROTOCOL_FC.
   * 
* * repeated string machine_ids = 8; * * @param index The index of the element to return. * @return The machineIds at the given index. */ public java.lang.String getMachineIds(int index) { return machineIds_.get(index); } /** * * *
   * Machine ids connected to this volume. Set only when protocol is
   * PROTOCOL_FC.
   * 
* * repeated string machine_ids = 8; * * @param index The index of the value to return. * @return The bytes of the machineIds at the given index. */ public com.google.protobuf.ByteString getMachineIdsBytes(int index) { return machineIds_.getByteString(index); } public static final int NFS_EXPORTS_FIELD_NUMBER = 9; @SuppressWarnings("serial") private java.util.List nfsExports_; /** * * *
   * NFS exports. Set only when protocol is PROTOCOL_NFS.
   * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ @java.lang.Override public java.util.List getNfsExportsList() { return nfsExports_; } /** * * *
   * NFS exports. Set only when protocol is PROTOCOL_NFS.
   * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ @java.lang.Override public java.util.List< ? extends com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExportOrBuilder> getNfsExportsOrBuilderList() { return nfsExports_; } /** * * *
   * NFS exports. Set only when protocol is PROTOCOL_NFS.
   * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ @java.lang.Override public int getNfsExportsCount() { return nfsExports_.size(); } /** * * *
   * NFS exports. Set only when protocol is PROTOCOL_NFS.
   * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport getNfsExports(int index) { return nfsExports_.get(index); } /** * * *
   * NFS exports. Set only when protocol is PROTOCOL_NFS.
   * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExportOrBuilder getNfsExportsOrBuilder(int index) { return nfsExports_.get(index); } public static final int USER_NOTE_FIELD_NUMBER = 10; @SuppressWarnings("serial") private volatile java.lang.Object userNote_ = ""; /** * * *
   * User note field, it can be used by customers to add additional information
   * for the BMS Ops team .
   * 
* * string user_note = 10; * * @return The userNote. */ @java.lang.Override public java.lang.String getUserNote() { java.lang.Object ref = userNote_; 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(); userNote_ = s; return s; } } /** * * *
   * User note field, it can be used by customers to add additional information
   * for the BMS Ops team .
   * 
* * string user_note = 10; * * @return The bytes for userNote. */ @java.lang.Override public com.google.protobuf.ByteString getUserNoteBytes() { java.lang.Object ref = userNote_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); userNote_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int GCP_SERVICE_FIELD_NUMBER = 11; @SuppressWarnings("serial") private volatile java.lang.Object gcpService_ = ""; /** * * *
   * The GCP service of the storage volume. Available gcp_service are in
   * https://cloud.google.com/bare-metal/docs/bms-planning.
   * 
* * string gcp_service = 11; * * @return The gcpService. */ @java.lang.Override public java.lang.String getGcpService() { java.lang.Object ref = gcpService_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); gcpService_ = s; return s; } } /** * * *
   * The GCP service of the storage volume. Available gcp_service are in
   * https://cloud.google.com/bare-metal/docs/bms-planning.
   * 
* * string gcp_service = 11; * * @return The bytes for gcpService. */ @java.lang.Override public com.google.protobuf.ByteString getGcpServiceBytes() { java.lang.Object ref = gcpService_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); gcpService_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PERFORMANCE_TIER_FIELD_NUMBER = 12; private int performanceTier_ = 0; /** * * *
   * Performance tier of the Volume.
   * Default is SHARED.
   * 
* * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; * * @return The enum numeric value on the wire for performanceTier. */ @java.lang.Override public int getPerformanceTierValue() { return performanceTier_; } /** * * *
   * Performance tier of the Volume.
   * Default is SHARED.
   * 
* * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; * * @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; } 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); } if (snapshotsEnabled_ != false) { output.writeBool(3, snapshotsEnabled_); } if (type_ != com.google.cloud.baremetalsolution.v2.VolumeConfig.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(4, type_); } if (protocol_ != com.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol.PROTOCOL_UNSPECIFIED .getNumber()) { output.writeEnum(5, protocol_); } if (sizeGb_ != 0) { output.writeInt32(6, sizeGb_); } for (int i = 0; i < lunRanges_.size(); i++) { output.writeMessage(7, lunRanges_.get(i)); } for (int i = 0; i < machineIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, machineIds_.getRaw(i)); } for (int i = 0; i < nfsExports_.size(); i++) { output.writeMessage(9, nfsExports_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userNote_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, userNote_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcpService_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, gcpService_); } if (performanceTier_ != com.google.cloud.baremetalsolution.v2.VolumePerformanceTier .VOLUME_PERFORMANCE_TIER_UNSPECIFIED .getNumber()) { output.writeEnum(12, performanceTier_); } 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); } if (snapshotsEnabled_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, snapshotsEnabled_); } if (type_ != com.google.cloud.baremetalsolution.v2.VolumeConfig.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, type_); } if (protocol_ != com.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol.PROTOCOL_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, protocol_); } if (sizeGb_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, sizeGb_); } for (int i = 0; i < lunRanges_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, lunRanges_.get(i)); } { int dataSize = 0; for (int i = 0; i < machineIds_.size(); i++) { dataSize += computeStringSizeNoTag(machineIds_.getRaw(i)); } size += dataSize; size += 1 * getMachineIdsList().size(); } for (int i = 0; i < nfsExports_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, nfsExports_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userNote_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, userNote_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcpService_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, gcpService_); } if (performanceTier_ != com.google.cloud.baremetalsolution.v2.VolumePerformanceTier .VOLUME_PERFORMANCE_TIER_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, performanceTier_); } 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.VolumeConfig)) { return super.equals(obj); } com.google.cloud.baremetalsolution.v2.VolumeConfig other = (com.google.cloud.baremetalsolution.v2.VolumeConfig) obj; if (!getName().equals(other.getName())) return false; if (!getId().equals(other.getId())) return false; if (getSnapshotsEnabled() != other.getSnapshotsEnabled()) return false; if (type_ != other.type_) return false; if (protocol_ != other.protocol_) return false; if (getSizeGb() != other.getSizeGb()) return false; if (!getLunRangesList().equals(other.getLunRangesList())) return false; if (!getMachineIdsList().equals(other.getMachineIdsList())) return false; if (!getNfsExportsList().equals(other.getNfsExportsList())) return false; if (!getUserNote().equals(other.getUserNote())) return false; if (!getGcpService().equals(other.getGcpService())) return false; if (performanceTier_ != other.performanceTier_) 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) + SNAPSHOTS_ENABLED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSnapshotsEnabled()); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; hash = (53 * hash) + protocol_; hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; hash = (53 * hash) + getSizeGb(); if (getLunRangesCount() > 0) { hash = (37 * hash) + LUN_RANGES_FIELD_NUMBER; hash = (53 * hash) + getLunRangesList().hashCode(); } if (getMachineIdsCount() > 0) { hash = (37 * hash) + MACHINE_IDS_FIELD_NUMBER; hash = (53 * hash) + getMachineIdsList().hashCode(); } if (getNfsExportsCount() > 0) { hash = (37 * hash) + NFS_EXPORTS_FIELD_NUMBER; hash = (53 * hash) + getNfsExportsList().hashCode(); } hash = (37 * hash) + USER_NOTE_FIELD_NUMBER; hash = (53 * hash) + getUserNote().hashCode(); hash = (37 * hash) + GCP_SERVICE_FIELD_NUMBER; hash = (53 * hash) + getGcpService().hashCode(); hash = (37 * hash) + PERFORMANCE_TIER_FIELD_NUMBER; hash = (53 * hash) + performanceTier_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.baremetalsolution.v2.VolumeConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig 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.VolumeConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig 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.VolumeConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig 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.VolumeConfig parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig 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.VolumeConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig 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.VolumeConfig 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.VolumeConfig 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.VolumeConfig 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; } /** * * *
   * Configuration parameters for a new volume.
   * 
* * Protobuf type {@code google.cloud.baremetalsolution.v2.VolumeConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.VolumeConfig) com.google.cloud.baremetalsolution.v2.VolumeConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.baremetalsolution.v2.VolumeConfig.class, com.google.cloud.baremetalsolution.v2.VolumeConfig.Builder.class); } // Construct using com.google.cloud.baremetalsolution.v2.VolumeConfig.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_ = ""; snapshotsEnabled_ = false; type_ = 0; protocol_ = 0; sizeGb_ = 0; if (lunRangesBuilder_ == null) { lunRanges_ = java.util.Collections.emptyList(); } else { lunRanges_ = null; lunRangesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); machineIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); if (nfsExportsBuilder_ == null) { nfsExports_ = java.util.Collections.emptyList(); } else { nfsExports_ = null; nfsExportsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000100); userNote_ = ""; gcpService_ = ""; performanceTier_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.baremetalsolution.v2.ProvisioningProto .internal_static_google_cloud_baremetalsolution_v2_VolumeConfig_descriptor; } @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig getDefaultInstanceForType() { return com.google.cloud.baremetalsolution.v2.VolumeConfig.getDefaultInstance(); } @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig build() { com.google.cloud.baremetalsolution.v2.VolumeConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig buildPartial() { com.google.cloud.baremetalsolution.v2.VolumeConfig result = new com.google.cloud.baremetalsolution.v2.VolumeConfig(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.baremetalsolution.v2.VolumeConfig result) { if (lunRangesBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0)) { lunRanges_ = java.util.Collections.unmodifiableList(lunRanges_); bitField0_ = (bitField0_ & ~0x00000040); } result.lunRanges_ = lunRanges_; } else { result.lunRanges_ = lunRangesBuilder_.build(); } if (nfsExportsBuilder_ == null) { if (((bitField0_ & 0x00000100) != 0)) { nfsExports_ = java.util.Collections.unmodifiableList(nfsExports_); bitField0_ = (bitField0_ & ~0x00000100); } result.nfsExports_ = nfsExports_; } else { result.nfsExports_ = nfsExportsBuilder_.build(); } } private void buildPartial0(com.google.cloud.baremetalsolution.v2.VolumeConfig 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.snapshotsEnabled_ = snapshotsEnabled_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.type_ = type_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.protocol_ = protocol_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.sizeGb_ = sizeGb_; } if (((from_bitField0_ & 0x00000080) != 0)) { machineIds_.makeImmutable(); result.machineIds_ = machineIds_; } if (((from_bitField0_ & 0x00000200) != 0)) { result.userNote_ = userNote_; } if (((from_bitField0_ & 0x00000400) != 0)) { result.gcpService_ = gcpService_; } if (((from_bitField0_ & 0x00000800) != 0)) { result.performanceTier_ = performanceTier_; } } @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.VolumeConfig) { return mergeFrom((com.google.cloud.baremetalsolution.v2.VolumeConfig) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.VolumeConfig other) { if (other == com.google.cloud.baremetalsolution.v2.VolumeConfig.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.getSnapshotsEnabled() != false) { setSnapshotsEnabled(other.getSnapshotsEnabled()); } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (other.protocol_ != 0) { setProtocolValue(other.getProtocolValue()); } if (other.getSizeGb() != 0) { setSizeGb(other.getSizeGb()); } if (lunRangesBuilder_ == null) { if (!other.lunRanges_.isEmpty()) { if (lunRanges_.isEmpty()) { lunRanges_ = other.lunRanges_; bitField0_ = (bitField0_ & ~0x00000040); } else { ensureLunRangesIsMutable(); lunRanges_.addAll(other.lunRanges_); } onChanged(); } } else { if (!other.lunRanges_.isEmpty()) { if (lunRangesBuilder_.isEmpty()) { lunRangesBuilder_.dispose(); lunRangesBuilder_ = null; lunRanges_ = other.lunRanges_; bitField0_ = (bitField0_ & ~0x00000040); lunRangesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLunRangesFieldBuilder() : null; } else { lunRangesBuilder_.addAllMessages(other.lunRanges_); } } } if (!other.machineIds_.isEmpty()) { if (machineIds_.isEmpty()) { machineIds_ = other.machineIds_; bitField0_ |= 0x00000080; } else { ensureMachineIdsIsMutable(); machineIds_.addAll(other.machineIds_); } onChanged(); } if (nfsExportsBuilder_ == null) { if (!other.nfsExports_.isEmpty()) { if (nfsExports_.isEmpty()) { nfsExports_ = other.nfsExports_; bitField0_ = (bitField0_ & ~0x00000100); } else { ensureNfsExportsIsMutable(); nfsExports_.addAll(other.nfsExports_); } onChanged(); } } else { if (!other.nfsExports_.isEmpty()) { if (nfsExportsBuilder_.isEmpty()) { nfsExportsBuilder_.dispose(); nfsExportsBuilder_ = null; nfsExports_ = other.nfsExports_; bitField0_ = (bitField0_ & ~0x00000100); nfsExportsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getNfsExportsFieldBuilder() : null; } else { nfsExportsBuilder_.addAllMessages(other.nfsExports_); } } } if (!other.getUserNote().isEmpty()) { userNote_ = other.userNote_; bitField0_ |= 0x00000200; onChanged(); } if (!other.getGcpService().isEmpty()) { gcpService_ = other.gcpService_; bitField0_ |= 0x00000400; onChanged(); } if (other.performanceTier_ != 0) { setPerformanceTierValue(other.getPerformanceTierValue()); } 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 18: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 24: { snapshotsEnabled_ = input.readBool(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { type_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 32 case 40: { protocol_ = input.readEnum(); bitField0_ |= 0x00000010; break; } // case 40 case 48: { sizeGb_ = input.readInt32(); bitField0_ |= 0x00000020; break; } // case 48 case 58: { com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange m = input.readMessage( com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.parser(), extensionRegistry); if (lunRangesBuilder_ == null) { ensureLunRangesIsMutable(); lunRanges_.add(m); } else { lunRangesBuilder_.addMessage(m); } break; } // case 58 case 66: { java.lang.String s = input.readStringRequireUtf8(); ensureMachineIdsIsMutable(); machineIds_.add(s); break; } // case 66 case 74: { com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport m = input.readMessage( com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.parser(), extensionRegistry); if (nfsExportsBuilder_ == null) { ensureNfsExportsIsMutable(); nfsExports_.add(m); } else { nfsExportsBuilder_.addMessage(m); } break; } // case 74 case 82: { userNote_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000200; break; } // case 82 case 90: { gcpService_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000400; break; } // case 90 case 96: { performanceTier_ = input.readEnum(); bitField0_ |= 0x00000800; break; } // case 96 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 name of the volume config.
     * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. The name of the volume config.
     * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. The name of the volume config.
     * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Output only. The name of the volume config.
     * 
* * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Output only. The name of the volume config.
     * 
* * 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_ = ""; /** * * *
     * A transient unique identifier to identify a volume within an
     * ProvisioningConfig request.
     * 
* * string id = 2; * * @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; } } /** * * *
     * A transient unique identifier to identify a volume within an
     * ProvisioningConfig request.
     * 
* * string id = 2; * * @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; } } /** * * *
     * A transient unique identifier to identify a volume within an
     * ProvisioningConfig request.
     * 
* * string id = 2; * * @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; } /** * * *
     * A transient unique identifier to identify a volume within an
     * ProvisioningConfig request.
     * 
* * string id = 2; * * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * A transient unique identifier to identify a volume within an
     * ProvisioningConfig request.
     * 
* * string id = 2; * * @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 boolean snapshotsEnabled_; /** * * *
     * Whether snapshots should be enabled.
     * 
* * bool snapshots_enabled = 3; * * @return The snapshotsEnabled. */ @java.lang.Override public boolean getSnapshotsEnabled() { return snapshotsEnabled_; } /** * * *
     * Whether snapshots should be enabled.
     * 
* * bool snapshots_enabled = 3; * * @param value The snapshotsEnabled to set. * @return This builder for chaining. */ public Builder setSnapshotsEnabled(boolean value) { snapshotsEnabled_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Whether snapshots should be enabled.
     * 
* * bool snapshots_enabled = 3; * * @return This builder for chaining. */ public Builder clearSnapshotsEnabled() { bitField0_ = (bitField0_ & ~0x00000004); snapshotsEnabled_ = false; onChanged(); return this; } private int type_ = 0; /** * * *
     * The type of this Volume.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; * * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * * *
     * The type of this Volume.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; * * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ public Builder setTypeValue(int value) { type_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * The type of this Volume.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; * * @return The type. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.Type getType() { com.google.cloud.baremetalsolution.v2.VolumeConfig.Type result = com.google.cloud.baremetalsolution.v2.VolumeConfig.Type.forNumber(type_); return result == null ? com.google.cloud.baremetalsolution.v2.VolumeConfig.Type.UNRECOGNIZED : result; } /** * * *
     * The type of this Volume.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; * * @param value The type to set. * @return This builder for chaining. */ public Builder setType(com.google.cloud.baremetalsolution.v2.VolumeConfig.Type value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; type_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The type of this Volume.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4; * * @return This builder for chaining. */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000008); type_ = 0; onChanged(); return this; } private int protocol_ = 0; /** * * *
     * Volume protocol.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; * * @return The enum numeric value on the wire for protocol. */ @java.lang.Override public int getProtocolValue() { return protocol_; } /** * * *
     * Volume protocol.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; * * @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_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Volume protocol.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; * * @return The protocol. */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol getProtocol() { com.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol result = com.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol.forNumber(protocol_); return result == null ? com.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol.UNRECOGNIZED : result; } /** * * *
     * Volume protocol.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; * * @param value The protocol to set. * @return This builder for chaining. */ public Builder setProtocol(com.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; protocol_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Volume protocol.
     * 
* * .google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5; * * @return This builder for chaining. */ public Builder clearProtocol() { bitField0_ = (bitField0_ & ~0x00000010); protocol_ = 0; onChanged(); return this; } private int sizeGb_; /** * * *
     * The requested size of this volume, in GB.
     * 
* * int32 size_gb = 6; * * @return The sizeGb. */ @java.lang.Override public int getSizeGb() { return sizeGb_; } /** * * *
     * The requested size of this volume, in GB.
     * 
* * int32 size_gb = 6; * * @param value The sizeGb to set. * @return This builder for chaining. */ public Builder setSizeGb(int value) { sizeGb_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * The requested size of this volume, in GB.
     * 
* * int32 size_gb = 6; * * @return This builder for chaining. */ public Builder clearSizeGb() { bitField0_ = (bitField0_ & ~0x00000020); sizeGb_ = 0; onChanged(); return this; } private java.util.List lunRanges_ = java.util.Collections.emptyList(); private void ensureLunRangesIsMutable() { if (!((bitField0_ & 0x00000040) != 0)) { lunRanges_ = new java.util.ArrayList( lunRanges_); bitField0_ |= 0x00000040; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.Builder, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRangeOrBuilder> lunRangesBuilder_; /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public java.util.List getLunRangesList() { if (lunRangesBuilder_ == null) { return java.util.Collections.unmodifiableList(lunRanges_); } else { return lunRangesBuilder_.getMessageList(); } } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public int getLunRangesCount() { if (lunRangesBuilder_ == null) { return lunRanges_.size(); } else { return lunRangesBuilder_.getCount(); } } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange getLunRanges(int index) { if (lunRangesBuilder_ == null) { return lunRanges_.get(index); } else { return lunRangesBuilder_.getMessage(index); } } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public Builder setLunRanges( int index, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange value) { if (lunRangesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLunRangesIsMutable(); lunRanges_.set(index, value); onChanged(); } else { lunRangesBuilder_.setMessage(index, value); } return this; } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public Builder setLunRanges( int index, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.Builder builderForValue) { if (lunRangesBuilder_ == null) { ensureLunRangesIsMutable(); lunRanges_.set(index, builderForValue.build()); onChanged(); } else { lunRangesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public Builder addLunRanges(com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange value) { if (lunRangesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLunRangesIsMutable(); lunRanges_.add(value); onChanged(); } else { lunRangesBuilder_.addMessage(value); } return this; } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public Builder addLunRanges( int index, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange value) { if (lunRangesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLunRangesIsMutable(); lunRanges_.add(index, value); onChanged(); } else { lunRangesBuilder_.addMessage(index, value); } return this; } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public Builder addLunRanges( com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.Builder builderForValue) { if (lunRangesBuilder_ == null) { ensureLunRangesIsMutable(); lunRanges_.add(builderForValue.build()); onChanged(); } else { lunRangesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public Builder addLunRanges( int index, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.Builder builderForValue) { if (lunRangesBuilder_ == null) { ensureLunRangesIsMutable(); lunRanges_.add(index, builderForValue.build()); onChanged(); } else { lunRangesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public Builder addAllLunRanges( java.lang.Iterable values) { if (lunRangesBuilder_ == null) { ensureLunRangesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, lunRanges_); onChanged(); } else { lunRangesBuilder_.addAllMessages(values); } return this; } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public Builder clearLunRanges() { if (lunRangesBuilder_ == null) { lunRanges_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { lunRangesBuilder_.clear(); } return this; } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public Builder removeLunRanges(int index) { if (lunRangesBuilder_ == null) { ensureLunRangesIsMutable(); lunRanges_.remove(index); onChanged(); } else { lunRangesBuilder_.remove(index); } return this; } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.Builder getLunRangesBuilder( int index) { return getLunRangesFieldBuilder().getBuilder(index); } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRangeOrBuilder getLunRangesOrBuilder(int index) { if (lunRangesBuilder_ == null) { return lunRanges_.get(index); } else { return lunRangesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public java.util.List< ? extends com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRangeOrBuilder> getLunRangesOrBuilderList() { if (lunRangesBuilder_ != null) { return lunRangesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(lunRanges_); } } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.Builder addLunRangesBuilder() { return getLunRangesFieldBuilder() .addBuilder( com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.getDefaultInstance()); } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.Builder addLunRangesBuilder( int index) { return getLunRangesFieldBuilder() .addBuilder( index, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.getDefaultInstance()); } /** * * *
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7; * */ public java.util.List getLunRangesBuilderList() { return getLunRangesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.Builder, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRangeOrBuilder> getLunRangesFieldBuilder() { if (lunRangesBuilder_ == null) { lunRangesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRange.Builder, com.google.cloud.baremetalsolution.v2.VolumeConfig.LunRangeOrBuilder>( lunRanges_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); lunRanges_ = null; } return lunRangesBuilder_; } private com.google.protobuf.LazyStringArrayList machineIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureMachineIdsIsMutable() { if (!machineIds_.isModifiable()) { machineIds_ = new com.google.protobuf.LazyStringArrayList(machineIds_); } bitField0_ |= 0x00000080; } /** * * *
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     * 
* * repeated string machine_ids = 8; * * @return A list containing the machineIds. */ public com.google.protobuf.ProtocolStringList getMachineIdsList() { machineIds_.makeImmutable(); return machineIds_; } /** * * *
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     * 
* * repeated string machine_ids = 8; * * @return The count of machineIds. */ public int getMachineIdsCount() { return machineIds_.size(); } /** * * *
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     * 
* * repeated string machine_ids = 8; * * @param index The index of the element to return. * @return The machineIds at the given index. */ public java.lang.String getMachineIds(int index) { return machineIds_.get(index); } /** * * *
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     * 
* * repeated string machine_ids = 8; * * @param index The index of the value to return. * @return The bytes of the machineIds at the given index. */ public com.google.protobuf.ByteString getMachineIdsBytes(int index) { return machineIds_.getByteString(index); } /** * * *
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     * 
* * repeated string machine_ids = 8; * * @param index The index to set the value at. * @param value The machineIds to set. * @return This builder for chaining. */ public Builder setMachineIds(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureMachineIdsIsMutable(); machineIds_.set(index, value); bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     * 
* * repeated string machine_ids = 8; * * @param value The machineIds to add. * @return This builder for chaining. */ public Builder addMachineIds(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureMachineIdsIsMutable(); machineIds_.add(value); bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     * 
* * repeated string machine_ids = 8; * * @param values The machineIds to add. * @return This builder for chaining. */ public Builder addAllMachineIds(java.lang.Iterable values) { ensureMachineIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, machineIds_); bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     * 
* * repeated string machine_ids = 8; * * @return This builder for chaining. */ public Builder clearMachineIds() { machineIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000080); ; onChanged(); return this; } /** * * *
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     * 
* * repeated string machine_ids = 8; * * @param value The bytes of the machineIds to add. * @return This builder for chaining. */ public Builder addMachineIdsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureMachineIdsIsMutable(); machineIds_.add(value); bitField0_ |= 0x00000080; onChanged(); return this; } private java.util.List nfsExports_ = java.util.Collections.emptyList(); private void ensureNfsExportsIsMutable() { if (!((bitField0_ & 0x00000100) != 0)) { nfsExports_ = new java.util.ArrayList( nfsExports_); bitField0_ |= 0x00000100; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Builder, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExportOrBuilder> nfsExportsBuilder_; /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public java.util.List getNfsExportsList() { if (nfsExportsBuilder_ == null) { return java.util.Collections.unmodifiableList(nfsExports_); } else { return nfsExportsBuilder_.getMessageList(); } } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public int getNfsExportsCount() { if (nfsExportsBuilder_ == null) { return nfsExports_.size(); } else { return nfsExportsBuilder_.getCount(); } } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport getNfsExports(int index) { if (nfsExportsBuilder_ == null) { return nfsExports_.get(index); } else { return nfsExportsBuilder_.getMessage(index); } } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public Builder setNfsExports( int index, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport value) { if (nfsExportsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNfsExportsIsMutable(); nfsExports_.set(index, value); onChanged(); } else { nfsExportsBuilder_.setMessage(index, value); } return this; } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public Builder setNfsExports( int index, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Builder builderForValue) { if (nfsExportsBuilder_ == null) { ensureNfsExportsIsMutable(); nfsExports_.set(index, builderForValue.build()); onChanged(); } else { nfsExportsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public Builder addNfsExports( com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport value) { if (nfsExportsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNfsExportsIsMutable(); nfsExports_.add(value); onChanged(); } else { nfsExportsBuilder_.addMessage(value); } return this; } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public Builder addNfsExports( int index, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport value) { if (nfsExportsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNfsExportsIsMutable(); nfsExports_.add(index, value); onChanged(); } else { nfsExportsBuilder_.addMessage(index, value); } return this; } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public Builder addNfsExports( com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Builder builderForValue) { if (nfsExportsBuilder_ == null) { ensureNfsExportsIsMutable(); nfsExports_.add(builderForValue.build()); onChanged(); } else { nfsExportsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public Builder addNfsExports( int index, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Builder builderForValue) { if (nfsExportsBuilder_ == null) { ensureNfsExportsIsMutable(); nfsExports_.add(index, builderForValue.build()); onChanged(); } else { nfsExportsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public Builder addAllNfsExports( java.lang.Iterable values) { if (nfsExportsBuilder_ == null) { ensureNfsExportsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nfsExports_); onChanged(); } else { nfsExportsBuilder_.addAllMessages(values); } return this; } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public Builder clearNfsExports() { if (nfsExportsBuilder_ == null) { nfsExports_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000100); onChanged(); } else { nfsExportsBuilder_.clear(); } return this; } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public Builder removeNfsExports(int index) { if (nfsExportsBuilder_ == null) { ensureNfsExportsIsMutable(); nfsExports_.remove(index); onChanged(); } else { nfsExportsBuilder_.remove(index); } return this; } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Builder getNfsExportsBuilder(int index) { return getNfsExportsFieldBuilder().getBuilder(index); } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExportOrBuilder getNfsExportsOrBuilder(int index) { if (nfsExportsBuilder_ == null) { return nfsExports_.get(index); } else { return nfsExportsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public java.util.List< ? extends com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExportOrBuilder> getNfsExportsOrBuilderList() { if (nfsExportsBuilder_ != null) { return nfsExportsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(nfsExports_); } } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Builder addNfsExportsBuilder() { return getNfsExportsFieldBuilder() .addBuilder( com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.getDefaultInstance()); } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Builder addNfsExportsBuilder(int index) { return getNfsExportsFieldBuilder() .addBuilder( index, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.getDefaultInstance()); } /** * * *
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     * 
* * repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9; * */ public java.util.List getNfsExportsBuilderList() { return getNfsExportsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Builder, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExportOrBuilder> getNfsExportsFieldBuilder() { if (nfsExportsBuilder_ == null) { nfsExportsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport.Builder, com.google.cloud.baremetalsolution.v2.VolumeConfig.NfsExportOrBuilder>( nfsExports_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); nfsExports_ = null; } return nfsExportsBuilder_; } private java.lang.Object userNote_ = ""; /** * * *
     * User note field, it can be used by customers to add additional information
     * for the BMS Ops team .
     * 
* * string user_note = 10; * * @return The userNote. */ public java.lang.String getUserNote() { java.lang.Object ref = userNote_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); userNote_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * User note field, it can be used by customers to add additional information
     * for the BMS Ops team .
     * 
* * string user_note = 10; * * @return The bytes for userNote. */ public com.google.protobuf.ByteString getUserNoteBytes() { java.lang.Object ref = userNote_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); userNote_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * User note field, it can be used by customers to add additional information
     * for the BMS Ops team .
     * 
* * string user_note = 10; * * @param value The userNote to set. * @return This builder for chaining. */ public Builder setUserNote(java.lang.String value) { if (value == null) { throw new NullPointerException(); } userNote_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * User note field, it can be used by customers to add additional information
     * for the BMS Ops team .
     * 
* * string user_note = 10; * * @return This builder for chaining. */ public Builder clearUserNote() { userNote_ = getDefaultInstance().getUserNote(); bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } /** * * *
     * User note field, it can be used by customers to add additional information
     * for the BMS Ops team .
     * 
* * string user_note = 10; * * @param value The bytes for userNote to set. * @return This builder for chaining. */ public Builder setUserNoteBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); userNote_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } private java.lang.Object gcpService_ = ""; /** * * *
     * The GCP service of the storage volume. Available gcp_service are in
     * https://cloud.google.com/bare-metal/docs/bms-planning.
     * 
* * string gcp_service = 11; * * @return The gcpService. */ public java.lang.String getGcpService() { java.lang.Object ref = gcpService_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); gcpService_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The GCP service of the storage volume. Available gcp_service are in
     * https://cloud.google.com/bare-metal/docs/bms-planning.
     * 
* * string gcp_service = 11; * * @return The bytes for gcpService. */ public com.google.protobuf.ByteString getGcpServiceBytes() { java.lang.Object ref = gcpService_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); gcpService_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The GCP service of the storage volume. Available gcp_service are in
     * https://cloud.google.com/bare-metal/docs/bms-planning.
     * 
* * string gcp_service = 11; * * @param value The gcpService to set. * @return This builder for chaining. */ public Builder setGcpService(java.lang.String value) { if (value == null) { throw new NullPointerException(); } gcpService_ = value; bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * The GCP service of the storage volume. Available gcp_service are in
     * https://cloud.google.com/bare-metal/docs/bms-planning.
     * 
* * string gcp_service = 11; * * @return This builder for chaining. */ public Builder clearGcpService() { gcpService_ = getDefaultInstance().getGcpService(); bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } /** * * *
     * The GCP service of the storage volume. Available gcp_service are in
     * https://cloud.google.com/bare-metal/docs/bms-planning.
     * 
* * string gcp_service = 11; * * @param value The bytes for gcpService to set. * @return This builder for chaining. */ public Builder setGcpServiceBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); gcpService_ = value; bitField0_ |= 0x00000400; onChanged(); return this; } private int performanceTier_ = 0; /** * * *
     * Performance tier of the Volume.
     * Default is SHARED.
     * 
* * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; * * @return The enum numeric value on the wire for performanceTier. */ @java.lang.Override public int getPerformanceTierValue() { return performanceTier_; } /** * * *
     * Performance tier of the Volume.
     * Default is SHARED.
     * 
* * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; * * @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_ |= 0x00000800; onChanged(); return this; } /** * * *
     * Performance tier of the Volume.
     * Default is SHARED.
     * 
* * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; * * @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; } /** * * *
     * Performance tier of the Volume.
     * Default is SHARED.
     * 
* * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; * * @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_ |= 0x00000800; performanceTier_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Performance tier of the Volume.
     * Default is SHARED.
     * 
* * .google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12; * * @return This builder for chaining. */ public Builder clearPerformanceTier() { bitField0_ = (bitField0_ & ~0x00000800); performanceTier_ = 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.VolumeConfig) } // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.VolumeConfig) private static final com.google.cloud.baremetalsolution.v2.VolumeConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.VolumeConfig(); } public static com.google.cloud.baremetalsolution.v2.VolumeConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public VolumeConfig 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.VolumeConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy