/*
 * 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/notebooks/v1/instance.proto

package com.google.cloud.notebooks.v1;

/**
 *
 *
 * <pre>
 * The definition of a notebook instance.
 * </pre>
 *
 * Protobuf type {@code google.cloud.notebooks.v1.Instance}
 */
public final class Instance extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance)
    InstanceOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use Instance.newBuilder() to construct.
  private Instance(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Instance() {
    name_ = "";
    postStartupScript_ = "";
    proxyUri_ = "";
    instanceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    serviceAccount_ = "";
    serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    machineType_ = "";
    state_ = 0;
    customGpuDriverPath_ = "";
    bootDiskType_ = 0;
    dataDiskType_ = 0;
    diskEncryption_ = 0;
    kmsKey_ = "";
    disks_ = java.util.Collections.emptyList();
    network_ = "";
    subnet_ = "";
    tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    upgradeHistory_ = java.util.Collections.emptyList();
    nicType_ = 0;
    creator_ = "";
  }

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

  @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.notebooks.v1.InstanceProto
        .internal_static_google_cloud_notebooks_v1_Instance_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 21:
        return internalGetLabels();
      case 22:
        return internalGetMetadata();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.notebooks.v1.InstanceProto
        .internal_static_google_cloud_notebooks_v1_Instance_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.notebooks.v1.Instance.class,
            com.google.cloud.notebooks.v1.Instance.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * Definition of the types of hardware accelerators that can be used on this
   * instance.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.notebooks.v1.Instance.AcceleratorType}
   */
  public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Accelerator type is not specified.
     * </pre>
     *
     * <code>ACCELERATOR_TYPE_UNSPECIFIED = 0;</code>
     */
    ACCELERATOR_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla K80.
     * </pre>
     *
     * <code>NVIDIA_TESLA_K80 = 1;</code>
     */
    NVIDIA_TESLA_K80(1),
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla P100.
     * </pre>
     *
     * <code>NVIDIA_TESLA_P100 = 2;</code>
     */
    NVIDIA_TESLA_P100(2),
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla V100.
     * </pre>
     *
     * <code>NVIDIA_TESLA_V100 = 3;</code>
     */
    NVIDIA_TESLA_V100(3),
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla P4.
     * </pre>
     *
     * <code>NVIDIA_TESLA_P4 = 4;</code>
     */
    NVIDIA_TESLA_P4(4),
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla T4.
     * </pre>
     *
     * <code>NVIDIA_TESLA_T4 = 5;</code>
     */
    NVIDIA_TESLA_T4(5),
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla A100.
     * </pre>
     *
     * <code>NVIDIA_TESLA_A100 = 11;</code>
     */
    NVIDIA_TESLA_A100(11),
    /**
     *
     *
     * <pre>
     * Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
     * </pre>
     *
     * <code>NVIDIA_TESLA_T4_VWS = 8;</code>
     */
    NVIDIA_TESLA_T4_VWS(8),
    /**
     *
     *
     * <pre>
     * Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
     * </pre>
     *
     * <code>NVIDIA_TESLA_P100_VWS = 9;</code>
     */
    NVIDIA_TESLA_P100_VWS(9),
    /**
     *
     *
     * <pre>
     * Accelerator type is NVIDIA Tesla P4 Virtual Workstations.
     * </pre>
     *
     * <code>NVIDIA_TESLA_P4_VWS = 10;</code>
     */
    NVIDIA_TESLA_P4_VWS(10),
    /**
     *
     *
     * <pre>
     * (Coming soon) Accelerator type is TPU V2.
     * </pre>
     *
     * <code>TPU_V2 = 6;</code>
     */
    TPU_V2(6),
    /**
     *
     *
     * <pre>
     * (Coming soon) Accelerator type is TPU V3.
     * </pre>
     *
     * <code>TPU_V3 = 7;</code>
     */
    TPU_V3(7),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Accelerator type is not specified.
     * </pre>
     *
     * <code>ACCELERATOR_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla K80.
     * </pre>
     *
     * <code>NVIDIA_TESLA_K80 = 1;</code>
     */
    public static final int NVIDIA_TESLA_K80_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla P100.
     * </pre>
     *
     * <code>NVIDIA_TESLA_P100 = 2;</code>
     */
    public static final int NVIDIA_TESLA_P100_VALUE = 2;
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla V100.
     * </pre>
     *
     * <code>NVIDIA_TESLA_V100 = 3;</code>
     */
    public static final int NVIDIA_TESLA_V100_VALUE = 3;
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla P4.
     * </pre>
     *
     * <code>NVIDIA_TESLA_P4 = 4;</code>
     */
    public static final int NVIDIA_TESLA_P4_VALUE = 4;
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla T4.
     * </pre>
     *
     * <code>NVIDIA_TESLA_T4 = 5;</code>
     */
    public static final int NVIDIA_TESLA_T4_VALUE = 5;
    /**
     *
     *
     * <pre>
     * Accelerator type is Nvidia Tesla A100.
     * </pre>
     *
     * <code>NVIDIA_TESLA_A100 = 11;</code>
     */
    public static final int NVIDIA_TESLA_A100_VALUE = 11;
    /**
     *
     *
     * <pre>
     * Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
     * </pre>
     *
     * <code>NVIDIA_TESLA_T4_VWS = 8;</code>
     */
    public static final int NVIDIA_TESLA_T4_VWS_VALUE = 8;
    /**
     *
     *
     * <pre>
     * Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
     * </pre>
     *
     * <code>NVIDIA_TESLA_P100_VWS = 9;</code>
     */
    public static final int NVIDIA_TESLA_P100_VWS_VALUE = 9;
    /**
     *
     *
     * <pre>
     * Accelerator type is NVIDIA Tesla P4 Virtual Workstations.
     * </pre>
     *
     * <code>NVIDIA_TESLA_P4_VWS = 10;</code>
     */
    public static final int NVIDIA_TESLA_P4_VWS_VALUE = 10;
    /**
     *
     *
     * <pre>
     * (Coming soon) Accelerator type is TPU V2.
     * </pre>
     *
     * <code>TPU_V2 = 6;</code>
     */
    public static final int TPU_V2_VALUE = 6;
    /**
     *
     *
     * <pre>
     * (Coming soon) Accelerator type is TPU V3.
     * </pre>
     *
     * <code>TPU_V3 = 7;</code>
     */
    public static final int TPU_V3_VALUE = 7;

    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 AcceleratorType 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 AcceleratorType forNumber(int value) {
      switch (value) {
        case 0:
          return ACCELERATOR_TYPE_UNSPECIFIED;
        case 1:
          return NVIDIA_TESLA_K80;
        case 2:
          return NVIDIA_TESLA_P100;
        case 3:
          return NVIDIA_TESLA_V100;
        case 4:
          return NVIDIA_TESLA_P4;
        case 5:
          return NVIDIA_TESLA_T4;
        case 11:
          return NVIDIA_TESLA_A100;
        case 8:
          return NVIDIA_TESLA_T4_VWS;
        case 9:
          return NVIDIA_TESLA_P100_VWS;
        case 10:
          return NVIDIA_TESLA_P4_VWS;
        case 6:
          return TPU_V2;
        case 7:
          return TPU_V3;
        default:
          return null;
      }
    }

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

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

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

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

    // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.AcceleratorType)
  }

  /**
   *
   *
   * <pre>
   * The definition of the states of this instance.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.notebooks.v1.Instance.State}
   */
  public enum State implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * State is not specified.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    STATE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * The control logic is starting the instance.
     * </pre>
     *
     * <code>STARTING = 1;</code>
     */
    STARTING(1),
    /**
     *
     *
     * <pre>
     * The control logic is installing required frameworks and registering the
     * instance with notebook proxy
     * </pre>
     *
     * <code>PROVISIONING = 2;</code>
     */
    PROVISIONING(2),
    /**
     *
     *
     * <pre>
     * The instance is running.
     * </pre>
     *
     * <code>ACTIVE = 3;</code>
     */
    ACTIVE(3),
    /**
     *
     *
     * <pre>
     * The control logic is stopping the instance.
     * </pre>
     *
     * <code>STOPPING = 4;</code>
     */
    STOPPING(4),
    /**
     *
     *
     * <pre>
     * The instance is stopped.
     * </pre>
     *
     * <code>STOPPED = 5;</code>
     */
    STOPPED(5),
    /**
     *
     *
     * <pre>
     * The instance is deleted.
     * </pre>
     *
     * <code>DELETED = 6;</code>
     */
    DELETED(6),
    /**
     *
     *
     * <pre>
     * The instance is upgrading.
     * </pre>
     *
     * <code>UPGRADING = 7;</code>
     */
    UPGRADING(7),
    /**
     *
     *
     * <pre>
     * The instance is being created.
     * </pre>
     *
     * <code>INITIALIZING = 8;</code>
     */
    INITIALIZING(8),
    /**
     *
     *
     * <pre>
     * The instance is getting registered.
     * </pre>
     *
     * <code>REGISTERING = 9;</code>
     */
    REGISTERING(9),
    /**
     *
     *
     * <pre>
     * The instance is suspending.
     * </pre>
     *
     * <code>SUSPENDING = 10;</code>
     */
    SUSPENDING(10),
    /**
     *
     *
     * <pre>
     * The instance is suspended.
     * </pre>
     *
     * <code>SUSPENDED = 11;</code>
     */
    SUSPENDED(11),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * State is not specified.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    public static final int STATE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * The control logic is starting the instance.
     * </pre>
     *
     * <code>STARTING = 1;</code>
     */
    public static final int STARTING_VALUE = 1;
    /**
     *
     *
     * <pre>
     * The control logic is installing required frameworks and registering the
     * instance with notebook proxy
     * </pre>
     *
     * <code>PROVISIONING = 2;</code>
     */
    public static final int PROVISIONING_VALUE = 2;
    /**
     *
     *
     * <pre>
     * The instance is running.
     * </pre>
     *
     * <code>ACTIVE = 3;</code>
     */
    public static final int ACTIVE_VALUE = 3;
    /**
     *
     *
     * <pre>
     * The control logic is stopping the instance.
     * </pre>
     *
     * <code>STOPPING = 4;</code>
     */
    public static final int STOPPING_VALUE = 4;
    /**
     *
     *
     * <pre>
     * The instance is stopped.
     * </pre>
     *
     * <code>STOPPED = 5;</code>
     */
    public static final int STOPPED_VALUE = 5;
    /**
     *
     *
     * <pre>
     * The instance is deleted.
     * </pre>
     *
     * <code>DELETED = 6;</code>
     */
    public static final int DELETED_VALUE = 6;
    /**
     *
     *
     * <pre>
     * The instance is upgrading.
     * </pre>
     *
     * <code>UPGRADING = 7;</code>
     */
    public static final int UPGRADING_VALUE = 7;
    /**
     *
     *
     * <pre>
     * The instance is being created.
     * </pre>
     *
     * <code>INITIALIZING = 8;</code>
     */
    public static final int INITIALIZING_VALUE = 8;
    /**
     *
     *
     * <pre>
     * The instance is getting registered.
     * </pre>
     *
     * <code>REGISTERING = 9;</code>
     */
    public static final int REGISTERING_VALUE = 9;
    /**
     *
     *
     * <pre>
     * The instance is suspending.
     * </pre>
     *
     * <code>SUSPENDING = 10;</code>
     */
    public static final int SUSPENDING_VALUE = 10;
    /**
     *
     *
     * <pre>
     * The instance is suspended.
     * </pre>
     *
     * <code>SUSPENDED = 11;</code>
     */
    public static final int SUSPENDED_VALUE = 11;

    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 STARTING;
        case 2:
          return PROVISIONING;
        case 3:
          return ACTIVE;
        case 4:
          return STOPPING;
        case 5:
          return STOPPED;
        case 6:
          return DELETED;
        case 7:
          return UPGRADING;
        case 8:
          return INITIALIZING;
        case 9:
          return REGISTERING;
        case 10:
          return SUSPENDING;
        case 11:
          return SUSPENDED;
        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.notebooks.v1.Instance.getDescriptor().getEnumTypes().get(1);
    }

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

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

    private final int value;

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

    // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.State)
  }

  /**
   *
   *
   * <pre>
   * Possible disk types for notebook instances.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.notebooks.v1.Instance.DiskType}
   */
  public enum DiskType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Disk type not set.
     * </pre>
     *
     * <code>DISK_TYPE_UNSPECIFIED = 0;</code>
     */
    DISK_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Standard persistent disk type.
     * </pre>
     *
     * <code>PD_STANDARD = 1;</code>
     */
    PD_STANDARD(1),
    /**
     *
     *
     * <pre>
     * SSD persistent disk type.
     * </pre>
     *
     * <code>PD_SSD = 2;</code>
     */
    PD_SSD(2),
    /**
     *
     *
     * <pre>
     * Balanced persistent disk type.
     * </pre>
     *
     * <code>PD_BALANCED = 3;</code>
     */
    PD_BALANCED(3),
    /**
     *
     *
     * <pre>
     * Extreme persistent disk type.
     * </pre>
     *
     * <code>PD_EXTREME = 4;</code>
     */
    PD_EXTREME(4),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Disk type not set.
     * </pre>
     *
     * <code>DISK_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int DISK_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Standard persistent disk type.
     * </pre>
     *
     * <code>PD_STANDARD = 1;</code>
     */
    public static final int PD_STANDARD_VALUE = 1;
    /**
     *
     *
     * <pre>
     * SSD persistent disk type.
     * </pre>
     *
     * <code>PD_SSD = 2;</code>
     */
    public static final int PD_SSD_VALUE = 2;
    /**
     *
     *
     * <pre>
     * Balanced persistent disk type.
     * </pre>
     *
     * <code>PD_BALANCED = 3;</code>
     */
    public static final int PD_BALANCED_VALUE = 3;
    /**
     *
     *
     * <pre>
     * Extreme persistent disk type.
     * </pre>
     *
     * <code>PD_EXTREME = 4;</code>
     */
    public static final int PD_EXTREME_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 DiskType 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 DiskType forNumber(int value) {
      switch (value) {
        case 0:
          return DISK_TYPE_UNSPECIFIED;
        case 1:
          return PD_STANDARD;
        case 2:
          return PD_SSD;
        case 3:
          return PD_BALANCED;
        case 4:
          return PD_EXTREME;
        default:
          return null;
      }
    }

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

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

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

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

    // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.DiskType)
  }

  /**
   *
   *
   * <pre>
   * Definition of the disk encryption options.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.notebooks.v1.Instance.DiskEncryption}
   */
  public enum DiskEncryption implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Disk encryption is not specified.
     * </pre>
     *
     * <code>DISK_ENCRYPTION_UNSPECIFIED = 0;</code>
     */
    DISK_ENCRYPTION_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Use Google managed encryption keys to encrypt the boot disk.
     * </pre>
     *
     * <code>GMEK = 1;</code>
     */
    GMEK(1),
    /**
     *
     *
     * <pre>
     * Use customer managed encryption keys to encrypt the boot disk.
     * </pre>
     *
     * <code>CMEK = 2;</code>
     */
    CMEK(2),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Disk encryption is not specified.
     * </pre>
     *
     * <code>DISK_ENCRYPTION_UNSPECIFIED = 0;</code>
     */
    public static final int DISK_ENCRYPTION_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Use Google managed encryption keys to encrypt the boot disk.
     * </pre>
     *
     * <code>GMEK = 1;</code>
     */
    public static final int GMEK_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Use customer managed encryption keys to encrypt the boot disk.
     * </pre>
     *
     * <code>CMEK = 2;</code>
     */
    public static final int CMEK_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 DiskEncryption 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 DiskEncryption forNumber(int value) {
      switch (value) {
        case 0:
          return DISK_ENCRYPTION_UNSPECIFIED;
        case 1:
          return GMEK;
        case 2:
          return CMEK;
        default:
          return null;
      }
    }

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

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

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

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

    // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.DiskEncryption)
  }

  /**
   *
   *
   * <pre>
   * The type of vNIC driver.
   * Default should be UNSPECIFIED_NIC_TYPE.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.notebooks.v1.Instance.NicType}
   */
  public enum NicType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * No type specified.
     * </pre>
     *
     * <code>UNSPECIFIED_NIC_TYPE = 0;</code>
     */
    UNSPECIFIED_NIC_TYPE(0),
    /**
     *
     *
     * <pre>
     * VIRTIO
     * </pre>
     *
     * <code>VIRTIO_NET = 1;</code>
     */
    VIRTIO_NET(1),
    /**
     *
     *
     * <pre>
     * GVNIC
     * </pre>
     *
     * <code>GVNIC = 2;</code>
     */
    GVNIC(2),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * No type specified.
     * </pre>
     *
     * <code>UNSPECIFIED_NIC_TYPE = 0;</code>
     */
    public static final int UNSPECIFIED_NIC_TYPE_VALUE = 0;
    /**
     *
     *
     * <pre>
     * VIRTIO
     * </pre>
     *
     * <code>VIRTIO_NET = 1;</code>
     */
    public static final int VIRTIO_NET_VALUE = 1;
    /**
     *
     *
     * <pre>
     * GVNIC
     * </pre>
     *
     * <code>GVNIC = 2;</code>
     */
    public static final int GVNIC_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 NicType 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 NicType forNumber(int value) {
      switch (value) {
        case 0:
          return UNSPECIFIED_NIC_TYPE;
        case 1:
          return VIRTIO_NET;
        case 2:
          return GVNIC;
        default:
          return null;
      }
    }

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

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

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

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

    // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.NicType)
  }

  public interface AcceleratorConfigOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Instance.AcceleratorConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Type of this accelerator.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorType type = 1;</code>
     *
     * @return The enum numeric value on the wire for type.
     */
    int getTypeValue();
    /**
     *
     *
     * <pre>
     * Type of this accelerator.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorType type = 1;</code>
     *
     * @return The type.
     */
    com.google.cloud.notebooks.v1.Instance.AcceleratorType getType();

    /**
     *
     *
     * <pre>
     * Count of cores of this accelerator.
     * </pre>
     *
     * <code>int64 core_count = 2;</code>
     *
     * @return The coreCount.
     */
    long getCoreCount();
  }
  /**
   *
   *
   * <pre>
   * Definition of a hardware accelerator. Note that not all combinations
   * of `type` and `core_count` are valid. Check [GPUs on Compute
   * Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a
   * valid combination. TPUs are not supported.
   * </pre>
   *
   * Protobuf type {@code google.cloud.notebooks.v1.Instance.AcceleratorConfig}
   */
  public static final class AcceleratorConfig extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance.AcceleratorConfig)
      AcceleratorConfigOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use AcceleratorConfig.newBuilder() to construct.
    private AcceleratorConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private AcceleratorConfig() {
      type_ = 0;
    }

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

    @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.notebooks.v1.InstanceProto
          .internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.notebooks.v1.InstanceProto
          .internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.class,
              com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder.class);
    }

    public static final int TYPE_FIELD_NUMBER = 1;
    private int type_ = 0;
    /**
     *
     *
     * <pre>
     * Type of this accelerator.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorType type = 1;</code>
     *
     * @return The enum numeric value on the wire for type.
     */
    @java.lang.Override
    public int getTypeValue() {
      return type_;
    }
    /**
     *
     *
     * <pre>
     * Type of this accelerator.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorType type = 1;</code>
     *
     * @return The type.
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.AcceleratorType getType() {
      com.google.cloud.notebooks.v1.Instance.AcceleratorType result =
          com.google.cloud.notebooks.v1.Instance.AcceleratorType.forNumber(type_);
      return result == null
          ? com.google.cloud.notebooks.v1.Instance.AcceleratorType.UNRECOGNIZED
          : result;
    }

    public static final int CORE_COUNT_FIELD_NUMBER = 2;
    private long coreCount_ = 0L;
    /**
     *
     *
     * <pre>
     * Count of cores of this accelerator.
     * </pre>
     *
     * <code>int64 core_count = 2;</code>
     *
     * @return The coreCount.
     */
    @java.lang.Override
    public long getCoreCount() {
      return coreCount_;
    }

    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 (type_
          != com.google.cloud.notebooks.v1.Instance.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED
              .getNumber()) {
        output.writeEnum(1, type_);
      }
      if (coreCount_ != 0L) {
        output.writeInt64(2, coreCount_);
      }
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (type_
          != com.google.cloud.notebooks.v1.Instance.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED
              .getNumber()) {
        size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_);
      }
      if (coreCount_ != 0L) {
        size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, coreCount_);
      }
      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.notebooks.v1.Instance.AcceleratorConfig)) {
        return super.equals(obj);
      }
      com.google.cloud.notebooks.v1.Instance.AcceleratorConfig other =
          (com.google.cloud.notebooks.v1.Instance.AcceleratorConfig) obj;

      if (type_ != other.type_) return false;
      if (getCoreCount() != other.getCoreCount()) 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) + TYPE_FIELD_NUMBER;
      hash = (53 * hash) + type_;
      hash = (37 * hash) + CORE_COUNT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCoreCount());
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig 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.notebooks.v1.Instance.AcceleratorConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

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

    public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

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

    public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig 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.notebooks.v1.Instance.AcceleratorConfig parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig 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.notebooks.v1.Instance.AcceleratorConfig 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>
     * Definition of a hardware accelerator. Note that not all combinations
     * of `type` and `core_count` are valid. Check [GPUs on Compute
     * Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a
     * valid combination. TPUs are not supported.
     * </pre>
     *
     * Protobuf type {@code google.cloud.notebooks.v1.Instance.AcceleratorConfig}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance.AcceleratorConfig)
        com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.class,
                com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder.class);
      }

      // Construct using com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.newBuilder()
      private Builder() {}

      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        type_ = 0;
        coreCount_ = 0L;
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig getDefaultInstanceForType() {
        return com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig build() {
        com.google.cloud.notebooks.v1.Instance.AcceleratorConfig result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig buildPartial() {
        com.google.cloud.notebooks.v1.Instance.AcceleratorConfig result =
            new com.google.cloud.notebooks.v1.Instance.AcceleratorConfig(this);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartial0(com.google.cloud.notebooks.v1.Instance.AcceleratorConfig result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.type_ = type_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.coreCount_ = coreCount_;
        }
      }

      @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.notebooks.v1.Instance.AcceleratorConfig) {
          return mergeFrom((com.google.cloud.notebooks.v1.Instance.AcceleratorConfig) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.notebooks.v1.Instance.AcceleratorConfig other) {
        if (other == com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance())
          return this;
        if (other.type_ != 0) {
          setTypeValue(other.getTypeValue());
        }
        if (other.getCoreCount() != 0L) {
          setCoreCount(other.getCoreCount());
        }
        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:
                {
                  type_ = input.readEnum();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 8
              case 16:
                {
                  coreCount_ = input.readInt64();
                  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 type_ = 0;
      /**
       *
       *
       * <pre>
       * Type of this accelerator.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.AcceleratorType type = 1;</code>
       *
       * @return The enum numeric value on the wire for type.
       */
      @java.lang.Override
      public int getTypeValue() {
        return type_;
      }
      /**
       *
       *
       * <pre>
       * Type of this accelerator.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.AcceleratorType type = 1;</code>
       *
       * @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_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Type of this accelerator.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.AcceleratorType type = 1;</code>
       *
       * @return The type.
       */
      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.AcceleratorType getType() {
        com.google.cloud.notebooks.v1.Instance.AcceleratorType result =
            com.google.cloud.notebooks.v1.Instance.AcceleratorType.forNumber(type_);
        return result == null
            ? com.google.cloud.notebooks.v1.Instance.AcceleratorType.UNRECOGNIZED
            : result;
      }
      /**
       *
       *
       * <pre>
       * Type of this accelerator.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.AcceleratorType type = 1;</code>
       *
       * @param value The type to set.
       * @return This builder for chaining.
       */
      public Builder setType(com.google.cloud.notebooks.v1.Instance.AcceleratorType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000001;
        type_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Type of this accelerator.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.AcceleratorType type = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearType() {
        bitField0_ = (bitField0_ & ~0x00000001);
        type_ = 0;
        onChanged();
        return this;
      }

      private long coreCount_;
      /**
       *
       *
       * <pre>
       * Count of cores of this accelerator.
       * </pre>
       *
       * <code>int64 core_count = 2;</code>
       *
       * @return The coreCount.
       */
      @java.lang.Override
      public long getCoreCount() {
        return coreCount_;
      }
      /**
       *
       *
       * <pre>
       * Count of cores of this accelerator.
       * </pre>
       *
       * <code>int64 core_count = 2;</code>
       *
       * @param value The coreCount to set.
       * @return This builder for chaining.
       */
      public Builder setCoreCount(long value) {

        coreCount_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Count of cores of this accelerator.
       * </pre>
       *
       * <code>int64 core_count = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearCoreCount() {
        bitField0_ = (bitField0_ & ~0x00000002);
        coreCount_ = 0L;
        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.notebooks.v1.Instance.AcceleratorConfig)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance.AcceleratorConfig)
    private static final com.google.cloud.notebooks.v1.Instance.AcceleratorConfig DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance.AcceleratorConfig();
    }

    public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface DiskOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Instance.Disk)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Indicates whether the disk will be auto-deleted when the instance is
     * deleted (but not when the disk is detached from the instance).
     * </pre>
     *
     * <code>bool auto_delete = 1;</code>
     *
     * @return The autoDelete.
     */
    boolean getAutoDelete();

    /**
     *
     *
     * <pre>
     * Indicates that this is a boot disk. The virtual machine will use the
     * first partition of the disk for its root filesystem.
     * </pre>
     *
     * <code>bool boot = 2;</code>
     *
     * @return The boot.
     */
    boolean getBoot();

    /**
     *
     *
     * <pre>
     * Indicates a unique device name of your choice that is reflected into the
     * `/dev/disk/by-id/google-*` tree of a Linux operating system running
     * within the instance. This name can be used to reference the device for
     * mounting, resizing, and so on, from within the instance.
     * If not specified, the server chooses a default device name to apply to
     * this disk, in the form persistent-disk-x, where x is a number assigned by
     * Google Compute Engine.This field is only applicable for persistent disks.
     * </pre>
     *
     * <code>string device_name = 3;</code>
     *
     * @return The deviceName.
     */
    java.lang.String getDeviceName();
    /**
     *
     *
     * <pre>
     * Indicates a unique device name of your choice that is reflected into the
     * `/dev/disk/by-id/google-*` tree of a Linux operating system running
     * within the instance. This name can be used to reference the device for
     * mounting, resizing, and so on, from within the instance.
     * If not specified, the server chooses a default device name to apply to
     * this disk, in the form persistent-disk-x, where x is a number assigned by
     * Google Compute Engine.This field is only applicable for persistent disks.
     * </pre>
     *
     * <code>string device_name = 3;</code>
     *
     * @return The bytes for deviceName.
     */
    com.google.protobuf.ByteString getDeviceNameBytes();

    /**
     *
     *
     * <pre>
     * Indicates the size of the disk in base-2 GB.
     * </pre>
     *
     * <code>int64 disk_size_gb = 4;</code>
     *
     * @return The diskSizeGb.
     */
    long getDiskSizeGb();

    /**
     *
     *
     * <pre>
     * Indicates a list of features to enable on the guest operating system.
     * Applicable only for bootable images. Read  Enabling guest operating
     * system features to see a list of available options.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
     * </code>
     */
    java.util.List<com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature>
        getGuestOsFeaturesList();
    /**
     *
     *
     * <pre>
     * Indicates a list of features to enable on the guest operating system.
     * Applicable only for bootable images. Read  Enabling guest operating
     * system features to see a list of available options.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
     * </code>
     */
    com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature getGuestOsFeatures(int index);
    /**
     *
     *
     * <pre>
     * Indicates a list of features to enable on the guest operating system.
     * Applicable only for bootable images. Read  Enabling guest operating
     * system features to see a list of available options.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
     * </code>
     */
    int getGuestOsFeaturesCount();
    /**
     *
     *
     * <pre>
     * Indicates a list of features to enable on the guest operating system.
     * Applicable only for bootable images. Read  Enabling guest operating
     * system features to see a list of available options.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
     * </code>
     */
    java.util.List<? extends com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder>
        getGuestOsFeaturesOrBuilderList();
    /**
     *
     *
     * <pre>
     * Indicates a list of features to enable on the guest operating system.
     * Applicable only for bootable images. Read  Enabling guest operating
     * system features to see a list of available options.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
     * </code>
     */
    com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder getGuestOsFeaturesOrBuilder(
        int index);

    /**
     *
     *
     * <pre>
     * A zero-based index to this disk, where 0 is reserved for the
     * boot disk. If you have many disks attached to an instance, each disk
     * would have a unique index number.
     * </pre>
     *
     * <code>int64 index = 6;</code>
     *
     * @return The index.
     */
    long getIndex();

    /**
     *
     *
     * <pre>
     * Indicates the disk interface to use for attaching this disk, which is
     * either SCSI or NVME. The default is SCSI. Persistent disks must always
     * use SCSI and the request will fail if you attempt to attach a persistent
     * disk in any other format than SCSI. Local SSDs can use either NVME or
     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
     * performance.
     * Valid values:
     * * `NVME`
     * * `SCSI`
     * </pre>
     *
     * <code>string interface = 7;</code>
     *
     * @return The interface.
     */
    java.lang.String getInterface();
    /**
     *
     *
     * <pre>
     * Indicates the disk interface to use for attaching this disk, which is
     * either SCSI or NVME. The default is SCSI. Persistent disks must always
     * use SCSI and the request will fail if you attempt to attach a persistent
     * disk in any other format than SCSI. Local SSDs can use either NVME or
     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
     * performance.
     * Valid values:
     * * `NVME`
     * * `SCSI`
     * </pre>
     *
     * <code>string interface = 7;</code>
     *
     * @return The bytes for interface.
     */
    com.google.protobuf.ByteString getInterfaceBytes();

    /**
     *
     *
     * <pre>
     * Type of the resource. Always compute#attachedDisk for attached
     * disks.
     * </pre>
     *
     * <code>string kind = 8;</code>
     *
     * @return The kind.
     */
    java.lang.String getKind();
    /**
     *
     *
     * <pre>
     * Type of the resource. Always compute#attachedDisk for attached
     * disks.
     * </pre>
     *
     * <code>string kind = 8;</code>
     *
     * @return The bytes for kind.
     */
    com.google.protobuf.ByteString getKindBytes();

    /**
     *
     *
     * <pre>
     * A list of publicly visible licenses. Reserved for Google's use.
     * A License represents billing and aggregate usage data for public
     * and marketplace images.
     * </pre>
     *
     * <code>repeated string licenses = 9;</code>
     *
     * @return A list containing the licenses.
     */
    java.util.List<java.lang.String> getLicensesList();
    /**
     *
     *
     * <pre>
     * A list of publicly visible licenses. Reserved for Google's use.
     * A License represents billing and aggregate usage data for public
     * and marketplace images.
     * </pre>
     *
     * <code>repeated string licenses = 9;</code>
     *
     * @return The count of licenses.
     */
    int getLicensesCount();
    /**
     *
     *
     * <pre>
     * A list of publicly visible licenses. Reserved for Google's use.
     * A License represents billing and aggregate usage data for public
     * and marketplace images.
     * </pre>
     *
     * <code>repeated string licenses = 9;</code>
     *
     * @param index The index of the element to return.
     * @return The licenses at the given index.
     */
    java.lang.String getLicenses(int index);
    /**
     *
     *
     * <pre>
     * A list of publicly visible licenses. Reserved for Google's use.
     * A License represents billing and aggregate usage data for public
     * and marketplace images.
     * </pre>
     *
     * <code>repeated string licenses = 9;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the licenses at the given index.
     */
    com.google.protobuf.ByteString getLicensesBytes(int index);

    /**
     *
     *
     * <pre>
     * The mode in which to attach this disk, either `READ_WRITE` or
     * `READ_ONLY`. If not specified, the default is to attach the disk in
     * `READ_WRITE` mode. Valid values:
     * * `READ_ONLY`
     * * `READ_WRITE`
     * </pre>
     *
     * <code>string mode = 10;</code>
     *
     * @return The mode.
     */
    java.lang.String getMode();
    /**
     *
     *
     * <pre>
     * The mode in which to attach this disk, either `READ_WRITE` or
     * `READ_ONLY`. If not specified, the default is to attach the disk in
     * `READ_WRITE` mode. Valid values:
     * * `READ_ONLY`
     * * `READ_WRITE`
     * </pre>
     *
     * <code>string mode = 10;</code>
     *
     * @return The bytes for mode.
     */
    com.google.protobuf.ByteString getModeBytes();

    /**
     *
     *
     * <pre>
     * Indicates a valid partial or full URL to an existing Persistent Disk
     * resource.
     * </pre>
     *
     * <code>string source = 11;</code>
     *
     * @return The source.
     */
    java.lang.String getSource();
    /**
     *
     *
     * <pre>
     * Indicates a valid partial or full URL to an existing Persistent Disk
     * resource.
     * </pre>
     *
     * <code>string source = 11;</code>
     *
     * @return The bytes for source.
     */
    com.google.protobuf.ByteString getSourceBytes();

    /**
     *
     *
     * <pre>
     * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
     * Valid values:
     * * `PERSISTENT`
     * * `SCRATCH`
     * </pre>
     *
     * <code>string type = 12;</code>
     *
     * @return The type.
     */
    java.lang.String getType();
    /**
     *
     *
     * <pre>
     * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
     * Valid values:
     * * `PERSISTENT`
     * * `SCRATCH`
     * </pre>
     *
     * <code>string type = 12;</code>
     *
     * @return The bytes for type.
     */
    com.google.protobuf.ByteString getTypeBytes();
  }
  /**
   *
   *
   * <pre>
   * An instance-attached disk resource.
   * </pre>
   *
   * Protobuf type {@code google.cloud.notebooks.v1.Instance.Disk}
   */
  public static final class Disk extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance.Disk)
      DiskOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use Disk.newBuilder() to construct.
    private Disk(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private Disk() {
      deviceName_ = "";
      guestOsFeatures_ = java.util.Collections.emptyList();
      interface_ = "";
      kind_ = "";
      licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      mode_ = "";
      source_ = "";
      type_ = "";
    }

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

    @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.notebooks.v1.InstanceProto
          .internal_static_google_cloud_notebooks_v1_Instance_Disk_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.notebooks.v1.InstanceProto
          .internal_static_google_cloud_notebooks_v1_Instance_Disk_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.notebooks.v1.Instance.Disk.class,
              com.google.cloud.notebooks.v1.Instance.Disk.Builder.class);
    }

    public interface GuestOsFeatureOrBuilder
        extends
        // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature)
        com.google.protobuf.MessageOrBuilder {

      /**
       *
       *
       * <pre>
       * The ID of a supported feature. Read  Enabling guest operating system
       * features to see a list of available options.
       * Valid values:
       * * `FEATURE_TYPE_UNSPECIFIED`
       * * `MULTI_IP_SUBNET`
       * * `SECURE_BOOT`
       * * `UEFI_COMPATIBLE`
       * * `VIRTIO_SCSI_MULTIQUEUE`
       * * `WINDOWS`
       * </pre>
       *
       * <code>string type = 1;</code>
       *
       * @return The type.
       */
      java.lang.String getType();
      /**
       *
       *
       * <pre>
       * The ID of a supported feature. Read  Enabling guest operating system
       * features to see a list of available options.
       * Valid values:
       * * `FEATURE_TYPE_UNSPECIFIED`
       * * `MULTI_IP_SUBNET`
       * * `SECURE_BOOT`
       * * `UEFI_COMPATIBLE`
       * * `VIRTIO_SCSI_MULTIQUEUE`
       * * `WINDOWS`
       * </pre>
       *
       * <code>string type = 1;</code>
       *
       * @return The bytes for type.
       */
      com.google.protobuf.ByteString getTypeBytes();
    }
    /**
     *
     *
     * <pre>
     * Guest OS features for boot disk.
     * </pre>
     *
     * Protobuf type {@code google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature}
     */
    public static final class GuestOsFeature extends com.google.protobuf.GeneratedMessageV3
        implements
        // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature)
        GuestOsFeatureOrBuilder {
      private static final long serialVersionUID = 0L;
      // Use GuestOsFeature.newBuilder() to construct.
      private GuestOsFeature(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }

      private GuestOsFeature() {
        type_ = "";
      }

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

      @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.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.class,
                com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder.class);
      }

      public static final int TYPE_FIELD_NUMBER = 1;

      @SuppressWarnings("serial")
      private volatile java.lang.Object type_ = "";
      /**
       *
       *
       * <pre>
       * The ID of a supported feature. Read  Enabling guest operating system
       * features to see a list of available options.
       * Valid values:
       * * `FEATURE_TYPE_UNSPECIFIED`
       * * `MULTI_IP_SUBNET`
       * * `SECURE_BOOT`
       * * `UEFI_COMPATIBLE`
       * * `VIRTIO_SCSI_MULTIQUEUE`
       * * `WINDOWS`
       * </pre>
       *
       * <code>string type = 1;</code>
       *
       * @return The type.
       */
      @java.lang.Override
      public java.lang.String getType() {
        java.lang.Object ref = type_;
        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();
          type_ = s;
          return s;
        }
      }
      /**
       *
       *
       * <pre>
       * The ID of a supported feature. Read  Enabling guest operating system
       * features to see a list of available options.
       * Valid values:
       * * `FEATURE_TYPE_UNSPECIFIED`
       * * `MULTI_IP_SUBNET`
       * * `SECURE_BOOT`
       * * `UEFI_COMPATIBLE`
       * * `VIRTIO_SCSI_MULTIQUEUE`
       * * `WINDOWS`
       * </pre>
       *
       * <code>string type = 1;</code>
       *
       * @return The bytes for type.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getTypeBytes() {
        java.lang.Object ref = type_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          type_ = 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(type_)) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_);
        }
        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(type_)) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_);
        }
        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.notebooks.v1.Instance.Disk.GuestOsFeature)) {
          return super.equals(obj);
        }
        com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature other =
            (com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) obj;

        if (!getType().equals(other.getType())) 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) + TYPE_FIELD_NUMBER;
        hash = (53 * hash) + getType().hashCode();
        hash = (29 * hash) + getUnknownFields().hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom(
          java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature 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.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature 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.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom(
          byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom(
          byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom(
          java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

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

      public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature 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.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom(
          com.google.protobuf.CodedInputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature 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.notebooks.v1.Instance.Disk.GuestOsFeature 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>
       * Guest OS features for boot disk.
       * </pre>
       *
       * Protobuf type {@code google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature}
       */
      public static final class Builder
          extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
          implements
          // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature)
          com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.cloud.notebooks.v1.InstanceProto
              .internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.cloud.notebooks.v1.InstanceProto
              .internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.class,
                  com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder.class);
        }

        // Construct using com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.newBuilder()
        private Builder() {}

        private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
        }

        @java.lang.Override
        public Builder clear() {
          super.clear();
          bitField0_ = 0;
          type_ = "";
          return this;
        }

        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
          return com.google.cloud.notebooks.v1.InstanceProto
              .internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor;
        }

        @java.lang.Override
        public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature
            getDefaultInstanceForType() {
          return com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.getDefaultInstance();
        }

        @java.lang.Override
        public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature build() {
          com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @java.lang.Override
        public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature buildPartial() {
          com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature result =
              new com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature(this);
          if (bitField0_ != 0) {
            buildPartial0(result);
          }
          onBuilt();
          return result;
        }

        private void buildPartial0(
            com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature result) {
          int from_bitField0_ = bitField0_;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.type_ = type_;
          }
        }

        @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.notebooks.v1.Instance.Disk.GuestOsFeature) {
            return mergeFrom((com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature other) {
          if (other
              == com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.getDefaultInstance())
            return this;
          if (!other.getType().isEmpty()) {
            type_ = other.type_;
            bitField0_ |= 0x00000001;
            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:
                  {
                    type_ = input.readStringRequireUtf8();
                    bitField0_ |= 0x00000001;
                    break;
                  } // case 10
                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 type_ = "";
        /**
         *
         *
         * <pre>
         * The ID of a supported feature. Read  Enabling guest operating system
         * features to see a list of available options.
         * Valid values:
         * * `FEATURE_TYPE_UNSPECIFIED`
         * * `MULTI_IP_SUBNET`
         * * `SECURE_BOOT`
         * * `UEFI_COMPATIBLE`
         * * `VIRTIO_SCSI_MULTIQUEUE`
         * * `WINDOWS`
         * </pre>
         *
         * <code>string type = 1;</code>
         *
         * @return The type.
         */
        public java.lang.String getType() {
          java.lang.Object ref = type_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            type_ = s;
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         *
         *
         * <pre>
         * The ID of a supported feature. Read  Enabling guest operating system
         * features to see a list of available options.
         * Valid values:
         * * `FEATURE_TYPE_UNSPECIFIED`
         * * `MULTI_IP_SUBNET`
         * * `SECURE_BOOT`
         * * `UEFI_COMPATIBLE`
         * * `VIRTIO_SCSI_MULTIQUEUE`
         * * `WINDOWS`
         * </pre>
         *
         * <code>string type = 1;</code>
         *
         * @return The bytes for type.
         */
        public com.google.protobuf.ByteString getTypeBytes() {
          java.lang.Object ref = type_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b =
                com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
            type_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         *
         *
         * <pre>
         * The ID of a supported feature. Read  Enabling guest operating system
         * features to see a list of available options.
         * Valid values:
         * * `FEATURE_TYPE_UNSPECIFIED`
         * * `MULTI_IP_SUBNET`
         * * `SECURE_BOOT`
         * * `UEFI_COMPATIBLE`
         * * `VIRTIO_SCSI_MULTIQUEUE`
         * * `WINDOWS`
         * </pre>
         *
         * <code>string type = 1;</code>
         *
         * @param value The type to set.
         * @return This builder for chaining.
         */
        public Builder setType(java.lang.String value) {
          if (value == null) {
            throw new NullPointerException();
          }
          type_ = value;
          bitField0_ |= 0x00000001;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * The ID of a supported feature. Read  Enabling guest operating system
         * features to see a list of available options.
         * Valid values:
         * * `FEATURE_TYPE_UNSPECIFIED`
         * * `MULTI_IP_SUBNET`
         * * `SECURE_BOOT`
         * * `UEFI_COMPATIBLE`
         * * `VIRTIO_SCSI_MULTIQUEUE`
         * * `WINDOWS`
         * </pre>
         *
         * <code>string type = 1;</code>
         *
         * @return This builder for chaining.
         */
        public Builder clearType() {
          type_ = getDefaultInstance().getType();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * The ID of a supported feature. Read  Enabling guest operating system
         * features to see a list of available options.
         * Valid values:
         * * `FEATURE_TYPE_UNSPECIFIED`
         * * `MULTI_IP_SUBNET`
         * * `SECURE_BOOT`
         * * `UEFI_COMPATIBLE`
         * * `VIRTIO_SCSI_MULTIQUEUE`
         * * `WINDOWS`
         * </pre>
         *
         * <code>string type = 1;</code>
         *
         * @param value The bytes for type to set.
         * @return This builder for chaining.
         */
        public Builder setTypeBytes(com.google.protobuf.ByteString value) {
          if (value == null) {
            throw new NullPointerException();
          }
          checkByteStringIsUtf8(value);
          type_ = value;
          bitField0_ |= 0x00000001;
          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.notebooks.v1.Instance.Disk.GuestOsFeature)
      }

      // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature)
      private static final com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature
          DEFAULT_INSTANCE;

      static {
        DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature();
      }

      public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature
          getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

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

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

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature
          getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
    }

    public static final int AUTO_DELETE_FIELD_NUMBER = 1;
    private boolean autoDelete_ = false;
    /**
     *
     *
     * <pre>
     * Indicates whether the disk will be auto-deleted when the instance is
     * deleted (but not when the disk is detached from the instance).
     * </pre>
     *
     * <code>bool auto_delete = 1;</code>
     *
     * @return The autoDelete.
     */
    @java.lang.Override
    public boolean getAutoDelete() {
      return autoDelete_;
    }

    public static final int BOOT_FIELD_NUMBER = 2;
    private boolean boot_ = false;
    /**
     *
     *
     * <pre>
     * Indicates that this is a boot disk. The virtual machine will use the
     * first partition of the disk for its root filesystem.
     * </pre>
     *
     * <code>bool boot = 2;</code>
     *
     * @return The boot.
     */
    @java.lang.Override
    public boolean getBoot() {
      return boot_;
    }

    public static final int DEVICE_NAME_FIELD_NUMBER = 3;

    @SuppressWarnings("serial")
    private volatile java.lang.Object deviceName_ = "";
    /**
     *
     *
     * <pre>
     * Indicates a unique device name of your choice that is reflected into the
     * `/dev/disk/by-id/google-*` tree of a Linux operating system running
     * within the instance. This name can be used to reference the device for
     * mounting, resizing, and so on, from within the instance.
     * If not specified, the server chooses a default device name to apply to
     * this disk, in the form persistent-disk-x, where x is a number assigned by
     * Google Compute Engine.This field is only applicable for persistent disks.
     * </pre>
     *
     * <code>string device_name = 3;</code>
     *
     * @return The deviceName.
     */
    @java.lang.Override
    public java.lang.String getDeviceName() {
      java.lang.Object ref = deviceName_;
      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();
        deviceName_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Indicates a unique device name of your choice that is reflected into the
     * `/dev/disk/by-id/google-*` tree of a Linux operating system running
     * within the instance. This name can be used to reference the device for
     * mounting, resizing, and so on, from within the instance.
     * If not specified, the server chooses a default device name to apply to
     * this disk, in the form persistent-disk-x, where x is a number assigned by
     * Google Compute Engine.This field is only applicable for persistent disks.
     * </pre>
     *
     * <code>string device_name = 3;</code>
     *
     * @return The bytes for deviceName.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getDeviceNameBytes() {
      java.lang.Object ref = deviceName_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        deviceName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int DISK_SIZE_GB_FIELD_NUMBER = 4;
    private long diskSizeGb_ = 0L;
    /**
     *
     *
     * <pre>
     * Indicates the size of the disk in base-2 GB.
     * </pre>
     *
     * <code>int64 disk_size_gb = 4;</code>
     *
     * @return The diskSizeGb.
     */
    @java.lang.Override
    public long getDiskSizeGb() {
      return diskSizeGb_;
    }

    public static final int GUEST_OS_FEATURES_FIELD_NUMBER = 5;

    @SuppressWarnings("serial")
    private java.util.List<com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature>
        guestOsFeatures_;
    /**
     *
     *
     * <pre>
     * Indicates a list of features to enable on the guest operating system.
     * Applicable only for bootable images. Read  Enabling guest operating
     * system features to see a list of available options.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
     * </code>
     */
    @java.lang.Override
    public java.util.List<com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature>
        getGuestOsFeaturesList() {
      return guestOsFeatures_;
    }
    /**
     *
     *
     * <pre>
     * Indicates a list of features to enable on the guest operating system.
     * Applicable only for bootable images. Read  Enabling guest operating
     * system features to see a list of available options.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
     * </code>
     */
    @java.lang.Override
    public java.util.List<
            ? extends com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder>
        getGuestOsFeaturesOrBuilderList() {
      return guestOsFeatures_;
    }
    /**
     *
     *
     * <pre>
     * Indicates a list of features to enable on the guest operating system.
     * Applicable only for bootable images. Read  Enabling guest operating
     * system features to see a list of available options.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
     * </code>
     */
    @java.lang.Override
    public int getGuestOsFeaturesCount() {
      return guestOsFeatures_.size();
    }
    /**
     *
     *
     * <pre>
     * Indicates a list of features to enable on the guest operating system.
     * Applicable only for bootable images. Read  Enabling guest operating
     * system features to see a list of available options.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature getGuestOsFeatures(
        int index) {
      return guestOsFeatures_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Indicates a list of features to enable on the guest operating system.
     * Applicable only for bootable images. Read  Enabling guest operating
     * system features to see a list of available options.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder
        getGuestOsFeaturesOrBuilder(int index) {
      return guestOsFeatures_.get(index);
    }

    public static final int INDEX_FIELD_NUMBER = 6;
    private long index_ = 0L;
    /**
     *
     *
     * <pre>
     * A zero-based index to this disk, where 0 is reserved for the
     * boot disk. If you have many disks attached to an instance, each disk
     * would have a unique index number.
     * </pre>
     *
     * <code>int64 index = 6;</code>
     *
     * @return The index.
     */
    @java.lang.Override
    public long getIndex() {
      return index_;
    }

    public static final int INTERFACE_FIELD_NUMBER = 7;

    @SuppressWarnings("serial")
    private volatile java.lang.Object interface_ = "";
    /**
     *
     *
     * <pre>
     * Indicates the disk interface to use for attaching this disk, which is
     * either SCSI or NVME. The default is SCSI. Persistent disks must always
     * use SCSI and the request will fail if you attempt to attach a persistent
     * disk in any other format than SCSI. Local SSDs can use either NVME or
     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
     * performance.
     * Valid values:
     * * `NVME`
     * * `SCSI`
     * </pre>
     *
     * <code>string interface = 7;</code>
     *
     * @return The interface.
     */
    @java.lang.Override
    public java.lang.String getInterface() {
      java.lang.Object ref = interface_;
      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();
        interface_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Indicates the disk interface to use for attaching this disk, which is
     * either SCSI or NVME. The default is SCSI. Persistent disks must always
     * use SCSI and the request will fail if you attempt to attach a persistent
     * disk in any other format than SCSI. Local SSDs can use either NVME or
     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
     * performance.
     * Valid values:
     * * `NVME`
     * * `SCSI`
     * </pre>
     *
     * <code>string interface = 7;</code>
     *
     * @return The bytes for interface.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getInterfaceBytes() {
      java.lang.Object ref = interface_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        interface_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int KIND_FIELD_NUMBER = 8;

    @SuppressWarnings("serial")
    private volatile java.lang.Object kind_ = "";
    /**
     *
     *
     * <pre>
     * Type of the resource. Always compute#attachedDisk for attached
     * disks.
     * </pre>
     *
     * <code>string kind = 8;</code>
     *
     * @return The kind.
     */
    @java.lang.Override
    public java.lang.String getKind() {
      java.lang.Object ref = kind_;
      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();
        kind_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Type of the resource. Always compute#attachedDisk for attached
     * disks.
     * </pre>
     *
     * <code>string kind = 8;</code>
     *
     * @return The bytes for kind.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getKindBytes() {
      java.lang.Object ref = kind_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        kind_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int LICENSES_FIELD_NUMBER = 9;

    @SuppressWarnings("serial")
    private com.google.protobuf.LazyStringList licenses_;
    /**
     *
     *
     * <pre>
     * A list of publicly visible licenses. Reserved for Google's use.
     * A License represents billing and aggregate usage data for public
     * and marketplace images.
     * </pre>
     *
     * <code>repeated string licenses = 9;</code>
     *
     * @return A list containing the licenses.
     */
    public com.google.protobuf.ProtocolStringList getLicensesList() {
      return licenses_;
    }
    /**
     *
     *
     * <pre>
     * A list of publicly visible licenses. Reserved for Google's use.
     * A License represents billing and aggregate usage data for public
     * and marketplace images.
     * </pre>
     *
     * <code>repeated string licenses = 9;</code>
     *
     * @return The count of licenses.
     */
    public int getLicensesCount() {
      return licenses_.size();
    }
    /**
     *
     *
     * <pre>
     * A list of publicly visible licenses. Reserved for Google's use.
     * A License represents billing and aggregate usage data for public
     * and marketplace images.
     * </pre>
     *
     * <code>repeated string licenses = 9;</code>
     *
     * @param index The index of the element to return.
     * @return The licenses at the given index.
     */
    public java.lang.String getLicenses(int index) {
      return licenses_.get(index);
    }
    /**
     *
     *
     * <pre>
     * A list of publicly visible licenses. Reserved for Google's use.
     * A License represents billing and aggregate usage data for public
     * and marketplace images.
     * </pre>
     *
     * <code>repeated string licenses = 9;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the licenses at the given index.
     */
    public com.google.protobuf.ByteString getLicensesBytes(int index) {
      return licenses_.getByteString(index);
    }

    public static final int MODE_FIELD_NUMBER = 10;

    @SuppressWarnings("serial")
    private volatile java.lang.Object mode_ = "";
    /**
     *
     *
     * <pre>
     * The mode in which to attach this disk, either `READ_WRITE` or
     * `READ_ONLY`. If not specified, the default is to attach the disk in
     * `READ_WRITE` mode. Valid values:
     * * `READ_ONLY`
     * * `READ_WRITE`
     * </pre>
     *
     * <code>string mode = 10;</code>
     *
     * @return The mode.
     */
    @java.lang.Override
    public java.lang.String getMode() {
      java.lang.Object ref = mode_;
      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();
        mode_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The mode in which to attach this disk, either `READ_WRITE` or
     * `READ_ONLY`. If not specified, the default is to attach the disk in
     * `READ_WRITE` mode. Valid values:
     * * `READ_ONLY`
     * * `READ_WRITE`
     * </pre>
     *
     * <code>string mode = 10;</code>
     *
     * @return The bytes for mode.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getModeBytes() {
      java.lang.Object ref = mode_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        mode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int SOURCE_FIELD_NUMBER = 11;

    @SuppressWarnings("serial")
    private volatile java.lang.Object source_ = "";
    /**
     *
     *
     * <pre>
     * Indicates a valid partial or full URL to an existing Persistent Disk
     * resource.
     * </pre>
     *
     * <code>string source = 11;</code>
     *
     * @return The source.
     */
    @java.lang.Override
    public java.lang.String getSource() {
      java.lang.Object ref = source_;
      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();
        source_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Indicates a valid partial or full URL to an existing Persistent Disk
     * resource.
     * </pre>
     *
     * <code>string source = 11;</code>
     *
     * @return The bytes for source.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getSourceBytes() {
      java.lang.Object ref = source_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        source_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int TYPE_FIELD_NUMBER = 12;

    @SuppressWarnings("serial")
    private volatile java.lang.Object type_ = "";
    /**
     *
     *
     * <pre>
     * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
     * Valid values:
     * * `PERSISTENT`
     * * `SCRATCH`
     * </pre>
     *
     * <code>string type = 12;</code>
     *
     * @return The type.
     */
    @java.lang.Override
    public java.lang.String getType() {
      java.lang.Object ref = type_;
      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();
        type_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
     * Valid values:
     * * `PERSISTENT`
     * * `SCRATCH`
     * </pre>
     *
     * <code>string type = 12;</code>
     *
     * @return The bytes for type.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getTypeBytes() {
      java.lang.Object ref = type_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        type_ = 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 (autoDelete_ != false) {
        output.writeBool(1, autoDelete_);
      }
      if (boot_ != false) {
        output.writeBool(2, boot_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceName_);
      }
      if (diskSizeGb_ != 0L) {
        output.writeInt64(4, diskSizeGb_);
      }
      for (int i = 0; i < guestOsFeatures_.size(); i++) {
        output.writeMessage(5, guestOsFeatures_.get(i));
      }
      if (index_ != 0L) {
        output.writeInt64(6, index_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interface_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 7, interface_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 8, kind_);
      }
      for (int i = 0; i < licenses_.size(); i++) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 9, licenses_.getRaw(i));
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 10, mode_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 11, source_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 12, type_);
      }
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (autoDelete_ != false) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, autoDelete_);
      }
      if (boot_ != false) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, boot_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceName_);
      }
      if (diskSizeGb_ != 0L) {
        size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, diskSizeGb_);
      }
      for (int i = 0; i < guestOsFeatures_.size(); i++) {
        size +=
            com.google.protobuf.CodedOutputStream.computeMessageSize(5, guestOsFeatures_.get(i));
      }
      if (index_ != 0L) {
        size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, index_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interface_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, interface_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, kind_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < licenses_.size(); i++) {
          dataSize += computeStringSizeNoTag(licenses_.getRaw(i));
        }
        size += dataSize;
        size += 1 * getLicensesList().size();
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, mode_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, source_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, type_);
      }
      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.notebooks.v1.Instance.Disk)) {
        return super.equals(obj);
      }
      com.google.cloud.notebooks.v1.Instance.Disk other =
          (com.google.cloud.notebooks.v1.Instance.Disk) obj;

      if (getAutoDelete() != other.getAutoDelete()) return false;
      if (getBoot() != other.getBoot()) return false;
      if (!getDeviceName().equals(other.getDeviceName())) return false;
      if (getDiskSizeGb() != other.getDiskSizeGb()) return false;
      if (!getGuestOsFeaturesList().equals(other.getGuestOsFeaturesList())) return false;
      if (getIndex() != other.getIndex()) return false;
      if (!getInterface().equals(other.getInterface())) return false;
      if (!getKind().equals(other.getKind())) return false;
      if (!getLicensesList().equals(other.getLicensesList())) return false;
      if (!getMode().equals(other.getMode())) return false;
      if (!getSource().equals(other.getSource())) return false;
      if (!getType().equals(other.getType())) 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) + AUTO_DELETE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoDelete());
      hash = (37 * hash) + BOOT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoot());
      hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER;
      hash = (53 * hash) + getDeviceName().hashCode();
      hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDiskSizeGb());
      if (getGuestOsFeaturesCount() > 0) {
        hash = (37 * hash) + GUEST_OS_FEATURES_FIELD_NUMBER;
        hash = (53 * hash) + getGuestOsFeaturesList().hashCode();
      }
      hash = (37 * hash) + INDEX_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIndex());
      hash = (37 * hash) + INTERFACE_FIELD_NUMBER;
      hash = (53 * hash) + getInterface().hashCode();
      hash = (37 * hash) + KIND_FIELD_NUMBER;
      hash = (53 * hash) + getKind().hashCode();
      if (getLicensesCount() > 0) {
        hash = (37 * hash) + LICENSES_FIELD_NUMBER;
        hash = (53 * hash) + getLicensesList().hashCode();
      }
      hash = (37 * hash) + MODE_FIELD_NUMBER;
      hash = (53 * hash) + getMode().hashCode();
      hash = (37 * hash) + SOURCE_FIELD_NUMBER;
      hash = (53 * hash) + getSource().hashCode();
      hash = (37 * hash) + TYPE_FIELD_NUMBER;
      hash = (53 * hash) + getType().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom(java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.notebooks.v1.Instance.Disk 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.notebooks.v1.Instance.Disk parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

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

    public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

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

    public static com.google.cloud.notebooks.v1.Instance.Disk 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.notebooks.v1.Instance.Disk parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.notebooks.v1.Instance.Disk 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.notebooks.v1.Instance.Disk 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>
     * An instance-attached disk resource.
     * </pre>
     *
     * Protobuf type {@code google.cloud.notebooks.v1.Instance.Disk}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance.Disk)
        com.google.cloud.notebooks.v1.Instance.DiskOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_Disk_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_Disk_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.notebooks.v1.Instance.Disk.class,
                com.google.cloud.notebooks.v1.Instance.Disk.Builder.class);
      }

      // Construct using com.google.cloud.notebooks.v1.Instance.Disk.newBuilder()
      private Builder() {}

      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        autoDelete_ = false;
        boot_ = false;
        deviceName_ = "";
        diskSizeGb_ = 0L;
        if (guestOsFeaturesBuilder_ == null) {
          guestOsFeatures_ = java.util.Collections.emptyList();
        } else {
          guestOsFeatures_ = null;
          guestOsFeaturesBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000010);
        index_ = 0L;
        interface_ = "";
        kind_ = "";
        licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000100);
        mode_ = "";
        source_ = "";
        type_ = "";
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_Disk_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.Disk getDefaultInstanceForType() {
        return com.google.cloud.notebooks.v1.Instance.Disk.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.Disk build() {
        com.google.cloud.notebooks.v1.Instance.Disk result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.Disk buildPartial() {
        com.google.cloud.notebooks.v1.Instance.Disk result =
            new com.google.cloud.notebooks.v1.Instance.Disk(this);
        buildPartialRepeatedFields(result);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartialRepeatedFields(com.google.cloud.notebooks.v1.Instance.Disk result) {
        if (guestOsFeaturesBuilder_ == null) {
          if (((bitField0_ & 0x00000010) != 0)) {
            guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_);
            bitField0_ = (bitField0_ & ~0x00000010);
          }
          result.guestOsFeatures_ = guestOsFeatures_;
        } else {
          result.guestOsFeatures_ = guestOsFeaturesBuilder_.build();
        }
        if (((bitField0_ & 0x00000100) != 0)) {
          licenses_ = licenses_.getUnmodifiableView();
          bitField0_ = (bitField0_ & ~0x00000100);
        }
        result.licenses_ = licenses_;
      }

      private void buildPartial0(com.google.cloud.notebooks.v1.Instance.Disk result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.autoDelete_ = autoDelete_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.boot_ = boot_;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.deviceName_ = deviceName_;
        }
        if (((from_bitField0_ & 0x00000008) != 0)) {
          result.diskSizeGb_ = diskSizeGb_;
        }
        if (((from_bitField0_ & 0x00000020) != 0)) {
          result.index_ = index_;
        }
        if (((from_bitField0_ & 0x00000040) != 0)) {
          result.interface_ = interface_;
        }
        if (((from_bitField0_ & 0x00000080) != 0)) {
          result.kind_ = kind_;
        }
        if (((from_bitField0_ & 0x00000200) != 0)) {
          result.mode_ = mode_;
        }
        if (((from_bitField0_ & 0x00000400) != 0)) {
          result.source_ = source_;
        }
        if (((from_bitField0_ & 0x00000800) != 0)) {
          result.type_ = type_;
        }
      }

      @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.notebooks.v1.Instance.Disk) {
          return mergeFrom((com.google.cloud.notebooks.v1.Instance.Disk) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.notebooks.v1.Instance.Disk other) {
        if (other == com.google.cloud.notebooks.v1.Instance.Disk.getDefaultInstance()) return this;
        if (other.getAutoDelete() != false) {
          setAutoDelete(other.getAutoDelete());
        }
        if (other.getBoot() != false) {
          setBoot(other.getBoot());
        }
        if (!other.getDeviceName().isEmpty()) {
          deviceName_ = other.deviceName_;
          bitField0_ |= 0x00000004;
          onChanged();
        }
        if (other.getDiskSizeGb() != 0L) {
          setDiskSizeGb(other.getDiskSizeGb());
        }
        if (guestOsFeaturesBuilder_ == null) {
          if (!other.guestOsFeatures_.isEmpty()) {
            if (guestOsFeatures_.isEmpty()) {
              guestOsFeatures_ = other.guestOsFeatures_;
              bitField0_ = (bitField0_ & ~0x00000010);
            } else {
              ensureGuestOsFeaturesIsMutable();
              guestOsFeatures_.addAll(other.guestOsFeatures_);
            }
            onChanged();
          }
        } else {
          if (!other.guestOsFeatures_.isEmpty()) {
            if (guestOsFeaturesBuilder_.isEmpty()) {
              guestOsFeaturesBuilder_.dispose();
              guestOsFeaturesBuilder_ = null;
              guestOsFeatures_ = other.guestOsFeatures_;
              bitField0_ = (bitField0_ & ~0x00000010);
              guestOsFeaturesBuilder_ =
                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                      ? getGuestOsFeaturesFieldBuilder()
                      : null;
            } else {
              guestOsFeaturesBuilder_.addAllMessages(other.guestOsFeatures_);
            }
          }
        }
        if (other.getIndex() != 0L) {
          setIndex(other.getIndex());
        }
        if (!other.getInterface().isEmpty()) {
          interface_ = other.interface_;
          bitField0_ |= 0x00000040;
          onChanged();
        }
        if (!other.getKind().isEmpty()) {
          kind_ = other.kind_;
          bitField0_ |= 0x00000080;
          onChanged();
        }
        if (!other.licenses_.isEmpty()) {
          if (licenses_.isEmpty()) {
            licenses_ = other.licenses_;
            bitField0_ = (bitField0_ & ~0x00000100);
          } else {
            ensureLicensesIsMutable();
            licenses_.addAll(other.licenses_);
          }
          onChanged();
        }
        if (!other.getMode().isEmpty()) {
          mode_ = other.mode_;
          bitField0_ |= 0x00000200;
          onChanged();
        }
        if (!other.getSource().isEmpty()) {
          source_ = other.source_;
          bitField0_ |= 0x00000400;
          onChanged();
        }
        if (!other.getType().isEmpty()) {
          type_ = other.type_;
          bitField0_ |= 0x00000800;
          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 8:
                {
                  autoDelete_ = input.readBool();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 8
              case 16:
                {
                  boot_ = input.readBool();
                  bitField0_ |= 0x00000002;
                  break;
                } // case 16
              case 26:
                {
                  deviceName_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000004;
                  break;
                } // case 26
              case 32:
                {
                  diskSizeGb_ = input.readInt64();
                  bitField0_ |= 0x00000008;
                  break;
                } // case 32
              case 42:
                {
                  com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature m =
                      input.readMessage(
                          com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.parser(),
                          extensionRegistry);
                  if (guestOsFeaturesBuilder_ == null) {
                    ensureGuestOsFeaturesIsMutable();
                    guestOsFeatures_.add(m);
                  } else {
                    guestOsFeaturesBuilder_.addMessage(m);
                  }
                  break;
                } // case 42
              case 48:
                {
                  index_ = input.readInt64();
                  bitField0_ |= 0x00000020;
                  break;
                } // case 48
              case 58:
                {
                  interface_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000040;
                  break;
                } // case 58
              case 66:
                {
                  kind_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000080;
                  break;
                } // case 66
              case 74:
                {
                  java.lang.String s = input.readStringRequireUtf8();
                  ensureLicensesIsMutable();
                  licenses_.add(s);
                  break;
                } // case 74
              case 82:
                {
                  mode_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000200;
                  break;
                } // case 82
              case 90:
                {
                  source_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000400;
                  break;
                } // case 90
              case 98:
                {
                  type_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000800;
                  break;
                } // case 98
              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 boolean autoDelete_;
      /**
       *
       *
       * <pre>
       * Indicates whether the disk will be auto-deleted when the instance is
       * deleted (but not when the disk is detached from the instance).
       * </pre>
       *
       * <code>bool auto_delete = 1;</code>
       *
       * @return The autoDelete.
       */
      @java.lang.Override
      public boolean getAutoDelete() {
        return autoDelete_;
      }
      /**
       *
       *
       * <pre>
       * Indicates whether the disk will be auto-deleted when the instance is
       * deleted (but not when the disk is detached from the instance).
       * </pre>
       *
       * <code>bool auto_delete = 1;</code>
       *
       * @param value The autoDelete to set.
       * @return This builder for chaining.
       */
      public Builder setAutoDelete(boolean value) {

        autoDelete_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates whether the disk will be auto-deleted when the instance is
       * deleted (but not when the disk is detached from the instance).
       * </pre>
       *
       * <code>bool auto_delete = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearAutoDelete() {
        bitField0_ = (bitField0_ & ~0x00000001);
        autoDelete_ = false;
        onChanged();
        return this;
      }

      private boolean boot_;
      /**
       *
       *
       * <pre>
       * Indicates that this is a boot disk. The virtual machine will use the
       * first partition of the disk for its root filesystem.
       * </pre>
       *
       * <code>bool boot = 2;</code>
       *
       * @return The boot.
       */
      @java.lang.Override
      public boolean getBoot() {
        return boot_;
      }
      /**
       *
       *
       * <pre>
       * Indicates that this is a boot disk. The virtual machine will use the
       * first partition of the disk for its root filesystem.
       * </pre>
       *
       * <code>bool boot = 2;</code>
       *
       * @param value The boot to set.
       * @return This builder for chaining.
       */
      public Builder setBoot(boolean value) {

        boot_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates that this is a boot disk. The virtual machine will use the
       * first partition of the disk for its root filesystem.
       * </pre>
       *
       * <code>bool boot = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearBoot() {
        bitField0_ = (bitField0_ & ~0x00000002);
        boot_ = false;
        onChanged();
        return this;
      }

      private java.lang.Object deviceName_ = "";
      /**
       *
       *
       * <pre>
       * Indicates a unique device name of your choice that is reflected into the
       * `/dev/disk/by-id/google-*` tree of a Linux operating system running
       * within the instance. This name can be used to reference the device for
       * mounting, resizing, and so on, from within the instance.
       * If not specified, the server chooses a default device name to apply to
       * this disk, in the form persistent-disk-x, where x is a number assigned by
       * Google Compute Engine.This field is only applicable for persistent disks.
       * </pre>
       *
       * <code>string device_name = 3;</code>
       *
       * @return The deviceName.
       */
      public java.lang.String getDeviceName() {
        java.lang.Object ref = deviceName_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          deviceName_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates a unique device name of your choice that is reflected into the
       * `/dev/disk/by-id/google-*` tree of a Linux operating system running
       * within the instance. This name can be used to reference the device for
       * mounting, resizing, and so on, from within the instance.
       * If not specified, the server chooses a default device name to apply to
       * this disk, in the form persistent-disk-x, where x is a number assigned by
       * Google Compute Engine.This field is only applicable for persistent disks.
       * </pre>
       *
       * <code>string device_name = 3;</code>
       *
       * @return The bytes for deviceName.
       */
      public com.google.protobuf.ByteString getDeviceNameBytes() {
        java.lang.Object ref = deviceName_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          deviceName_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates a unique device name of your choice that is reflected into the
       * `/dev/disk/by-id/google-*` tree of a Linux operating system running
       * within the instance. This name can be used to reference the device for
       * mounting, resizing, and so on, from within the instance.
       * If not specified, the server chooses a default device name to apply to
       * this disk, in the form persistent-disk-x, where x is a number assigned by
       * Google Compute Engine.This field is only applicable for persistent disks.
       * </pre>
       *
       * <code>string device_name = 3;</code>
       *
       * @param value The deviceName to set.
       * @return This builder for chaining.
       */
      public Builder setDeviceName(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        deviceName_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a unique device name of your choice that is reflected into the
       * `/dev/disk/by-id/google-*` tree of a Linux operating system running
       * within the instance. This name can be used to reference the device for
       * mounting, resizing, and so on, from within the instance.
       * If not specified, the server chooses a default device name to apply to
       * this disk, in the form persistent-disk-x, where x is a number assigned by
       * Google Compute Engine.This field is only applicable for persistent disks.
       * </pre>
       *
       * <code>string device_name = 3;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearDeviceName() {
        deviceName_ = getDefaultInstance().getDeviceName();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a unique device name of your choice that is reflected into the
       * `/dev/disk/by-id/google-*` tree of a Linux operating system running
       * within the instance. This name can be used to reference the device for
       * mounting, resizing, and so on, from within the instance.
       * If not specified, the server chooses a default device name to apply to
       * this disk, in the form persistent-disk-x, where x is a number assigned by
       * Google Compute Engine.This field is only applicable for persistent disks.
       * </pre>
       *
       * <code>string device_name = 3;</code>
       *
       * @param value The bytes for deviceName to set.
       * @return This builder for chaining.
       */
      public Builder setDeviceNameBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        deviceName_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }

      private long diskSizeGb_;
      /**
       *
       *
       * <pre>
       * Indicates the size of the disk in base-2 GB.
       * </pre>
       *
       * <code>int64 disk_size_gb = 4;</code>
       *
       * @return The diskSizeGb.
       */
      @java.lang.Override
      public long getDiskSizeGb() {
        return diskSizeGb_;
      }
      /**
       *
       *
       * <pre>
       * Indicates the size of the disk in base-2 GB.
       * </pre>
       *
       * <code>int64 disk_size_gb = 4;</code>
       *
       * @param value The diskSizeGb to set.
       * @return This builder for chaining.
       */
      public Builder setDiskSizeGb(long value) {

        diskSizeGb_ = value;
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates the size of the disk in base-2 GB.
       * </pre>
       *
       * <code>int64 disk_size_gb = 4;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearDiskSizeGb() {
        bitField0_ = (bitField0_ & ~0x00000008);
        diskSizeGb_ = 0L;
        onChanged();
        return this;
      }

      private java.util.List<com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature>
          guestOsFeatures_ = java.util.Collections.emptyList();

      private void ensureGuestOsFeaturesIsMutable() {
        if (!((bitField0_ & 0x00000010) != 0)) {
          guestOsFeatures_ =
              new java.util.ArrayList<com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature>(
                  guestOsFeatures_);
          bitField0_ |= 0x00000010;
        }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature,
              com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder,
              com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder>
          guestOsFeaturesBuilder_;

      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public java.util.List<com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature>
          getGuestOsFeaturesList() {
        if (guestOsFeaturesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(guestOsFeatures_);
        } else {
          return guestOsFeaturesBuilder_.getMessageList();
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public int getGuestOsFeaturesCount() {
        if (guestOsFeaturesBuilder_ == null) {
          return guestOsFeatures_.size();
        } else {
          return guestOsFeaturesBuilder_.getCount();
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature getGuestOsFeatures(
          int index) {
        if (guestOsFeaturesBuilder_ == null) {
          return guestOsFeatures_.get(index);
        } else {
          return guestOsFeaturesBuilder_.getMessage(index);
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public Builder setGuestOsFeatures(
          int index, com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature value) {
        if (guestOsFeaturesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureGuestOsFeaturesIsMutable();
          guestOsFeatures_.set(index, value);
          onChanged();
        } else {
          guestOsFeaturesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public Builder setGuestOsFeatures(
          int index,
          com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder builderForValue) {
        if (guestOsFeaturesBuilder_ == null) {
          ensureGuestOsFeaturesIsMutable();
          guestOsFeatures_.set(index, builderForValue.build());
          onChanged();
        } else {
          guestOsFeaturesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public Builder addGuestOsFeatures(
          com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature value) {
        if (guestOsFeaturesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureGuestOsFeaturesIsMutable();
          guestOsFeatures_.add(value);
          onChanged();
        } else {
          guestOsFeaturesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public Builder addGuestOsFeatures(
          int index, com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature value) {
        if (guestOsFeaturesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureGuestOsFeaturesIsMutable();
          guestOsFeatures_.add(index, value);
          onChanged();
        } else {
          guestOsFeaturesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public Builder addGuestOsFeatures(
          com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder builderForValue) {
        if (guestOsFeaturesBuilder_ == null) {
          ensureGuestOsFeaturesIsMutable();
          guestOsFeatures_.add(builderForValue.build());
          onChanged();
        } else {
          guestOsFeaturesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public Builder addGuestOsFeatures(
          int index,
          com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder builderForValue) {
        if (guestOsFeaturesBuilder_ == null) {
          ensureGuestOsFeaturesIsMutable();
          guestOsFeatures_.add(index, builderForValue.build());
          onChanged();
        } else {
          guestOsFeaturesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public Builder addAllGuestOsFeatures(
          java.lang.Iterable<? extends com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature>
              values) {
        if (guestOsFeaturesBuilder_ == null) {
          ensureGuestOsFeaturesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestOsFeatures_);
          onChanged();
        } else {
          guestOsFeaturesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public Builder clearGuestOsFeatures() {
        if (guestOsFeaturesBuilder_ == null) {
          guestOsFeatures_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000010);
          onChanged();
        } else {
          guestOsFeaturesBuilder_.clear();
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public Builder removeGuestOsFeatures(int index) {
        if (guestOsFeaturesBuilder_ == null) {
          ensureGuestOsFeaturesIsMutable();
          guestOsFeatures_.remove(index);
          onChanged();
        } else {
          guestOsFeaturesBuilder_.remove(index);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder
          getGuestOsFeaturesBuilder(int index) {
        return getGuestOsFeaturesFieldBuilder().getBuilder(index);
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder
          getGuestOsFeaturesOrBuilder(int index) {
        if (guestOsFeaturesBuilder_ == null) {
          return guestOsFeatures_.get(index);
        } else {
          return guestOsFeaturesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public java.util.List<
              ? extends com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder>
          getGuestOsFeaturesOrBuilderList() {
        if (guestOsFeaturesBuilder_ != null) {
          return guestOsFeaturesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(guestOsFeatures_);
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder
          addGuestOsFeaturesBuilder() {
        return getGuestOsFeaturesFieldBuilder()
            .addBuilder(
                com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.getDefaultInstance());
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder
          addGuestOsFeaturesBuilder(int index) {
        return getGuestOsFeaturesFieldBuilder()
            .addBuilder(
                index,
                com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.getDefaultInstance());
      }
      /**
       *
       *
       * <pre>
       * Indicates a list of features to enable on the guest operating system.
       * Applicable only for bootable images. Read  Enabling guest operating
       * system features to see a list of available options.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5;
       * </code>
       */
      public java.util.List<com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder>
          getGuestOsFeaturesBuilderList() {
        return getGuestOsFeaturesFieldBuilder().getBuilderList();
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature,
              com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder,
              com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder>
          getGuestOsFeaturesFieldBuilder() {
        if (guestOsFeaturesBuilder_ == null) {
          guestOsFeaturesBuilder_ =
              new com.google.protobuf.RepeatedFieldBuilderV3<
                  com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature,
                  com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder,
                  com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder>(
                  guestOsFeatures_,
                  ((bitField0_ & 0x00000010) != 0),
                  getParentForChildren(),
                  isClean());
          guestOsFeatures_ = null;
        }
        return guestOsFeaturesBuilder_;
      }

      private long index_;
      /**
       *
       *
       * <pre>
       * A zero-based index to this disk, where 0 is reserved for the
       * boot disk. If you have many disks attached to an instance, each disk
       * would have a unique index number.
       * </pre>
       *
       * <code>int64 index = 6;</code>
       *
       * @return The index.
       */
      @java.lang.Override
      public long getIndex() {
        return index_;
      }
      /**
       *
       *
       * <pre>
       * A zero-based index to this disk, where 0 is reserved for the
       * boot disk. If you have many disks attached to an instance, each disk
       * would have a unique index number.
       * </pre>
       *
       * <code>int64 index = 6;</code>
       *
       * @param value The index to set.
       * @return This builder for chaining.
       */
      public Builder setIndex(long value) {

        index_ = value;
        bitField0_ |= 0x00000020;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * A zero-based index to this disk, where 0 is reserved for the
       * boot disk. If you have many disks attached to an instance, each disk
       * would have a unique index number.
       * </pre>
       *
       * <code>int64 index = 6;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearIndex() {
        bitField0_ = (bitField0_ & ~0x00000020);
        index_ = 0L;
        onChanged();
        return this;
      }

      private java.lang.Object interface_ = "";
      /**
       *
       *
       * <pre>
       * Indicates the disk interface to use for attaching this disk, which is
       * either SCSI or NVME. The default is SCSI. Persistent disks must always
       * use SCSI and the request will fail if you attempt to attach a persistent
       * disk in any other format than SCSI. Local SSDs can use either NVME or
       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
       * performance.
       * Valid values:
       * * `NVME`
       * * `SCSI`
       * </pre>
       *
       * <code>string interface = 7;</code>
       *
       * @return The interface.
       */
      public java.lang.String getInterface() {
        java.lang.Object ref = interface_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          interface_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates the disk interface to use for attaching this disk, which is
       * either SCSI or NVME. The default is SCSI. Persistent disks must always
       * use SCSI and the request will fail if you attempt to attach a persistent
       * disk in any other format than SCSI. Local SSDs can use either NVME or
       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
       * performance.
       * Valid values:
       * * `NVME`
       * * `SCSI`
       * </pre>
       *
       * <code>string interface = 7;</code>
       *
       * @return The bytes for interface.
       */
      public com.google.protobuf.ByteString getInterfaceBytes() {
        java.lang.Object ref = interface_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          interface_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates the disk interface to use for attaching this disk, which is
       * either SCSI or NVME. The default is SCSI. Persistent disks must always
       * use SCSI and the request will fail if you attempt to attach a persistent
       * disk in any other format than SCSI. Local SSDs can use either NVME or
       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
       * performance.
       * Valid values:
       * * `NVME`
       * * `SCSI`
       * </pre>
       *
       * <code>string interface = 7;</code>
       *
       * @param value The interface to set.
       * @return This builder for chaining.
       */
      public Builder setInterface(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        interface_ = value;
        bitField0_ |= 0x00000040;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates the disk interface to use for attaching this disk, which is
       * either SCSI or NVME. The default is SCSI. Persistent disks must always
       * use SCSI and the request will fail if you attempt to attach a persistent
       * disk in any other format than SCSI. Local SSDs can use either NVME or
       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
       * performance.
       * Valid values:
       * * `NVME`
       * * `SCSI`
       * </pre>
       *
       * <code>string interface = 7;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearInterface() {
        interface_ = getDefaultInstance().getInterface();
        bitField0_ = (bitField0_ & ~0x00000040);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates the disk interface to use for attaching this disk, which is
       * either SCSI or NVME. The default is SCSI. Persistent disks must always
       * use SCSI and the request will fail if you attempt to attach a persistent
       * disk in any other format than SCSI. Local SSDs can use either NVME or
       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
       * performance.
       * Valid values:
       * * `NVME`
       * * `SCSI`
       * </pre>
       *
       * <code>string interface = 7;</code>
       *
       * @param value The bytes for interface to set.
       * @return This builder for chaining.
       */
      public Builder setInterfaceBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        interface_ = value;
        bitField0_ |= 0x00000040;
        onChanged();
        return this;
      }

      private java.lang.Object kind_ = "";
      /**
       *
       *
       * <pre>
       * Type of the resource. Always compute#attachedDisk for attached
       * disks.
       * </pre>
       *
       * <code>string kind = 8;</code>
       *
       * @return The kind.
       */
      public java.lang.String getKind() {
        java.lang.Object ref = kind_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          kind_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Type of the resource. Always compute#attachedDisk for attached
       * disks.
       * </pre>
       *
       * <code>string kind = 8;</code>
       *
       * @return The bytes for kind.
       */
      public com.google.protobuf.ByteString getKindBytes() {
        java.lang.Object ref = kind_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          kind_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Type of the resource. Always compute#attachedDisk for attached
       * disks.
       * </pre>
       *
       * <code>string kind = 8;</code>
       *
       * @param value The kind to set.
       * @return This builder for chaining.
       */
      public Builder setKind(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        kind_ = value;
        bitField0_ |= 0x00000080;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Type of the resource. Always compute#attachedDisk for attached
       * disks.
       * </pre>
       *
       * <code>string kind = 8;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearKind() {
        kind_ = getDefaultInstance().getKind();
        bitField0_ = (bitField0_ & ~0x00000080);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Type of the resource. Always compute#attachedDisk for attached
       * disks.
       * </pre>
       *
       * <code>string kind = 8;</code>
       *
       * @param value The bytes for kind to set.
       * @return This builder for chaining.
       */
      public Builder setKindBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        kind_ = value;
        bitField0_ |= 0x00000080;
        onChanged();
        return this;
      }

      private com.google.protobuf.LazyStringList licenses_ =
          com.google.protobuf.LazyStringArrayList.EMPTY;

      private void ensureLicensesIsMutable() {
        if (!((bitField0_ & 0x00000100) != 0)) {
          licenses_ = new com.google.protobuf.LazyStringArrayList(licenses_);
          bitField0_ |= 0x00000100;
        }
      }
      /**
       *
       *
       * <pre>
       * A list of publicly visible licenses. Reserved for Google's use.
       * A License represents billing and aggregate usage data for public
       * and marketplace images.
       * </pre>
       *
       * <code>repeated string licenses = 9;</code>
       *
       * @return A list containing the licenses.
       */
      public com.google.protobuf.ProtocolStringList getLicensesList() {
        return licenses_.getUnmodifiableView();
      }
      /**
       *
       *
       * <pre>
       * A list of publicly visible licenses. Reserved for Google's use.
       * A License represents billing and aggregate usage data for public
       * and marketplace images.
       * </pre>
       *
       * <code>repeated string licenses = 9;</code>
       *
       * @return The count of licenses.
       */
      public int getLicensesCount() {
        return licenses_.size();
      }
      /**
       *
       *
       * <pre>
       * A list of publicly visible licenses. Reserved for Google's use.
       * A License represents billing and aggregate usage data for public
       * and marketplace images.
       * </pre>
       *
       * <code>repeated string licenses = 9;</code>
       *
       * @param index The index of the element to return.
       * @return The licenses at the given index.
       */
      public java.lang.String getLicenses(int index) {
        return licenses_.get(index);
      }
      /**
       *
       *
       * <pre>
       * A list of publicly visible licenses. Reserved for Google's use.
       * A License represents billing and aggregate usage data for public
       * and marketplace images.
       * </pre>
       *
       * <code>repeated string licenses = 9;</code>
       *
       * @param index The index of the value to return.
       * @return The bytes of the licenses at the given index.
       */
      public com.google.protobuf.ByteString getLicensesBytes(int index) {
        return licenses_.getByteString(index);
      }
      /**
       *
       *
       * <pre>
       * A list of publicly visible licenses. Reserved for Google's use.
       * A License represents billing and aggregate usage data for public
       * and marketplace images.
       * </pre>
       *
       * <code>repeated string licenses = 9;</code>
       *
       * @param index The index to set the value at.
       * @param value The licenses to set.
       * @return This builder for chaining.
       */
      public Builder setLicenses(int index, java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureLicensesIsMutable();
        licenses_.set(index, value);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * A list of publicly visible licenses. Reserved for Google's use.
       * A License represents billing and aggregate usage data for public
       * and marketplace images.
       * </pre>
       *
       * <code>repeated string licenses = 9;</code>
       *
       * @param value The licenses to add.
       * @return This builder for chaining.
       */
      public Builder addLicenses(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureLicensesIsMutable();
        licenses_.add(value);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * A list of publicly visible licenses. Reserved for Google's use.
       * A License represents billing and aggregate usage data for public
       * and marketplace images.
       * </pre>
       *
       * <code>repeated string licenses = 9;</code>
       *
       * @param values The licenses to add.
       * @return This builder for chaining.
       */
      public Builder addAllLicenses(java.lang.Iterable<java.lang.String> values) {
        ensureLicensesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, licenses_);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * A list of publicly visible licenses. Reserved for Google's use.
       * A License represents billing and aggregate usage data for public
       * and marketplace images.
       * </pre>
       *
       * <code>repeated string licenses = 9;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearLicenses() {
        licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000100);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * A list of publicly visible licenses. Reserved for Google's use.
       * A License represents billing and aggregate usage data for public
       * and marketplace images.
       * </pre>
       *
       * <code>repeated string licenses = 9;</code>
       *
       * @param value The bytes of the licenses to add.
       * @return This builder for chaining.
       */
      public Builder addLicensesBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        ensureLicensesIsMutable();
        licenses_.add(value);
        onChanged();
        return this;
      }

      private java.lang.Object mode_ = "";
      /**
       *
       *
       * <pre>
       * The mode in which to attach this disk, either `READ_WRITE` or
       * `READ_ONLY`. If not specified, the default is to attach the disk in
       * `READ_WRITE` mode. Valid values:
       * * `READ_ONLY`
       * * `READ_WRITE`
       * </pre>
       *
       * <code>string mode = 10;</code>
       *
       * @return The mode.
       */
      public java.lang.String getMode() {
        java.lang.Object ref = mode_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          mode_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The mode in which to attach this disk, either `READ_WRITE` or
       * `READ_ONLY`. If not specified, the default is to attach the disk in
       * `READ_WRITE` mode. Valid values:
       * * `READ_ONLY`
       * * `READ_WRITE`
       * </pre>
       *
       * <code>string mode = 10;</code>
       *
       * @return The bytes for mode.
       */
      public com.google.protobuf.ByteString getModeBytes() {
        java.lang.Object ref = mode_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          mode_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The mode in which to attach this disk, either `READ_WRITE` or
       * `READ_ONLY`. If not specified, the default is to attach the disk in
       * `READ_WRITE` mode. Valid values:
       * * `READ_ONLY`
       * * `READ_WRITE`
       * </pre>
       *
       * <code>string mode = 10;</code>
       *
       * @param value The mode to set.
       * @return This builder for chaining.
       */
      public Builder setMode(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        mode_ = value;
        bitField0_ |= 0x00000200;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The mode in which to attach this disk, either `READ_WRITE` or
       * `READ_ONLY`. If not specified, the default is to attach the disk in
       * `READ_WRITE` mode. Valid values:
       * * `READ_ONLY`
       * * `READ_WRITE`
       * </pre>
       *
       * <code>string mode = 10;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearMode() {
        mode_ = getDefaultInstance().getMode();
        bitField0_ = (bitField0_ & ~0x00000200);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The mode in which to attach this disk, either `READ_WRITE` or
       * `READ_ONLY`. If not specified, the default is to attach the disk in
       * `READ_WRITE` mode. Valid values:
       * * `READ_ONLY`
       * * `READ_WRITE`
       * </pre>
       *
       * <code>string mode = 10;</code>
       *
       * @param value The bytes for mode to set.
       * @return This builder for chaining.
       */
      public Builder setModeBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        mode_ = value;
        bitField0_ |= 0x00000200;
        onChanged();
        return this;
      }

      private java.lang.Object source_ = "";
      /**
       *
       *
       * <pre>
       * Indicates a valid partial or full URL to an existing Persistent Disk
       * resource.
       * </pre>
       *
       * <code>string source = 11;</code>
       *
       * @return The source.
       */
      public java.lang.String getSource() {
        java.lang.Object ref = source_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          source_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates a valid partial or full URL to an existing Persistent Disk
       * resource.
       * </pre>
       *
       * <code>string source = 11;</code>
       *
       * @return The bytes for source.
       */
      public com.google.protobuf.ByteString getSourceBytes() {
        java.lang.Object ref = source_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          source_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates a valid partial or full URL to an existing Persistent Disk
       * resource.
       * </pre>
       *
       * <code>string source = 11;</code>
       *
       * @param value The source to set.
       * @return This builder for chaining.
       */
      public Builder setSource(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        source_ = value;
        bitField0_ |= 0x00000400;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a valid partial or full URL to an existing Persistent Disk
       * resource.
       * </pre>
       *
       * <code>string source = 11;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearSource() {
        source_ = getDefaultInstance().getSource();
        bitField0_ = (bitField0_ & ~0x00000400);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates a valid partial or full URL to an existing Persistent Disk
       * resource.
       * </pre>
       *
       * <code>string source = 11;</code>
       *
       * @param value The bytes for source to set.
       * @return This builder for chaining.
       */
      public Builder setSourceBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        source_ = value;
        bitField0_ |= 0x00000400;
        onChanged();
        return this;
      }

      private java.lang.Object type_ = "";
      /**
       *
       *
       * <pre>
       * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
       * Valid values:
       * * `PERSISTENT`
       * * `SCRATCH`
       * </pre>
       *
       * <code>string type = 12;</code>
       *
       * @return The type.
       */
      public java.lang.String getType() {
        java.lang.Object ref = type_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          type_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
       * Valid values:
       * * `PERSISTENT`
       * * `SCRATCH`
       * </pre>
       *
       * <code>string type = 12;</code>
       *
       * @return The bytes for type.
       */
      public com.google.protobuf.ByteString getTypeBytes() {
        java.lang.Object ref = type_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          type_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
       * Valid values:
       * * `PERSISTENT`
       * * `SCRATCH`
       * </pre>
       *
       * <code>string type = 12;</code>
       *
       * @param value The type to set.
       * @return This builder for chaining.
       */
      public Builder setType(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        type_ = value;
        bitField0_ |= 0x00000800;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
       * Valid values:
       * * `PERSISTENT`
       * * `SCRATCH`
       * </pre>
       *
       * <code>string type = 12;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearType() {
        type_ = getDefaultInstance().getType();
        bitField0_ = (bitField0_ & ~0x00000800);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`.
       * Valid values:
       * * `PERSISTENT`
       * * `SCRATCH`
       * </pre>
       *
       * <code>string type = 12;</code>
       *
       * @param value The bytes for type to set.
       * @return This builder for chaining.
       */
      public Builder setTypeBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        type_ = value;
        bitField0_ |= 0x00000800;
        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.notebooks.v1.Instance.Disk)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance.Disk)
    private static final com.google.cloud.notebooks.v1.Instance.Disk DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance.Disk();
    }

    public static com.google.cloud.notebooks.v1.Instance.Disk getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.Disk getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface ShieldedInstanceConfigOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Defines whether the instance has Secure Boot enabled.
     * Secure Boot helps ensure that the system only runs authentic software by
     * verifying the digital signature of all boot components, and halting the
     * boot process if signature verification fails. Disabled by default.
     * </pre>
     *
     * <code>bool enable_secure_boot = 1;</code>
     *
     * @return The enableSecureBoot.
     */
    boolean getEnableSecureBoot();

    /**
     *
     *
     * <pre>
     * Defines whether the instance has the vTPM enabled. Enabled by default.
     * </pre>
     *
     * <code>bool enable_vtpm = 2;</code>
     *
     * @return The enableVtpm.
     */
    boolean getEnableVtpm();

    /**
     *
     *
     * <pre>
     * Defines whether the instance has integrity monitoring enabled.
     * Enables monitoring and attestation of the boot integrity of the instance.
     * The attestation is performed against the integrity policy baseline. This
     * baseline is initially derived from the implicitly trusted boot image when
     * the instance is created. Enabled by default.
     * </pre>
     *
     * <code>bool enable_integrity_monitoring = 3;</code>
     *
     * @return The enableIntegrityMonitoring.
     */
    boolean getEnableIntegrityMonitoring();
  }
  /**
   *
   *
   * <pre>
   * A set of Shielded Instance options.
   * Check [Images using supported Shielded VM
   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
   * Not all combinations are valid.
   * </pre>
   *
   * Protobuf type {@code google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig}
   */
  public static final class ShieldedInstanceConfig extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig)
      ShieldedInstanceConfigOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use ShieldedInstanceConfig.newBuilder() to construct.
    private ShieldedInstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private ShieldedInstanceConfig() {}

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

    @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.notebooks.v1.InstanceProto
          .internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.notebooks.v1.InstanceProto
          .internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.class,
              com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder.class);
    }

    public static final int ENABLE_SECURE_BOOT_FIELD_NUMBER = 1;
    private boolean enableSecureBoot_ = false;
    /**
     *
     *
     * <pre>
     * Defines whether the instance has Secure Boot enabled.
     * Secure Boot helps ensure that the system only runs authentic software by
     * verifying the digital signature of all boot components, and halting the
     * boot process if signature verification fails. Disabled by default.
     * </pre>
     *
     * <code>bool enable_secure_boot = 1;</code>
     *
     * @return The enableSecureBoot.
     */
    @java.lang.Override
    public boolean getEnableSecureBoot() {
      return enableSecureBoot_;
    }

    public static final int ENABLE_VTPM_FIELD_NUMBER = 2;
    private boolean enableVtpm_ = false;
    /**
     *
     *
     * <pre>
     * Defines whether the instance has the vTPM enabled. Enabled by default.
     * </pre>
     *
     * <code>bool enable_vtpm = 2;</code>
     *
     * @return The enableVtpm.
     */
    @java.lang.Override
    public boolean getEnableVtpm() {
      return enableVtpm_;
    }

    public static final int ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER = 3;
    private boolean enableIntegrityMonitoring_ = false;
    /**
     *
     *
     * <pre>
     * Defines whether the instance has integrity monitoring enabled.
     * Enables monitoring and attestation of the boot integrity of the instance.
     * The attestation is performed against the integrity policy baseline. This
     * baseline is initially derived from the implicitly trusted boot image when
     * the instance is created. Enabled by default.
     * </pre>
     *
     * <code>bool enable_integrity_monitoring = 3;</code>
     *
     * @return The enableIntegrityMonitoring.
     */
    @java.lang.Override
    public boolean getEnableIntegrityMonitoring() {
      return enableIntegrityMonitoring_;
    }

    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 (enableSecureBoot_ != false) {
        output.writeBool(1, enableSecureBoot_);
      }
      if (enableVtpm_ != false) {
        output.writeBool(2, enableVtpm_);
      }
      if (enableIntegrityMonitoring_ != false) {
        output.writeBool(3, enableIntegrityMonitoring_);
      }
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (enableSecureBoot_ != false) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableSecureBoot_);
      }
      if (enableVtpm_ != false) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableVtpm_);
      }
      if (enableIntegrityMonitoring_ != false) {
        size +=
            com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableIntegrityMonitoring_);
      }
      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.notebooks.v1.Instance.ShieldedInstanceConfig)) {
        return super.equals(obj);
      }
      com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig other =
          (com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) obj;

      if (getEnableSecureBoot() != other.getEnableSecureBoot()) return false;
      if (getEnableVtpm() != other.getEnableVtpm()) return false;
      if (getEnableIntegrityMonitoring() != other.getEnableIntegrityMonitoring()) 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) + ENABLE_SECURE_BOOT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSecureBoot());
      hash = (37 * hash) + ENABLE_VTPM_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableVtpm());
      hash = (37 * hash) + ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableIntegrityMonitoring());
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig 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.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

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

    public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

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

    public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig 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.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig 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.notebooks.v1.Instance.ShieldedInstanceConfig 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 set of Shielded Instance options.
     * Check [Images using supported Shielded VM
     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     * Not all combinations are valid.
     * </pre>
     *
     * Protobuf type {@code google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig)
        com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.class,
                com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder.class);
      }

      // Construct using com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.newBuilder()
      private Builder() {}

      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        enableSecureBoot_ = false;
        enableVtpm_ = false;
        enableIntegrityMonitoring_ = false;
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig
          getDefaultInstanceForType() {
        return com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig build() {
        com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig buildPartial() {
        com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig result =
            new com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig(this);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartial0(
          com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.enableSecureBoot_ = enableSecureBoot_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.enableVtpm_ = enableVtpm_;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.enableIntegrityMonitoring_ = enableIntegrityMonitoring_;
        }
      }

      @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.notebooks.v1.Instance.ShieldedInstanceConfig) {
          return mergeFrom((com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig other) {
        if (other
            == com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance())
          return this;
        if (other.getEnableSecureBoot() != false) {
          setEnableSecureBoot(other.getEnableSecureBoot());
        }
        if (other.getEnableVtpm() != false) {
          setEnableVtpm(other.getEnableVtpm());
        }
        if (other.getEnableIntegrityMonitoring() != false) {
          setEnableIntegrityMonitoring(other.getEnableIntegrityMonitoring());
        }
        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:
                {
                  enableSecureBoot_ = input.readBool();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 8
              case 16:
                {
                  enableVtpm_ = input.readBool();
                  bitField0_ |= 0x00000002;
                  break;
                } // case 16
              case 24:
                {
                  enableIntegrityMonitoring_ = input.readBool();
                  bitField0_ |= 0x00000004;
                  break;
                } // case 24
              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 boolean enableSecureBoot_;
      /**
       *
       *
       * <pre>
       * Defines whether the instance has Secure Boot enabled.
       * Secure Boot helps ensure that the system only runs authentic software by
       * verifying the digital signature of all boot components, and halting the
       * boot process if signature verification fails. Disabled by default.
       * </pre>
       *
       * <code>bool enable_secure_boot = 1;</code>
       *
       * @return The enableSecureBoot.
       */
      @java.lang.Override
      public boolean getEnableSecureBoot() {
        return enableSecureBoot_;
      }
      /**
       *
       *
       * <pre>
       * Defines whether the instance has Secure Boot enabled.
       * Secure Boot helps ensure that the system only runs authentic software by
       * verifying the digital signature of all boot components, and halting the
       * boot process if signature verification fails. Disabled by default.
       * </pre>
       *
       * <code>bool enable_secure_boot = 1;</code>
       *
       * @param value The enableSecureBoot to set.
       * @return This builder for chaining.
       */
      public Builder setEnableSecureBoot(boolean value) {

        enableSecureBoot_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Defines whether the instance has Secure Boot enabled.
       * Secure Boot helps ensure that the system only runs authentic software by
       * verifying the digital signature of all boot components, and halting the
       * boot process if signature verification fails. Disabled by default.
       * </pre>
       *
       * <code>bool enable_secure_boot = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearEnableSecureBoot() {
        bitField0_ = (bitField0_ & ~0x00000001);
        enableSecureBoot_ = false;
        onChanged();
        return this;
      }

      private boolean enableVtpm_;
      /**
       *
       *
       * <pre>
       * Defines whether the instance has the vTPM enabled. Enabled by default.
       * </pre>
       *
       * <code>bool enable_vtpm = 2;</code>
       *
       * @return The enableVtpm.
       */
      @java.lang.Override
      public boolean getEnableVtpm() {
        return enableVtpm_;
      }
      /**
       *
       *
       * <pre>
       * Defines whether the instance has the vTPM enabled. Enabled by default.
       * </pre>
       *
       * <code>bool enable_vtpm = 2;</code>
       *
       * @param value The enableVtpm to set.
       * @return This builder for chaining.
       */
      public Builder setEnableVtpm(boolean value) {

        enableVtpm_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Defines whether the instance has the vTPM enabled. Enabled by default.
       * </pre>
       *
       * <code>bool enable_vtpm = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearEnableVtpm() {
        bitField0_ = (bitField0_ & ~0x00000002);
        enableVtpm_ = false;
        onChanged();
        return this;
      }

      private boolean enableIntegrityMonitoring_;
      /**
       *
       *
       * <pre>
       * Defines whether the instance has integrity monitoring enabled.
       * Enables monitoring and attestation of the boot integrity of the instance.
       * The attestation is performed against the integrity policy baseline. This
       * baseline is initially derived from the implicitly trusted boot image when
       * the instance is created. Enabled by default.
       * </pre>
       *
       * <code>bool enable_integrity_monitoring = 3;</code>
       *
       * @return The enableIntegrityMonitoring.
       */
      @java.lang.Override
      public boolean getEnableIntegrityMonitoring() {
        return enableIntegrityMonitoring_;
      }
      /**
       *
       *
       * <pre>
       * Defines whether the instance has integrity monitoring enabled.
       * Enables monitoring and attestation of the boot integrity of the instance.
       * The attestation is performed against the integrity policy baseline. This
       * baseline is initially derived from the implicitly trusted boot image when
       * the instance is created. Enabled by default.
       * </pre>
       *
       * <code>bool enable_integrity_monitoring = 3;</code>
       *
       * @param value The enableIntegrityMonitoring to set.
       * @return This builder for chaining.
       */
      public Builder setEnableIntegrityMonitoring(boolean value) {

        enableIntegrityMonitoring_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Defines whether the instance has integrity monitoring enabled.
       * Enables monitoring and attestation of the boot integrity of the instance.
       * The attestation is performed against the integrity policy baseline. This
       * baseline is initially derived from the implicitly trusted boot image when
       * the instance is created. Enabled by default.
       * </pre>
       *
       * <code>bool enable_integrity_monitoring = 3;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearEnableIntegrityMonitoring() {
        bitField0_ = (bitField0_ & ~0x00000004);
        enableIntegrityMonitoring_ = 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.notebooks.v1.Instance.ShieldedInstanceConfig)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig)
    private static final com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig();
    }

    public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface UpgradeHistoryEntryOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The snapshot of the boot disk of this notebook instance before upgrade.
     * </pre>
     *
     * <code>string snapshot = 1;</code>
     *
     * @return The snapshot.
     */
    java.lang.String getSnapshot();
    /**
     *
     *
     * <pre>
     * The snapshot of the boot disk of this notebook instance before upgrade.
     * </pre>
     *
     * <code>string snapshot = 1;</code>
     *
     * @return The bytes for snapshot.
     */
    com.google.protobuf.ByteString getSnapshotBytes();

    /**
     *
     *
     * <pre>
     * The VM image before this instance upgrade.
     * </pre>
     *
     * <code>string vm_image = 2;</code>
     *
     * @return The vmImage.
     */
    java.lang.String getVmImage();
    /**
     *
     *
     * <pre>
     * The VM image before this instance upgrade.
     * </pre>
     *
     * <code>string vm_image = 2;</code>
     *
     * @return The bytes for vmImage.
     */
    com.google.protobuf.ByteString getVmImageBytes();

    /**
     *
     *
     * <pre>
     * The container image before this instance upgrade.
     * </pre>
     *
     * <code>string container_image = 3;</code>
     *
     * @return The containerImage.
     */
    java.lang.String getContainerImage();
    /**
     *
     *
     * <pre>
     * The container image before this instance upgrade.
     * </pre>
     *
     * <code>string container_image = 3;</code>
     *
     * @return The bytes for containerImage.
     */
    com.google.protobuf.ByteString getContainerImageBytes();

    /**
     *
     *
     * <pre>
     * The framework of this notebook instance.
     * </pre>
     *
     * <code>string framework = 4;</code>
     *
     * @return The framework.
     */
    java.lang.String getFramework();
    /**
     *
     *
     * <pre>
     * The framework of this notebook instance.
     * </pre>
     *
     * <code>string framework = 4;</code>
     *
     * @return The bytes for framework.
     */
    com.google.protobuf.ByteString getFrameworkBytes();

    /**
     *
     *
     * <pre>
     * The version of the notebook instance before this upgrade.
     * </pre>
     *
     * <code>string version = 5;</code>
     *
     * @return The version.
     */
    java.lang.String getVersion();
    /**
     *
     *
     * <pre>
     * The version of the notebook instance before this upgrade.
     * </pre>
     *
     * <code>string version = 5;</code>
     *
     * @return The bytes for version.
     */
    com.google.protobuf.ByteString getVersionBytes();

    /**
     *
     *
     * <pre>
     * The state of this instance upgrade history entry.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6;</code>
     *
     * @return The enum numeric value on the wire for state.
     */
    int getStateValue();
    /**
     *
     *
     * <pre>
     * The state of this instance upgrade history entry.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6;</code>
     *
     * @return The state.
     */
    com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State getState();

    /**
     *
     *
     * <pre>
     * The time that this instance upgrade history entry is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 7;</code>
     *
     * @return Whether the createTime field is set.
     */
    boolean hasCreateTime();
    /**
     *
     *
     * <pre>
     * The time that this instance upgrade history entry is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 7;</code>
     *
     * @return The createTime.
     */
    com.google.protobuf.Timestamp getCreateTime();
    /**
     *
     *
     * <pre>
     * The time that this instance upgrade history entry is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 7;</code>
     */
    com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();

    /**
     *
     *
     * <pre>
     * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
     * </pre>
     *
     * <code>string target_image = 8 [deprecated = true];</code>
     *
     * @deprecated google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.target_image is
     *     deprecated. See google/cloud/notebooks/v1/instance.proto;l=352
     * @return The targetImage.
     */
    @java.lang.Deprecated
    java.lang.String getTargetImage();
    /**
     *
     *
     * <pre>
     * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
     * </pre>
     *
     * <code>string target_image = 8 [deprecated = true];</code>
     *
     * @deprecated google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.target_image is
     *     deprecated. See google/cloud/notebooks/v1/instance.proto;l=352
     * @return The bytes for targetImage.
     */
    @java.lang.Deprecated
    com.google.protobuf.ByteString getTargetImageBytes();

    /**
     *
     *
     * <pre>
     * Action. Rolloback or Upgrade.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9;</code>
     *
     * @return The enum numeric value on the wire for action.
     */
    int getActionValue();
    /**
     *
     *
     * <pre>
     * Action. Rolloback or Upgrade.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9;</code>
     *
     * @return The action.
     */
    com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action getAction();

    /**
     *
     *
     * <pre>
     * Target VM Version, like m63.
     * </pre>
     *
     * <code>string target_version = 10;</code>
     *
     * @return The targetVersion.
     */
    java.lang.String getTargetVersion();
    /**
     *
     *
     * <pre>
     * Target VM Version, like m63.
     * </pre>
     *
     * <code>string target_version = 10;</code>
     *
     * @return The bytes for targetVersion.
     */
    com.google.protobuf.ByteString getTargetVersionBytes();
  }
  /**
   *
   *
   * <pre>
   * The entry of VM image upgrade history.
   * </pre>
   *
   * Protobuf type {@code google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry}
   */
  public static final class UpgradeHistoryEntry extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry)
      UpgradeHistoryEntryOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use UpgradeHistoryEntry.newBuilder() to construct.
    private UpgradeHistoryEntry(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private UpgradeHistoryEntry() {
      snapshot_ = "";
      vmImage_ = "";
      containerImage_ = "";
      framework_ = "";
      version_ = "";
      state_ = 0;
      targetImage_ = "";
      action_ = 0;
      targetVersion_ = "";
    }

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

    @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.notebooks.v1.InstanceProto
          .internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.notebooks.v1.InstanceProto
          .internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.class,
              com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder.class);
    }

    /**
     *
     *
     * <pre>
     * The definition of the states of this upgrade history entry.
     * </pre>
     *
     * Protobuf enum {@code google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State}
     */
    public enum State implements com.google.protobuf.ProtocolMessageEnum {
      /**
       *
       *
       * <pre>
       * State is not specified.
       * </pre>
       *
       * <code>STATE_UNSPECIFIED = 0;</code>
       */
      STATE_UNSPECIFIED(0),
      /**
       *
       *
       * <pre>
       * The instance upgrade is started.
       * </pre>
       *
       * <code>STARTED = 1;</code>
       */
      STARTED(1),
      /**
       *
       *
       * <pre>
       * The instance upgrade is succeeded.
       * </pre>
       *
       * <code>SUCCEEDED = 2;</code>
       */
      SUCCEEDED(2),
      /**
       *
       *
       * <pre>
       * The instance upgrade is failed.
       * </pre>
       *
       * <code>FAILED = 3;</code>
       */
      FAILED(3),
      UNRECOGNIZED(-1),
      ;

      /**
       *
       *
       * <pre>
       * State is not specified.
       * </pre>
       *
       * <code>STATE_UNSPECIFIED = 0;</code>
       */
      public static final int STATE_UNSPECIFIED_VALUE = 0;
      /**
       *
       *
       * <pre>
       * The instance upgrade is started.
       * </pre>
       *
       * <code>STARTED = 1;</code>
       */
      public static final int STARTED_VALUE = 1;
      /**
       *
       *
       * <pre>
       * The instance upgrade is succeeded.
       * </pre>
       *
       * <code>SUCCEEDED = 2;</code>
       */
      public static final int SUCCEEDED_VALUE = 2;
      /**
       *
       *
       * <pre>
       * The instance upgrade is failed.
       * </pre>
       *
       * <code>FAILED = 3;</code>
       */
      public static final int FAILED_VALUE = 3;

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

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

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       */
      public static State forNumber(int value) {
        switch (value) {
          case 0:
            return STATE_UNSPECIFIED;
          case 1:
            return STARTED;
          case 2:
            return SUCCEEDED;
          case 3:
            return FAILED;
          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.notebooks.v1.Instance.UpgradeHistoryEntry.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.notebooks.v1.Instance.UpgradeHistoryEntry.State)
    }

    /**
     *
     *
     * <pre>
     * The definition of operations of this upgrade history entry.
     * </pre>
     *
     * Protobuf enum {@code google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action}
     */
    public enum Action implements com.google.protobuf.ProtocolMessageEnum {
      /**
       *
       *
       * <pre>
       * Operation is not specified.
       * </pre>
       *
       * <code>ACTION_UNSPECIFIED = 0;</code>
       */
      ACTION_UNSPECIFIED(0),
      /**
       *
       *
       * <pre>
       * Upgrade.
       * </pre>
       *
       * <code>UPGRADE = 1;</code>
       */
      UPGRADE(1),
      /**
       *
       *
       * <pre>
       * Rollback.
       * </pre>
       *
       * <code>ROLLBACK = 2;</code>
       */
      ROLLBACK(2),
      UNRECOGNIZED(-1),
      ;

      /**
       *
       *
       * <pre>
       * Operation is not specified.
       * </pre>
       *
       * <code>ACTION_UNSPECIFIED = 0;</code>
       */
      public static final int ACTION_UNSPECIFIED_VALUE = 0;
      /**
       *
       *
       * <pre>
       * Upgrade.
       * </pre>
       *
       * <code>UPGRADE = 1;</code>
       */
      public static final int UPGRADE_VALUE = 1;
      /**
       *
       *
       * <pre>
       * Rollback.
       * </pre>
       *
       * <code>ROLLBACK = 2;</code>
       */
      public static final int ROLLBACK_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 Action 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 Action forNumber(int value) {
        switch (value) {
          case 0:
            return ACTION_UNSPECIFIED;
          case 1:
            return UPGRADE;
          case 2:
            return ROLLBACK;
          default:
            return null;
        }
      }

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

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

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

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

      // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action)
    }

    public static final int SNAPSHOT_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private volatile java.lang.Object snapshot_ = "";
    /**
     *
     *
     * <pre>
     * The snapshot of the boot disk of this notebook instance before upgrade.
     * </pre>
     *
     * <code>string snapshot = 1;</code>
     *
     * @return The snapshot.
     */
    @java.lang.Override
    public java.lang.String getSnapshot() {
      java.lang.Object ref = snapshot_;
      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();
        snapshot_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The snapshot of the boot disk of this notebook instance before upgrade.
     * </pre>
     *
     * <code>string snapshot = 1;</code>
     *
     * @return The bytes for snapshot.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getSnapshotBytes() {
      java.lang.Object ref = snapshot_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        snapshot_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int VM_IMAGE_FIELD_NUMBER = 2;

    @SuppressWarnings("serial")
    private volatile java.lang.Object vmImage_ = "";
    /**
     *
     *
     * <pre>
     * The VM image before this instance upgrade.
     * </pre>
     *
     * <code>string vm_image = 2;</code>
     *
     * @return The vmImage.
     */
    @java.lang.Override
    public java.lang.String getVmImage() {
      java.lang.Object ref = vmImage_;
      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();
        vmImage_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The VM image before this instance upgrade.
     * </pre>
     *
     * <code>string vm_image = 2;</code>
     *
     * @return The bytes for vmImage.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getVmImageBytes() {
      java.lang.Object ref = vmImage_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        vmImage_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int CONTAINER_IMAGE_FIELD_NUMBER = 3;

    @SuppressWarnings("serial")
    private volatile java.lang.Object containerImage_ = "";
    /**
     *
     *
     * <pre>
     * The container image before this instance upgrade.
     * </pre>
     *
     * <code>string container_image = 3;</code>
     *
     * @return The containerImage.
     */
    @java.lang.Override
    public java.lang.String getContainerImage() {
      java.lang.Object ref = containerImage_;
      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();
        containerImage_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The container image before this instance upgrade.
     * </pre>
     *
     * <code>string container_image = 3;</code>
     *
     * @return The bytes for containerImage.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getContainerImageBytes() {
      java.lang.Object ref = containerImage_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        containerImage_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int FRAMEWORK_FIELD_NUMBER = 4;

    @SuppressWarnings("serial")
    private volatile java.lang.Object framework_ = "";
    /**
     *
     *
     * <pre>
     * The framework of this notebook instance.
     * </pre>
     *
     * <code>string framework = 4;</code>
     *
     * @return The framework.
     */
    @java.lang.Override
    public java.lang.String getFramework() {
      java.lang.Object ref = framework_;
      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();
        framework_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The framework of this notebook instance.
     * </pre>
     *
     * <code>string framework = 4;</code>
     *
     * @return The bytes for framework.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getFrameworkBytes() {
      java.lang.Object ref = framework_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        framework_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int VERSION_FIELD_NUMBER = 5;

    @SuppressWarnings("serial")
    private volatile java.lang.Object version_ = "";
    /**
     *
     *
     * <pre>
     * The version of the notebook instance before this upgrade.
     * </pre>
     *
     * <code>string version = 5;</code>
     *
     * @return The version.
     */
    @java.lang.Override
    public java.lang.String getVersion() {
      java.lang.Object ref = version_;
      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();
        version_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The version of the notebook instance before this upgrade.
     * </pre>
     *
     * <code>string version = 5;</code>
     *
     * @return The bytes for version.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getVersionBytes() {
      java.lang.Object ref = version_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        version_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int STATE_FIELD_NUMBER = 6;
    private int state_ = 0;
    /**
     *
     *
     * <pre>
     * The state of this instance upgrade history entry.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6;</code>
     *
     * @return The enum numeric value on the wire for state.
     */
    @java.lang.Override
    public int getStateValue() {
      return state_;
    }
    /**
     *
     *
     * <pre>
     * The state of this instance upgrade history entry.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6;</code>
     *
     * @return The state.
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State getState() {
      com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State result =
          com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.forNumber(state_);
      return result == null
          ? com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.UNRECOGNIZED
          : result;
    }

    public static final int CREATE_TIME_FIELD_NUMBER = 7;
    private com.google.protobuf.Timestamp createTime_;
    /**
     *
     *
     * <pre>
     * The time that this instance upgrade history entry is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 7;</code>
     *
     * @return Whether the createTime field is set.
     */
    @java.lang.Override
    public boolean hasCreateTime() {
      return createTime_ != null;
    }
    /**
     *
     *
     * <pre>
     * The time that this instance upgrade history entry is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 7;</code>
     *
     * @return The createTime.
     */
    @java.lang.Override
    public com.google.protobuf.Timestamp getCreateTime() {
      return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
    }
    /**
     *
     *
     * <pre>
     * The time that this instance upgrade history entry is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 7;</code>
     */
    @java.lang.Override
    public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
      return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
    }

    public static final int TARGET_IMAGE_FIELD_NUMBER = 8;

    @SuppressWarnings("serial")
    private volatile java.lang.Object targetImage_ = "";
    /**
     *
     *
     * <pre>
     * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
     * </pre>
     *
     * <code>string target_image = 8 [deprecated = true];</code>
     *
     * @deprecated google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.target_image is
     *     deprecated. See google/cloud/notebooks/v1/instance.proto;l=352
     * @return The targetImage.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.lang.String getTargetImage() {
      java.lang.Object ref = targetImage_;
      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();
        targetImage_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
     * </pre>
     *
     * <code>string target_image = 8 [deprecated = true];</code>
     *
     * @deprecated google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.target_image is
     *     deprecated. See google/cloud/notebooks/v1/instance.proto;l=352
     * @return The bytes for targetImage.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public com.google.protobuf.ByteString getTargetImageBytes() {
      java.lang.Object ref = targetImage_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        targetImage_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int ACTION_FIELD_NUMBER = 9;
    private int action_ = 0;
    /**
     *
     *
     * <pre>
     * Action. Rolloback or Upgrade.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9;</code>
     *
     * @return The enum numeric value on the wire for action.
     */
    @java.lang.Override
    public int getActionValue() {
      return action_;
    }
    /**
     *
     *
     * <pre>
     * Action. Rolloback or Upgrade.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9;</code>
     *
     * @return The action.
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action getAction() {
      com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action result =
          com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.forNumber(action_);
      return result == null
          ? com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.UNRECOGNIZED
          : result;
    }

    public static final int TARGET_VERSION_FIELD_NUMBER = 10;

    @SuppressWarnings("serial")
    private volatile java.lang.Object targetVersion_ = "";
    /**
     *
     *
     * <pre>
     * Target VM Version, like m63.
     * </pre>
     *
     * <code>string target_version = 10;</code>
     *
     * @return The targetVersion.
     */
    @java.lang.Override
    public java.lang.String getTargetVersion() {
      java.lang.Object ref = targetVersion_;
      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();
        targetVersion_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Target VM Version, like m63.
     * </pre>
     *
     * <code>string target_version = 10;</code>
     *
     * @return The bytes for targetVersion.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getTargetVersionBytes() {
      java.lang.Object ref = targetVersion_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        targetVersion_ = 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(snapshot_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snapshot_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmImage_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vmImage_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerImage_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, containerImage_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(framework_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, framework_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_);
      }
      if (state_
          != com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.STATE_UNSPECIFIED
              .getNumber()) {
        output.writeEnum(6, state_);
      }
      if (createTime_ != null) {
        output.writeMessage(7, getCreateTime());
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetImage_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 8, targetImage_);
      }
      if (action_
          != com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.ACTION_UNSPECIFIED
              .getNumber()) {
        output.writeEnum(9, action_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetVersion_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 10, targetVersion_);
      }
      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(snapshot_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, snapshot_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmImage_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vmImage_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerImage_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, containerImage_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(framework_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, framework_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_);
      }
      if (state_
          != com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.STATE_UNSPECIFIED
              .getNumber()) {
        size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_);
      }
      if (createTime_ != null) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime());
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetImage_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, targetImage_);
      }
      if (action_
          != com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.ACTION_UNSPECIFIED
              .getNumber()) {
        size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, action_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetVersion_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, targetVersion_);
      }
      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.notebooks.v1.Instance.UpgradeHistoryEntry)) {
        return super.equals(obj);
      }
      com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry other =
          (com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) obj;

      if (!getSnapshot().equals(other.getSnapshot())) return false;
      if (!getVmImage().equals(other.getVmImage())) return false;
      if (!getContainerImage().equals(other.getContainerImage())) return false;
      if (!getFramework().equals(other.getFramework())) return false;
      if (!getVersion().equals(other.getVersion())) return false;
      if (state_ != other.state_) return false;
      if (hasCreateTime() != other.hasCreateTime()) return false;
      if (hasCreateTime()) {
        if (!getCreateTime().equals(other.getCreateTime())) return false;
      }
      if (!getTargetImage().equals(other.getTargetImage())) return false;
      if (action_ != other.action_) return false;
      if (!getTargetVersion().equals(other.getTargetVersion())) 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) + SNAPSHOT_FIELD_NUMBER;
      hash = (53 * hash) + getSnapshot().hashCode();
      hash = (37 * hash) + VM_IMAGE_FIELD_NUMBER;
      hash = (53 * hash) + getVmImage().hashCode();
      hash = (37 * hash) + CONTAINER_IMAGE_FIELD_NUMBER;
      hash = (53 * hash) + getContainerImage().hashCode();
      hash = (37 * hash) + FRAMEWORK_FIELD_NUMBER;
      hash = (53 * hash) + getFramework().hashCode();
      hash = (37 * hash) + VERSION_FIELD_NUMBER;
      hash = (53 * hash) + getVersion().hashCode();
      hash = (37 * hash) + STATE_FIELD_NUMBER;
      hash = (53 * hash) + state_;
      if (hasCreateTime()) {
        hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
        hash = (53 * hash) + getCreateTime().hashCode();
      }
      hash = (37 * hash) + TARGET_IMAGE_FIELD_NUMBER;
      hash = (53 * hash) + getTargetImage().hashCode();
      hash = (37 * hash) + ACTION_FIELD_NUMBER;
      hash = (53 * hash) + action_;
      hash = (37 * hash) + TARGET_VERSION_FIELD_NUMBER;
      hash = (53 * hash) + getTargetVersion().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry 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.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

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

    public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

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

    public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry 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.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry 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.notebooks.v1.Instance.UpgradeHistoryEntry 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>
     * The entry of VM image upgrade history.
     * </pre>
     *
     * Protobuf type {@code google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry)
        com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.class,
                com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder.class);
      }

      // Construct using com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.newBuilder()
      private Builder() {}

      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        snapshot_ = "";
        vmImage_ = "";
        containerImage_ = "";
        framework_ = "";
        version_ = "";
        state_ = 0;
        createTime_ = null;
        if (createTimeBuilder_ != null) {
          createTimeBuilder_.dispose();
          createTimeBuilder_ = null;
        }
        targetImage_ = "";
        action_ = 0;
        targetVersion_ = "";
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.notebooks.v1.InstanceProto
            .internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry
          getDefaultInstanceForType() {
        return com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry build() {
        com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry buildPartial() {
        com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry result =
            new com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry(this);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartial0(
          com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.snapshot_ = snapshot_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.vmImage_ = vmImage_;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.containerImage_ = containerImage_;
        }
        if (((from_bitField0_ & 0x00000008) != 0)) {
          result.framework_ = framework_;
        }
        if (((from_bitField0_ & 0x00000010) != 0)) {
          result.version_ = version_;
        }
        if (((from_bitField0_ & 0x00000020) != 0)) {
          result.state_ = state_;
        }
        if (((from_bitField0_ & 0x00000040) != 0)) {
          result.createTime_ =
              createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000080) != 0)) {
          result.targetImage_ = targetImage_;
        }
        if (((from_bitField0_ & 0x00000100) != 0)) {
          result.action_ = action_;
        }
        if (((from_bitField0_ & 0x00000200) != 0)) {
          result.targetVersion_ = targetVersion_;
        }
      }

      @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.notebooks.v1.Instance.UpgradeHistoryEntry) {
          return mergeFrom((com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry other) {
        if (other
            == com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDefaultInstance())
          return this;
        if (!other.getSnapshot().isEmpty()) {
          snapshot_ = other.snapshot_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        if (!other.getVmImage().isEmpty()) {
          vmImage_ = other.vmImage_;
          bitField0_ |= 0x00000002;
          onChanged();
        }
        if (!other.getContainerImage().isEmpty()) {
          containerImage_ = other.containerImage_;
          bitField0_ |= 0x00000004;
          onChanged();
        }
        if (!other.getFramework().isEmpty()) {
          framework_ = other.framework_;
          bitField0_ |= 0x00000008;
          onChanged();
        }
        if (!other.getVersion().isEmpty()) {
          version_ = other.version_;
          bitField0_ |= 0x00000010;
          onChanged();
        }
        if (other.state_ != 0) {
          setStateValue(other.getStateValue());
        }
        if (other.hasCreateTime()) {
          mergeCreateTime(other.getCreateTime());
        }
        if (!other.getTargetImage().isEmpty()) {
          targetImage_ = other.targetImage_;
          bitField0_ |= 0x00000080;
          onChanged();
        }
        if (other.action_ != 0) {
          setActionValue(other.getActionValue());
        }
        if (!other.getTargetVersion().isEmpty()) {
          targetVersion_ = other.targetVersion_;
          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:
                {
                  snapshot_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
              case 18:
                {
                  vmImage_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000002;
                  break;
                } // case 18
              case 26:
                {
                  containerImage_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000004;
                  break;
                } // case 26
              case 34:
                {
                  framework_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000008;
                  break;
                } // case 34
              case 42:
                {
                  version_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000010;
                  break;
                } // case 42
              case 48:
                {
                  state_ = input.readEnum();
                  bitField0_ |= 0x00000020;
                  break;
                } // case 48
              case 58:
                {
                  input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
                  bitField0_ |= 0x00000040;
                  break;
                } // case 58
              case 66:
                {
                  targetImage_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000080;
                  break;
                } // case 66
              case 72:
                {
                  action_ = input.readEnum();
                  bitField0_ |= 0x00000100;
                  break;
                } // case 72
              case 82:
                {
                  targetVersion_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000200;
                  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 snapshot_ = "";
      /**
       *
       *
       * <pre>
       * The snapshot of the boot disk of this notebook instance before upgrade.
       * </pre>
       *
       * <code>string snapshot = 1;</code>
       *
       * @return The snapshot.
       */
      public java.lang.String getSnapshot() {
        java.lang.Object ref = snapshot_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          snapshot_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The snapshot of the boot disk of this notebook instance before upgrade.
       * </pre>
       *
       * <code>string snapshot = 1;</code>
       *
       * @return The bytes for snapshot.
       */
      public com.google.protobuf.ByteString getSnapshotBytes() {
        java.lang.Object ref = snapshot_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          snapshot_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The snapshot of the boot disk of this notebook instance before upgrade.
       * </pre>
       *
       * <code>string snapshot = 1;</code>
       *
       * @param value The snapshot to set.
       * @return This builder for chaining.
       */
      public Builder setSnapshot(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        snapshot_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The snapshot of the boot disk of this notebook instance before upgrade.
       * </pre>
       *
       * <code>string snapshot = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearSnapshot() {
        snapshot_ = getDefaultInstance().getSnapshot();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The snapshot of the boot disk of this notebook instance before upgrade.
       * </pre>
       *
       * <code>string snapshot = 1;</code>
       *
       * @param value The bytes for snapshot to set.
       * @return This builder for chaining.
       */
      public Builder setSnapshotBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        snapshot_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      private java.lang.Object vmImage_ = "";
      /**
       *
       *
       * <pre>
       * The VM image before this instance upgrade.
       * </pre>
       *
       * <code>string vm_image = 2;</code>
       *
       * @return The vmImage.
       */
      public java.lang.String getVmImage() {
        java.lang.Object ref = vmImage_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          vmImage_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The VM image before this instance upgrade.
       * </pre>
       *
       * <code>string vm_image = 2;</code>
       *
       * @return The bytes for vmImage.
       */
      public com.google.protobuf.ByteString getVmImageBytes() {
        java.lang.Object ref = vmImage_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          vmImage_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The VM image before this instance upgrade.
       * </pre>
       *
       * <code>string vm_image = 2;</code>
       *
       * @param value The vmImage to set.
       * @return This builder for chaining.
       */
      public Builder setVmImage(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        vmImage_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The VM image before this instance upgrade.
       * </pre>
       *
       * <code>string vm_image = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearVmImage() {
        vmImage_ = getDefaultInstance().getVmImage();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The VM image before this instance upgrade.
       * </pre>
       *
       * <code>string vm_image = 2;</code>
       *
       * @param value The bytes for vmImage to set.
       * @return This builder for chaining.
       */
      public Builder setVmImageBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        vmImage_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }

      private java.lang.Object containerImage_ = "";
      /**
       *
       *
       * <pre>
       * The container image before this instance upgrade.
       * </pre>
       *
       * <code>string container_image = 3;</code>
       *
       * @return The containerImage.
       */
      public java.lang.String getContainerImage() {
        java.lang.Object ref = containerImage_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          containerImage_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The container image before this instance upgrade.
       * </pre>
       *
       * <code>string container_image = 3;</code>
       *
       * @return The bytes for containerImage.
       */
      public com.google.protobuf.ByteString getContainerImageBytes() {
        java.lang.Object ref = containerImage_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          containerImage_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The container image before this instance upgrade.
       * </pre>
       *
       * <code>string container_image = 3;</code>
       *
       * @param value The containerImage to set.
       * @return This builder for chaining.
       */
      public Builder setContainerImage(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        containerImage_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The container image before this instance upgrade.
       * </pre>
       *
       * <code>string container_image = 3;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearContainerImage() {
        containerImage_ = getDefaultInstance().getContainerImage();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The container image before this instance upgrade.
       * </pre>
       *
       * <code>string container_image = 3;</code>
       *
       * @param value The bytes for containerImage to set.
       * @return This builder for chaining.
       */
      public Builder setContainerImageBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        containerImage_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }

      private java.lang.Object framework_ = "";
      /**
       *
       *
       * <pre>
       * The framework of this notebook instance.
       * </pre>
       *
       * <code>string framework = 4;</code>
       *
       * @return The framework.
       */
      public java.lang.String getFramework() {
        java.lang.Object ref = framework_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          framework_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The framework of this notebook instance.
       * </pre>
       *
       * <code>string framework = 4;</code>
       *
       * @return The bytes for framework.
       */
      public com.google.protobuf.ByteString getFrameworkBytes() {
        java.lang.Object ref = framework_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          framework_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The framework of this notebook instance.
       * </pre>
       *
       * <code>string framework = 4;</code>
       *
       * @param value The framework to set.
       * @return This builder for chaining.
       */
      public Builder setFramework(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        framework_ = value;
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The framework of this notebook instance.
       * </pre>
       *
       * <code>string framework = 4;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearFramework() {
        framework_ = getDefaultInstance().getFramework();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The framework of this notebook instance.
       * </pre>
       *
       * <code>string framework = 4;</code>
       *
       * @param value The bytes for framework to set.
       * @return This builder for chaining.
       */
      public Builder setFrameworkBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        framework_ = value;
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }

      private java.lang.Object version_ = "";
      /**
       *
       *
       * <pre>
       * The version of the notebook instance before this upgrade.
       * </pre>
       *
       * <code>string version = 5;</code>
       *
       * @return The version.
       */
      public java.lang.String getVersion() {
        java.lang.Object ref = version_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          version_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The version of the notebook instance before this upgrade.
       * </pre>
       *
       * <code>string version = 5;</code>
       *
       * @return The bytes for version.
       */
      public com.google.protobuf.ByteString getVersionBytes() {
        java.lang.Object ref = version_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          version_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The version of the notebook instance before this upgrade.
       * </pre>
       *
       * <code>string version = 5;</code>
       *
       * @param value The version to set.
       * @return This builder for chaining.
       */
      public Builder setVersion(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        version_ = value;
        bitField0_ |= 0x00000010;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The version of the notebook instance before this upgrade.
       * </pre>
       *
       * <code>string version = 5;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearVersion() {
        version_ = getDefaultInstance().getVersion();
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The version of the notebook instance before this upgrade.
       * </pre>
       *
       * <code>string version = 5;</code>
       *
       * @param value The bytes for version to set.
       * @return This builder for chaining.
       */
      public Builder setVersionBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        version_ = value;
        bitField0_ |= 0x00000010;
        onChanged();
        return this;
      }

      private int state_ = 0;
      /**
       *
       *
       * <pre>
       * The state of this instance upgrade history entry.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6;</code>
       *
       * @return The enum numeric value on the wire for state.
       */
      @java.lang.Override
      public int getStateValue() {
        return state_;
      }
      /**
       *
       *
       * <pre>
       * The state of this instance upgrade history entry.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6;</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_ |= 0x00000020;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The state of this instance upgrade history entry.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6;</code>
       *
       * @return The state.
       */
      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State getState() {
        com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State result =
            com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.forNumber(state_);
        return result == null
            ? com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.UNRECOGNIZED
            : result;
      }
      /**
       *
       *
       * <pre>
       * The state of this instance upgrade history entry.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6;</code>
       *
       * @param value The state to set.
       * @return This builder for chaining.
       */
      public Builder setState(
          com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000020;
        state_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The state of this instance upgrade history entry.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearState() {
        bitField0_ = (bitField0_ & ~0x00000020);
        state_ = 0;
        onChanged();
        return this;
      }

      private com.google.protobuf.Timestamp createTime_;
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Timestamp,
              com.google.protobuf.Timestamp.Builder,
              com.google.protobuf.TimestampOrBuilder>
          createTimeBuilder_;
      /**
       *
       *
       * <pre>
       * The time that this instance upgrade history entry is created.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp create_time = 7;</code>
       *
       * @return Whether the createTime field is set.
       */
      public boolean hasCreateTime() {
        return ((bitField0_ & 0x00000040) != 0);
      }
      /**
       *
       *
       * <pre>
       * The time that this instance upgrade history entry is created.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp create_time = 7;</code>
       *
       * @return The createTime.
       */
      public com.google.protobuf.Timestamp getCreateTime() {
        if (createTimeBuilder_ == null) {
          return createTime_ == null
              ? com.google.protobuf.Timestamp.getDefaultInstance()
              : createTime_;
        } else {
          return createTimeBuilder_.getMessage();
        }
      }
      /**
       *
       *
       * <pre>
       * The time that this instance upgrade history entry is created.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp create_time = 7;</code>
       */
      public Builder setCreateTime(com.google.protobuf.Timestamp value) {
        if (createTimeBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          createTime_ = value;
        } else {
          createTimeBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000040;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The time that this instance upgrade history entry is created.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp create_time = 7;</code>
       */
      public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
        if (createTimeBuilder_ == null) {
          createTime_ = builderForValue.build();
        } else {
          createTimeBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000040;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The time that this instance upgrade history entry is created.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp create_time = 7;</code>
       */
      public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
        if (createTimeBuilder_ == null) {
          if (((bitField0_ & 0x00000040) != 0)
              && createTime_ != null
              && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
            getCreateTimeBuilder().mergeFrom(value);
          } else {
            createTime_ = value;
          }
        } else {
          createTimeBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000040;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The time that this instance upgrade history entry is created.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp create_time = 7;</code>
       */
      public Builder clearCreateTime() {
        bitField0_ = (bitField0_ & ~0x00000040);
        createTime_ = null;
        if (createTimeBuilder_ != null) {
          createTimeBuilder_.dispose();
          createTimeBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The time that this instance upgrade history entry is created.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp create_time = 7;</code>
       */
      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
        bitField0_ |= 0x00000040;
        onChanged();
        return getCreateTimeFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * The time that this instance upgrade history entry is created.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp create_time = 7;</code>
       */
      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
        if (createTimeBuilder_ != null) {
          return createTimeBuilder_.getMessageOrBuilder();
        } else {
          return createTime_ == null
              ? com.google.protobuf.Timestamp.getDefaultInstance()
              : createTime_;
        }
      }
      /**
       *
       *
       * <pre>
       * The time that this instance upgrade history entry is created.
       * </pre>
       *
       * <code>.google.protobuf.Timestamp create_time = 7;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Timestamp,
              com.google.protobuf.Timestamp.Builder,
              com.google.protobuf.TimestampOrBuilder>
          getCreateTimeFieldBuilder() {
        if (createTimeBuilder_ == null) {
          createTimeBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.protobuf.Timestamp,
                  com.google.protobuf.Timestamp.Builder,
                  com.google.protobuf.TimestampOrBuilder>(
                  getCreateTime(), getParentForChildren(), isClean());
          createTime_ = null;
        }
        return createTimeBuilder_;
      }

      private java.lang.Object targetImage_ = "";
      /**
       *
       *
       * <pre>
       * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
       * </pre>
       *
       * <code>string target_image = 8 [deprecated = true];</code>
       *
       * @deprecated google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.target_image is
       *     deprecated. See google/cloud/notebooks/v1/instance.proto;l=352
       * @return The targetImage.
       */
      @java.lang.Deprecated
      public java.lang.String getTargetImage() {
        java.lang.Object ref = targetImage_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          targetImage_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
       * </pre>
       *
       * <code>string target_image = 8 [deprecated = true];</code>
       *
       * @deprecated google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.target_image is
       *     deprecated. See google/cloud/notebooks/v1/instance.proto;l=352
       * @return The bytes for targetImage.
       */
      @java.lang.Deprecated
      public com.google.protobuf.ByteString getTargetImageBytes() {
        java.lang.Object ref = targetImage_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          targetImage_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
       * </pre>
       *
       * <code>string target_image = 8 [deprecated = true];</code>
       *
       * @deprecated google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.target_image is
       *     deprecated. See google/cloud/notebooks/v1/instance.proto;l=352
       * @param value The targetImage to set.
       * @return This builder for chaining.
       */
      @java.lang.Deprecated
      public Builder setTargetImage(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        targetImage_ = value;
        bitField0_ |= 0x00000080;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
       * </pre>
       *
       * <code>string target_image = 8 [deprecated = true];</code>
       *
       * @deprecated google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.target_image is
       *     deprecated. See google/cloud/notebooks/v1/instance.proto;l=352
       * @return This builder for chaining.
       */
      @java.lang.Deprecated
      public Builder clearTargetImage() {
        targetImage_ = getDefaultInstance().getTargetImage();
        bitField0_ = (bitField0_ & ~0x00000080);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.
       * </pre>
       *
       * <code>string target_image = 8 [deprecated = true];</code>
       *
       * @deprecated google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.target_image is
       *     deprecated. See google/cloud/notebooks/v1/instance.proto;l=352
       * @param value The bytes for targetImage to set.
       * @return This builder for chaining.
       */
      @java.lang.Deprecated
      public Builder setTargetImageBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        targetImage_ = value;
        bitField0_ |= 0x00000080;
        onChanged();
        return this;
      }

      private int action_ = 0;
      /**
       *
       *
       * <pre>
       * Action. Rolloback or Upgrade.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9;</code>
       *
       * @return The enum numeric value on the wire for action.
       */
      @java.lang.Override
      public int getActionValue() {
        return action_;
      }
      /**
       *
       *
       * <pre>
       * Action. Rolloback or Upgrade.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9;</code>
       *
       * @param value The enum numeric value on the wire for action to set.
       * @return This builder for chaining.
       */
      public Builder setActionValue(int value) {
        action_ = value;
        bitField0_ |= 0x00000100;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Action. Rolloback or Upgrade.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9;</code>
       *
       * @return The action.
       */
      @java.lang.Override
      public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action getAction() {
        com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action result =
            com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.forNumber(action_);
        return result == null
            ? com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.UNRECOGNIZED
            : result;
      }
      /**
       *
       *
       * <pre>
       * Action. Rolloback or Upgrade.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9;</code>
       *
       * @param value The action to set.
       * @return This builder for chaining.
       */
      public Builder setAction(
          com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000100;
        action_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Action. Rolloback or Upgrade.
       * </pre>
       *
       * <code>.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearAction() {
        bitField0_ = (bitField0_ & ~0x00000100);
        action_ = 0;
        onChanged();
        return this;
      }

      private java.lang.Object targetVersion_ = "";
      /**
       *
       *
       * <pre>
       * Target VM Version, like m63.
       * </pre>
       *
       * <code>string target_version = 10;</code>
       *
       * @return The targetVersion.
       */
      public java.lang.String getTargetVersion() {
        java.lang.Object ref = targetVersion_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          targetVersion_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Target VM Version, like m63.
       * </pre>
       *
       * <code>string target_version = 10;</code>
       *
       * @return The bytes for targetVersion.
       */
      public com.google.protobuf.ByteString getTargetVersionBytes() {
        java.lang.Object ref = targetVersion_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          targetVersion_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Target VM Version, like m63.
       * </pre>
       *
       * <code>string target_version = 10;</code>
       *
       * @param value The targetVersion to set.
       * @return This builder for chaining.
       */
      public Builder setTargetVersion(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        targetVersion_ = value;
        bitField0_ |= 0x00000200;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Target VM Version, like m63.
       * </pre>
       *
       * <code>string target_version = 10;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearTargetVersion() {
        targetVersion_ = getDefaultInstance().getTargetVersion();
        bitField0_ = (bitField0_ & ~0x00000200);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Target VM Version, like m63.
       * </pre>
       *
       * <code>string target_version = 10;</code>
       *
       * @param value The bytes for targetVersion to set.
       * @return This builder for chaining.
       */
      public Builder setTargetVersionBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        targetVersion_ = 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.notebooks.v1.Instance.UpgradeHistoryEntry)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry)
    private static final com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry();
    }

    public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  private int environmentCase_ = 0;
  private java.lang.Object environment_;

  public enum EnvironmentCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    VM_IMAGE(2),
    CONTAINER_IMAGE(3),
    ENVIRONMENT_NOT_SET(0);
    private final int value;

    private EnvironmentCase(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 EnvironmentCase valueOf(int value) {
      return forNumber(value);
    }

    public static EnvironmentCase forNumber(int value) {
      switch (value) {
        case 2:
          return VM_IMAGE;
        case 3:
          return CONTAINER_IMAGE;
        case 0:
          return ENVIRONMENT_NOT_SET;
        default:
          return null;
      }
    }

    public int getNumber() {
      return this.value;
    }
  };

  public EnvironmentCase getEnvironmentCase() {
    return EnvironmentCase.forNumber(environmentCase_);
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The name of this notebook instance. Format:
   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
   * </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 this notebook instance. Format:
   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
   * </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 VM_IMAGE_FIELD_NUMBER = 2;
  /**
   *
   *
   * <pre>
   * Use a Compute Engine VM image to start the notebook instance.
   * </pre>
   *
   * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
   *
   * @return Whether the vmImage field is set.
   */
  @java.lang.Override
  public boolean hasVmImage() {
    return environmentCase_ == 2;
  }
  /**
   *
   *
   * <pre>
   * Use a Compute Engine VM image to start the notebook instance.
   * </pre>
   *
   * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
   *
   * @return The vmImage.
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.VmImage getVmImage() {
    if (environmentCase_ == 2) {
      return (com.google.cloud.notebooks.v1.VmImage) environment_;
    }
    return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Use a Compute Engine VM image to start the notebook instance.
   * </pre>
   *
   * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder() {
    if (environmentCase_ == 2) {
      return (com.google.cloud.notebooks.v1.VmImage) environment_;
    }
    return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance();
  }

  public static final int CONTAINER_IMAGE_FIELD_NUMBER = 3;
  /**
   *
   *
   * <pre>
   * Use a container image to start the notebook instance.
   * </pre>
   *
   * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
   *
   * @return Whether the containerImage field is set.
   */
  @java.lang.Override
  public boolean hasContainerImage() {
    return environmentCase_ == 3;
  }
  /**
   *
   *
   * <pre>
   * Use a container image to start the notebook instance.
   * </pre>
   *
   * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
   *
   * @return The containerImage.
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.ContainerImage getContainerImage() {
    if (environmentCase_ == 3) {
      return (com.google.cloud.notebooks.v1.ContainerImage) environment_;
    }
    return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Use a container image to start the notebook instance.
   * </pre>
   *
   * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder() {
    if (environmentCase_ == 3) {
      return (com.google.cloud.notebooks.v1.ContainerImage) environment_;
    }
    return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance();
  }

  public static final int POST_STARTUP_SCRIPT_FIELD_NUMBER = 4;

  @SuppressWarnings("serial")
  private volatile java.lang.Object postStartupScript_ = "";
  /**
   *
   *
   * <pre>
   * Path to a Bash script that automatically runs after a notebook instance
   * fully boots up. The path must be a URL or
   * Cloud Storage path (`gs://path-to-file/file-name`).
   * </pre>
   *
   * <code>string post_startup_script = 4;</code>
   *
   * @return The postStartupScript.
   */
  @java.lang.Override
  public java.lang.String getPostStartupScript() {
    java.lang.Object ref = postStartupScript_;
    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();
      postStartupScript_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Path to a Bash script that automatically runs after a notebook instance
   * fully boots up. The path must be a URL or
   * Cloud Storage path (`gs://path-to-file/file-name`).
   * </pre>
   *
   * <code>string post_startup_script = 4;</code>
   *
   * @return The bytes for postStartupScript.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getPostStartupScriptBytes() {
    java.lang.Object ref = postStartupScript_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      postStartupScript_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PROXY_URI_FIELD_NUMBER = 5;

  @SuppressWarnings("serial")
  private volatile java.lang.Object proxyUri_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The proxy endpoint that is used to access the Jupyter notebook.
   * </pre>
   *
   * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The proxyUri.
   */
  @java.lang.Override
  public java.lang.String getProxyUri() {
    java.lang.Object ref = proxyUri_;
    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();
      proxyUri_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The proxy endpoint that is used to access the Jupyter notebook.
   * </pre>
   *
   * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for proxyUri.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getProxyUriBytes() {
    java.lang.Object ref = proxyUri_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      proxyUri_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int INSTANCE_OWNERS_FIELD_NUMBER = 6;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList instanceOwners_;
  /**
   *
   *
   * <pre>
   * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
   * Currently supports one owner only. If not specified, all of the service
   * account users of your VM instance's service account can use
   * the instance.
   * </pre>
   *
   * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
   *
   * @return A list containing the instanceOwners.
   */
  public com.google.protobuf.ProtocolStringList getInstanceOwnersList() {
    return instanceOwners_;
  }
  /**
   *
   *
   * <pre>
   * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
   * Currently supports one owner only. If not specified, all of the service
   * account users of your VM instance's service account can use
   * the instance.
   * </pre>
   *
   * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
   *
   * @return The count of instanceOwners.
   */
  public int getInstanceOwnersCount() {
    return instanceOwners_.size();
  }
  /**
   *
   *
   * <pre>
   * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
   * Currently supports one owner only. If not specified, all of the service
   * account users of your VM instance's service account can use
   * the instance.
   * </pre>
   *
   * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
   *
   * @param index The index of the element to return.
   * @return The instanceOwners at the given index.
   */
  public java.lang.String getInstanceOwners(int index) {
    return instanceOwners_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
   * Currently supports one owner only. If not specified, all of the service
   * account users of your VM instance's service account can use
   * the instance.
   * </pre>
   *
   * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the instanceOwners at the given index.
   */
  public com.google.protobuf.ByteString getInstanceOwnersBytes(int index) {
    return instanceOwners_.getByteString(index);
  }

  public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 7;

  @SuppressWarnings("serial")
  private volatile java.lang.Object serviceAccount_ = "";
  /**
   *
   *
   * <pre>
   * The service account on this instance, giving access to other Google
   * Cloud services.
   * You can use any service account within the same project, but you
   * must have the service account user permission to use the instance.
   * If not specified, the [Compute Engine default service
   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
   * is used.
   * </pre>
   *
   * <code>string service_account = 7;</code>
   *
   * @return The serviceAccount.
   */
  @java.lang.Override
  public java.lang.String getServiceAccount() {
    java.lang.Object ref = serviceAccount_;
    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();
      serviceAccount_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The service account on this instance, giving access to other Google
   * Cloud services.
   * You can use any service account within the same project, but you
   * must have the service account user permission to use the instance.
   * If not specified, the [Compute Engine default service
   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
   * is used.
   * </pre>
   *
   * <code>string service_account = 7;</code>
   *
   * @return The bytes for serviceAccount.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getServiceAccountBytes() {
    java.lang.Object ref = serviceAccount_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      serviceAccount_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SERVICE_ACCOUNT_SCOPES_FIELD_NUMBER = 31;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList serviceAccountScopes_;
  /**
   *
   *
   * <pre>
   * Optional. The URIs of service account scopes to be included in
   * Compute Engine instances.
   * If not specified, the following
   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
   * are defined:
   *  - https://www.googleapis.com/auth/cloud-platform
   *  - https://www.googleapis.com/auth/userinfo.email
   * If not using default scopes, you need at least:
   *    https://www.googleapis.com/auth/compute
   * </pre>
   *
   * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return A list containing the serviceAccountScopes.
   */
  public com.google.protobuf.ProtocolStringList getServiceAccountScopesList() {
    return serviceAccountScopes_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The URIs of service account scopes to be included in
   * Compute Engine instances.
   * If not specified, the following
   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
   * are defined:
   *  - https://www.googleapis.com/auth/cloud-platform
   *  - https://www.googleapis.com/auth/userinfo.email
   * If not using default scopes, you need at least:
   *    https://www.googleapis.com/auth/compute
   * </pre>
   *
   * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The count of serviceAccountScopes.
   */
  public int getServiceAccountScopesCount() {
    return serviceAccountScopes_.size();
  }
  /**
   *
   *
   * <pre>
   * Optional. The URIs of service account scopes to be included in
   * Compute Engine instances.
   * If not specified, the following
   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
   * are defined:
   *  - https://www.googleapis.com/auth/cloud-platform
   *  - https://www.googleapis.com/auth/userinfo.email
   * If not using default scopes, you need at least:
   *    https://www.googleapis.com/auth/compute
   * </pre>
   *
   * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @param index The index of the element to return.
   * @return The serviceAccountScopes at the given index.
   */
  public java.lang.String getServiceAccountScopes(int index) {
    return serviceAccountScopes_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Optional. The URIs of service account scopes to be included in
   * Compute Engine instances.
   * If not specified, the following
   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
   * are defined:
   *  - https://www.googleapis.com/auth/cloud-platform
   *  - https://www.googleapis.com/auth/userinfo.email
   * If not using default scopes, you need at least:
   *    https://www.googleapis.com/auth/compute
   * </pre>
   *
   * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the serviceAccountScopes at the given index.
   */
  public com.google.protobuf.ByteString getServiceAccountScopesBytes(int index) {
    return serviceAccountScopes_.getByteString(index);
  }

  public static final int MACHINE_TYPE_FIELD_NUMBER = 8;

  @SuppressWarnings("serial")
  private volatile java.lang.Object machineType_ = "";
  /**
   *
   *
   * <pre>
   * Required. The [Compute Engine machine
   * type](https://cloud.google.com/compute/docs/machine-types) of this
   * instance.
   * </pre>
   *
   * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @return The machineType.
   */
  @java.lang.Override
  public java.lang.String getMachineType() {
    java.lang.Object ref = machineType_;
    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();
      machineType_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Required. The [Compute Engine machine
   * type](https://cloud.google.com/compute/docs/machine-types) of this
   * instance.
   * </pre>
   *
   * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @return The bytes for machineType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getMachineTypeBytes() {
    java.lang.Object ref = machineType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      machineType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ACCELERATOR_CONFIG_FIELD_NUMBER = 9;
  private com.google.cloud.notebooks.v1.Instance.AcceleratorConfig acceleratorConfig_;
  /**
   *
   *
   * <pre>
   * The hardware accelerator used on this instance. If you use
   * accelerators, make sure that your configuration has
   * [enough vCPUs and memory to support the `machine_type` you have
   * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
   * </pre>
   *
   * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
   *
   * @return Whether the acceleratorConfig field is set.
   */
  @java.lang.Override
  public boolean hasAcceleratorConfig() {
    return acceleratorConfig_ != null;
  }
  /**
   *
   *
   * <pre>
   * The hardware accelerator used on this instance. If you use
   * accelerators, make sure that your configuration has
   * [enough vCPUs and memory to support the `machine_type` you have
   * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
   * </pre>
   *
   * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
   *
   * @return The acceleratorConfig.
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig getAcceleratorConfig() {
    return acceleratorConfig_ == null
        ? com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance()
        : acceleratorConfig_;
  }
  /**
   *
   *
   * <pre>
   * The hardware accelerator used on this instance. If you use
   * accelerators, make sure that your configuration has
   * [enough vCPUs and memory to support the `machine_type` you have
   * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
   * </pre>
   *
   * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder
      getAcceleratorConfigOrBuilder() {
    return acceleratorConfig_ == null
        ? com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance()
        : acceleratorConfig_;
  }

  public static final int STATE_FIELD_NUMBER = 10;
  private int state_ = 0;
  /**
   *
   *
   * <pre>
   * Output only. The state of this instance.
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The enum numeric value on the wire for state.
   */
  @java.lang.Override
  public int getStateValue() {
    return state_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The state of this instance.
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The state.
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.State getState() {
    com.google.cloud.notebooks.v1.Instance.State result =
        com.google.cloud.notebooks.v1.Instance.State.forNumber(state_);
    return result == null ? com.google.cloud.notebooks.v1.Instance.State.UNRECOGNIZED : result;
  }

  public static final int INSTALL_GPU_DRIVER_FIELD_NUMBER = 11;
  private boolean installGpuDriver_ = false;
  /**
   *
   *
   * <pre>
   * Whether the end user authorizes Google Cloud to install GPU driver
   * on this instance.
   * If this field is empty or set to false, the GPU driver won't be installed.
   * Only applicable to instances with GPUs.
   * </pre>
   *
   * <code>bool install_gpu_driver = 11;</code>
   *
   * @return The installGpuDriver.
   */
  @java.lang.Override
  public boolean getInstallGpuDriver() {
    return installGpuDriver_;
  }

  public static final int CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER = 12;

  @SuppressWarnings("serial")
  private volatile java.lang.Object customGpuDriverPath_ = "";
  /**
   *
   *
   * <pre>
   * Specify a custom Cloud Storage path where the GPU driver is stored.
   * If not specified, we'll automatically choose from official GPU drivers.
   * </pre>
   *
   * <code>string custom_gpu_driver_path = 12;</code>
   *
   * @return The customGpuDriverPath.
   */
  @java.lang.Override
  public java.lang.String getCustomGpuDriverPath() {
    java.lang.Object ref = customGpuDriverPath_;
    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();
      customGpuDriverPath_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Specify a custom Cloud Storage path where the GPU driver is stored.
   * If not specified, we'll automatically choose from official GPU drivers.
   * </pre>
   *
   * <code>string custom_gpu_driver_path = 12;</code>
   *
   * @return The bytes for customGpuDriverPath.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() {
    java.lang.Object ref = customGpuDriverPath_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      customGpuDriverPath_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int BOOT_DISK_TYPE_FIELD_NUMBER = 13;
  private int bootDiskType_ = 0;
  /**
   *
   *
   * <pre>
   * Input only. The type of the boot disk attached to this instance, defaults to
   * standard persistent disk (`PD_STANDARD`).
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY];
   * </code>
   *
   * @return The enum numeric value on the wire for bootDiskType.
   */
  @java.lang.Override
  public int getBootDiskTypeValue() {
    return bootDiskType_;
  }
  /**
   *
   *
   * <pre>
   * Input only. The type of the boot disk attached to this instance, defaults to
   * standard persistent disk (`PD_STANDARD`).
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY];
   * </code>
   *
   * @return The bootDiskType.
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.DiskType getBootDiskType() {
    com.google.cloud.notebooks.v1.Instance.DiskType result =
        com.google.cloud.notebooks.v1.Instance.DiskType.forNumber(bootDiskType_);
    return result == null ? com.google.cloud.notebooks.v1.Instance.DiskType.UNRECOGNIZED : result;
  }

  public static final int BOOT_DISK_SIZE_GB_FIELD_NUMBER = 14;
  private long bootDiskSizeGb_ = 0L;
  /**
   *
   *
   * <pre>
   * Input only. The size of the boot disk in GB attached to this instance, up to a maximum
   * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not
   * specified, this defaults to 100.
   * </pre>
   *
   * <code>int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];</code>
   *
   * @return The bootDiskSizeGb.
   */
  @java.lang.Override
  public long getBootDiskSizeGb() {
    return bootDiskSizeGb_;
  }

  public static final int DATA_DISK_TYPE_FIELD_NUMBER = 25;
  private int dataDiskType_ = 0;
  /**
   *
   *
   * <pre>
   * Input only. The type of the data disk attached to this instance, defaults to
   * standard persistent disk (`PD_STANDARD`).
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY];
   * </code>
   *
   * @return The enum numeric value on the wire for dataDiskType.
   */
  @java.lang.Override
  public int getDataDiskTypeValue() {
    return dataDiskType_;
  }
  /**
   *
   *
   * <pre>
   * Input only. The type of the data disk attached to this instance, defaults to
   * standard persistent disk (`PD_STANDARD`).
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY];
   * </code>
   *
   * @return The dataDiskType.
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.DiskType getDataDiskType() {
    com.google.cloud.notebooks.v1.Instance.DiskType result =
        com.google.cloud.notebooks.v1.Instance.DiskType.forNumber(dataDiskType_);
    return result == null ? com.google.cloud.notebooks.v1.Instance.DiskType.UNRECOGNIZED : result;
  }

  public static final int DATA_DISK_SIZE_GB_FIELD_NUMBER = 26;
  private long dataDiskSizeGb_ = 0L;
  /**
   *
   *
   * <pre>
   * Input only. The size of the data disk in GB attached to this instance, up to a maximum
   * of 64000 GB (64 TB). You can choose the size of the data disk based on how
   * big your notebooks and data are. If not specified, this defaults to 100.
   * </pre>
   *
   * <code>int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];</code>
   *
   * @return The dataDiskSizeGb.
   */
  @java.lang.Override
  public long getDataDiskSizeGb() {
    return dataDiskSizeGb_;
  }

  public static final int NO_REMOVE_DATA_DISK_FIELD_NUMBER = 27;
  private boolean noRemoveDataDisk_ = false;
  /**
   *
   *
   * <pre>
   * Input only. If true, the data disk will not be auto deleted when deleting the instance.
   * </pre>
   *
   * <code>bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];</code>
   *
   * @return The noRemoveDataDisk.
   */
  @java.lang.Override
  public boolean getNoRemoveDataDisk() {
    return noRemoveDataDisk_;
  }

  public static final int DISK_ENCRYPTION_FIELD_NUMBER = 15;
  private int diskEncryption_ = 0;
  /**
   *
   *
   * <pre>
   * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY];
   * </code>
   *
   * @return The enum numeric value on the wire for diskEncryption.
   */
  @java.lang.Override
  public int getDiskEncryptionValue() {
    return diskEncryption_;
  }
  /**
   *
   *
   * <pre>
   * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY];
   * </code>
   *
   * @return The diskEncryption.
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.DiskEncryption getDiskEncryption() {
    com.google.cloud.notebooks.v1.Instance.DiskEncryption result =
        com.google.cloud.notebooks.v1.Instance.DiskEncryption.forNumber(diskEncryption_);
    return result == null
        ? com.google.cloud.notebooks.v1.Instance.DiskEncryption.UNRECOGNIZED
        : result;
  }

  public static final int KMS_KEY_FIELD_NUMBER = 16;

  @SuppressWarnings("serial")
  private volatile java.lang.Object kmsKey_ = "";
  /**
   *
   *
   * <pre>
   * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
   * is CMEK.
   * Format:
   * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
   * Learn more about [using your own encryption keys](/kms/docs/quickstart).
   * </pre>
   *
   * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code>
   *
   * @return The kmsKey.
   */
  @java.lang.Override
  public java.lang.String getKmsKey() {
    java.lang.Object ref = kmsKey_;
    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();
      kmsKey_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
   * is CMEK.
   * Format:
   * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
   * Learn more about [using your own encryption keys](/kms/docs/quickstart).
   * </pre>
   *
   * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code>
   *
   * @return The bytes for kmsKey.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getKmsKeyBytes() {
    java.lang.Object ref = kmsKey_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      kmsKey_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DISKS_FIELD_NUMBER = 28;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.notebooks.v1.Instance.Disk> disks_;
  /**
   *
   *
   * <pre>
   * Output only. Attached disks to notebook instance.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.notebooks.v1.Instance.Disk> getDisksList() {
    return disks_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Attached disks to notebook instance.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.notebooks.v1.Instance.DiskOrBuilder>
      getDisksOrBuilderList() {
    return disks_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Attached disks to notebook instance.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public int getDisksCount() {
    return disks_.size();
  }
  /**
   *
   *
   * <pre>
   * Output only. Attached disks to notebook instance.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.Disk getDisks(int index) {
    return disks_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Output only. Attached disks to notebook instance.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.DiskOrBuilder getDisksOrBuilder(int index) {
    return disks_.get(index);
  }

  public static final int SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER = 30;
  private com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shieldedInstanceConfig_;
  /**
   *
   *
   * <pre>
   * Optional. Shielded VM configuration.
   * [Images using supported Shielded VM
   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the shieldedInstanceConfig field is set.
   */
  @java.lang.Override
  public boolean hasShieldedInstanceConfig() {
    return shieldedInstanceConfig_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. Shielded VM configuration.
   * [Images using supported Shielded VM
   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The shieldedInstanceConfig.
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig getShieldedInstanceConfig() {
    return shieldedInstanceConfig_ == null
        ? com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance()
        : shieldedInstanceConfig_;
  }
  /**
   *
   *
   * <pre>
   * Optional. Shielded VM configuration.
   * [Images using supported Shielded VM
   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder
      getShieldedInstanceConfigOrBuilder() {
    return shieldedInstanceConfig_ == null
        ? com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance()
        : shieldedInstanceConfig_;
  }

  public static final int NO_PUBLIC_IP_FIELD_NUMBER = 17;
  private boolean noPublicIp_ = false;
  /**
   *
   *
   * <pre>
   * If true, no public IP will be assigned to this instance.
   * </pre>
   *
   * <code>bool no_public_ip = 17;</code>
   *
   * @return The noPublicIp.
   */
  @java.lang.Override
  public boolean getNoPublicIp() {
    return noPublicIp_;
  }

  public static final int NO_PROXY_ACCESS_FIELD_NUMBER = 18;
  private boolean noProxyAccess_ = false;
  /**
   *
   *
   * <pre>
   * If true, the notebook instance will not register with the proxy.
   * </pre>
   *
   * <code>bool no_proxy_access = 18;</code>
   *
   * @return The noProxyAccess.
   */
  @java.lang.Override
  public boolean getNoProxyAccess() {
    return noProxyAccess_;
  }

  public static final int NETWORK_FIELD_NUMBER = 19;

  @SuppressWarnings("serial")
  private volatile java.lang.Object network_ = "";
  /**
   *
   *
   * <pre>
   * The name of the VPC that this instance is in.
   * Format:
   * `projects/{project_id}/global/networks/{network_id}`
   * </pre>
   *
   * <code>string network = 19;</code>
   *
   * @return The network.
   */
  @java.lang.Override
  public java.lang.String getNetwork() {
    java.lang.Object ref = network_;
    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();
      network_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The name of the VPC that this instance is in.
   * Format:
   * `projects/{project_id}/global/networks/{network_id}`
   * </pre>
   *
   * <code>string network = 19;</code>
   *
   * @return The bytes for network.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNetworkBytes() {
    java.lang.Object ref = network_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      network_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SUBNET_FIELD_NUMBER = 20;

  @SuppressWarnings("serial")
  private volatile java.lang.Object subnet_ = "";
  /**
   *
   *
   * <pre>
   * The name of the subnet that this instance is in.
   * Format:
   * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
   * </pre>
   *
   * <code>string subnet = 20;</code>
   *
   * @return The subnet.
   */
  @java.lang.Override
  public java.lang.String getSubnet() {
    java.lang.Object ref = subnet_;
    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();
      subnet_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The name of the subnet that this instance is in.
   * Format:
   * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
   * </pre>
   *
   * <code>string subnet = 20;</code>
   *
   * @return The bytes for subnet.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getSubnetBytes() {
    java.lang.Object ref = subnet_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      subnet_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LABELS_FIELD_NUMBER = 21;

  private static final class LabelsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.cloud.notebooks.v1.InstanceProto
                .internal_static_google_cloud_notebooks_v1_Instance_LabelsEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
    if (labels_ == null) {
      return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
    }
    return labels_;
  }

  public int getLabelsCount() {
    return internalGetLabels().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Labels to apply to this instance.
   * These can be later modified by the setLabels method.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 21;</code>
   */
  @java.lang.Override
  public boolean containsLabels(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetLabels().getMap().containsKey(key);
  }
  /** Use {@link #getLabelsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getLabels() {
    return getLabelsMap();
  }
  /**
   *
   *
   * <pre>
   * Labels to apply to this instance.
   * These can be later modified by the setLabels method.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 21;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
    return internalGetLabels().getMap();
  }
  /**
   *
   *
   * <pre>
   * Labels to apply to this instance.
   * These can be later modified by the setLabels method.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 21;</code>
   */
  @java.lang.Override
  public /* nullable */ java.lang.String getLabelsOrDefault(
      java.lang.String key,
      /* nullable */
      java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Labels to apply to this instance.
   * These can be later modified by the setLabels method.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 21;</code>
   */
  @java.lang.Override
  public java.lang.String getLabelsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int METADATA_FIELD_NUMBER = 22;

  private static final class MetadataDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.cloud.notebooks.v1.InstanceProto
                .internal_static_google_cloud_notebooks_v1_Instance_MetadataEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, java.lang.String> metadata_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() {
    if (metadata_ == null) {
      return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry);
    }
    return metadata_;
  }

  public int getMetadataCount() {
    return internalGetMetadata().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Custom metadata to apply to this instance.
   * </pre>
   *
   * <code>map&lt;string, string&gt; metadata = 22;</code>
   */
  @java.lang.Override
  public boolean containsMetadata(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetMetadata().getMap().containsKey(key);
  }
  /** Use {@link #getMetadataMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getMetadata() {
    return getMetadataMap();
  }
  /**
   *
   *
   * <pre>
   * Custom metadata to apply to this instance.
   * </pre>
   *
   * <code>map&lt;string, string&gt; metadata = 22;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() {
    return internalGetMetadata().getMap();
  }
  /**
   *
   *
   * <pre>
   * Custom metadata to apply to this instance.
   * </pre>
   *
   * <code>map&lt;string, string&gt; metadata = 22;</code>
   */
  @java.lang.Override
  public /* nullable */ java.lang.String getMetadataOrDefault(
      java.lang.String key,
      /* nullable */
      java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Custom metadata to apply to this instance.
   * </pre>
   *
   * <code>map&lt;string, string&gt; metadata = 22;</code>
   */
  @java.lang.Override
  public java.lang.String getMetadataOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int TAGS_FIELD_NUMBER = 32;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList tags_;
  /**
   *
   *
   * <pre>
   * Optional. The Compute Engine tags to add to runtime (see [Tagging
   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
   * </pre>
   *
   * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return A list containing the tags.
   */
  public com.google.protobuf.ProtocolStringList getTagsList() {
    return tags_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The Compute Engine tags to add to runtime (see [Tagging
   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
   * </pre>
   *
   * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The count of tags.
   */
  public int getTagsCount() {
    return tags_.size();
  }
  /**
   *
   *
   * <pre>
   * Optional. The Compute Engine tags to add to runtime (see [Tagging
   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
   * </pre>
   *
   * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @param index The index of the element to return.
   * @return The tags at the given index.
   */
  public java.lang.String getTags(int index) {
    return tags_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Optional. The Compute Engine tags to add to runtime (see [Tagging
   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
   * </pre>
   *
   * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the tags at the given index.
   */
  public com.google.protobuf.ByteString getTagsBytes(int index) {
    return tags_.getByteString(index);
  }

  public static final int UPGRADE_HISTORY_FIELD_NUMBER = 29;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry>
      upgradeHistory_;
  /**
   *
   *
   * <pre>
   * The upgrade history of this instance.
   * </pre>
   *
   * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
   * </code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry>
      getUpgradeHistoryList() {
    return upgradeHistory_;
  }
  /**
   *
   *
   * <pre>
   * The upgrade history of this instance.
   * </pre>
   *
   * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
   * </code>
   */
  @java.lang.Override
  public java.util.List<
          ? extends com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder>
      getUpgradeHistoryOrBuilderList() {
    return upgradeHistory_;
  }
  /**
   *
   *
   * <pre>
   * The upgrade history of this instance.
   * </pre>
   *
   * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
   * </code>
   */
  @java.lang.Override
  public int getUpgradeHistoryCount() {
    return upgradeHistory_.size();
  }
  /**
   *
   *
   * <pre>
   * The upgrade history of this instance.
   * </pre>
   *
   * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getUpgradeHistory(int index) {
    return upgradeHistory_.get(index);
  }
  /**
   *
   *
   * <pre>
   * The upgrade history of this instance.
   * </pre>
   *
   * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder
      getUpgradeHistoryOrBuilder(int index) {
    return upgradeHistory_.get(index);
  }

  public static final int NIC_TYPE_FIELD_NUMBER = 33;
  private int nicType_ = 0;
  /**
   *
   *
   * <pre>
   * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
   * VirtioNet.
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The enum numeric value on the wire for nicType.
   */
  @java.lang.Override
  public int getNicTypeValue() {
    return nicType_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
   * VirtioNet.
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The nicType.
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance.NicType getNicType() {
    com.google.cloud.notebooks.v1.Instance.NicType result =
        com.google.cloud.notebooks.v1.Instance.NicType.forNumber(nicType_);
    return result == null ? com.google.cloud.notebooks.v1.Instance.NicType.UNRECOGNIZED : result;
  }

  public static final int RESERVATION_AFFINITY_FIELD_NUMBER = 34;
  private com.google.cloud.notebooks.v1.ReservationAffinity reservationAffinity_;
  /**
   *
   *
   * <pre>
   * Optional. The optional reservation affinity. Setting this field will apply
   * the specified [Zonal Compute
   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
   * to this notebook instance.
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the reservationAffinity field is set.
   */
  @java.lang.Override
  public boolean hasReservationAffinity() {
    return reservationAffinity_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. The optional reservation affinity. Setting this field will apply
   * the specified [Zonal Compute
   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
   * to this notebook instance.
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The reservationAffinity.
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.ReservationAffinity getReservationAffinity() {
    return reservationAffinity_ == null
        ? com.google.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance()
        : reservationAffinity_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The optional reservation affinity. Setting this field will apply
   * the specified [Zonal Compute
   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
   * to this notebook instance.
   * </pre>
   *
   * <code>
   * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder
      getReservationAffinityOrBuilder() {
    return reservationAffinity_ == null
        ? com.google.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance()
        : reservationAffinity_;
  }

  public static final int CREATOR_FIELD_NUMBER = 36;

  @SuppressWarnings("serial")
  private volatile java.lang.Object creator_ = "";
  /**
   *
   *
   * <pre>
   * Output only. Email address of entity that sent original CreateInstance request.
   * </pre>
   *
   * <code>string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The creator.
   */
  @java.lang.Override
  public java.lang.String getCreator() {
    java.lang.Object ref = creator_;
    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();
      creator_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. Email address of entity that sent original CreateInstance request.
   * </pre>
   *
   * <code>string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for creator.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getCreatorBytes() {
    java.lang.Object ref = creator_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      creator_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CAN_IP_FORWARD_FIELD_NUMBER = 39;
  private boolean canIpForward_ = false;
  /**
   *
   *
   * <pre>
   * Optional. Flag to enable ip forwarding or not, default false/off.
   * https://cloud.google.com/vpc/docs/using-routes#canipforward
   * </pre>
   *
   * <code>bool can_ip_forward = 39 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The canIpForward.
   */
  @java.lang.Override
  public boolean getCanIpForward() {
    return canIpForward_;
  }

  public static final int CREATE_TIME_FIELD_NUMBER = 23;
  private com.google.protobuf.Timestamp createTime_;
  /**
   *
   *
   * <pre>
   * Output only. Instance creation time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the createTime field is set.
   */
  @java.lang.Override
  public boolean hasCreateTime() {
    return createTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. Instance creation time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The createTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getCreateTime() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Instance creation time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }

  public static final int UPDATE_TIME_FIELD_NUMBER = 24;
  private com.google.protobuf.Timestamp updateTime_;
  /**
   *
   *
   * <pre>
   * Output only. Instance update time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the updateTime field is set.
   */
  @java.lang.Override
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. Instance update time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The updateTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Instance update time.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }

  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 (environmentCase_ == 2) {
      output.writeMessage(2, (com.google.cloud.notebooks.v1.VmImage) environment_);
    }
    if (environmentCase_ == 3) {
      output.writeMessage(3, (com.google.cloud.notebooks.v1.ContainerImage) environment_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postStartupScript_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, postStartupScript_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, proxyUri_);
    }
    for (int i = 0; i < instanceOwners_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, instanceOwners_.getRaw(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serviceAccount_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, machineType_);
    }
    if (acceleratorConfig_ != null) {
      output.writeMessage(9, getAcceleratorConfig());
    }
    if (state_ != com.google.cloud.notebooks.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) {
      output.writeEnum(10, state_);
    }
    if (installGpuDriver_ != false) {
      output.writeBool(11, installGpuDriver_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customGpuDriverPath_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, customGpuDriverPath_);
    }
    if (bootDiskType_
        != com.google.cloud.notebooks.v1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) {
      output.writeEnum(13, bootDiskType_);
    }
    if (bootDiskSizeGb_ != 0L) {
      output.writeInt64(14, bootDiskSizeGb_);
    }
    if (diskEncryption_
        != com.google.cloud.notebooks.v1.Instance.DiskEncryption.DISK_ENCRYPTION_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(15, diskEncryption_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 16, kmsKey_);
    }
    if (noPublicIp_ != false) {
      output.writeBool(17, noPublicIp_);
    }
    if (noProxyAccess_ != false) {
      output.writeBool(18, noProxyAccess_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 19, network_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnet_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 20, subnet_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 21);
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 22);
    if (createTime_ != null) {
      output.writeMessage(23, getCreateTime());
    }
    if (updateTime_ != null) {
      output.writeMessage(24, getUpdateTime());
    }
    if (dataDiskType_
        != com.google.cloud.notebooks.v1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) {
      output.writeEnum(25, dataDiskType_);
    }
    if (dataDiskSizeGb_ != 0L) {
      output.writeInt64(26, dataDiskSizeGb_);
    }
    if (noRemoveDataDisk_ != false) {
      output.writeBool(27, noRemoveDataDisk_);
    }
    for (int i = 0; i < disks_.size(); i++) {
      output.writeMessage(28, disks_.get(i));
    }
    for (int i = 0; i < upgradeHistory_.size(); i++) {
      output.writeMessage(29, upgradeHistory_.get(i));
    }
    if (shieldedInstanceConfig_ != null) {
      output.writeMessage(30, getShieldedInstanceConfig());
    }
    for (int i = 0; i < serviceAccountScopes_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(
          output, 31, serviceAccountScopes_.getRaw(i));
    }
    for (int i = 0; i < tags_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 32, tags_.getRaw(i));
    }
    if (nicType_
        != com.google.cloud.notebooks.v1.Instance.NicType.UNSPECIFIED_NIC_TYPE.getNumber()) {
      output.writeEnum(33, nicType_);
    }
    if (reservationAffinity_ != null) {
      output.writeMessage(34, getReservationAffinity());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 36, creator_);
    }
    if (canIpForward_ != false) {
      output.writeBool(39, canIpForward_);
    }
    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 (environmentCase_ == 2) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              2, (com.google.cloud.notebooks.v1.VmImage) environment_);
    }
    if (environmentCase_ == 3) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              3, (com.google.cloud.notebooks.v1.ContainerImage) environment_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postStartupScript_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, postStartupScript_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proxyUri_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, proxyUri_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < instanceOwners_.size(); i++) {
        dataSize += computeStringSizeNoTag(instanceOwners_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getInstanceOwnersList().size();
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serviceAccount_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, machineType_);
    }
    if (acceleratorConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getAcceleratorConfig());
    }
    if (state_ != com.google.cloud.notebooks.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_);
    }
    if (installGpuDriver_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, installGpuDriver_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customGpuDriverPath_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, customGpuDriverPath_);
    }
    if (bootDiskType_
        != com.google.cloud.notebooks.v1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, bootDiskType_);
    }
    if (bootDiskSizeGb_ != 0L) {
      size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, bootDiskSizeGb_);
    }
    if (diskEncryption_
        != com.google.cloud.notebooks.v1.Instance.DiskEncryption.DISK_ENCRYPTION_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, diskEncryption_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, kmsKey_);
    }
    if (noPublicIp_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(17, noPublicIp_);
    }
    if (noProxyAccess_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, noProxyAccess_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, network_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnet_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, subnet_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetLabels().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
          LabelsDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, labels__);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetMetadata().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ =
          MetadataDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, metadata__);
    }
    if (createTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getCreateTime());
    }
    if (updateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getUpdateTime());
    }
    if (dataDiskType_
        != com.google.cloud.notebooks.v1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(25, dataDiskType_);
    }
    if (dataDiskSizeGb_ != 0L) {
      size += com.google.protobuf.CodedOutputStream.computeInt64Size(26, dataDiskSizeGb_);
    }
    if (noRemoveDataDisk_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(27, noRemoveDataDisk_);
    }
    for (int i = 0; i < disks_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, disks_.get(i));
    }
    for (int i = 0; i < upgradeHistory_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, upgradeHistory_.get(i));
    }
    if (shieldedInstanceConfig_ != null) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(30, getShieldedInstanceConfig());
    }
    {
      int dataSize = 0;
      for (int i = 0; i < serviceAccountScopes_.size(); i++) {
        dataSize += computeStringSizeNoTag(serviceAccountScopes_.getRaw(i));
      }
      size += dataSize;
      size += 2 * getServiceAccountScopesList().size();
    }
    {
      int dataSize = 0;
      for (int i = 0; i < tags_.size(); i++) {
        dataSize += computeStringSizeNoTag(tags_.getRaw(i));
      }
      size += dataSize;
      size += 2 * getTagsList().size();
    }
    if (nicType_
        != com.google.cloud.notebooks.v1.Instance.NicType.UNSPECIFIED_NIC_TYPE.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(33, nicType_);
    }
    if (reservationAffinity_ != null) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(34, getReservationAffinity());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(36, creator_);
    }
    if (canIpForward_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(39, canIpForward_);
    }
    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.notebooks.v1.Instance)) {
      return super.equals(obj);
    }
    com.google.cloud.notebooks.v1.Instance other = (com.google.cloud.notebooks.v1.Instance) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getPostStartupScript().equals(other.getPostStartupScript())) return false;
    if (!getProxyUri().equals(other.getProxyUri())) return false;
    if (!getInstanceOwnersList().equals(other.getInstanceOwnersList())) return false;
    if (!getServiceAccount().equals(other.getServiceAccount())) return false;
    if (!getServiceAccountScopesList().equals(other.getServiceAccountScopesList())) return false;
    if (!getMachineType().equals(other.getMachineType())) return false;
    if (hasAcceleratorConfig() != other.hasAcceleratorConfig()) return false;
    if (hasAcceleratorConfig()) {
      if (!getAcceleratorConfig().equals(other.getAcceleratorConfig())) return false;
    }
    if (state_ != other.state_) return false;
    if (getInstallGpuDriver() != other.getInstallGpuDriver()) return false;
    if (!getCustomGpuDriverPath().equals(other.getCustomGpuDriverPath())) return false;
    if (bootDiskType_ != other.bootDiskType_) return false;
    if (getBootDiskSizeGb() != other.getBootDiskSizeGb()) return false;
    if (dataDiskType_ != other.dataDiskType_) return false;
    if (getDataDiskSizeGb() != other.getDataDiskSizeGb()) return false;
    if (getNoRemoveDataDisk() != other.getNoRemoveDataDisk()) return false;
    if (diskEncryption_ != other.diskEncryption_) return false;
    if (!getKmsKey().equals(other.getKmsKey())) return false;
    if (!getDisksList().equals(other.getDisksList())) return false;
    if (hasShieldedInstanceConfig() != other.hasShieldedInstanceConfig()) return false;
    if (hasShieldedInstanceConfig()) {
      if (!getShieldedInstanceConfig().equals(other.getShieldedInstanceConfig())) return false;
    }
    if (getNoPublicIp() != other.getNoPublicIp()) return false;
    if (getNoProxyAccess() != other.getNoProxyAccess()) return false;
    if (!getNetwork().equals(other.getNetwork())) return false;
    if (!getSubnet().equals(other.getSubnet())) return false;
    if (!internalGetLabels().equals(other.internalGetLabels())) return false;
    if (!internalGetMetadata().equals(other.internalGetMetadata())) return false;
    if (!getTagsList().equals(other.getTagsList())) return false;
    if (!getUpgradeHistoryList().equals(other.getUpgradeHistoryList())) return false;
    if (nicType_ != other.nicType_) return false;
    if (hasReservationAffinity() != other.hasReservationAffinity()) return false;
    if (hasReservationAffinity()) {
      if (!getReservationAffinity().equals(other.getReservationAffinity())) return false;
    }
    if (!getCreator().equals(other.getCreator())) return false;
    if (getCanIpForward() != other.getCanIpForward()) return false;
    if (hasCreateTime() != other.hasCreateTime()) return false;
    if (hasCreateTime()) {
      if (!getCreateTime().equals(other.getCreateTime())) return false;
    }
    if (hasUpdateTime() != other.hasUpdateTime()) return false;
    if (hasUpdateTime()) {
      if (!getUpdateTime().equals(other.getUpdateTime())) return false;
    }
    if (!getEnvironmentCase().equals(other.getEnvironmentCase())) return false;
    switch (environmentCase_) {
      case 2:
        if (!getVmImage().equals(other.getVmImage())) return false;
        break;
      case 3:
        if (!getContainerImage().equals(other.getContainerImage())) return false;
        break;
      case 0:
      default:
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + POST_STARTUP_SCRIPT_FIELD_NUMBER;
    hash = (53 * hash) + getPostStartupScript().hashCode();
    hash = (37 * hash) + PROXY_URI_FIELD_NUMBER;
    hash = (53 * hash) + getProxyUri().hashCode();
    if (getInstanceOwnersCount() > 0) {
      hash = (37 * hash) + INSTANCE_OWNERS_FIELD_NUMBER;
      hash = (53 * hash) + getInstanceOwnersList().hashCode();
    }
    hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER;
    hash = (53 * hash) + getServiceAccount().hashCode();
    if (getServiceAccountScopesCount() > 0) {
      hash = (37 * hash) + SERVICE_ACCOUNT_SCOPES_FIELD_NUMBER;
      hash = (53 * hash) + getServiceAccountScopesList().hashCode();
    }
    hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getMachineType().hashCode();
    if (hasAcceleratorConfig()) {
      hash = (37 * hash) + ACCELERATOR_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getAcceleratorConfig().hashCode();
    }
    hash = (37 * hash) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + state_;
    hash = (37 * hash) + INSTALL_GPU_DRIVER_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInstallGpuDriver());
    hash = (37 * hash) + CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER;
    hash = (53 * hash) + getCustomGpuDriverPath().hashCode();
    hash = (37 * hash) + BOOT_DISK_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + bootDiskType_;
    hash = (37 * hash) + BOOT_DISK_SIZE_GB_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBootDiskSizeGb());
    hash = (37 * hash) + DATA_DISK_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + dataDiskType_;
    hash = (37 * hash) + DATA_DISK_SIZE_GB_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDataDiskSizeGb());
    hash = (37 * hash) + NO_REMOVE_DATA_DISK_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoRemoveDataDisk());
    hash = (37 * hash) + DISK_ENCRYPTION_FIELD_NUMBER;
    hash = (53 * hash) + diskEncryption_;
    hash = (37 * hash) + KMS_KEY_FIELD_NUMBER;
    hash = (53 * hash) + getKmsKey().hashCode();
    if (getDisksCount() > 0) {
      hash = (37 * hash) + DISKS_FIELD_NUMBER;
      hash = (53 * hash) + getDisksList().hashCode();
    }
    if (hasShieldedInstanceConfig()) {
      hash = (37 * hash) + SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getShieldedInstanceConfig().hashCode();
    }
    hash = (37 * hash) + NO_PUBLIC_IP_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoPublicIp());
    hash = (37 * hash) + NO_PROXY_ACCESS_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoProxyAccess());
    hash = (37 * hash) + NETWORK_FIELD_NUMBER;
    hash = (53 * hash) + getNetwork().hashCode();
    hash = (37 * hash) + SUBNET_FIELD_NUMBER;
    hash = (53 * hash) + getSubnet().hashCode();
    if (!internalGetLabels().getMap().isEmpty()) {
      hash = (37 * hash) + LABELS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetLabels().hashCode();
    }
    if (!internalGetMetadata().getMap().isEmpty()) {
      hash = (37 * hash) + METADATA_FIELD_NUMBER;
      hash = (53 * hash) + internalGetMetadata().hashCode();
    }
    if (getTagsCount() > 0) {
      hash = (37 * hash) + TAGS_FIELD_NUMBER;
      hash = (53 * hash) + getTagsList().hashCode();
    }
    if (getUpgradeHistoryCount() > 0) {
      hash = (37 * hash) + UPGRADE_HISTORY_FIELD_NUMBER;
      hash = (53 * hash) + getUpgradeHistoryList().hashCode();
    }
    hash = (37 * hash) + NIC_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + nicType_;
    if (hasReservationAffinity()) {
      hash = (37 * hash) + RESERVATION_AFFINITY_FIELD_NUMBER;
      hash = (53 * hash) + getReservationAffinity().hashCode();
    }
    hash = (37 * hash) + CREATOR_FIELD_NUMBER;
    hash = (53 * hash) + getCreator().hashCode();
    hash = (37 * hash) + CAN_IP_FORWARD_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCanIpForward());
    if (hasCreateTime()) {
      hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreateTime().hashCode();
    }
    if (hasUpdateTime()) {
      hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUpdateTime().hashCode();
    }
    switch (environmentCase_) {
      case 2:
        hash = (37 * hash) + VM_IMAGE_FIELD_NUMBER;
        hash = (53 * hash) + getVmImage().hashCode();
        break;
      case 3:
        hash = (37 * hash) + CONTAINER_IMAGE_FIELD_NUMBER;
        hash = (53 * hash) + getContainerImage().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.notebooks.v1.Instance parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

  public static com.google.cloud.notebooks.v1.Instance parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.notebooks.v1.Instance parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

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

  public static com.google.cloud.notebooks.v1.Instance 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.notebooks.v1.Instance parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.notebooks.v1.Instance 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.notebooks.v1.Instance 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>
   * The definition of a notebook instance.
   * </pre>
   *
   * Protobuf type {@code google.cloud.notebooks.v1.Instance}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance)
      com.google.cloud.notebooks.v1.InstanceOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.notebooks.v1.InstanceProto
          .internal_static_google_cloud_notebooks_v1_Instance_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 21:
          return internalGetLabels();
        case 22:
          return internalGetMetadata();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 21:
          return internalGetMutableLabels();
        case 22:
          return internalGetMutableMetadata();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.notebooks.v1.InstanceProto
          .internal_static_google_cloud_notebooks_v1_Instance_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.notebooks.v1.Instance.class,
              com.google.cloud.notebooks.v1.Instance.Builder.class);
    }

    // Construct using com.google.cloud.notebooks.v1.Instance.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      bitField1_ = 0;
      name_ = "";
      if (vmImageBuilder_ != null) {
        vmImageBuilder_.clear();
      }
      if (containerImageBuilder_ != null) {
        containerImageBuilder_.clear();
      }
      postStartupScript_ = "";
      proxyUri_ = "";
      instanceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000020);
      serviceAccount_ = "";
      serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000080);
      machineType_ = "";
      acceleratorConfig_ = null;
      if (acceleratorConfigBuilder_ != null) {
        acceleratorConfigBuilder_.dispose();
        acceleratorConfigBuilder_ = null;
      }
      state_ = 0;
      installGpuDriver_ = false;
      customGpuDriverPath_ = "";
      bootDiskType_ = 0;
      bootDiskSizeGb_ = 0L;
      dataDiskType_ = 0;
      dataDiskSizeGb_ = 0L;
      noRemoveDataDisk_ = false;
      diskEncryption_ = 0;
      kmsKey_ = "";
      if (disksBuilder_ == null) {
        disks_ = java.util.Collections.emptyList();
      } else {
        disks_ = null;
        disksBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00100000);
      shieldedInstanceConfig_ = null;
      if (shieldedInstanceConfigBuilder_ != null) {
        shieldedInstanceConfigBuilder_.dispose();
        shieldedInstanceConfigBuilder_ = null;
      }
      noPublicIp_ = false;
      noProxyAccess_ = false;
      network_ = "";
      subnet_ = "";
      internalGetMutableLabels().clear();
      internalGetMutableMetadata().clear();
      tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x10000000);
      if (upgradeHistoryBuilder_ == null) {
        upgradeHistory_ = java.util.Collections.emptyList();
      } else {
        upgradeHistory_ = null;
        upgradeHistoryBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x20000000);
      nicType_ = 0;
      reservationAffinity_ = null;
      if (reservationAffinityBuilder_ != null) {
        reservationAffinityBuilder_.dispose();
        reservationAffinityBuilder_ = null;
      }
      creator_ = "";
      canIpForward_ = false;
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      environmentCase_ = 0;
      environment_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.notebooks.v1.InstanceProto
          .internal_static_google_cloud_notebooks_v1_Instance_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance getDefaultInstanceForType() {
      return com.google.cloud.notebooks.v1.Instance.getDefaultInstance();
    }

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

    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance buildPartial() {
      com.google.cloud.notebooks.v1.Instance result =
          new com.google.cloud.notebooks.v1.Instance(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      if (bitField1_ != 0) {
        buildPartial1(result);
      }
      buildPartialOneofs(result);
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(com.google.cloud.notebooks.v1.Instance result) {
      if (((bitField0_ & 0x00000020) != 0)) {
        instanceOwners_ = instanceOwners_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000020);
      }
      result.instanceOwners_ = instanceOwners_;
      if (((bitField0_ & 0x00000080) != 0)) {
        serviceAccountScopes_ = serviceAccountScopes_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000080);
      }
      result.serviceAccountScopes_ = serviceAccountScopes_;
      if (disksBuilder_ == null) {
        if (((bitField0_ & 0x00100000) != 0)) {
          disks_ = java.util.Collections.unmodifiableList(disks_);
          bitField0_ = (bitField0_ & ~0x00100000);
        }
        result.disks_ = disks_;
      } else {
        result.disks_ = disksBuilder_.build();
      }
      if (((bitField0_ & 0x10000000) != 0)) {
        tags_ = tags_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x10000000);
      }
      result.tags_ = tags_;
      if (upgradeHistoryBuilder_ == null) {
        if (((bitField0_ & 0x20000000) != 0)) {
          upgradeHistory_ = java.util.Collections.unmodifiableList(upgradeHistory_);
          bitField0_ = (bitField0_ & ~0x20000000);
        }
        result.upgradeHistory_ = upgradeHistory_;
      } else {
        result.upgradeHistory_ = upgradeHistoryBuilder_.build();
      }
    }

    private void buildPartial0(com.google.cloud.notebooks.v1.Instance result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.postStartupScript_ = postStartupScript_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.proxyUri_ = proxyUri_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.serviceAccount_ = serviceAccount_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.machineType_ = machineType_;
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.acceleratorConfig_ =
            acceleratorConfigBuilder_ == null
                ? acceleratorConfig_
                : acceleratorConfigBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000400) != 0)) {
        result.state_ = state_;
      }
      if (((from_bitField0_ & 0x00000800) != 0)) {
        result.installGpuDriver_ = installGpuDriver_;
      }
      if (((from_bitField0_ & 0x00001000) != 0)) {
        result.customGpuDriverPath_ = customGpuDriverPath_;
      }
      if (((from_bitField0_ & 0x00002000) != 0)) {
        result.bootDiskType_ = bootDiskType_;
      }
      if (((from_bitField0_ & 0x00004000) != 0)) {
        result.bootDiskSizeGb_ = bootDiskSizeGb_;
      }
      if (((from_bitField0_ & 0x00008000) != 0)) {
        result.dataDiskType_ = dataDiskType_;
      }
      if (((from_bitField0_ & 0x00010000) != 0)) {
        result.dataDiskSizeGb_ = dataDiskSizeGb_;
      }
      if (((from_bitField0_ & 0x00020000) != 0)) {
        result.noRemoveDataDisk_ = noRemoveDataDisk_;
      }
      if (((from_bitField0_ & 0x00040000) != 0)) {
        result.diskEncryption_ = diskEncryption_;
      }
      if (((from_bitField0_ & 0x00080000) != 0)) {
        result.kmsKey_ = kmsKey_;
      }
      if (((from_bitField0_ & 0x00200000) != 0)) {
        result.shieldedInstanceConfig_ =
            shieldedInstanceConfigBuilder_ == null
                ? shieldedInstanceConfig_
                : shieldedInstanceConfigBuilder_.build();
      }
      if (((from_bitField0_ & 0x00400000) != 0)) {
        result.noPublicIp_ = noPublicIp_;
      }
      if (((from_bitField0_ & 0x00800000) != 0)) {
        result.noProxyAccess_ = noProxyAccess_;
      }
      if (((from_bitField0_ & 0x01000000) != 0)) {
        result.network_ = network_;
      }
      if (((from_bitField0_ & 0x02000000) != 0)) {
        result.subnet_ = subnet_;
      }
      if (((from_bitField0_ & 0x04000000) != 0)) {
        result.labels_ = internalGetLabels();
        result.labels_.makeImmutable();
      }
      if (((from_bitField0_ & 0x08000000) != 0)) {
        result.metadata_ = internalGetMetadata();
        result.metadata_.makeImmutable();
      }
      if (((from_bitField0_ & 0x40000000) != 0)) {
        result.nicType_ = nicType_;
      }
      if (((from_bitField0_ & 0x80000000) != 0)) {
        result.reservationAffinity_ =
            reservationAffinityBuilder_ == null
                ? reservationAffinity_
                : reservationAffinityBuilder_.build();
      }
    }

    private void buildPartial1(com.google.cloud.notebooks.v1.Instance result) {
      int from_bitField1_ = bitField1_;
      if (((from_bitField1_ & 0x00000001) != 0)) {
        result.creator_ = creator_;
      }
      if (((from_bitField1_ & 0x00000002) != 0)) {
        result.canIpForward_ = canIpForward_;
      }
      if (((from_bitField1_ & 0x00000004) != 0)) {
        result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
      }
      if (((from_bitField1_ & 0x00000008) != 0)) {
        result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
      }
    }

    private void buildPartialOneofs(com.google.cloud.notebooks.v1.Instance result) {
      result.environmentCase_ = environmentCase_;
      result.environment_ = this.environment_;
      if (environmentCase_ == 2 && vmImageBuilder_ != null) {
        result.environment_ = vmImageBuilder_.build();
      }
      if (environmentCase_ == 3 && containerImageBuilder_ != null) {
        result.environment_ = containerImageBuilder_.build();
      }
    }

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

    public Builder mergeFrom(com.google.cloud.notebooks.v1.Instance other) {
      if (other == com.google.cloud.notebooks.v1.Instance.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (!other.getPostStartupScript().isEmpty()) {
        postStartupScript_ = other.postStartupScript_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      if (!other.getProxyUri().isEmpty()) {
        proxyUri_ = other.proxyUri_;
        bitField0_ |= 0x00000010;
        onChanged();
      }
      if (!other.instanceOwners_.isEmpty()) {
        if (instanceOwners_.isEmpty()) {
          instanceOwners_ = other.instanceOwners_;
          bitField0_ = (bitField0_ & ~0x00000020);
        } else {
          ensureInstanceOwnersIsMutable();
          instanceOwners_.addAll(other.instanceOwners_);
        }
        onChanged();
      }
      if (!other.getServiceAccount().isEmpty()) {
        serviceAccount_ = other.serviceAccount_;
        bitField0_ |= 0x00000040;
        onChanged();
      }
      if (!other.serviceAccountScopes_.isEmpty()) {
        if (serviceAccountScopes_.isEmpty()) {
          serviceAccountScopes_ = other.serviceAccountScopes_;
          bitField0_ = (bitField0_ & ~0x00000080);
        } else {
          ensureServiceAccountScopesIsMutable();
          serviceAccountScopes_.addAll(other.serviceAccountScopes_);
        }
        onChanged();
      }
      if (!other.getMachineType().isEmpty()) {
        machineType_ = other.machineType_;
        bitField0_ |= 0x00000100;
        onChanged();
      }
      if (other.hasAcceleratorConfig()) {
        mergeAcceleratorConfig(other.getAcceleratorConfig());
      }
      if (other.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (other.getInstallGpuDriver() != false) {
        setInstallGpuDriver(other.getInstallGpuDriver());
      }
      if (!other.getCustomGpuDriverPath().isEmpty()) {
        customGpuDriverPath_ = other.customGpuDriverPath_;
        bitField0_ |= 0x00001000;
        onChanged();
      }
      if (other.bootDiskType_ != 0) {
        setBootDiskTypeValue(other.getBootDiskTypeValue());
      }
      if (other.getBootDiskSizeGb() != 0L) {
        setBootDiskSizeGb(other.getBootDiskSizeGb());
      }
      if (other.dataDiskType_ != 0) {
        setDataDiskTypeValue(other.getDataDiskTypeValue());
      }
      if (other.getDataDiskSizeGb() != 0L) {
        setDataDiskSizeGb(other.getDataDiskSizeGb());
      }
      if (other.getNoRemoveDataDisk() != false) {
        setNoRemoveDataDisk(other.getNoRemoveDataDisk());
      }
      if (other.diskEncryption_ != 0) {
        setDiskEncryptionValue(other.getDiskEncryptionValue());
      }
      if (!other.getKmsKey().isEmpty()) {
        kmsKey_ = other.kmsKey_;
        bitField0_ |= 0x00080000;
        onChanged();
      }
      if (disksBuilder_ == null) {
        if (!other.disks_.isEmpty()) {
          if (disks_.isEmpty()) {
            disks_ = other.disks_;
            bitField0_ = (bitField0_ & ~0x00100000);
          } else {
            ensureDisksIsMutable();
            disks_.addAll(other.disks_);
          }
          onChanged();
        }
      } else {
        if (!other.disks_.isEmpty()) {
          if (disksBuilder_.isEmpty()) {
            disksBuilder_.dispose();
            disksBuilder_ = null;
            disks_ = other.disks_;
            bitField0_ = (bitField0_ & ~0x00100000);
            disksBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getDisksFieldBuilder()
                    : null;
          } else {
            disksBuilder_.addAllMessages(other.disks_);
          }
        }
      }
      if (other.hasShieldedInstanceConfig()) {
        mergeShieldedInstanceConfig(other.getShieldedInstanceConfig());
      }
      if (other.getNoPublicIp() != false) {
        setNoPublicIp(other.getNoPublicIp());
      }
      if (other.getNoProxyAccess() != false) {
        setNoProxyAccess(other.getNoProxyAccess());
      }
      if (!other.getNetwork().isEmpty()) {
        network_ = other.network_;
        bitField0_ |= 0x01000000;
        onChanged();
      }
      if (!other.getSubnet().isEmpty()) {
        subnet_ = other.subnet_;
        bitField0_ |= 0x02000000;
        onChanged();
      }
      internalGetMutableLabels().mergeFrom(other.internalGetLabels());
      bitField0_ |= 0x04000000;
      internalGetMutableMetadata().mergeFrom(other.internalGetMetadata());
      bitField0_ |= 0x08000000;
      if (!other.tags_.isEmpty()) {
        if (tags_.isEmpty()) {
          tags_ = other.tags_;
          bitField0_ = (bitField0_ & ~0x10000000);
        } else {
          ensureTagsIsMutable();
          tags_.addAll(other.tags_);
        }
        onChanged();
      }
      if (upgradeHistoryBuilder_ == null) {
        if (!other.upgradeHistory_.isEmpty()) {
          if (upgradeHistory_.isEmpty()) {
            upgradeHistory_ = other.upgradeHistory_;
            bitField0_ = (bitField0_ & ~0x20000000);
          } else {
            ensureUpgradeHistoryIsMutable();
            upgradeHistory_.addAll(other.upgradeHistory_);
          }
          onChanged();
        }
      } else {
        if (!other.upgradeHistory_.isEmpty()) {
          if (upgradeHistoryBuilder_.isEmpty()) {
            upgradeHistoryBuilder_.dispose();
            upgradeHistoryBuilder_ = null;
            upgradeHistory_ = other.upgradeHistory_;
            bitField0_ = (bitField0_ & ~0x20000000);
            upgradeHistoryBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getUpgradeHistoryFieldBuilder()
                    : null;
          } else {
            upgradeHistoryBuilder_.addAllMessages(other.upgradeHistory_);
          }
        }
      }
      if (other.nicType_ != 0) {
        setNicTypeValue(other.getNicTypeValue());
      }
      if (other.hasReservationAffinity()) {
        mergeReservationAffinity(other.getReservationAffinity());
      }
      if (!other.getCreator().isEmpty()) {
        creator_ = other.creator_;
        bitField1_ |= 0x00000001;
        onChanged();
      }
      if (other.getCanIpForward() != false) {
        setCanIpForward(other.getCanIpForward());
      }
      if (other.hasCreateTime()) {
        mergeCreateTime(other.getCreateTime());
      }
      if (other.hasUpdateTime()) {
        mergeUpdateTime(other.getUpdateTime());
      }
      switch (other.getEnvironmentCase()) {
        case VM_IMAGE:
          {
            mergeVmImage(other.getVmImage());
            break;
          }
        case CONTAINER_IMAGE:
          {
            mergeContainerImage(other.getContainerImage());
            break;
          }
        case ENVIRONMENT_NOT_SET:
          {
            break;
          }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

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

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                input.readMessage(getVmImageFieldBuilder().getBuilder(), extensionRegistry);
                environmentCase_ = 2;
                break;
              } // case 18
            case 26:
              {
                input.readMessage(getContainerImageFieldBuilder().getBuilder(), extensionRegistry);
                environmentCase_ = 3;
                break;
              } // case 26
            case 34:
              {
                postStartupScript_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            case 42:
              {
                proxyUri_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000010;
                break;
              } // case 42
            case 50:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureInstanceOwnersIsMutable();
                instanceOwners_.add(s);
                break;
              } // case 50
            case 58:
              {
                serviceAccount_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000040;
                break;
              } // case 58
            case 66:
              {
                machineType_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000100;
                break;
              } // case 66
            case 74:
              {
                input.readMessage(
                    getAcceleratorConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000200;
                break;
              } // case 74
            case 80:
              {
                state_ = input.readEnum();
                bitField0_ |= 0x00000400;
                break;
              } // case 80
            case 88:
              {
                installGpuDriver_ = input.readBool();
                bitField0_ |= 0x00000800;
                break;
              } // case 88
            case 98:
              {
                customGpuDriverPath_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00001000;
                break;
              } // case 98
            case 104:
              {
                bootDiskType_ = input.readEnum();
                bitField0_ |= 0x00002000;
                break;
              } // case 104
            case 112:
              {
                bootDiskSizeGb_ = input.readInt64();
                bitField0_ |= 0x00004000;
                break;
              } // case 112
            case 120:
              {
                diskEncryption_ = input.readEnum();
                bitField0_ |= 0x00040000;
                break;
              } // case 120
            case 130:
              {
                kmsKey_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00080000;
                break;
              } // case 130
            case 136:
              {
                noPublicIp_ = input.readBool();
                bitField0_ |= 0x00400000;
                break;
              } // case 136
            case 144:
              {
                noProxyAccess_ = input.readBool();
                bitField0_ |= 0x00800000;
                break;
              } // case 144
            case 154:
              {
                network_ = input.readStringRequireUtf8();
                bitField0_ |= 0x01000000;
                break;
              } // case 154
            case 162:
              {
                subnet_ = input.readStringRequireUtf8();
                bitField0_ |= 0x02000000;
                break;
              } // case 162
            case 170:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
                    input.readMessage(
                        LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableLabels()
                    .getMutableMap()
                    .put(labels__.getKey(), labels__.getValue());
                bitField0_ |= 0x04000000;
                break;
              } // case 170
            case 178:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ =
                    input.readMessage(
                        MetadataDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableMetadata()
                    .getMutableMap()
                    .put(metadata__.getKey(), metadata__.getValue());
                bitField0_ |= 0x08000000;
                break;
              } // case 178
            case 186:
              {
                input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField1_ |= 0x00000004;
                break;
              } // case 186
            case 194:
              {
                input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField1_ |= 0x00000008;
                break;
              } // case 194
            case 200:
              {
                dataDiskType_ = input.readEnum();
                bitField0_ |= 0x00008000;
                break;
              } // case 200
            case 208:
              {
                dataDiskSizeGb_ = input.readInt64();
                bitField0_ |= 0x00010000;
                break;
              } // case 208
            case 216:
              {
                noRemoveDataDisk_ = input.readBool();
                bitField0_ |= 0x00020000;
                break;
              } // case 216
            case 226:
              {
                com.google.cloud.notebooks.v1.Instance.Disk m =
                    input.readMessage(
                        com.google.cloud.notebooks.v1.Instance.Disk.parser(), extensionRegistry);
                if (disksBuilder_ == null) {
                  ensureDisksIsMutable();
                  disks_.add(m);
                } else {
                  disksBuilder_.addMessage(m);
                }
                break;
              } // case 226
            case 234:
              {
                com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry m =
                    input.readMessage(
                        com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.parser(),
                        extensionRegistry);
                if (upgradeHistoryBuilder_ == null) {
                  ensureUpgradeHistoryIsMutable();
                  upgradeHistory_.add(m);
                } else {
                  upgradeHistoryBuilder_.addMessage(m);
                }
                break;
              } // case 234
            case 242:
              {
                input.readMessage(
                    getShieldedInstanceConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00200000;
                break;
              } // case 242
            case 250:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureServiceAccountScopesIsMutable();
                serviceAccountScopes_.add(s);
                break;
              } // case 250
            case 258:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureTagsIsMutable();
                tags_.add(s);
                break;
              } // case 258
            case 264:
              {
                nicType_ = input.readEnum();
                bitField0_ |= 0x40000000;
                break;
              } // case 264
            case 274:
              {
                input.readMessage(
                    getReservationAffinityFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x80000000;
                break;
              } // case 274
            case 290:
              {
                creator_ = input.readStringRequireUtf8();
                bitField1_ |= 0x00000001;
                break;
              } // case 290
            case 312:
              {
                canIpForward_ = input.readBool();
                bitField1_ |= 0x00000002;
                break;
              } // case 312
            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 environmentCase_ = 0;
    private java.lang.Object environment_;

    public EnvironmentCase getEnvironmentCase() {
      return EnvironmentCase.forNumber(environmentCase_);
    }

    public Builder clearEnvironment() {
      environmentCase_ = 0;
      environment_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;
    private int bitField1_;

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The name of this notebook instance. Format:
     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
     * </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 this notebook instance. Format:
     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
     * </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 this notebook instance. Format:
     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
     * </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 this notebook instance. Format:
     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
     * </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 this notebook instance. Format:
     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
     * </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 com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.notebooks.v1.VmImage,
            com.google.cloud.notebooks.v1.VmImage.Builder,
            com.google.cloud.notebooks.v1.VmImageOrBuilder>
        vmImageBuilder_;
    /**
     *
     *
     * <pre>
     * Use a Compute Engine VM image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
     *
     * @return Whether the vmImage field is set.
     */
    @java.lang.Override
    public boolean hasVmImage() {
      return environmentCase_ == 2;
    }
    /**
     *
     *
     * <pre>
     * Use a Compute Engine VM image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
     *
     * @return The vmImage.
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.VmImage getVmImage() {
      if (vmImageBuilder_ == null) {
        if (environmentCase_ == 2) {
          return (com.google.cloud.notebooks.v1.VmImage) environment_;
        }
        return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance();
      } else {
        if (environmentCase_ == 2) {
          return vmImageBuilder_.getMessage();
        }
        return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Use a Compute Engine VM image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
     */
    public Builder setVmImage(com.google.cloud.notebooks.v1.VmImage value) {
      if (vmImageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        environment_ = value;
        onChanged();
      } else {
        vmImageBuilder_.setMessage(value);
      }
      environmentCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Use a Compute Engine VM image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
     */
    public Builder setVmImage(com.google.cloud.notebooks.v1.VmImage.Builder builderForValue) {
      if (vmImageBuilder_ == null) {
        environment_ = builderForValue.build();
        onChanged();
      } else {
        vmImageBuilder_.setMessage(builderForValue.build());
      }
      environmentCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Use a Compute Engine VM image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
     */
    public Builder mergeVmImage(com.google.cloud.notebooks.v1.VmImage value) {
      if (vmImageBuilder_ == null) {
        if (environmentCase_ == 2
            && environment_ != com.google.cloud.notebooks.v1.VmImage.getDefaultInstance()) {
          environment_ =
              com.google.cloud.notebooks.v1.VmImage.newBuilder(
                      (com.google.cloud.notebooks.v1.VmImage) environment_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          environment_ = value;
        }
        onChanged();
      } else {
        if (environmentCase_ == 2) {
          vmImageBuilder_.mergeFrom(value);
        } else {
          vmImageBuilder_.setMessage(value);
        }
      }
      environmentCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Use a Compute Engine VM image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
     */
    public Builder clearVmImage() {
      if (vmImageBuilder_ == null) {
        if (environmentCase_ == 2) {
          environmentCase_ = 0;
          environment_ = null;
          onChanged();
        }
      } else {
        if (environmentCase_ == 2) {
          environmentCase_ = 0;
          environment_ = null;
        }
        vmImageBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Use a Compute Engine VM image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
     */
    public com.google.cloud.notebooks.v1.VmImage.Builder getVmImageBuilder() {
      return getVmImageFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Use a Compute Engine VM image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder() {
      if ((environmentCase_ == 2) && (vmImageBuilder_ != null)) {
        return vmImageBuilder_.getMessageOrBuilder();
      } else {
        if (environmentCase_ == 2) {
          return (com.google.cloud.notebooks.v1.VmImage) environment_;
        }
        return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Use a Compute Engine VM image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.VmImage vm_image = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.notebooks.v1.VmImage,
            com.google.cloud.notebooks.v1.VmImage.Builder,
            com.google.cloud.notebooks.v1.VmImageOrBuilder>
        getVmImageFieldBuilder() {
      if (vmImageBuilder_ == null) {
        if (!(environmentCase_ == 2)) {
          environment_ = com.google.cloud.notebooks.v1.VmImage.getDefaultInstance();
        }
        vmImageBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.notebooks.v1.VmImage,
                com.google.cloud.notebooks.v1.VmImage.Builder,
                com.google.cloud.notebooks.v1.VmImageOrBuilder>(
                (com.google.cloud.notebooks.v1.VmImage) environment_,
                getParentForChildren(),
                isClean());
        environment_ = null;
      }
      environmentCase_ = 2;
      onChanged();
      return vmImageBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.notebooks.v1.ContainerImage,
            com.google.cloud.notebooks.v1.ContainerImage.Builder,
            com.google.cloud.notebooks.v1.ContainerImageOrBuilder>
        containerImageBuilder_;
    /**
     *
     *
     * <pre>
     * Use a container image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
     *
     * @return Whether the containerImage field is set.
     */
    @java.lang.Override
    public boolean hasContainerImage() {
      return environmentCase_ == 3;
    }
    /**
     *
     *
     * <pre>
     * Use a container image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
     *
     * @return The containerImage.
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.ContainerImage getContainerImage() {
      if (containerImageBuilder_ == null) {
        if (environmentCase_ == 3) {
          return (com.google.cloud.notebooks.v1.ContainerImage) environment_;
        }
        return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance();
      } else {
        if (environmentCase_ == 3) {
          return containerImageBuilder_.getMessage();
        }
        return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Use a container image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
     */
    public Builder setContainerImage(com.google.cloud.notebooks.v1.ContainerImage value) {
      if (containerImageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        environment_ = value;
        onChanged();
      } else {
        containerImageBuilder_.setMessage(value);
      }
      environmentCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Use a container image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
     */
    public Builder setContainerImage(
        com.google.cloud.notebooks.v1.ContainerImage.Builder builderForValue) {
      if (containerImageBuilder_ == null) {
        environment_ = builderForValue.build();
        onChanged();
      } else {
        containerImageBuilder_.setMessage(builderForValue.build());
      }
      environmentCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Use a container image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
     */
    public Builder mergeContainerImage(com.google.cloud.notebooks.v1.ContainerImage value) {
      if (containerImageBuilder_ == null) {
        if (environmentCase_ == 3
            && environment_ != com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance()) {
          environment_ =
              com.google.cloud.notebooks.v1.ContainerImage.newBuilder(
                      (com.google.cloud.notebooks.v1.ContainerImage) environment_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          environment_ = value;
        }
        onChanged();
      } else {
        if (environmentCase_ == 3) {
          containerImageBuilder_.mergeFrom(value);
        } else {
          containerImageBuilder_.setMessage(value);
        }
      }
      environmentCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Use a container image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
     */
    public Builder clearContainerImage() {
      if (containerImageBuilder_ == null) {
        if (environmentCase_ == 3) {
          environmentCase_ = 0;
          environment_ = null;
          onChanged();
        }
      } else {
        if (environmentCase_ == 3) {
          environmentCase_ = 0;
          environment_ = null;
        }
        containerImageBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Use a container image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
     */
    public com.google.cloud.notebooks.v1.ContainerImage.Builder getContainerImageBuilder() {
      return getContainerImageFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Use a container image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder() {
      if ((environmentCase_ == 3) && (containerImageBuilder_ != null)) {
        return containerImageBuilder_.getMessageOrBuilder();
      } else {
        if (environmentCase_ == 3) {
          return (com.google.cloud.notebooks.v1.ContainerImage) environment_;
        }
        return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Use a container image to start the notebook instance.
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.ContainerImage container_image = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.notebooks.v1.ContainerImage,
            com.google.cloud.notebooks.v1.ContainerImage.Builder,
            com.google.cloud.notebooks.v1.ContainerImageOrBuilder>
        getContainerImageFieldBuilder() {
      if (containerImageBuilder_ == null) {
        if (!(environmentCase_ == 3)) {
          environment_ = com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance();
        }
        containerImageBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.notebooks.v1.ContainerImage,
                com.google.cloud.notebooks.v1.ContainerImage.Builder,
                com.google.cloud.notebooks.v1.ContainerImageOrBuilder>(
                (com.google.cloud.notebooks.v1.ContainerImage) environment_,
                getParentForChildren(),
                isClean());
        environment_ = null;
      }
      environmentCase_ = 3;
      onChanged();
      return containerImageBuilder_;
    }

    private java.lang.Object postStartupScript_ = "";
    /**
     *
     *
     * <pre>
     * Path to a Bash script that automatically runs after a notebook instance
     * fully boots up. The path must be a URL or
     * Cloud Storage path (`gs://path-to-file/file-name`).
     * </pre>
     *
     * <code>string post_startup_script = 4;</code>
     *
     * @return The postStartupScript.
     */
    public java.lang.String getPostStartupScript() {
      java.lang.Object ref = postStartupScript_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        postStartupScript_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Path to a Bash script that automatically runs after a notebook instance
     * fully boots up. The path must be a URL or
     * Cloud Storage path (`gs://path-to-file/file-name`).
     * </pre>
     *
     * <code>string post_startup_script = 4;</code>
     *
     * @return The bytes for postStartupScript.
     */
    public com.google.protobuf.ByteString getPostStartupScriptBytes() {
      java.lang.Object ref = postStartupScript_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        postStartupScript_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Path to a Bash script that automatically runs after a notebook instance
     * fully boots up. The path must be a URL or
     * Cloud Storage path (`gs://path-to-file/file-name`).
     * </pre>
     *
     * <code>string post_startup_script = 4;</code>
     *
     * @param value The postStartupScript to set.
     * @return This builder for chaining.
     */
    public Builder setPostStartupScript(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      postStartupScript_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Path to a Bash script that automatically runs after a notebook instance
     * fully boots up. The path must be a URL or
     * Cloud Storage path (`gs://path-to-file/file-name`).
     * </pre>
     *
     * <code>string post_startup_script = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearPostStartupScript() {
      postStartupScript_ = getDefaultInstance().getPostStartupScript();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Path to a Bash script that automatically runs after a notebook instance
     * fully boots up. The path must be a URL or
     * Cloud Storage path (`gs://path-to-file/file-name`).
     * </pre>
     *
     * <code>string post_startup_script = 4;</code>
     *
     * @param value The bytes for postStartupScript to set.
     * @return This builder for chaining.
     */
    public Builder setPostStartupScriptBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      postStartupScript_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    private java.lang.Object proxyUri_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The proxy endpoint that is used to access the Jupyter notebook.
     * </pre>
     *
     * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The proxyUri.
     */
    public java.lang.String getProxyUri() {
      java.lang.Object ref = proxyUri_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        proxyUri_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The proxy endpoint that is used to access the Jupyter notebook.
     * </pre>
     *
     * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for proxyUri.
     */
    public com.google.protobuf.ByteString getProxyUriBytes() {
      java.lang.Object ref = proxyUri_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        proxyUri_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The proxy endpoint that is used to access the Jupyter notebook.
     * </pre>
     *
     * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The proxyUri to set.
     * @return This builder for chaining.
     */
    public Builder setProxyUri(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      proxyUri_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The proxy endpoint that is used to access the Jupyter notebook.
     * </pre>
     *
     * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearProxyUri() {
      proxyUri_ = getDefaultInstance().getProxyUri();
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The proxy endpoint that is used to access the Jupyter notebook.
     * </pre>
     *
     * <code>string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for proxyUri to set.
     * @return This builder for chaining.
     */
    public Builder setProxyUriBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      proxyUri_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList instanceOwners_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureInstanceOwnersIsMutable() {
      if (!((bitField0_ & 0x00000020) != 0)) {
        instanceOwners_ = new com.google.protobuf.LazyStringArrayList(instanceOwners_);
        bitField0_ |= 0x00000020;
      }
    }
    /**
     *
     *
     * <pre>
     * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
     * Currently supports one owner only. If not specified, all of the service
     * account users of your VM instance's service account can use
     * the instance.
     * </pre>
     *
     * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return A list containing the instanceOwners.
     */
    public com.google.protobuf.ProtocolStringList getInstanceOwnersList() {
      return instanceOwners_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
     * Currently supports one owner only. If not specified, all of the service
     * account users of your VM instance's service account can use
     * the instance.
     * </pre>
     *
     * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return The count of instanceOwners.
     */
    public int getInstanceOwnersCount() {
      return instanceOwners_.size();
    }
    /**
     *
     *
     * <pre>
     * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
     * Currently supports one owner only. If not specified, all of the service
     * account users of your VM instance's service account can use
     * the instance.
     * </pre>
     *
     * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @param index The index of the element to return.
     * @return The instanceOwners at the given index.
     */
    public java.lang.String getInstanceOwners(int index) {
      return instanceOwners_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
     * Currently supports one owner only. If not specified, all of the service
     * account users of your VM instance's service account can use
     * the instance.
     * </pre>
     *
     * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the instanceOwners at the given index.
     */
    public com.google.protobuf.ByteString getInstanceOwnersBytes(int index) {
      return instanceOwners_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
     * Currently supports one owner only. If not specified, all of the service
     * account users of your VM instance's service account can use
     * the instance.
     * </pre>
     *
     * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @param index The index to set the value at.
     * @param value The instanceOwners to set.
     * @return This builder for chaining.
     */
    public Builder setInstanceOwners(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureInstanceOwnersIsMutable();
      instanceOwners_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
     * Currently supports one owner only. If not specified, all of the service
     * account users of your VM instance's service account can use
     * the instance.
     * </pre>
     *
     * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @param value The instanceOwners to add.
     * @return This builder for chaining.
     */
    public Builder addInstanceOwners(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureInstanceOwnersIsMutable();
      instanceOwners_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
     * Currently supports one owner only. If not specified, all of the service
     * account users of your VM instance's service account can use
     * the instance.
     * </pre>
     *
     * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @param values The instanceOwners to add.
     * @return This builder for chaining.
     */
    public Builder addAllInstanceOwners(java.lang.Iterable<java.lang.String> values) {
      ensureInstanceOwnersIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instanceOwners_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
     * Currently supports one owner only. If not specified, all of the service
     * account users of your VM instance's service account can use
     * the instance.
     * </pre>
     *
     * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearInstanceOwners() {
      instanceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000020);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The owner of this instance after creation. Format: `alias&#64;example.com`
     * Currently supports one owner only. If not specified, all of the service
     * account users of your VM instance's service account can use
     * the instance.
     * </pre>
     *
     * <code>repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @param value The bytes of the instanceOwners to add.
     * @return This builder for chaining.
     */
    public Builder addInstanceOwnersBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureInstanceOwnersIsMutable();
      instanceOwners_.add(value);
      onChanged();
      return this;
    }

    private java.lang.Object serviceAccount_ = "";
    /**
     *
     *
     * <pre>
     * The service account on this instance, giving access to other Google
     * Cloud services.
     * You can use any service account within the same project, but you
     * must have the service account user permission to use the instance.
     * If not specified, the [Compute Engine default service
     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
     * is used.
     * </pre>
     *
     * <code>string service_account = 7;</code>
     *
     * @return The serviceAccount.
     */
    public java.lang.String getServiceAccount() {
      java.lang.Object ref = serviceAccount_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        serviceAccount_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The service account on this instance, giving access to other Google
     * Cloud services.
     * You can use any service account within the same project, but you
     * must have the service account user permission to use the instance.
     * If not specified, the [Compute Engine default service
     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
     * is used.
     * </pre>
     *
     * <code>string service_account = 7;</code>
     *
     * @return The bytes for serviceAccount.
     */
    public com.google.protobuf.ByteString getServiceAccountBytes() {
      java.lang.Object ref = serviceAccount_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        serviceAccount_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The service account on this instance, giving access to other Google
     * Cloud services.
     * You can use any service account within the same project, but you
     * must have the service account user permission to use the instance.
     * If not specified, the [Compute Engine default service
     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
     * is used.
     * </pre>
     *
     * <code>string service_account = 7;</code>
     *
     * @param value The serviceAccount to set.
     * @return This builder for chaining.
     */
    public Builder setServiceAccount(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      serviceAccount_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The service account on this instance, giving access to other Google
     * Cloud services.
     * You can use any service account within the same project, but you
     * must have the service account user permission to use the instance.
     * If not specified, the [Compute Engine default service
     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
     * is used.
     * </pre>
     *
     * <code>string service_account = 7;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearServiceAccount() {
      serviceAccount_ = getDefaultInstance().getServiceAccount();
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The service account on this instance, giving access to other Google
     * Cloud services.
     * You can use any service account within the same project, but you
     * must have the service account user permission to use the instance.
     * If not specified, the [Compute Engine default service
     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
     * is used.
     * </pre>
     *
     * <code>string service_account = 7;</code>
     *
     * @param value The bytes for serviceAccount to set.
     * @return This builder for chaining.
     */
    public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      serviceAccount_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList serviceAccountScopes_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureServiceAccountScopesIsMutable() {
      if (!((bitField0_ & 0x00000080) != 0)) {
        serviceAccountScopes_ = new com.google.protobuf.LazyStringArrayList(serviceAccountScopes_);
        bitField0_ |= 0x00000080;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The URIs of service account scopes to be included in
     * Compute Engine instances.
     * If not specified, the following
     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * are defined:
     *  - https://www.googleapis.com/auth/cloud-platform
     *  - https://www.googleapis.com/auth/userinfo.email
     * If not using default scopes, you need at least:
     *    https://www.googleapis.com/auth/compute
     * </pre>
     *
     * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return A list containing the serviceAccountScopes.
     */
    public com.google.protobuf.ProtocolStringList getServiceAccountScopesList() {
      return serviceAccountScopes_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * Optional. The URIs of service account scopes to be included in
     * Compute Engine instances.
     * If not specified, the following
     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * are defined:
     *  - https://www.googleapis.com/auth/cloud-platform
     *  - https://www.googleapis.com/auth/userinfo.email
     * If not using default scopes, you need at least:
     *    https://www.googleapis.com/auth/compute
     * </pre>
     *
     * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The count of serviceAccountScopes.
     */
    public int getServiceAccountScopesCount() {
      return serviceAccountScopes_.size();
    }
    /**
     *
     *
     * <pre>
     * Optional. The URIs of service account scopes to be included in
     * Compute Engine instances.
     * If not specified, the following
     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * are defined:
     *  - https://www.googleapis.com/auth/cloud-platform
     *  - https://www.googleapis.com/auth/userinfo.email
     * If not using default scopes, you need at least:
     *    https://www.googleapis.com/auth/compute
     * </pre>
     *
     * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @param index The index of the element to return.
     * @return The serviceAccountScopes at the given index.
     */
    public java.lang.String getServiceAccountScopes(int index) {
      return serviceAccountScopes_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. The URIs of service account scopes to be included in
     * Compute Engine instances.
     * If not specified, the following
     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * are defined:
     *  - https://www.googleapis.com/auth/cloud-platform
     *  - https://www.googleapis.com/auth/userinfo.email
     * If not using default scopes, you need at least:
     *    https://www.googleapis.com/auth/compute
     * </pre>
     *
     * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the serviceAccountScopes at the given index.
     */
    public com.google.protobuf.ByteString getServiceAccountScopesBytes(int index) {
      return serviceAccountScopes_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. The URIs of service account scopes to be included in
     * Compute Engine instances.
     * If not specified, the following
     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * are defined:
     *  - https://www.googleapis.com/auth/cloud-platform
     *  - https://www.googleapis.com/auth/userinfo.email
     * If not using default scopes, you need at least:
     *    https://www.googleapis.com/auth/compute
     * </pre>
     *
     * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @param index The index to set the value at.
     * @param value The serviceAccountScopes to set.
     * @return This builder for chaining.
     */
    public Builder setServiceAccountScopes(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureServiceAccountScopesIsMutable();
      serviceAccountScopes_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The URIs of service account scopes to be included in
     * Compute Engine instances.
     * If not specified, the following
     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * are defined:
     *  - https://www.googleapis.com/auth/cloud-platform
     *  - https://www.googleapis.com/auth/userinfo.email
     * If not using default scopes, you need at least:
     *    https://www.googleapis.com/auth/compute
     * </pre>
     *
     * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @param value The serviceAccountScopes to add.
     * @return This builder for chaining.
     */
    public Builder addServiceAccountScopes(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureServiceAccountScopesIsMutable();
      serviceAccountScopes_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The URIs of service account scopes to be included in
     * Compute Engine instances.
     * If not specified, the following
     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * are defined:
     *  - https://www.googleapis.com/auth/cloud-platform
     *  - https://www.googleapis.com/auth/userinfo.email
     * If not using default scopes, you need at least:
     *    https://www.googleapis.com/auth/compute
     * </pre>
     *
     * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @param values The serviceAccountScopes to add.
     * @return This builder for chaining.
     */
    public Builder addAllServiceAccountScopes(java.lang.Iterable<java.lang.String> values) {
      ensureServiceAccountScopesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceAccountScopes_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The URIs of service account scopes to be included in
     * Compute Engine instances.
     * If not specified, the following
     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * are defined:
     *  - https://www.googleapis.com/auth/cloud-platform
     *  - https://www.googleapis.com/auth/userinfo.email
     * If not using default scopes, you need at least:
     *    https://www.googleapis.com/auth/compute
     * </pre>
     *
     * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearServiceAccountScopes() {
      serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000080);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The URIs of service account scopes to be included in
     * Compute Engine instances.
     * If not specified, the following
     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
     * are defined:
     *  - https://www.googleapis.com/auth/cloud-platform
     *  - https://www.googleapis.com/auth/userinfo.email
     * If not using default scopes, you need at least:
     *    https://www.googleapis.com/auth/compute
     * </pre>
     *
     * <code>repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @param value The bytes of the serviceAccountScopes to add.
     * @return This builder for chaining.
     */
    public Builder addServiceAccountScopesBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureServiceAccountScopesIsMutable();
      serviceAccountScopes_.add(value);
      onChanged();
      return this;
    }

    private java.lang.Object machineType_ = "";
    /**
     *
     *
     * <pre>
     * Required. The [Compute Engine machine
     * type](https://cloud.google.com/compute/docs/machine-types) of this
     * instance.
     * </pre>
     *
     * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The machineType.
     */
    public java.lang.String getMachineType() {
      java.lang.Object ref = machineType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        machineType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The [Compute Engine machine
     * type](https://cloud.google.com/compute/docs/machine-types) of this
     * instance.
     * </pre>
     *
     * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for machineType.
     */
    public com.google.protobuf.ByteString getMachineTypeBytes() {
      java.lang.Object ref = machineType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        machineType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. The [Compute Engine machine
     * type](https://cloud.google.com/compute/docs/machine-types) of this
     * instance.
     * </pre>
     *
     * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param value The machineType to set.
     * @return This builder for chaining.
     */
    public Builder setMachineType(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      machineType_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The [Compute Engine machine
     * type](https://cloud.google.com/compute/docs/machine-types) of this
     * instance.
     * </pre>
     *
     * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearMachineType() {
      machineType_ = getDefaultInstance().getMachineType();
      bitField0_ = (bitField0_ & ~0x00000100);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The [Compute Engine machine
     * type](https://cloud.google.com/compute/docs/machine-types) of this
     * instance.
     * </pre>
     *
     * <code>string machine_type = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param value The bytes for machineType to set.
     * @return This builder for chaining.
     */
    public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      machineType_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }

    private com.google.cloud.notebooks.v1.Instance.AcceleratorConfig acceleratorConfig_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.notebooks.v1.Instance.AcceleratorConfig,
            com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder,
            com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder>
        acceleratorConfigBuilder_;
    /**
     *
     *
     * <pre>
     * The hardware accelerator used on this instance. If you use
     * accelerators, make sure that your configuration has
     * [enough vCPUs and memory to support the `machine_type` you have
     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
     *
     * @return Whether the acceleratorConfig field is set.
     */
    public boolean hasAcceleratorConfig() {
      return ((bitField0_ & 0x00000200) != 0);
    }
    /**
     *
     *
     * <pre>
     * The hardware accelerator used on this instance. If you use
     * accelerators, make sure that your configuration has
     * [enough vCPUs and memory to support the `machine_type` you have
     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
     *
     * @return The acceleratorConfig.
     */
    public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig getAcceleratorConfig() {
      if (acceleratorConfigBuilder_ == null) {
        return acceleratorConfig_ == null
            ? com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance()
            : acceleratorConfig_;
      } else {
        return acceleratorConfigBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The hardware accelerator used on this instance. If you use
     * accelerators, make sure that your configuration has
     * [enough vCPUs and memory to support the `machine_type` you have
     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
     */
    public Builder setAcceleratorConfig(
        com.google.cloud.notebooks.v1.Instance.AcceleratorConfig value) {
      if (acceleratorConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        acceleratorConfig_ = value;
      } else {
        acceleratorConfigBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The hardware accelerator used on this instance. If you use
     * accelerators, make sure that your configuration has
     * [enough vCPUs and memory to support the `machine_type` you have
     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
     */
    public Builder setAcceleratorConfig(
        com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder builderForValue) {
      if (acceleratorConfigBuilder_ == null) {
        acceleratorConfig_ = builderForValue.build();
      } else {
        acceleratorConfigBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The hardware accelerator used on this instance. If you use
     * accelerators, make sure that your configuration has
     * [enough vCPUs and memory to support the `machine_type` you have
     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
     */
    public Builder mergeAcceleratorConfig(
        com.google.cloud.notebooks.v1.Instance.AcceleratorConfig value) {
      if (acceleratorConfigBuilder_ == null) {
        if (((bitField0_ & 0x00000200) != 0)
            && acceleratorConfig_ != null
            && acceleratorConfig_
                != com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance()) {
          getAcceleratorConfigBuilder().mergeFrom(value);
        } else {
          acceleratorConfig_ = value;
        }
      } else {
        acceleratorConfigBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The hardware accelerator used on this instance. If you use
     * accelerators, make sure that your configuration has
     * [enough vCPUs and memory to support the `machine_type` you have
     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
     */
    public Builder clearAcceleratorConfig() {
      bitField0_ = (bitField0_ & ~0x00000200);
      acceleratorConfig_ = null;
      if (acceleratorConfigBuilder_ != null) {
        acceleratorConfigBuilder_.dispose();
        acceleratorConfigBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The hardware accelerator used on this instance. If you use
     * accelerators, make sure that your configuration has
     * [enough vCPUs and memory to support the `machine_type` you have
     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
     */
    public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder
        getAcceleratorConfigBuilder() {
      bitField0_ |= 0x00000200;
      onChanged();
      return getAcceleratorConfigFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The hardware accelerator used on this instance. If you use
     * accelerators, make sure that your configuration has
     * [enough vCPUs and memory to support the `machine_type` you have
     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
     */
    public com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder
        getAcceleratorConfigOrBuilder() {
      if (acceleratorConfigBuilder_ != null) {
        return acceleratorConfigBuilder_.getMessageOrBuilder();
      } else {
        return acceleratorConfig_ == null
            ? com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance()
            : acceleratorConfig_;
      }
    }
    /**
     *
     *
     * <pre>
     * The hardware accelerator used on this instance. If you use
     * accelerators, make sure that your configuration has
     * [enough vCPUs and memory to support the `machine_type` you have
     * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     * </pre>
     *
     * <code>.google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.notebooks.v1.Instance.AcceleratorConfig,
            com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder,
            com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder>
        getAcceleratorConfigFieldBuilder() {
      if (acceleratorConfigBuilder_ == null) {
        acceleratorConfigBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.notebooks.v1.Instance.AcceleratorConfig,
                com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder,
                com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder>(
                getAcceleratorConfig(), getParentForChildren(), isClean());
        acceleratorConfig_ = null;
      }
      return acceleratorConfigBuilder_;
    }

    private int state_ = 0;
    /**
     *
     *
     * <pre>
     * Output only. The state of this instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The enum numeric value on the wire for state.
     */
    @java.lang.Override
    public int getStateValue() {
      return state_;
    }
    /**
     *
     *
     * <pre>
     * Output only. The state of this instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </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_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The state of this instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The state.
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.State getState() {
      com.google.cloud.notebooks.v1.Instance.State result =
          com.google.cloud.notebooks.v1.Instance.State.forNumber(state_);
      return result == null ? com.google.cloud.notebooks.v1.Instance.State.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Output only. The state of this instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The state to set.
     * @return This builder for chaining.
     */
    public Builder setState(com.google.cloud.notebooks.v1.Instance.State value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000400;
      state_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The state of this instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearState() {
      bitField0_ = (bitField0_ & ~0x00000400);
      state_ = 0;
      onChanged();
      return this;
    }

    private boolean installGpuDriver_;
    /**
     *
     *
     * <pre>
     * Whether the end user authorizes Google Cloud to install GPU driver
     * on this instance.
     * If this field is empty or set to false, the GPU driver won't be installed.
     * Only applicable to instances with GPUs.
     * </pre>
     *
     * <code>bool install_gpu_driver = 11;</code>
     *
     * @return The installGpuDriver.
     */
    @java.lang.Override
    public boolean getInstallGpuDriver() {
      return installGpuDriver_;
    }
    /**
     *
     *
     * <pre>
     * Whether the end user authorizes Google Cloud to install GPU driver
     * on this instance.
     * If this field is empty or set to false, the GPU driver won't be installed.
     * Only applicable to instances with GPUs.
     * </pre>
     *
     * <code>bool install_gpu_driver = 11;</code>
     *
     * @param value The installGpuDriver to set.
     * @return This builder for chaining.
     */
    public Builder setInstallGpuDriver(boolean value) {

      installGpuDriver_ = value;
      bitField0_ |= 0x00000800;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Whether the end user authorizes Google Cloud to install GPU driver
     * on this instance.
     * If this field is empty or set to false, the GPU driver won't be installed.
     * Only applicable to instances with GPUs.
     * </pre>
     *
     * <code>bool install_gpu_driver = 11;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearInstallGpuDriver() {
      bitField0_ = (bitField0_ & ~0x00000800);
      installGpuDriver_ = false;
      onChanged();
      return this;
    }

    private java.lang.Object customGpuDriverPath_ = "";
    /**
     *
     *
     * <pre>
     * Specify a custom Cloud Storage path where the GPU driver is stored.
     * If not specified, we'll automatically choose from official GPU drivers.
     * </pre>
     *
     * <code>string custom_gpu_driver_path = 12;</code>
     *
     * @return The customGpuDriverPath.
     */
    public java.lang.String getCustomGpuDriverPath() {
      java.lang.Object ref = customGpuDriverPath_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        customGpuDriverPath_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Specify a custom Cloud Storage path where the GPU driver is stored.
     * If not specified, we'll automatically choose from official GPU drivers.
     * </pre>
     *
     * <code>string custom_gpu_driver_path = 12;</code>
     *
     * @return The bytes for customGpuDriverPath.
     */
    public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() {
      java.lang.Object ref = customGpuDriverPath_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        customGpuDriverPath_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Specify a custom Cloud Storage path where the GPU driver is stored.
     * If not specified, we'll automatically choose from official GPU drivers.
     * </pre>
     *
     * <code>string custom_gpu_driver_path = 12;</code>
     *
     * @param value The customGpuDriverPath to set.
     * @return This builder for chaining.
     */
    public Builder setCustomGpuDriverPath(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      customGpuDriverPath_ = value;
      bitField0_ |= 0x00001000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Specify a custom Cloud Storage path where the GPU driver is stored.
     * If not specified, we'll automatically choose from official GPU drivers.
     * </pre>
     *
     * <code>string custom_gpu_driver_path = 12;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearCustomGpuDriverPath() {
      customGpuDriverPath_ = getDefaultInstance().getCustomGpuDriverPath();
      bitField0_ = (bitField0_ & ~0x00001000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Specify a custom Cloud Storage path where the GPU driver is stored.
     * If not specified, we'll automatically choose from official GPU drivers.
     * </pre>
     *
     * <code>string custom_gpu_driver_path = 12;</code>
     *
     * @param value The bytes for customGpuDriverPath to set.
     * @return This builder for chaining.
     */
    public Builder setCustomGpuDriverPathBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      customGpuDriverPath_ = value;
      bitField0_ |= 0x00001000;
      onChanged();
      return this;
    }

    private int bootDiskType_ = 0;
    /**
     *
     *
     * <pre>
     * Input only. The type of the boot disk attached to this instance, defaults to
     * standard persistent disk (`PD_STANDARD`).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @return The enum numeric value on the wire for bootDiskType.
     */
    @java.lang.Override
    public int getBootDiskTypeValue() {
      return bootDiskType_;
    }
    /**
     *
     *
     * <pre>
     * Input only. The type of the boot disk attached to this instance, defaults to
     * standard persistent disk (`PD_STANDARD`).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @param value The enum numeric value on the wire for bootDiskType to set.
     * @return This builder for chaining.
     */
    public Builder setBootDiskTypeValue(int value) {
      bootDiskType_ = value;
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The type of the boot disk attached to this instance, defaults to
     * standard persistent disk (`PD_STANDARD`).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @return The bootDiskType.
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.DiskType getBootDiskType() {
      com.google.cloud.notebooks.v1.Instance.DiskType result =
          com.google.cloud.notebooks.v1.Instance.DiskType.forNumber(bootDiskType_);
      return result == null ? com.google.cloud.notebooks.v1.Instance.DiskType.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Input only. The type of the boot disk attached to this instance, defaults to
     * standard persistent disk (`PD_STANDARD`).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @param value The bootDiskType to set.
     * @return This builder for chaining.
     */
    public Builder setBootDiskType(com.google.cloud.notebooks.v1.Instance.DiskType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00002000;
      bootDiskType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The type of the boot disk attached to this instance, defaults to
     * standard persistent disk (`PD_STANDARD`).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearBootDiskType() {
      bitField0_ = (bitField0_ & ~0x00002000);
      bootDiskType_ = 0;
      onChanged();
      return this;
    }

    private long bootDiskSizeGb_;
    /**
     *
     *
     * <pre>
     * Input only. The size of the boot disk in GB attached to this instance, up to a maximum
     * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not
     * specified, this defaults to 100.
     * </pre>
     *
     * <code>int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return The bootDiskSizeGb.
     */
    @java.lang.Override
    public long getBootDiskSizeGb() {
      return bootDiskSizeGb_;
    }
    /**
     *
     *
     * <pre>
     * Input only. The size of the boot disk in GB attached to this instance, up to a maximum
     * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not
     * specified, this defaults to 100.
     * </pre>
     *
     * <code>int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @param value The bootDiskSizeGb to set.
     * @return This builder for chaining.
     */
    public Builder setBootDiskSizeGb(long value) {

      bootDiskSizeGb_ = value;
      bitField0_ |= 0x00004000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The size of the boot disk in GB attached to this instance, up to a maximum
     * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not
     * specified, this defaults to 100.
     * </pre>
     *
     * <code>int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearBootDiskSizeGb() {
      bitField0_ = (bitField0_ & ~0x00004000);
      bootDiskSizeGb_ = 0L;
      onChanged();
      return this;
    }

    private int dataDiskType_ = 0;
    /**
     *
     *
     * <pre>
     * Input only. The type of the data disk attached to this instance, defaults to
     * standard persistent disk (`PD_STANDARD`).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @return The enum numeric value on the wire for dataDiskType.
     */
    @java.lang.Override
    public int getDataDiskTypeValue() {
      return dataDiskType_;
    }
    /**
     *
     *
     * <pre>
     * Input only. The type of the data disk attached to this instance, defaults to
     * standard persistent disk (`PD_STANDARD`).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @param value The enum numeric value on the wire for dataDiskType to set.
     * @return This builder for chaining.
     */
    public Builder setDataDiskTypeValue(int value) {
      dataDiskType_ = value;
      bitField0_ |= 0x00008000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The type of the data disk attached to this instance, defaults to
     * standard persistent disk (`PD_STANDARD`).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @return The dataDiskType.
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.DiskType getDataDiskType() {
      com.google.cloud.notebooks.v1.Instance.DiskType result =
          com.google.cloud.notebooks.v1.Instance.DiskType.forNumber(dataDiskType_);
      return result == null ? com.google.cloud.notebooks.v1.Instance.DiskType.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Input only. The type of the data disk attached to this instance, defaults to
     * standard persistent disk (`PD_STANDARD`).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @param value The dataDiskType to set.
     * @return This builder for chaining.
     */
    public Builder setDataDiskType(com.google.cloud.notebooks.v1.Instance.DiskType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00008000;
      dataDiskType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The type of the data disk attached to this instance, defaults to
     * standard persistent disk (`PD_STANDARD`).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDataDiskType() {
      bitField0_ = (bitField0_ & ~0x00008000);
      dataDiskType_ = 0;
      onChanged();
      return this;
    }

    private long dataDiskSizeGb_;
    /**
     *
     *
     * <pre>
     * Input only. The size of the data disk in GB attached to this instance, up to a maximum
     * of 64000 GB (64 TB). You can choose the size of the data disk based on how
     * big your notebooks and data are. If not specified, this defaults to 100.
     * </pre>
     *
     * <code>int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return The dataDiskSizeGb.
     */
    @java.lang.Override
    public long getDataDiskSizeGb() {
      return dataDiskSizeGb_;
    }
    /**
     *
     *
     * <pre>
     * Input only. The size of the data disk in GB attached to this instance, up to a maximum
     * of 64000 GB (64 TB). You can choose the size of the data disk based on how
     * big your notebooks and data are. If not specified, this defaults to 100.
     * </pre>
     *
     * <code>int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @param value The dataDiskSizeGb to set.
     * @return This builder for chaining.
     */
    public Builder setDataDiskSizeGb(long value) {

      dataDiskSizeGb_ = value;
      bitField0_ |= 0x00010000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The size of the data disk in GB attached to this instance, up to a maximum
     * of 64000 GB (64 TB). You can choose the size of the data disk based on how
     * big your notebooks and data are. If not specified, this defaults to 100.
     * </pre>
     *
     * <code>int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDataDiskSizeGb() {
      bitField0_ = (bitField0_ & ~0x00010000);
      dataDiskSizeGb_ = 0L;
      onChanged();
      return this;
    }

    private boolean noRemoveDataDisk_;
    /**
     *
     *
     * <pre>
     * Input only. If true, the data disk will not be auto deleted when deleting the instance.
     * </pre>
     *
     * <code>bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return The noRemoveDataDisk.
     */
    @java.lang.Override
    public boolean getNoRemoveDataDisk() {
      return noRemoveDataDisk_;
    }
    /**
     *
     *
     * <pre>
     * Input only. If true, the data disk will not be auto deleted when deleting the instance.
     * </pre>
     *
     * <code>bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @param value The noRemoveDataDisk to set.
     * @return This builder for chaining.
     */
    public Builder setNoRemoveDataDisk(boolean value) {

      noRemoveDataDisk_ = value;
      bitField0_ |= 0x00020000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. If true, the data disk will not be auto deleted when deleting the instance.
     * </pre>
     *
     * <code>bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearNoRemoveDataDisk() {
      bitField0_ = (bitField0_ & ~0x00020000);
      noRemoveDataDisk_ = false;
      onChanged();
      return this;
    }

    private int diskEncryption_ = 0;
    /**
     *
     *
     * <pre>
     * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @return The enum numeric value on the wire for diskEncryption.
     */
    @java.lang.Override
    public int getDiskEncryptionValue() {
      return diskEncryption_;
    }
    /**
     *
     *
     * <pre>
     * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @param value The enum numeric value on the wire for diskEncryption to set.
     * @return This builder for chaining.
     */
    public Builder setDiskEncryptionValue(int value) {
      diskEncryption_ = value;
      bitField0_ |= 0x00040000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @return The diskEncryption.
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.DiskEncryption getDiskEncryption() {
      com.google.cloud.notebooks.v1.Instance.DiskEncryption result =
          com.google.cloud.notebooks.v1.Instance.DiskEncryption.forNumber(diskEncryption_);
      return result == null
          ? com.google.cloud.notebooks.v1.Instance.DiskEncryption.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @param value The diskEncryption to set.
     * @return This builder for chaining.
     */
    public Builder setDiskEncryption(com.google.cloud.notebooks.v1.Instance.DiskEncryption value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00040000;
      diskEncryption_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDiskEncryption() {
      bitField0_ = (bitField0_ & ~0x00040000);
      diskEncryption_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object kmsKey_ = "";
    /**
     *
     *
     * <pre>
     * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
     * is CMEK.
     * Format:
     * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
     * Learn more about [using your own encryption keys](/kms/docs/quickstart).
     * </pre>
     *
     * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return The kmsKey.
     */
    public java.lang.String getKmsKey() {
      java.lang.Object ref = kmsKey_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        kmsKey_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
     * is CMEK.
     * Format:
     * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
     * Learn more about [using your own encryption keys](/kms/docs/quickstart).
     * </pre>
     *
     * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return The bytes for kmsKey.
     */
    public com.google.protobuf.ByteString getKmsKeyBytes() {
      java.lang.Object ref = kmsKey_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        kmsKey_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
     * is CMEK.
     * Format:
     * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
     * Learn more about [using your own encryption keys](/kms/docs/quickstart).
     * </pre>
     *
     * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @param value The kmsKey to set.
     * @return This builder for chaining.
     */
    public Builder setKmsKey(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      kmsKey_ = value;
      bitField0_ |= 0x00080000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
     * is CMEK.
     * Format:
     * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
     * Learn more about [using your own encryption keys](/kms/docs/quickstart).
     * </pre>
     *
     * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearKmsKey() {
      kmsKey_ = getDefaultInstance().getKmsKey();
      bitField0_ = (bitField0_ & ~0x00080000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
     * is CMEK.
     * Format:
     * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
     * Learn more about [using your own encryption keys](/kms/docs/quickstart).
     * </pre>
     *
     * <code>string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     *
     * @param value The bytes for kmsKey to set.
     * @return This builder for chaining.
     */
    public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      kmsKey_ = value;
      bitField0_ |= 0x00080000;
      onChanged();
      return this;
    }

    private java.util.List<com.google.cloud.notebooks.v1.Instance.Disk> disks_ =
        java.util.Collections.emptyList();

    private void ensureDisksIsMutable() {
      if (!((bitField0_ & 0x00100000) != 0)) {
        disks_ = new java.util.ArrayList<com.google.cloud.notebooks.v1.Instance.Disk>(disks_);
        bitField0_ |= 0x00100000;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.notebooks.v1.Instance.Disk,
            com.google.cloud.notebooks.v1.Instance.Disk.Builder,
            com.google.cloud.notebooks.v1.Instance.DiskOrBuilder>
        disksBuilder_;

    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<com.google.cloud.notebooks.v1.Instance.Disk> getDisksList() {
      if (disksBuilder_ == null) {
        return java.util.Collections.unmodifiableList(disks_);
      } else {
        return disksBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public int getDisksCount() {
      if (disksBuilder_ == null) {
        return disks_.size();
      } else {
        return disksBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.Disk getDisks(int index) {
      if (disksBuilder_ == null) {
        return disks_.get(index);
      } else {
        return disksBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setDisks(int index, com.google.cloud.notebooks.v1.Instance.Disk value) {
      if (disksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDisksIsMutable();
        disks_.set(index, value);
        onChanged();
      } else {
        disksBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setDisks(
        int index, com.google.cloud.notebooks.v1.Instance.Disk.Builder builderForValue) {
      if (disksBuilder_ == null) {
        ensureDisksIsMutable();
        disks_.set(index, builderForValue.build());
        onChanged();
      } else {
        disksBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addDisks(com.google.cloud.notebooks.v1.Instance.Disk value) {
      if (disksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDisksIsMutable();
        disks_.add(value);
        onChanged();
      } else {
        disksBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addDisks(int index, com.google.cloud.notebooks.v1.Instance.Disk value) {
      if (disksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDisksIsMutable();
        disks_.add(index, value);
        onChanged();
      } else {
        disksBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addDisks(com.google.cloud.notebooks.v1.Instance.Disk.Builder builderForValue) {
      if (disksBuilder_ == null) {
        ensureDisksIsMutable();
        disks_.add(builderForValue.build());
        onChanged();
      } else {
        disksBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addDisks(
        int index, com.google.cloud.notebooks.v1.Instance.Disk.Builder builderForValue) {
      if (disksBuilder_ == null) {
        ensureDisksIsMutable();
        disks_.add(index, builderForValue.build());
        onChanged();
      } else {
        disksBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addAllDisks(
        java.lang.Iterable<? extends com.google.cloud.notebooks.v1.Instance.Disk> values) {
      if (disksBuilder_ == null) {
        ensureDisksIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, disks_);
        onChanged();
      } else {
        disksBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearDisks() {
      if (disksBuilder_ == null) {
        disks_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00100000);
        onChanged();
      } else {
        disksBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder removeDisks(int index) {
      if (disksBuilder_ == null) {
        ensureDisksIsMutable();
        disks_.remove(index);
        onChanged();
      } else {
        disksBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.Disk.Builder getDisksBuilder(int index) {
      return getDisksFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.DiskOrBuilder getDisksOrBuilder(int index) {
      if (disksBuilder_ == null) {
        return disks_.get(index);
      } else {
        return disksBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<? extends com.google.cloud.notebooks.v1.Instance.DiskOrBuilder>
        getDisksOrBuilderList() {
      if (disksBuilder_ != null) {
        return disksBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(disks_);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.Disk.Builder addDisksBuilder() {
      return getDisksFieldBuilder()
          .addBuilder(com.google.cloud.notebooks.v1.Instance.Disk.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.Disk.Builder addDisksBuilder(int index) {
      return getDisksFieldBuilder()
          .addBuilder(index, com.google.cloud.notebooks.v1.Instance.Disk.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Output only. Attached disks to notebook instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<com.google.cloud.notebooks.v1.Instance.Disk.Builder>
        getDisksBuilderList() {
      return getDisksFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.notebooks.v1.Instance.Disk,
            com.google.cloud.notebooks.v1.Instance.Disk.Builder,
            com.google.cloud.notebooks.v1.Instance.DiskOrBuilder>
        getDisksFieldBuilder() {
      if (disksBuilder_ == null) {
        disksBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.notebooks.v1.Instance.Disk,
                com.google.cloud.notebooks.v1.Instance.Disk.Builder,
                com.google.cloud.notebooks.v1.Instance.DiskOrBuilder>(
                disks_, ((bitField0_ & 0x00100000) != 0), getParentForChildren(), isClean());
        disks_ = null;
      }
      return disksBuilder_;
    }

    private com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shieldedInstanceConfig_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig,
            com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder,
            com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder>
        shieldedInstanceConfigBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. Shielded VM configuration.
     * [Images using supported Shielded VM
     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the shieldedInstanceConfig field is set.
     */
    public boolean hasShieldedInstanceConfig() {
      return ((bitField0_ & 0x00200000) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. Shielded VM configuration.
     * [Images using supported Shielded VM
     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The shieldedInstanceConfig.
     */
    public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig
        getShieldedInstanceConfig() {
      if (shieldedInstanceConfigBuilder_ == null) {
        return shieldedInstanceConfig_ == null
            ? com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance()
            : shieldedInstanceConfig_;
      } else {
        return shieldedInstanceConfigBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. Shielded VM configuration.
     * [Images using supported Shielded VM
     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setShieldedInstanceConfig(
        com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig value) {
      if (shieldedInstanceConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        shieldedInstanceConfig_ = value;
      } else {
        shieldedInstanceConfigBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00200000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Shielded VM configuration.
     * [Images using supported Shielded VM
     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setShieldedInstanceConfig(
        com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder builderForValue) {
      if (shieldedInstanceConfigBuilder_ == null) {
        shieldedInstanceConfig_ = builderForValue.build();
      } else {
        shieldedInstanceConfigBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00200000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Shielded VM configuration.
     * [Images using supported Shielded VM
     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergeShieldedInstanceConfig(
        com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig value) {
      if (shieldedInstanceConfigBuilder_ == null) {
        if (((bitField0_ & 0x00200000) != 0)
            && shieldedInstanceConfig_ != null
            && shieldedInstanceConfig_
                != com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig
                    .getDefaultInstance()) {
          getShieldedInstanceConfigBuilder().mergeFrom(value);
        } else {
          shieldedInstanceConfig_ = value;
        }
      } else {
        shieldedInstanceConfigBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00200000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Shielded VM configuration.
     * [Images using supported Shielded VM
     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearShieldedInstanceConfig() {
      bitField0_ = (bitField0_ & ~0x00200000);
      shieldedInstanceConfig_ = null;
      if (shieldedInstanceConfigBuilder_ != null) {
        shieldedInstanceConfigBuilder_.dispose();
        shieldedInstanceConfigBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Shielded VM configuration.
     * [Images using supported Shielded VM
     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder
        getShieldedInstanceConfigBuilder() {
      bitField0_ |= 0x00200000;
      onChanged();
      return getShieldedInstanceConfigFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. Shielded VM configuration.
     * [Images using supported Shielded VM
     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder
        getShieldedInstanceConfigOrBuilder() {
      if (shieldedInstanceConfigBuilder_ != null) {
        return shieldedInstanceConfigBuilder_.getMessageOrBuilder();
      } else {
        return shieldedInstanceConfig_ == null
            ? com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance()
            : shieldedInstanceConfig_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. Shielded VM configuration.
     * [Images using supported Shielded VM
     * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig,
            com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder,
            com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder>
        getShieldedInstanceConfigFieldBuilder() {
      if (shieldedInstanceConfigBuilder_ == null) {
        shieldedInstanceConfigBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig,
                com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder,
                com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder>(
                getShieldedInstanceConfig(), getParentForChildren(), isClean());
        shieldedInstanceConfig_ = null;
      }
      return shieldedInstanceConfigBuilder_;
    }

    private boolean noPublicIp_;
    /**
     *
     *
     * <pre>
     * If true, no public IP will be assigned to this instance.
     * </pre>
     *
     * <code>bool no_public_ip = 17;</code>
     *
     * @return The noPublicIp.
     */
    @java.lang.Override
    public boolean getNoPublicIp() {
      return noPublicIp_;
    }
    /**
     *
     *
     * <pre>
     * If true, no public IP will be assigned to this instance.
     * </pre>
     *
     * <code>bool no_public_ip = 17;</code>
     *
     * @param value The noPublicIp to set.
     * @return This builder for chaining.
     */
    public Builder setNoPublicIp(boolean value) {

      noPublicIp_ = value;
      bitField0_ |= 0x00400000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * If true, no public IP will be assigned to this instance.
     * </pre>
     *
     * <code>bool no_public_ip = 17;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearNoPublicIp() {
      bitField0_ = (bitField0_ & ~0x00400000);
      noPublicIp_ = false;
      onChanged();
      return this;
    }

    private boolean noProxyAccess_;
    /**
     *
     *
     * <pre>
     * If true, the notebook instance will not register with the proxy.
     * </pre>
     *
     * <code>bool no_proxy_access = 18;</code>
     *
     * @return The noProxyAccess.
     */
    @java.lang.Override
    public boolean getNoProxyAccess() {
      return noProxyAccess_;
    }
    /**
     *
     *
     * <pre>
     * If true, the notebook instance will not register with the proxy.
     * </pre>
     *
     * <code>bool no_proxy_access = 18;</code>
     *
     * @param value The noProxyAccess to set.
     * @return This builder for chaining.
     */
    public Builder setNoProxyAccess(boolean value) {

      noProxyAccess_ = value;
      bitField0_ |= 0x00800000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * If true, the notebook instance will not register with the proxy.
     * </pre>
     *
     * <code>bool no_proxy_access = 18;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearNoProxyAccess() {
      bitField0_ = (bitField0_ & ~0x00800000);
      noProxyAccess_ = false;
      onChanged();
      return this;
    }

    private java.lang.Object network_ = "";
    /**
     *
     *
     * <pre>
     * The name of the VPC that this instance is in.
     * Format:
     * `projects/{project_id}/global/networks/{network_id}`
     * </pre>
     *
     * <code>string network = 19;</code>
     *
     * @return The network.
     */
    public java.lang.String getNetwork() {
      java.lang.Object ref = network_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        network_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the VPC that this instance is in.
     * Format:
     * `projects/{project_id}/global/networks/{network_id}`
     * </pre>
     *
     * <code>string network = 19;</code>
     *
     * @return The bytes for network.
     */
    public com.google.protobuf.ByteString getNetworkBytes() {
      java.lang.Object ref = network_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        network_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the VPC that this instance is in.
     * Format:
     * `projects/{project_id}/global/networks/{network_id}`
     * </pre>
     *
     * <code>string network = 19;</code>
     *
     * @param value The network to set.
     * @return This builder for chaining.
     */
    public Builder setNetwork(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      network_ = value;
      bitField0_ |= 0x01000000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the VPC that this instance is in.
     * Format:
     * `projects/{project_id}/global/networks/{network_id}`
     * </pre>
     *
     * <code>string network = 19;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearNetwork() {
      network_ = getDefaultInstance().getNetwork();
      bitField0_ = (bitField0_ & ~0x01000000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the VPC that this instance is in.
     * Format:
     * `projects/{project_id}/global/networks/{network_id}`
     * </pre>
     *
     * <code>string network = 19;</code>
     *
     * @param value The bytes for network to set.
     * @return This builder for chaining.
     */
    public Builder setNetworkBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      network_ = value;
      bitField0_ |= 0x01000000;
      onChanged();
      return this;
    }

    private java.lang.Object subnet_ = "";
    /**
     *
     *
     * <pre>
     * The name of the subnet that this instance is in.
     * Format:
     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
     * </pre>
     *
     * <code>string subnet = 20;</code>
     *
     * @return The subnet.
     */
    public java.lang.String getSubnet() {
      java.lang.Object ref = subnet_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        subnet_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the subnet that this instance is in.
     * Format:
     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
     * </pre>
     *
     * <code>string subnet = 20;</code>
     *
     * @return The bytes for subnet.
     */
    public com.google.protobuf.ByteString getSubnetBytes() {
      java.lang.Object ref = subnet_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        subnet_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the subnet that this instance is in.
     * Format:
     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
     * </pre>
     *
     * <code>string subnet = 20;</code>
     *
     * @param value The subnet to set.
     * @return This builder for chaining.
     */
    public Builder setSubnet(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      subnet_ = value;
      bitField0_ |= 0x02000000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the subnet that this instance is in.
     * Format:
     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
     * </pre>
     *
     * <code>string subnet = 20;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSubnet() {
      subnet_ = getDefaultInstance().getSubnet();
      bitField0_ = (bitField0_ & ~0x02000000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the subnet that this instance is in.
     * Format:
     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
     * </pre>
     *
     * <code>string subnet = 20;</code>
     *
     * @param value The bytes for subnet to set.
     * @return This builder for chaining.
     */
    public Builder setSubnetBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      subnet_ = value;
      bitField0_ |= 0x02000000;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
      if (labels_ == null) {
        return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      return labels_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableLabels() {
      if (labels_ == null) {
        labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      if (!labels_.isMutable()) {
        labels_ = labels_.copy();
      }
      bitField0_ |= 0x04000000;
      onChanged();
      return labels_;
    }

    public int getLabelsCount() {
      return internalGetLabels().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Labels to apply to this instance.
     * These can be later modified by the setLabels method.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 21;</code>
     */
    @java.lang.Override
    public boolean containsLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetLabels().getMap().containsKey(key);
    }
    /** Use {@link #getLabelsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getLabels() {
      return getLabelsMap();
    }
    /**
     *
     *
     * <pre>
     * Labels to apply to this instance.
     * These can be later modified by the setLabels method.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 21;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
      return internalGetLabels().getMap();
    }
    /**
     *
     *
     * <pre>
     * Labels to apply to this instance.
     * These can be later modified by the setLabels method.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 21;</code>
     */
    @java.lang.Override
    public /* nullable */ java.lang.String getLabelsOrDefault(
        java.lang.String key,
        /* nullable */
        java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Labels to apply to this instance.
     * These can be later modified by the setLabels method.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 21;</code>
     */
    @java.lang.Override
    public java.lang.String getLabelsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearLabels() {
      bitField0_ = (bitField0_ & ~0x04000000);
      internalGetMutableLabels().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Labels to apply to this instance.
     * These can be later modified by the setLabels method.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 21;</code>
     */
    public Builder removeLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableLabels().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
      bitField0_ |= 0x04000000;
      return internalGetMutableLabels().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Labels to apply to this instance.
     * These can be later modified by the setLabels method.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 21;</code>
     */
    public Builder putLabels(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableLabels().getMutableMap().put(key, value);
      bitField0_ |= 0x04000000;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Labels to apply to this instance.
     * These can be later modified by the setLabels method.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 21;</code>
     */
    public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableLabels().getMutableMap().putAll(values);
      bitField0_ |= 0x04000000;
      return this;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> metadata_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() {
      if (metadata_ == null) {
        return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry);
      }
      return metadata_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableMetadata() {
      if (metadata_ == null) {
        metadata_ =
            com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry);
      }
      if (!metadata_.isMutable()) {
        metadata_ = metadata_.copy();
      }
      bitField0_ |= 0x08000000;
      onChanged();
      return metadata_;
    }

    public int getMetadataCount() {
      return internalGetMetadata().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Custom metadata to apply to this instance.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 22;</code>
     */
    @java.lang.Override
    public boolean containsMetadata(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetMetadata().getMap().containsKey(key);
    }
    /** Use {@link #getMetadataMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMetadata() {
      return getMetadataMap();
    }
    /**
     *
     *
     * <pre>
     * Custom metadata to apply to this instance.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 22;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() {
      return internalGetMetadata().getMap();
    }
    /**
     *
     *
     * <pre>
     * Custom metadata to apply to this instance.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 22;</code>
     */
    @java.lang.Override
    public /* nullable */ java.lang.String getMetadataOrDefault(
        java.lang.String key,
        /* nullable */
        java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Custom metadata to apply to this instance.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 22;</code>
     */
    @java.lang.Override
    public java.lang.String getMetadataOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearMetadata() {
      bitField0_ = (bitField0_ & ~0x08000000);
      internalGetMutableMetadata().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Custom metadata to apply to this instance.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 22;</code>
     */
    public Builder removeMetadata(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableMetadata().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableMetadata() {
      bitField0_ |= 0x08000000;
      return internalGetMutableMetadata().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Custom metadata to apply to this instance.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 22;</code>
     */
    public Builder putMetadata(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableMetadata().getMutableMap().put(key, value);
      bitField0_ |= 0x08000000;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Custom metadata to apply to this instance.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 22;</code>
     */
    public Builder putAllMetadata(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableMetadata().getMutableMap().putAll(values);
      bitField0_ |= 0x08000000;
      return this;
    }

    private com.google.protobuf.LazyStringList tags_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureTagsIsMutable() {
      if (!((bitField0_ & 0x10000000) != 0)) {
        tags_ = new com.google.protobuf.LazyStringArrayList(tags_);
        bitField0_ |= 0x10000000;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The Compute Engine tags to add to runtime (see [Tagging
     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     * </pre>
     *
     * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return A list containing the tags.
     */
    public com.google.protobuf.ProtocolStringList getTagsList() {
      return tags_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * Optional. The Compute Engine tags to add to runtime (see [Tagging
     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     * </pre>
     *
     * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The count of tags.
     */
    public int getTagsCount() {
      return tags_.size();
    }
    /**
     *
     *
     * <pre>
     * Optional. The Compute Engine tags to add to runtime (see [Tagging
     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     * </pre>
     *
     * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param index The index of the element to return.
     * @return The tags at the given index.
     */
    public java.lang.String getTags(int index) {
      return tags_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. The Compute Engine tags to add to runtime (see [Tagging
     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     * </pre>
     *
     * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the tags at the given index.
     */
    public com.google.protobuf.ByteString getTagsBytes(int index) {
      return tags_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. The Compute Engine tags to add to runtime (see [Tagging
     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     * </pre>
     *
     * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param index The index to set the value at.
     * @param value The tags to set.
     * @return This builder for chaining.
     */
    public Builder setTags(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTagsIsMutable();
      tags_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The Compute Engine tags to add to runtime (see [Tagging
     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     * </pre>
     *
     * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The tags to add.
     * @return This builder for chaining.
     */
    public Builder addTags(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTagsIsMutable();
      tags_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The Compute Engine tags to add to runtime (see [Tagging
     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     * </pre>
     *
     * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param values The tags to add.
     * @return This builder for chaining.
     */
    public Builder addAllTags(java.lang.Iterable<java.lang.String> values) {
      ensureTagsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The Compute Engine tags to add to runtime (see [Tagging
     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     * </pre>
     *
     * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearTags() {
      tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x10000000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The Compute Engine tags to add to runtime (see [Tagging
     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     * </pre>
     *
     * <code>repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The bytes of the tags to add.
     * @return This builder for chaining.
     */
    public Builder addTagsBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureTagsIsMutable();
      tags_.add(value);
      onChanged();
      return this;
    }

    private java.util.List<com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry>
        upgradeHistory_ = java.util.Collections.emptyList();

    private void ensureUpgradeHistoryIsMutable() {
      if (!((bitField0_ & 0x20000000) != 0)) {
        upgradeHistory_ =
            new java.util.ArrayList<com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry>(
                upgradeHistory_);
        bitField0_ |= 0x20000000;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry,
            com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder,
            com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder>
        upgradeHistoryBuilder_;

    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public java.util.List<com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry>
        getUpgradeHistoryList() {
      if (upgradeHistoryBuilder_ == null) {
        return java.util.Collections.unmodifiableList(upgradeHistory_);
      } else {
        return upgradeHistoryBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public int getUpgradeHistoryCount() {
      if (upgradeHistoryBuilder_ == null) {
        return upgradeHistory_.size();
      } else {
        return upgradeHistoryBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getUpgradeHistory(int index) {
      if (upgradeHistoryBuilder_ == null) {
        return upgradeHistory_.get(index);
      } else {
        return upgradeHistoryBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public Builder setUpgradeHistory(
        int index, com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry value) {
      if (upgradeHistoryBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureUpgradeHistoryIsMutable();
        upgradeHistory_.set(index, value);
        onChanged();
      } else {
        upgradeHistoryBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public Builder setUpgradeHistory(
        int index,
        com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder builderForValue) {
      if (upgradeHistoryBuilder_ == null) {
        ensureUpgradeHistoryIsMutable();
        upgradeHistory_.set(index, builderForValue.build());
        onChanged();
      } else {
        upgradeHistoryBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public Builder addUpgradeHistory(
        com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry value) {
      if (upgradeHistoryBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureUpgradeHistoryIsMutable();
        upgradeHistory_.add(value);
        onChanged();
      } else {
        upgradeHistoryBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public Builder addUpgradeHistory(
        int index, com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry value) {
      if (upgradeHistoryBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureUpgradeHistoryIsMutable();
        upgradeHistory_.add(index, value);
        onChanged();
      } else {
        upgradeHistoryBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public Builder addUpgradeHistory(
        com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder builderForValue) {
      if (upgradeHistoryBuilder_ == null) {
        ensureUpgradeHistoryIsMutable();
        upgradeHistory_.add(builderForValue.build());
        onChanged();
      } else {
        upgradeHistoryBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public Builder addUpgradeHistory(
        int index,
        com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder builderForValue) {
      if (upgradeHistoryBuilder_ == null) {
        ensureUpgradeHistoryIsMutable();
        upgradeHistory_.add(index, builderForValue.build());
        onChanged();
      } else {
        upgradeHistoryBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public Builder addAllUpgradeHistory(
        java.lang.Iterable<? extends com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry>
            values) {
      if (upgradeHistoryBuilder_ == null) {
        ensureUpgradeHistoryIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, upgradeHistory_);
        onChanged();
      } else {
        upgradeHistoryBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public Builder clearUpgradeHistory() {
      if (upgradeHistoryBuilder_ == null) {
        upgradeHistory_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x20000000);
        onChanged();
      } else {
        upgradeHistoryBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public Builder removeUpgradeHistory(int index) {
      if (upgradeHistoryBuilder_ == null) {
        ensureUpgradeHistoryIsMutable();
        upgradeHistory_.remove(index);
        onChanged();
      } else {
        upgradeHistoryBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder
        getUpgradeHistoryBuilder(int index) {
      return getUpgradeHistoryFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder
        getUpgradeHistoryOrBuilder(int index) {
      if (upgradeHistoryBuilder_ == null) {
        return upgradeHistory_.get(index);
      } else {
        return upgradeHistoryBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public java.util.List<
            ? extends com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder>
        getUpgradeHistoryOrBuilderList() {
      if (upgradeHistoryBuilder_ != null) {
        return upgradeHistoryBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(upgradeHistory_);
      }
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder
        addUpgradeHistoryBuilder() {
      return getUpgradeHistoryFieldBuilder()
          .addBuilder(
              com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder
        addUpgradeHistoryBuilder(int index) {
      return getUpgradeHistoryFieldBuilder()
          .addBuilder(
              index,
              com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The upgrade history of this instance.
     * </pre>
     *
     * <code>repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29;
     * </code>
     */
    public java.util.List<com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder>
        getUpgradeHistoryBuilderList() {
      return getUpgradeHistoryFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry,
            com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder,
            com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder>
        getUpgradeHistoryFieldBuilder() {
      if (upgradeHistoryBuilder_ == null) {
        upgradeHistoryBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry,
                com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder,
                com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder>(
                upgradeHistory_,
                ((bitField0_ & 0x20000000) != 0),
                getParentForChildren(),
                isClean());
        upgradeHistory_ = null;
      }
      return upgradeHistoryBuilder_;
    }

    private int nicType_ = 0;
    /**
     *
     *
     * <pre>
     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
     * VirtioNet.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The enum numeric value on the wire for nicType.
     */
    @java.lang.Override
    public int getNicTypeValue() {
      return nicType_;
    }
    /**
     *
     *
     * <pre>
     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
     * VirtioNet.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @param value The enum numeric value on the wire for nicType to set.
     * @return This builder for chaining.
     */
    public Builder setNicTypeValue(int value) {
      nicType_ = value;
      bitField0_ |= 0x40000000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
     * VirtioNet.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The nicType.
     */
    @java.lang.Override
    public com.google.cloud.notebooks.v1.Instance.NicType getNicType() {
      com.google.cloud.notebooks.v1.Instance.NicType result =
          com.google.cloud.notebooks.v1.Instance.NicType.forNumber(nicType_);
      return result == null ? com.google.cloud.notebooks.v1.Instance.NicType.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
     * VirtioNet.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @param value The nicType to set.
     * @return This builder for chaining.
     */
    public Builder setNicType(com.google.cloud.notebooks.v1.Instance.NicType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x40000000;
      nicType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
     * VirtioNet.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearNicType() {
      bitField0_ = (bitField0_ & ~0x40000000);
      nicType_ = 0;
      onChanged();
      return this;
    }

    private com.google.cloud.notebooks.v1.ReservationAffinity reservationAffinity_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.notebooks.v1.ReservationAffinity,
            com.google.cloud.notebooks.v1.ReservationAffinity.Builder,
            com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder>
        reservationAffinityBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. The optional reservation affinity. Setting this field will apply
     * the specified [Zonal Compute
     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
     * to this notebook instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the reservationAffinity field is set.
     */
    public boolean hasReservationAffinity() {
      return ((bitField0_ & 0x80000000) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. The optional reservation affinity. Setting this field will apply
     * the specified [Zonal Compute
     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
     * to this notebook instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The reservationAffinity.
     */
    public com.google.cloud.notebooks.v1.ReservationAffinity getReservationAffinity() {
      if (reservationAffinityBuilder_ == null) {
        return reservationAffinity_ == null
            ? com.google.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance()
            : reservationAffinity_;
      } else {
        return reservationAffinityBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The optional reservation affinity. Setting this field will apply
     * the specified [Zonal Compute
     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
     * to this notebook instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setReservationAffinity(com.google.cloud.notebooks.v1.ReservationAffinity value) {
      if (reservationAffinityBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        reservationAffinity_ = value;
      } else {
        reservationAffinityBuilder_.setMessage(value);
      }
      bitField0_ |= 0x80000000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The optional reservation affinity. Setting this field will apply
     * the specified [Zonal Compute
     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
     * to this notebook instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setReservationAffinity(
        com.google.cloud.notebooks.v1.ReservationAffinity.Builder builderForValue) {
      if (reservationAffinityBuilder_ == null) {
        reservationAffinity_ = builderForValue.build();
      } else {
        reservationAffinityBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x80000000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The optional reservation affinity. Setting this field will apply
     * the specified [Zonal Compute
     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
     * to this notebook instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergeReservationAffinity(
        com.google.cloud.notebooks.v1.ReservationAffinity value) {
      if (reservationAffinityBuilder_ == null) {
        if (((bitField0_ & 0x80000000) != 0)
            && reservationAffinity_ != null
            && reservationAffinity_
                != com.google.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance()) {
          getReservationAffinityBuilder().mergeFrom(value);
        } else {
          reservationAffinity_ = value;
        }
      } else {
        reservationAffinityBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x80000000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The optional reservation affinity. Setting this field will apply
     * the specified [Zonal Compute
     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
     * to this notebook instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearReservationAffinity() {
      bitField0_ = (bitField0_ & ~0x80000000);
      reservationAffinity_ = null;
      if (reservationAffinityBuilder_ != null) {
        reservationAffinityBuilder_.dispose();
        reservationAffinityBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The optional reservation affinity. Setting this field will apply
     * the specified [Zonal Compute
     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
     * to this notebook instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.notebooks.v1.ReservationAffinity.Builder
        getReservationAffinityBuilder() {
      bitField0_ |= 0x80000000;
      onChanged();
      return getReservationAffinityFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. The optional reservation affinity. Setting this field will apply
     * the specified [Zonal Compute
     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
     * to this notebook instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder
        getReservationAffinityOrBuilder() {
      if (reservationAffinityBuilder_ != null) {
        return reservationAffinityBuilder_.getMessageOrBuilder();
      } else {
        return reservationAffinity_ == null
            ? com.google.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance()
            : reservationAffinity_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The optional reservation affinity. Setting this field will apply
     * the specified [Zonal Compute
     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
     * to this notebook instance.
     * </pre>
     *
     * <code>
     * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.notebooks.v1.ReservationAffinity,
            com.google.cloud.notebooks.v1.ReservationAffinity.Builder,
            com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder>
        getReservationAffinityFieldBuilder() {
      if (reservationAffinityBuilder_ == null) {
        reservationAffinityBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.notebooks.v1.ReservationAffinity,
                com.google.cloud.notebooks.v1.ReservationAffinity.Builder,
                com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder>(
                getReservationAffinity(), getParentForChildren(), isClean());
        reservationAffinity_ = null;
      }
      return reservationAffinityBuilder_;
    }

    private java.lang.Object creator_ = "";
    /**
     *
     *
     * <pre>
     * Output only. Email address of entity that sent original CreateInstance request.
     * </pre>
     *
     * <code>string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The creator.
     */
    public java.lang.String getCreator() {
      java.lang.Object ref = creator_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        creator_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Email address of entity that sent original CreateInstance request.
     * </pre>
     *
     * <code>string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for creator.
     */
    public com.google.protobuf.ByteString getCreatorBytes() {
      java.lang.Object ref = creator_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        creator_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Email address of entity that sent original CreateInstance request.
     * </pre>
     *
     * <code>string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The creator to set.
     * @return This builder for chaining.
     */
    public Builder setCreator(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      creator_ = value;
      bitField1_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Email address of entity that sent original CreateInstance request.
     * </pre>
     *
     * <code>string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearCreator() {
      creator_ = getDefaultInstance().getCreator();
      bitField1_ = (bitField1_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Email address of entity that sent original CreateInstance request.
     * </pre>
     *
     * <code>string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for creator to set.
     * @return This builder for chaining.
     */
    public Builder setCreatorBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      creator_ = value;
      bitField1_ |= 0x00000001;
      onChanged();
      return this;
    }

    private boolean canIpForward_;
    /**
     *
     *
     * <pre>
     * Optional. Flag to enable ip forwarding or not, default false/off.
     * https://cloud.google.com/vpc/docs/using-routes#canipforward
     * </pre>
     *
     * <code>bool can_ip_forward = 39 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The canIpForward.
     */
    @java.lang.Override
    public boolean getCanIpForward() {
      return canIpForward_;
    }
    /**
     *
     *
     * <pre>
     * Optional. Flag to enable ip forwarding or not, default false/off.
     * https://cloud.google.com/vpc/docs/using-routes#canipforward
     * </pre>
     *
     * <code>bool can_ip_forward = 39 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The canIpForward to set.
     * @return This builder for chaining.
     */
    public Builder setCanIpForward(boolean value) {

      canIpForward_ = value;
      bitField1_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Flag to enable ip forwarding or not, default false/off.
     * https://cloud.google.com/vpc/docs/using-routes#canipforward
     * </pre>
     *
     * <code>bool can_ip_forward = 39 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearCanIpForward() {
      bitField1_ = (bitField1_ & ~0x00000002);
      canIpForward_ = false;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp createTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        createTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. Instance creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the createTime field is set.
     */
    public boolean hasCreateTime() {
      return ((bitField1_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The createTime.
     */
    public com.google.protobuf.Timestamp getCreateTime() {
      if (createTimeBuilder_ == null) {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      } else {
        return createTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        createTime_ = value;
      } else {
        createTimeBuilder_.setMessage(value);
      }
      bitField1_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (createTimeBuilder_ == null) {
        createTime_ = builderForValue.build();
      } else {
        createTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField1_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (((bitField1_ & 0x00000004) != 0)
            && createTime_ != null
            && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getCreateTimeBuilder().mergeFrom(value);
        } else {
          createTime_ = value;
        }
      } else {
        createTimeBuilder_.mergeFrom(value);
      }
      bitField1_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearCreateTime() {
      bitField1_ = (bitField1_ & ~0x00000004);
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
      bitField1_ |= 0x00000004;
      onChanged();
      return getCreateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
      if (createTimeBuilder_ != null) {
        return createTimeBuilder_.getMessageOrBuilder();
      } else {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance creation time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getCreateTimeFieldBuilder() {
      if (createTimeBuilder_ == null) {
        createTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getCreateTime(), getParentForChildren(), isClean());
        createTime_ = null;
      }
      return createTimeBuilder_;
    }

    private com.google.protobuf.Timestamp updateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        updateTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. Instance update time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the updateTime field is set.
     */
    public boolean hasUpdateTime() {
      return ((bitField1_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance update time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The updateTime.
     */
    public com.google.protobuf.Timestamp getUpdateTime() {
      if (updateTimeBuilder_ == null) {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      } else {
        return updateTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance update time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        updateTime_ = value;
      } else {
        updateTimeBuilder_.setMessage(value);
      }
      bitField1_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance update time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (updateTimeBuilder_ == null) {
        updateTime_ = builderForValue.build();
      } else {
        updateTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField1_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance update time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (((bitField1_ & 0x00000008) != 0)
            && updateTime_ != null
            && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getUpdateTimeBuilder().mergeFrom(value);
        } else {
          updateTime_ = value;
        }
      } else {
        updateTimeBuilder_.mergeFrom(value);
      }
      bitField1_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance update time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearUpdateTime() {
      bitField1_ = (bitField1_ & ~0x00000008);
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance update time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
      bitField1_ |= 0x00000008;
      onChanged();
      return getUpdateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance update time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
      if (updateTimeBuilder_ != null) {
        return updateTimeBuilder_.getMessageOrBuilder();
      } else {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Instance update time.
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getUpdateTimeFieldBuilder() {
      if (updateTimeBuilder_ == null) {
        updateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getUpdateTime(), getParentForChildren(), isClean());
        updateTime_ = null;
      }
      return updateTimeBuilder_;
    }

    @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.notebooks.v1.Instance)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance)
  private static final com.google.cloud.notebooks.v1.Instance DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance();
  }

  public static com.google.cloud.notebooks.v1.Instance getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

  @java.lang.Override
  public com.google.cloud.notebooks.v1.Instance getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
