/*
 * Copyright 2020 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/lun.proto

package com.google.cloud.baremetalsolution.v2;

/**
 *
 *
 * <pre>
 * A storage volume logical unit number (LUN).
 * </pre>
 *
 * Protobuf type {@code google.cloud.baremetalsolution.v2.Lun}
 */
public final class Lun extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.Lun)
    LunOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use Lun.newBuilder() to construct.
  private Lun(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Lun() {
    name_ = "";
    id_ = "";
    state_ = 0;
    multiprotocolType_ = 0;
    storageVolume_ = "";
    storageType_ = 0;
    wwid_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new Lun();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.baremetalsolution.v2.LunProto
        .internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.baremetalsolution.v2.LunProto
        .internal_static_google_cloud_baremetalsolution_v2_Lun_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.baremetalsolution.v2.Lun.class,
            com.google.cloud.baremetalsolution.v2.Lun.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * The possible states for the LUN.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.baremetalsolution.v2.Lun.State}
   */
  public enum State implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * The LUN is in an unknown state.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    STATE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * The LUN is being created.
     * </pre>
     *
     * <code>CREATING = 1;</code>
     */
    CREATING(1),
    /**
     *
     *
     * <pre>
     * The LUN is being updated.
     * </pre>
     *
     * <code>UPDATING = 2;</code>
     */
    UPDATING(2),
    /**
     *
     *
     * <pre>
     * The LUN is ready for use.
     * </pre>
     *
     * <code>READY = 3;</code>
     */
    READY(3),
    /**
     *
     *
     * <pre>
     * The LUN has been requested to be deleted.
     * </pre>
     *
     * <code>DELETING = 4;</code>
     */
    DELETING(4),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * The LUN is in an unknown state.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    public static final int STATE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * The LUN is being created.
     * </pre>
     *
     * <code>CREATING = 1;</code>
     */
    public static final int CREATING_VALUE = 1;
    /**
     *
     *
     * <pre>
     * The LUN is being updated.
     * </pre>
     *
     * <code>UPDATING = 2;</code>
     */
    public static final int UPDATING_VALUE = 2;
    /**
     *
     *
     * <pre>
     * The LUN is ready for use.
     * </pre>
     *
     * <code>READY = 3;</code>
     */
    public static final int READY_VALUE = 3;
    /**
     *
     *
     * <pre>
     * The LUN has been requested to be deleted.
     * </pre>
     *
     * <code>DELETING = 4;</code>
     */
    public static final int DELETING_VALUE = 4;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static State valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static State forNumber(int value) {
      switch (value) {
        case 0:
          return STATE_UNSPECIFIED;
        case 1:
          return CREATING;
        case 2:
          return UPDATING;
        case 3:
          return READY;
        case 4:
          return DELETING;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<State> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<State>() {
          public State findValueByNumber(int number) {
            return State.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.cloud.baremetalsolution.v2.Lun.getDescriptor().getEnumTypes().get(0);
    }

    private static final State[] VALUES = values();

    public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private State(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.Lun.State)
  }

  /**
   *
   *
   * <pre>
   * Display the operating systems present for the LUN multiprotocol type.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.baremetalsolution.v2.Lun.MultiprotocolType}
   */
  public enum MultiprotocolType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Server has no OS specified.
     * </pre>
     *
     * <code>MULTIPROTOCOL_TYPE_UNSPECIFIED = 0;</code>
     */
    MULTIPROTOCOL_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Server with Linux OS.
     * </pre>
     *
     * <code>LINUX = 1;</code>
     */
    LINUX(1),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Server has no OS specified.
     * </pre>
     *
     * <code>MULTIPROTOCOL_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int MULTIPROTOCOL_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Server with Linux OS.
     * </pre>
     *
     * <code>LINUX = 1;</code>
     */
    public static final int LINUX_VALUE = 1;

    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 MultiprotocolType 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 MultiprotocolType forNumber(int value) {
      switch (value) {
        case 0:
          return MULTIPROTOCOL_TYPE_UNSPECIFIED;
        case 1:
          return LINUX;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<MultiprotocolType>
        internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<MultiprotocolType>
        internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<MultiprotocolType>() {
              public MultiprotocolType findValueByNumber(int number) {
                return MultiprotocolType.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.Lun.getDescriptor().getEnumTypes().get(1);
    }

    private static final MultiprotocolType[] VALUES = values();

    public static MultiprotocolType 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 MultiprotocolType(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.Lun.MultiprotocolType)
  }

  /**
   *
   *
   * <pre>
   * The storage types for a LUN.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.baremetalsolution.v2.Lun.StorageType}
   */
  public enum StorageType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * The storage type for this LUN is unknown.
     * </pre>
     *
     * <code>STORAGE_TYPE_UNSPECIFIED = 0;</code>
     */
    STORAGE_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * This storage type for this LUN is SSD.
     * </pre>
     *
     * <code>SSD = 1;</code>
     */
    SSD(1),
    /**
     *
     *
     * <pre>
     * This storage type for this LUN is HDD.
     * </pre>
     *
     * <code>HDD = 2;</code>
     */
    HDD(2),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * The storage type for this LUN is unknown.
     * </pre>
     *
     * <code>STORAGE_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int STORAGE_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * This storage type for this LUN is SSD.
     * </pre>
     *
     * <code>SSD = 1;</code>
     */
    public static final int SSD_VALUE = 1;
    /**
     *
     *
     * <pre>
     * This storage type for this LUN is HDD.
     * </pre>
     *
     * <code>HDD = 2;</code>
     */
    public static final int HDD_VALUE = 2;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static StorageType valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static StorageType forNumber(int value) {
      switch (value) {
        case 0:
          return STORAGE_TYPE_UNSPECIFIED;
        case 1:
          return SSD;
        case 2:
          return HDD;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<StorageType> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<StorageType> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<StorageType>() {
          public StorageType findValueByNumber(int number) {
            return StorageType.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.cloud.baremetalsolution.v2.Lun.getDescriptor().getEnumTypes().get(2);
    }

    private static final StorageType[] VALUES = values();

    public static StorageType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private StorageType(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.Lun.StorageType)
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The name of the LUN.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @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;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The name of the LUN.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @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 = 10;

  @SuppressWarnings("serial")
  private volatile java.lang.Object id_ = "";
  /**
   *
   *
   * <pre>
   * An identifier for the LUN, generated by the backend.
   * </pre>
   *
   * <code>string id = 10;</code>
   *
   * @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;
    }
  }
  /**
   *
   *
   * <pre>
   * An identifier for the LUN, generated by the backend.
   * </pre>
   *
   * <code>string id = 10;</code>
   *
   * @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 STATE_FIELD_NUMBER = 2;
  private int state_ = 0;
  /**
   *
   *
   * <pre>
   * The state of this storage volume.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.Lun.State state = 2;</code>
   *
   * @return The enum numeric value on the wire for state.
   */
  @java.lang.Override
  public int getStateValue() {
    return state_;
  }
  /**
   *
   *
   * <pre>
   * The state of this storage volume.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.Lun.State state = 2;</code>
   *
   * @return The state.
   */
  @java.lang.Override
  public com.google.cloud.baremetalsolution.v2.Lun.State getState() {
    com.google.cloud.baremetalsolution.v2.Lun.State result =
        com.google.cloud.baremetalsolution.v2.Lun.State.forNumber(state_);
    return result == null ? com.google.cloud.baremetalsolution.v2.Lun.State.UNRECOGNIZED : result;
  }

  public static final int SIZE_GB_FIELD_NUMBER = 3;
  private long sizeGb_ = 0L;
  /**
   *
   *
   * <pre>
   * The size of this LUN, in gigabytes.
   * </pre>
   *
   * <code>int64 size_gb = 3;</code>
   *
   * @return The sizeGb.
   */
  @java.lang.Override
  public long getSizeGb() {
    return sizeGb_;
  }

  public static final int MULTIPROTOCOL_TYPE_FIELD_NUMBER = 4;
  private int multiprotocolType_ = 0;
  /**
   *
   *
   * <pre>
   * The LUN multiprotocol type ensures the characteristics of the LUN are
   * optimized for each operating system.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4;</code>
   *
   * @return The enum numeric value on the wire for multiprotocolType.
   */
  @java.lang.Override
  public int getMultiprotocolTypeValue() {
    return multiprotocolType_;
  }
  /**
   *
   *
   * <pre>
   * The LUN multiprotocol type ensures the characteristics of the LUN are
   * optimized for each operating system.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4;</code>
   *
   * @return The multiprotocolType.
   */
  @java.lang.Override
  public com.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType getMultiprotocolType() {
    com.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType result =
        com.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType.forNumber(multiprotocolType_);
    return result == null
        ? com.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType.UNRECOGNIZED
        : result;
  }

  public static final int STORAGE_VOLUME_FIELD_NUMBER = 5;

  @SuppressWarnings("serial")
  private volatile java.lang.Object storageVolume_ = "";
  /**
   *
   *
   * <pre>
   * Display the storage volume for this LUN.
   * </pre>
   *
   * <code>string storage_volume = 5 [(.google.api.resource_reference) = { ... }</code>
   *
   * @return The storageVolume.
   */
  @java.lang.Override
  public java.lang.String getStorageVolume() {
    java.lang.Object ref = storageVolume_;
    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();
      storageVolume_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Display the storage volume for this LUN.
   * </pre>
   *
   * <code>string storage_volume = 5 [(.google.api.resource_reference) = { ... }</code>
   *
   * @return The bytes for storageVolume.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getStorageVolumeBytes() {
    java.lang.Object ref = storageVolume_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      storageVolume_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SHAREABLE_FIELD_NUMBER = 6;
  private boolean shareable_ = false;
  /**
   *
   *
   * <pre>
   * Display if this LUN can be shared between multiple physical servers.
   * </pre>
   *
   * <code>bool shareable = 6;</code>
   *
   * @return The shareable.
   */
  @java.lang.Override
  public boolean getShareable() {
    return shareable_;
  }

  public static final int BOOT_LUN_FIELD_NUMBER = 7;
  private boolean bootLun_ = false;
  /**
   *
   *
   * <pre>
   * Display if this LUN is a boot LUN.
   * </pre>
   *
   * <code>bool boot_lun = 7;</code>
   *
   * @return The bootLun.
   */
  @java.lang.Override
  public boolean getBootLun() {
    return bootLun_;
  }

  public static final int STORAGE_TYPE_FIELD_NUMBER = 8;
  private int storageType_ = 0;
  /**
   *
   *
   * <pre>
   * The storage type for this LUN.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8;</code>
   *
   * @return The enum numeric value on the wire for storageType.
   */
  @java.lang.Override
  public int getStorageTypeValue() {
    return storageType_;
  }
  /**
   *
   *
   * <pre>
   * The storage type for this LUN.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8;</code>
   *
   * @return The storageType.
   */
  @java.lang.Override
  public com.google.cloud.baremetalsolution.v2.Lun.StorageType getStorageType() {
    com.google.cloud.baremetalsolution.v2.Lun.StorageType result =
        com.google.cloud.baremetalsolution.v2.Lun.StorageType.forNumber(storageType_);
    return result == null
        ? com.google.cloud.baremetalsolution.v2.Lun.StorageType.UNRECOGNIZED
        : result;
  }

  public static final int WWID_FIELD_NUMBER = 9;

  @SuppressWarnings("serial")
  private volatile java.lang.Object wwid_ = "";
  /**
   *
   *
   * <pre>
   * The WWID for this LUN.
   * </pre>
   *
   * <code>string wwid = 9;</code>
   *
   * @return The wwid.
   */
  @java.lang.Override
  public java.lang.String getWwid() {
    java.lang.Object ref = wwid_;
    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();
      wwid_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The WWID for this LUN.
   * </pre>
   *
   * <code>string wwid = 9;</code>
   *
   * @return The bytes for wwid.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getWwidBytes() {
    java.lang.Object ref = wwid_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      wwid_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (state_ != com.google.cloud.baremetalsolution.v2.Lun.State.STATE_UNSPECIFIED.getNumber()) {
      output.writeEnum(2, state_);
    }
    if (sizeGb_ != 0L) {
      output.writeInt64(3, sizeGb_);
    }
    if (multiprotocolType_
        != com.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType
            .MULTIPROTOCOL_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(4, multiprotocolType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageVolume_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, storageVolume_);
    }
    if (shareable_ != false) {
      output.writeBool(6, shareable_);
    }
    if (bootLun_ != false) {
      output.writeBool(7, bootLun_);
    }
    if (storageType_
        != com.google.cloud.baremetalsolution.v2.Lun.StorageType.STORAGE_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(8, storageType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wwid_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, wwid_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, id_);
    }
    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 (state_ != com.google.cloud.baremetalsolution.v2.Lun.State.STATE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_);
    }
    if (sizeGb_ != 0L) {
      size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, sizeGb_);
    }
    if (multiprotocolType_
        != com.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType
            .MULTIPROTOCOL_TYPE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, multiprotocolType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageVolume_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, storageVolume_);
    }
    if (shareable_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, shareable_);
    }
    if (bootLun_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, bootLun_);
    }
    if (storageType_
        != com.google.cloud.baremetalsolution.v2.Lun.StorageType.STORAGE_TYPE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, storageType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wwid_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, wwid_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, id_);
    }
    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.Lun)) {
      return super.equals(obj);
    }
    com.google.cloud.baremetalsolution.v2.Lun other =
        (com.google.cloud.baremetalsolution.v2.Lun) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getId().equals(other.getId())) return false;
    if (state_ != other.state_) return false;
    if (getSizeGb() != other.getSizeGb()) return false;
    if (multiprotocolType_ != other.multiprotocolType_) return false;
    if (!getStorageVolume().equals(other.getStorageVolume())) return false;
    if (getShareable() != other.getShareable()) return false;
    if (getBootLun() != other.getBootLun()) return false;
    if (storageType_ != other.storageType_) return false;
    if (!getWwid().equals(other.getWwid())) 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) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + state_;
    hash = (37 * hash) + SIZE_GB_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeGb());
    hash = (37 * hash) + MULTIPROTOCOL_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + multiprotocolType_;
    hash = (37 * hash) + STORAGE_VOLUME_FIELD_NUMBER;
    hash = (53 * hash) + getStorageVolume().hashCode();
    hash = (37 * hash) + SHAREABLE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShareable());
    hash = (37 * hash) + BOOT_LUN_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBootLun());
    hash = (37 * hash) + STORAGE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + storageType_;
    hash = (37 * hash) + WWID_FIELD_NUMBER;
    hash = (53 * hash) + getWwid().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.baremetalsolution.v2.Lun parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.baremetalsolution.v2.Lun 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.Lun parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.baremetalsolution.v2.Lun 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.Lun parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.baremetalsolution.v2.Lun 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.Lun parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.baremetalsolution.v2.Lun 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.Lun parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.baremetalsolution.v2.Lun 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.Lun 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.Lun 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.Lun 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;
  }
  /**
   *
   *
   * <pre>
   * A storage volume logical unit number (LUN).
   * </pre>
   *
   * Protobuf type {@code google.cloud.baremetalsolution.v2.Lun}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.Lun)
      com.google.cloud.baremetalsolution.v2.LunOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.baremetalsolution.v2.LunProto
          .internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.baremetalsolution.v2.LunProto
          .internal_static_google_cloud_baremetalsolution_v2_Lun_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.baremetalsolution.v2.Lun.class,
              com.google.cloud.baremetalsolution.v2.Lun.Builder.class);
    }

    // Construct using com.google.cloud.baremetalsolution.v2.Lun.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_ = "";
      state_ = 0;
      sizeGb_ = 0L;
      multiprotocolType_ = 0;
      storageVolume_ = "";
      shareable_ = false;
      bootLun_ = false;
      storageType_ = 0;
      wwid_ = "";
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.baremetalsolution.v2.LunProto
          .internal_static_google_cloud_baremetalsolution_v2_Lun_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.baremetalsolution.v2.Lun getDefaultInstanceForType() {
      return com.google.cloud.baremetalsolution.v2.Lun.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.baremetalsolution.v2.Lun build() {
      com.google.cloud.baremetalsolution.v2.Lun result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.baremetalsolution.v2.Lun buildPartial() {
      com.google.cloud.baremetalsolution.v2.Lun result =
          new com.google.cloud.baremetalsolution.v2.Lun(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartial0(com.google.cloud.baremetalsolution.v2.Lun 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.state_ = state_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.sizeGb_ = sizeGb_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.multiprotocolType_ = multiprotocolType_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.storageVolume_ = storageVolume_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.shareable_ = shareable_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.bootLun_ = bootLun_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.storageType_ = storageType_;
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.wwid_ = wwid_;
      }
    }

    @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.Lun) {
        return mergeFrom((com.google.cloud.baremetalsolution.v2.Lun) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Lun other) {
      if (other == com.google.cloud.baremetalsolution.v2.Lun.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.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (other.getSizeGb() != 0L) {
        setSizeGb(other.getSizeGb());
      }
      if (other.multiprotocolType_ != 0) {
        setMultiprotocolTypeValue(other.getMultiprotocolTypeValue());
      }
      if (!other.getStorageVolume().isEmpty()) {
        storageVolume_ = other.storageVolume_;
        bitField0_ |= 0x00000020;
        onChanged();
      }
      if (other.getShareable() != false) {
        setShareable(other.getShareable());
      }
      if (other.getBootLun() != false) {
        setBootLun(other.getBootLun());
      }
      if (other.storageType_ != 0) {
        setStorageTypeValue(other.getStorageTypeValue());
      }
      if (!other.getWwid().isEmpty()) {
        wwid_ = other.wwid_;
        bitField0_ |= 0x00000200;
        onChanged();
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 16:
              {
                state_ = input.readEnum();
                bitField0_ |= 0x00000004;
                break;
              } // case 16
            case 24:
              {
                sizeGb_ = input.readInt64();
                bitField0_ |= 0x00000008;
                break;
              } // case 24
            case 32:
              {
                multiprotocolType_ = input.readEnum();
                bitField0_ |= 0x00000010;
                break;
              } // case 32
            case 42:
              {
                storageVolume_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000020;
                break;
              } // case 42
            case 48:
              {
                shareable_ = input.readBool();
                bitField0_ |= 0x00000040;
                break;
              } // case 48
            case 56:
              {
                bootLun_ = input.readBool();
                bitField0_ |= 0x00000080;
                break;
              } // case 56
            case 64:
              {
                storageType_ = input.readEnum();
                bitField0_ |= 0x00000100;
                break;
              } // case 64
            case 74:
              {
                wwid_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000200;
                break;
              } // case 74
            case 82:
              {
                id_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 82
            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_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The name of the LUN.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The name of the LUN.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The name of the LUN.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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;
    }
    /**
     *
     *
     * <pre>
     * Output only. The name of the LUN.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The name of the LUN.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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_ = "";
    /**
     *
     *
     * <pre>
     * An identifier for the LUN, generated by the backend.
     * </pre>
     *
     * <code>string id = 10;</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * An identifier for the LUN, generated by the backend.
     * </pre>
     *
     * <code>string id = 10;</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * An identifier for the LUN, generated by the backend.
     * </pre>
     *
     * <code>string id = 10;</code>
     *
     * @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;
    }
    /**
     *
     *
     * <pre>
     * An identifier for the LUN, generated by the backend.
     * </pre>
     *
     * <code>string id = 10;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearId() {
      id_ = getDefaultInstance().getId();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * An identifier for the LUN, generated by the backend.
     * </pre>
     *
     * <code>string id = 10;</code>
     *
     * @param value The bytes for id to set.
     * @return This builder for chaining.
     */
    public Builder setIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      id_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private int state_ = 0;
    /**
     *
     *
     * <pre>
     * The state of this storage volume.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.State state = 2;</code>
     *
     * @return The enum numeric value on the wire for state.
     */
    @java.lang.Override
    public int getStateValue() {
      return state_;
    }
    /**
     *
     *
     * <pre>
     * The state of this storage volume.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.State state = 2;</code>
     *
     * @param value The enum numeric value on the wire for state to set.
     * @return This builder for chaining.
     */
    public Builder setStateValue(int value) {
      state_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state of this storage volume.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.State state = 2;</code>
     *
     * @return The state.
     */
    @java.lang.Override
    public com.google.cloud.baremetalsolution.v2.Lun.State getState() {
      com.google.cloud.baremetalsolution.v2.Lun.State result =
          com.google.cloud.baremetalsolution.v2.Lun.State.forNumber(state_);
      return result == null ? com.google.cloud.baremetalsolution.v2.Lun.State.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * The state of this storage volume.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.State state = 2;</code>
     *
     * @param value The state to set.
     * @return This builder for chaining.
     */
    public Builder setState(com.google.cloud.baremetalsolution.v2.Lun.State value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000004;
      state_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state of this storage volume.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.State state = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearState() {
      bitField0_ = (bitField0_ & ~0x00000004);
      state_ = 0;
      onChanged();
      return this;
    }

    private long sizeGb_;
    /**
     *
     *
     * <pre>
     * The size of this LUN, in gigabytes.
     * </pre>
     *
     * <code>int64 size_gb = 3;</code>
     *
     * @return The sizeGb.
     */
    @java.lang.Override
    public long getSizeGb() {
      return sizeGb_;
    }
    /**
     *
     *
     * <pre>
     * The size of this LUN, in gigabytes.
     * </pre>
     *
     * <code>int64 size_gb = 3;</code>
     *
     * @param value The sizeGb to set.
     * @return This builder for chaining.
     */
    public Builder setSizeGb(long value) {

      sizeGb_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The size of this LUN, in gigabytes.
     * </pre>
     *
     * <code>int64 size_gb = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSizeGb() {
      bitField0_ = (bitField0_ & ~0x00000008);
      sizeGb_ = 0L;
      onChanged();
      return this;
    }

    private int multiprotocolType_ = 0;
    /**
     *
     *
     * <pre>
     * The LUN multiprotocol type ensures the characteristics of the LUN are
     * optimized for each operating system.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4;</code>
     *
     * @return The enum numeric value on the wire for multiprotocolType.
     */
    @java.lang.Override
    public int getMultiprotocolTypeValue() {
      return multiprotocolType_;
    }
    /**
     *
     *
     * <pre>
     * The LUN multiprotocol type ensures the characteristics of the LUN are
     * optimized for each operating system.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4;</code>
     *
     * @param value The enum numeric value on the wire for multiprotocolType to set.
     * @return This builder for chaining.
     */
    public Builder setMultiprotocolTypeValue(int value) {
      multiprotocolType_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The LUN multiprotocol type ensures the characteristics of the LUN are
     * optimized for each operating system.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4;</code>
     *
     * @return The multiprotocolType.
     */
    @java.lang.Override
    public com.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType getMultiprotocolType() {
      com.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType result =
          com.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType.forNumber(multiprotocolType_);
      return result == null
          ? com.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * The LUN multiprotocol type ensures the characteristics of the LUN are
     * optimized for each operating system.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4;</code>
     *
     * @param value The multiprotocolType to set.
     * @return This builder for chaining.
     */
    public Builder setMultiprotocolType(
        com.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000010;
      multiprotocolType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The LUN multiprotocol type ensures the characteristics of the LUN are
     * optimized for each operating system.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.MultiprotocolType multiprotocol_type = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearMultiprotocolType() {
      bitField0_ = (bitField0_ & ~0x00000010);
      multiprotocolType_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object storageVolume_ = "";
    /**
     *
     *
     * <pre>
     * Display the storage volume for this LUN.
     * </pre>
     *
     * <code>string storage_volume = 5 [(.google.api.resource_reference) = { ... }</code>
     *
     * @return The storageVolume.
     */
    public java.lang.String getStorageVolume() {
      java.lang.Object ref = storageVolume_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        storageVolume_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Display the storage volume for this LUN.
     * </pre>
     *
     * <code>string storage_volume = 5 [(.google.api.resource_reference) = { ... }</code>
     *
     * @return The bytes for storageVolume.
     */
    public com.google.protobuf.ByteString getStorageVolumeBytes() {
      java.lang.Object ref = storageVolume_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        storageVolume_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Display the storage volume for this LUN.
     * </pre>
     *
     * <code>string storage_volume = 5 [(.google.api.resource_reference) = { ... }</code>
     *
     * @param value The storageVolume to set.
     * @return This builder for chaining.
     */
    public Builder setStorageVolume(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      storageVolume_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Display the storage volume for this LUN.
     * </pre>
     *
     * <code>string storage_volume = 5 [(.google.api.resource_reference) = { ... }</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearStorageVolume() {
      storageVolume_ = getDefaultInstance().getStorageVolume();
      bitField0_ = (bitField0_ & ~0x00000020);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Display the storage volume for this LUN.
     * </pre>
     *
     * <code>string storage_volume = 5 [(.google.api.resource_reference) = { ... }</code>
     *
     * @param value The bytes for storageVolume to set.
     * @return This builder for chaining.
     */
    public Builder setStorageVolumeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      storageVolume_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }

    private boolean shareable_;
    /**
     *
     *
     * <pre>
     * Display if this LUN can be shared between multiple physical servers.
     * </pre>
     *
     * <code>bool shareable = 6;</code>
     *
     * @return The shareable.
     */
    @java.lang.Override
    public boolean getShareable() {
      return shareable_;
    }
    /**
     *
     *
     * <pre>
     * Display if this LUN can be shared between multiple physical servers.
     * </pre>
     *
     * <code>bool shareable = 6;</code>
     *
     * @param value The shareable to set.
     * @return This builder for chaining.
     */
    public Builder setShareable(boolean value) {

      shareable_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Display if this LUN can be shared between multiple physical servers.
     * </pre>
     *
     * <code>bool shareable = 6;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearShareable() {
      bitField0_ = (bitField0_ & ~0x00000040);
      shareable_ = false;
      onChanged();
      return this;
    }

    private boolean bootLun_;
    /**
     *
     *
     * <pre>
     * Display if this LUN is a boot LUN.
     * </pre>
     *
     * <code>bool boot_lun = 7;</code>
     *
     * @return The bootLun.
     */
    @java.lang.Override
    public boolean getBootLun() {
      return bootLun_;
    }
    /**
     *
     *
     * <pre>
     * Display if this LUN is a boot LUN.
     * </pre>
     *
     * <code>bool boot_lun = 7;</code>
     *
     * @param value The bootLun to set.
     * @return This builder for chaining.
     */
    public Builder setBootLun(boolean value) {

      bootLun_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Display if this LUN is a boot LUN.
     * </pre>
     *
     * <code>bool boot_lun = 7;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearBootLun() {
      bitField0_ = (bitField0_ & ~0x00000080);
      bootLun_ = false;
      onChanged();
      return this;
    }

    private int storageType_ = 0;
    /**
     *
     *
     * <pre>
     * The storage type for this LUN.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8;</code>
     *
     * @return The enum numeric value on the wire for storageType.
     */
    @java.lang.Override
    public int getStorageTypeValue() {
      return storageType_;
    }
    /**
     *
     *
     * <pre>
     * The storage type for this LUN.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8;</code>
     *
     * @param value The enum numeric value on the wire for storageType to set.
     * @return This builder for chaining.
     */
    public Builder setStorageTypeValue(int value) {
      storageType_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The storage type for this LUN.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8;</code>
     *
     * @return The storageType.
     */
    @java.lang.Override
    public com.google.cloud.baremetalsolution.v2.Lun.StorageType getStorageType() {
      com.google.cloud.baremetalsolution.v2.Lun.StorageType result =
          com.google.cloud.baremetalsolution.v2.Lun.StorageType.forNumber(storageType_);
      return result == null
          ? com.google.cloud.baremetalsolution.v2.Lun.StorageType.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * The storage type for this LUN.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8;</code>
     *
     * @param value The storageType to set.
     * @return This builder for chaining.
     */
    public Builder setStorageType(com.google.cloud.baremetalsolution.v2.Lun.StorageType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000100;
      storageType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The storage type for this LUN.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Lun.StorageType storage_type = 8;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearStorageType() {
      bitField0_ = (bitField0_ & ~0x00000100);
      storageType_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object wwid_ = "";
    /**
     *
     *
     * <pre>
     * The WWID for this LUN.
     * </pre>
     *
     * <code>string wwid = 9;</code>
     *
     * @return The wwid.
     */
    public java.lang.String getWwid() {
      java.lang.Object ref = wwid_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        wwid_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The WWID for this LUN.
     * </pre>
     *
     * <code>string wwid = 9;</code>
     *
     * @return The bytes for wwid.
     */
    public com.google.protobuf.ByteString getWwidBytes() {
      java.lang.Object ref = wwid_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        wwid_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The WWID for this LUN.
     * </pre>
     *
     * <code>string wwid = 9;</code>
     *
     * @param value The wwid to set.
     * @return This builder for chaining.
     */
    public Builder setWwid(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      wwid_ = value;
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The WWID for this LUN.
     * </pre>
     *
     * <code>string wwid = 9;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearWwid() {
      wwid_ = getDefaultInstance().getWwid();
      bitField0_ = (bitField0_ & ~0x00000200);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The WWID for this LUN.
     * </pre>
     *
     * <code>string wwid = 9;</code>
     *
     * @param value The bytes for wwid to set.
     * @return This builder for chaining.
     */
    public Builder setWwidBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      wwid_ = value;
      bitField0_ |= 0x00000200;
      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.Lun)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.Lun)
  private static final com.google.cloud.baremetalsolution.v2.Lun DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.Lun();
  }

  public static com.google.cloud.baremetalsolution.v2.Lun getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Lun> PARSER =
      new com.google.protobuf.AbstractParser<Lun>() {
        @java.lang.Override
        public Lun 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<Lun> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<Lun> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.baremetalsolution.v2.Lun getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
