com.google.cloud.notebooks.v1.LocalDisk Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-notebooks-v1 Show documentation
Show all versions of proto-google-cloud-notebooks-v1 Show documentation
Proto library for google-cloud-notebooks
/*
* Copyright 2024 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/runtime.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.notebooks.v1;
/**
*
*
*
* A Local attached disk resource.
*
*
* Protobuf type {@code google.cloud.notebooks.v1.LocalDisk}
*/
public final class LocalDisk extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.LocalDisk)
LocalDiskOrBuilder {
private static final long serialVersionUID = 0L;
// Use LocalDisk.newBuilder() to construct.
private LocalDisk(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LocalDisk() {
deviceName_ = "";
guestOsFeatures_ = java.util.Collections.emptyList();
interface_ = "";
kind_ = "";
licenses_ = com.google.protobuf.LazyStringArrayList.emptyList();
mode_ = "";
source_ = "";
type_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new LocalDisk();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.notebooks.v1.RuntimeProto
.internal_static_google_cloud_notebooks_v1_LocalDisk_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.notebooks.v1.RuntimeProto
.internal_static_google_cloud_notebooks_v1_LocalDisk_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.notebooks.v1.LocalDisk.class,
com.google.cloud.notebooks.v1.LocalDisk.Builder.class);
}
public interface RuntimeGuestOsFeatureOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The ID of a supported feature. Read [Enabling guest operating system
* features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
* to see a list of available options.
*
* Valid values:
*
* * `FEATURE_TYPE_UNSPECIFIED`
* * `MULTI_IP_SUBNET`
* * `SECURE_BOOT`
* * `UEFI_COMPATIBLE`
* * `VIRTIO_SCSI_MULTIQUEUE`
* * `WINDOWS`
*
*
* string type = 1;
*
* @return The type.
*/
java.lang.String getType();
/**
*
*
*
* The ID of a supported feature. Read [Enabling guest operating system
* features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
* to see a list of available options.
*
* Valid values:
*
* * `FEATURE_TYPE_UNSPECIFIED`
* * `MULTI_IP_SUBNET`
* * `SECURE_BOOT`
* * `UEFI_COMPATIBLE`
* * `VIRTIO_SCSI_MULTIQUEUE`
* * `WINDOWS`
*
*
* string type = 1;
*
* @return The bytes for type.
*/
com.google.protobuf.ByteString getTypeBytes();
}
/**
*
*
*
* Optional. A list of features to enable on the guest operating system.
* Applicable only for bootable images.
* Read [Enabling guest operating system
* features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
* to see a list of available options.
* Guest OS features for boot disk.
*
*
* Protobuf type {@code google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature}
*/
public static final class RuntimeGuestOsFeature extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature)
RuntimeGuestOsFeatureOrBuilder {
private static final long serialVersionUID = 0L;
// Use RuntimeGuestOsFeature.newBuilder() to construct.
private RuntimeGuestOsFeature(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RuntimeGuestOsFeature() {
type_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new RuntimeGuestOsFeature();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.notebooks.v1.RuntimeProto
.internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.notebooks.v1.RuntimeProto
.internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.class,
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder.class);
}
public static final int TYPE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object type_ = "";
/**
*
*
*
* The ID of a supported feature. Read [Enabling guest operating system
* features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
* to see a list of available options.
*
* Valid values:
*
* * `FEATURE_TYPE_UNSPECIFIED`
* * `MULTI_IP_SUBNET`
* * `SECURE_BOOT`
* * `UEFI_COMPATIBLE`
* * `VIRTIO_SCSI_MULTIQUEUE`
* * `WINDOWS`
*
*
* string type = 1;
*
* @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;
}
}
/**
*
*
*
* The ID of a supported feature. Read [Enabling guest operating system
* features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
* to see a list of available options.
*
* Valid values:
*
* * `FEATURE_TYPE_UNSPECIFIED`
* * `MULTI_IP_SUBNET`
* * `SECURE_BOOT`
* * `UEFI_COMPATIBLE`
* * `VIRTIO_SCSI_MULTIQUEUE`
* * `WINDOWS`
*
*
* string type = 1;
*
* @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.LocalDisk.RuntimeGuestOsFeature)) {
return super.equals(obj);
}
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature other =
(com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) 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.LocalDisk.RuntimeGuestOsFeature parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature 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.LocalDisk.RuntimeGuestOsFeature parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature 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.LocalDisk.RuntimeGuestOsFeature parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature 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.LocalDisk.RuntimeGuestOsFeature parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature 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.LocalDisk.RuntimeGuestOsFeature parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature 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.LocalDisk.RuntimeGuestOsFeature 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.LocalDisk.RuntimeGuestOsFeature 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.LocalDisk.RuntimeGuestOsFeature 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;
}
/**
*
*
*
* Optional. A list of features to enable on the guest operating system.
* Applicable only for bootable images.
* Read [Enabling guest operating system
* features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
* to see a list of available options.
* Guest OS features for boot disk.
*
*
* Protobuf type {@code google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature)
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.notebooks.v1.RuntimeProto
.internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.notebooks.v1.RuntimeProto
.internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.class,
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder.class);
}
// Construct using com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.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.RuntimeProto
.internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor;
}
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature
getDefaultInstanceForType() {
return com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature build() {
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature buildPartial() {
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature result =
new com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature 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.LocalDisk.RuntimeGuestOsFeature) {
return mergeFrom((com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature other) {
if (other
== com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.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_ = "";
/**
*
*
*
* The ID of a supported feature. Read [Enabling guest operating system
* features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
* to see a list of available options.
*
* Valid values:
*
* * `FEATURE_TYPE_UNSPECIFIED`
* * `MULTI_IP_SUBNET`
* * `SECURE_BOOT`
* * `UEFI_COMPATIBLE`
* * `VIRTIO_SCSI_MULTIQUEUE`
* * `WINDOWS`
*
*
* string type = 1;
*
* @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;
}
}
/**
*
*
*
* The ID of a supported feature. Read [Enabling guest operating system
* features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
* to see a list of available options.
*
* Valid values:
*
* * `FEATURE_TYPE_UNSPECIFIED`
* * `MULTI_IP_SUBNET`
* * `SECURE_BOOT`
* * `UEFI_COMPATIBLE`
* * `VIRTIO_SCSI_MULTIQUEUE`
* * `WINDOWS`
*
*
* string type = 1;
*
* @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;
}
}
/**
*
*
*
* The ID of a supported feature. Read [Enabling guest operating system
* features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
* to see a list of available options.
*
* Valid values:
*
* * `FEATURE_TYPE_UNSPECIFIED`
* * `MULTI_IP_SUBNET`
* * `SECURE_BOOT`
* * `UEFI_COMPATIBLE`
* * `VIRTIO_SCSI_MULTIQUEUE`
* * `WINDOWS`
*
*
* string type = 1;
*
* @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;
}
/**
*
*
*
* The ID of a supported feature. Read [Enabling guest operating system
* features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
* to see a list of available options.
*
* Valid values:
*
* * `FEATURE_TYPE_UNSPECIFIED`
* * `MULTI_IP_SUBNET`
* * `SECURE_BOOT`
* * `UEFI_COMPATIBLE`
* * `VIRTIO_SCSI_MULTIQUEUE`
* * `WINDOWS`
*
*
* string type = 1;
*
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = getDefaultInstance().getType();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The ID of a supported feature. Read [Enabling guest operating system
* features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
* to see a list of available options.
*
* Valid values:
*
* * `FEATURE_TYPE_UNSPECIFIED`
* * `MULTI_IP_SUBNET`
* * `SECURE_BOOT`
* * `UEFI_COMPATIBLE`
* * `VIRTIO_SCSI_MULTIQUEUE`
* * `WINDOWS`
*
*
* string type = 1;
*
* @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.LocalDisk.RuntimeGuestOsFeature)
}
// @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature)
private static final com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature();
}
public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RuntimeGuestOsFeature parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int AUTO_DELETE_FIELD_NUMBER = 1;
private boolean autoDelete_ = false;
/**
*
*
*
* Optional. Output only. Specifies whether the disk will be auto-deleted when the
* instance is deleted (but not when the disk is detached from the instance).
*
*
* bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The autoDelete.
*/
@java.lang.Override
public boolean getAutoDelete() {
return autoDelete_;
}
public static final int BOOT_FIELD_NUMBER = 2;
private boolean boot_ = false;
/**
*
*
*
* Optional. Output only. Indicates that this is a boot disk. The virtual machine
* will use the first partition of the disk for its root filesystem.
*
*
* bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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_ = "";
/**
*
*
*
* Optional. Output only. Specifies 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.
*
*
* string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Optional. Output only. Specifies 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.
*
*
* string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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 GUEST_OS_FEATURES_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List
guestOsFeatures_;
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public java.util.List
getGuestOsFeaturesList() {
return guestOsFeatures_;
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder>
getGuestOsFeaturesOrBuilderList() {
return guestOsFeatures_;
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public int getGuestOsFeaturesCount() {
return guestOsFeatures_.size();
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature getGuestOsFeatures(
int index) {
return guestOsFeatures_.get(index);
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder
getGuestOsFeaturesOrBuilder(int index) {
return guestOsFeatures_.get(index);
}
public static final int INDEX_FIELD_NUMBER = 5;
private int index_ = 0;
/**
*
*
*
* Output only. 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.
*
*
* int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The index.
*/
@java.lang.Override
public int getIndex() {
return index_;
}
public static final int INITIALIZE_PARAMS_FIELD_NUMBER = 6;
private com.google.cloud.notebooks.v1.LocalDiskInitializeParams initializeParams_;
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*
* @return Whether the initializeParams field is set.
*/
@java.lang.Override
public boolean hasInitializeParams() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*
* @return The initializeParams.
*/
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDiskInitializeParams getInitializeParams() {
return initializeParams_ == null
? com.google.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance()
: initializeParams_;
}
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder
getInitializeParamsOrBuilder() {
return initializeParams_ == null
? com.google.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance()
: initializeParams_;
}
public static final int INTERFACE_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object interface_ = "";
/**
*
*
*
* Specifies 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`
*
*
* string interface = 7;
*
* @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;
}
}
/**
*
*
*
* Specifies 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`
*
*
* string interface = 7;
*
* @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_ = "";
/**
*
*
*
* Output only. Type of the resource. Always compute#attachedDisk for attached disks.
*
*
* string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Output only. Type of the resource. Always compute#attachedDisk for attached disks.
*
*
* string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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.LazyStringArrayList licenses_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return A list containing the licenses.
*/
public com.google.protobuf.ProtocolStringList getLicensesList() {
return licenses_;
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The count of licenses.
*/
public int getLicensesCount() {
return licenses_.size();
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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);
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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_ = "";
/**
*
*
*
* 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`
*
*
* string mode = 10;
*
* @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;
}
}
/**
*
*
*
* 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`
*
*
* string mode = 10;
*
* @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_ = "";
/**
*
*
*
* Specifies a valid partial or full URL to an existing Persistent Disk
* resource.
*
*
* string source = 11;
*
* @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;
}
}
/**
*
*
*
* Specifies a valid partial or full URL to an existing Persistent Disk
* resource.
*
*
* string source = 11;
*
* @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_ = "";
/**
*
*
*
* Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
* specified, the default is `PERSISTENT`.
* Valid values:
*
* * `PERSISTENT`
* * `SCRATCH`
*
*
* string type = 12;
*
* @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;
}
}
/**
*
*
*
* Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
* specified, the default is `PERSISTENT`.
* Valid values:
*
* * `PERSISTENT`
* * `SCRATCH`
*
*
* string type = 12;
*
* @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_);
}
for (int i = 0; i < guestOsFeatures_.size(); i++) {
output.writeMessage(4, guestOsFeatures_.get(i));
}
if (index_ != 0) {
output.writeInt32(5, index_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(6, getInitializeParams());
}
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_);
}
for (int i = 0; i < guestOsFeatures_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, guestOsFeatures_.get(i));
}
if (index_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, index_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getInitializeParams());
}
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.LocalDisk)) {
return super.equals(obj);
}
com.google.cloud.notebooks.v1.LocalDisk other = (com.google.cloud.notebooks.v1.LocalDisk) obj;
if (getAutoDelete() != other.getAutoDelete()) return false;
if (getBoot() != other.getBoot()) return false;
if (!getDeviceName().equals(other.getDeviceName())) return false;
if (!getGuestOsFeaturesList().equals(other.getGuestOsFeaturesList())) return false;
if (getIndex() != other.getIndex()) return false;
if (hasInitializeParams() != other.hasInitializeParams()) return false;
if (hasInitializeParams()) {
if (!getInitializeParams().equals(other.getInitializeParams())) 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();
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) + getIndex();
if (hasInitializeParams()) {
hash = (37 * hash) + INITIALIZE_PARAMS_FIELD_NUMBER;
hash = (53 * hash) + getInitializeParams().hashCode();
}
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.LocalDisk parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.notebooks.v1.LocalDisk 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.LocalDisk parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.notebooks.v1.LocalDisk 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.LocalDisk parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.notebooks.v1.LocalDisk 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.LocalDisk parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.notebooks.v1.LocalDisk 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.LocalDisk parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.notebooks.v1.LocalDisk 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.LocalDisk 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.LocalDisk 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.LocalDisk prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* A Local attached disk resource.
*
*
* Protobuf type {@code google.cloud.notebooks.v1.LocalDisk}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.LocalDisk)
com.google.cloud.notebooks.v1.LocalDiskOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.notebooks.v1.RuntimeProto
.internal_static_google_cloud_notebooks_v1_LocalDisk_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.notebooks.v1.RuntimeProto
.internal_static_google_cloud_notebooks_v1_LocalDisk_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.notebooks.v1.LocalDisk.class,
com.google.cloud.notebooks.v1.LocalDisk.Builder.class);
}
// Construct using com.google.cloud.notebooks.v1.LocalDisk.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getGuestOsFeaturesFieldBuilder();
getInitializeParamsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
autoDelete_ = false;
boot_ = false;
deviceName_ = "";
if (guestOsFeaturesBuilder_ == null) {
guestOsFeatures_ = java.util.Collections.emptyList();
} else {
guestOsFeatures_ = null;
guestOsFeaturesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
index_ = 0;
initializeParams_ = null;
if (initializeParamsBuilder_ != null) {
initializeParamsBuilder_.dispose();
initializeParamsBuilder_ = null;
}
interface_ = "";
kind_ = "";
licenses_ = com.google.protobuf.LazyStringArrayList.emptyList();
mode_ = "";
source_ = "";
type_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.notebooks.v1.RuntimeProto
.internal_static_google_cloud_notebooks_v1_LocalDisk_descriptor;
}
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDisk getDefaultInstanceForType() {
return com.google.cloud.notebooks.v1.LocalDisk.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDisk build() {
com.google.cloud.notebooks.v1.LocalDisk result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDisk buildPartial() {
com.google.cloud.notebooks.v1.LocalDisk result =
new com.google.cloud.notebooks.v1.LocalDisk(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.notebooks.v1.LocalDisk result) {
if (guestOsFeaturesBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.guestOsFeatures_ = guestOsFeatures_;
} else {
result.guestOsFeatures_ = guestOsFeaturesBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.notebooks.v1.LocalDisk 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_ & 0x00000010) != 0)) {
result.index_ = index_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.initializeParams_ =
initializeParamsBuilder_ == null ? initializeParams_ : initializeParamsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.interface_ = interface_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.kind_ = kind_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
licenses_.makeImmutable();
result.licenses_ = licenses_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.mode_ = mode_;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.source_ = source_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.type_ = type_;
}
result.bitField0_ |= to_bitField0_;
}
@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.LocalDisk) {
return mergeFrom((com.google.cloud.notebooks.v1.LocalDisk) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.notebooks.v1.LocalDisk other) {
if (other == com.google.cloud.notebooks.v1.LocalDisk.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 (guestOsFeaturesBuilder_ == null) {
if (!other.guestOsFeatures_.isEmpty()) {
if (guestOsFeatures_.isEmpty()) {
guestOsFeatures_ = other.guestOsFeatures_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureGuestOsFeaturesIsMutable();
guestOsFeatures_.addAll(other.guestOsFeatures_);
}
onChanged();
}
} else {
if (!other.guestOsFeatures_.isEmpty()) {
if (guestOsFeaturesBuilder_.isEmpty()) {
guestOsFeaturesBuilder_.dispose();
guestOsFeaturesBuilder_ = null;
guestOsFeatures_ = other.guestOsFeatures_;
bitField0_ = (bitField0_ & ~0x00000008);
guestOsFeaturesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getGuestOsFeaturesFieldBuilder()
: null;
} else {
guestOsFeaturesBuilder_.addAllMessages(other.guestOsFeatures_);
}
}
}
if (other.getIndex() != 0) {
setIndex(other.getIndex());
}
if (other.hasInitializeParams()) {
mergeInitializeParams(other.getInitializeParams());
}
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_ |= 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 34:
{
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature m =
input.readMessage(
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.parser(),
extensionRegistry);
if (guestOsFeaturesBuilder_ == null) {
ensureGuestOsFeaturesIsMutable();
guestOsFeatures_.add(m);
} else {
guestOsFeaturesBuilder_.addMessage(m);
}
break;
} // case 34
case 40:
{
index_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
case 50:
{
input.readMessage(
getInitializeParamsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
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_;
/**
*
*
*
* Optional. Output only. Specifies whether the disk will be auto-deleted when the
* instance is deleted (but not when the disk is detached from the instance).
*
*
* bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The autoDelete.
*/
@java.lang.Override
public boolean getAutoDelete() {
return autoDelete_;
}
/**
*
*
*
* Optional. Output only. Specifies whether the disk will be auto-deleted when the
* instance is deleted (but not when the disk is detached from the instance).
*
*
* bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The autoDelete to set.
* @return This builder for chaining.
*/
public Builder setAutoDelete(boolean value) {
autoDelete_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. Output only. Specifies whether the disk will be auto-deleted when the
* instance is deleted (but not when the disk is detached from the instance).
*
*
* bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearAutoDelete() {
bitField0_ = (bitField0_ & ~0x00000001);
autoDelete_ = false;
onChanged();
return this;
}
private boolean boot_;
/**
*
*
*
* Optional. Output only. Indicates that this is a boot disk. The virtual machine
* will use the first partition of the disk for its root filesystem.
*
*
* bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The boot.
*/
@java.lang.Override
public boolean getBoot() {
return boot_;
}
/**
*
*
*
* Optional. Output only. Indicates that this is a boot disk. The virtual machine
* will use the first partition of the disk for its root filesystem.
*
*
* bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The boot to set.
* @return This builder for chaining.
*/
public Builder setBoot(boolean value) {
boot_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Output only. Indicates that this is a boot disk. The virtual machine
* will use the first partition of the disk for its root filesystem.
*
*
* bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearBoot() {
bitField0_ = (bitField0_ & ~0x00000002);
boot_ = false;
onChanged();
return this;
}
private java.lang.Object deviceName_ = "";
/**
*
*
*
* Optional. Output only. Specifies 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.
*
*
* string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Optional. Output only. Specifies 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.
*
*
* string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Optional. Output only. Specifies 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.
*
*
* string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
/**
*
*
*
* Optional. Output only. Specifies 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.
*
*
* string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearDeviceName() {
deviceName_ = getDefaultInstance().getDeviceName();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. Output only. Specifies 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.
*
*
* string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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 java.util.List
guestOsFeatures_ = java.util.Collections.emptyList();
private void ensureGuestOsFeaturesIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
guestOsFeatures_ =
new java.util.ArrayList(
guestOsFeatures_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature,
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder,
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder>
guestOsFeaturesBuilder_;
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public java.util.List
getGuestOsFeaturesList() {
if (guestOsFeaturesBuilder_ == null) {
return java.util.Collections.unmodifiableList(guestOsFeatures_);
} else {
return guestOsFeaturesBuilder_.getMessageList();
}
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public int getGuestOsFeaturesCount() {
if (guestOsFeaturesBuilder_ == null) {
return guestOsFeatures_.size();
} else {
return guestOsFeaturesBuilder_.getCount();
}
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature getGuestOsFeatures(
int index) {
if (guestOsFeaturesBuilder_ == null) {
return guestOsFeatures_.get(index);
} else {
return guestOsFeaturesBuilder_.getMessage(index);
}
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setGuestOsFeatures(
int index, com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature value) {
if (guestOsFeaturesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGuestOsFeaturesIsMutable();
guestOsFeatures_.set(index, value);
onChanged();
} else {
guestOsFeaturesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setGuestOsFeatures(
int index,
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder builderForValue) {
if (guestOsFeaturesBuilder_ == null) {
ensureGuestOsFeaturesIsMutable();
guestOsFeatures_.set(index, builderForValue.build());
onChanged();
} else {
guestOsFeaturesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addGuestOsFeatures(
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature value) {
if (guestOsFeaturesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGuestOsFeaturesIsMutable();
guestOsFeatures_.add(value);
onChanged();
} else {
guestOsFeaturesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addGuestOsFeatures(
int index, com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature value) {
if (guestOsFeaturesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGuestOsFeaturesIsMutable();
guestOsFeatures_.add(index, value);
onChanged();
} else {
guestOsFeaturesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addGuestOsFeatures(
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder builderForValue) {
if (guestOsFeaturesBuilder_ == null) {
ensureGuestOsFeaturesIsMutable();
guestOsFeatures_.add(builderForValue.build());
onChanged();
} else {
guestOsFeaturesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addGuestOsFeatures(
int index,
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder builderForValue) {
if (guestOsFeaturesBuilder_ == null) {
ensureGuestOsFeaturesIsMutable();
guestOsFeatures_.add(index, builderForValue.build());
onChanged();
} else {
guestOsFeaturesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addAllGuestOsFeatures(
java.lang.Iterable extends com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature>
values) {
if (guestOsFeaturesBuilder_ == null) {
ensureGuestOsFeaturesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestOsFeatures_);
onChanged();
} else {
guestOsFeaturesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearGuestOsFeatures() {
if (guestOsFeaturesBuilder_ == null) {
guestOsFeatures_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
guestOsFeaturesBuilder_.clear();
}
return this;
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder removeGuestOsFeatures(int index) {
if (guestOsFeaturesBuilder_ == null) {
ensureGuestOsFeaturesIsMutable();
guestOsFeatures_.remove(index);
onChanged();
} else {
guestOsFeaturesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder
getGuestOsFeaturesBuilder(int index) {
return getGuestOsFeaturesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder
getGuestOsFeaturesOrBuilder(int index) {
if (guestOsFeaturesBuilder_ == null) {
return guestOsFeatures_.get(index);
} else {
return guestOsFeaturesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public java.util.List<
? extends com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder>
getGuestOsFeaturesOrBuilderList() {
if (guestOsFeaturesBuilder_ != null) {
return guestOsFeaturesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(guestOsFeatures_);
}
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder
addGuestOsFeaturesBuilder() {
return getGuestOsFeaturesFieldBuilder()
.addBuilder(
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.getDefaultInstance());
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder
addGuestOsFeaturesBuilder(int index) {
return getGuestOsFeaturesFieldBuilder()
.addBuilder(
index,
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.getDefaultInstance());
}
/**
*
*
*
* Output only. 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.
*
*
*
* repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public java.util.List
getGuestOsFeaturesBuilderList() {
return getGuestOsFeaturesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature,
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder,
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder>
getGuestOsFeaturesFieldBuilder() {
if (guestOsFeaturesBuilder_ == null) {
guestOsFeaturesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature,
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder,
com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder>(
guestOsFeatures_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
guestOsFeatures_ = null;
}
return guestOsFeaturesBuilder_;
}
private int index_;
/**
*
*
*
* Output only. 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.
*
*
* int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The index.
*/
@java.lang.Override
public int getIndex() {
return index_;
}
/**
*
*
*
* Output only. 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.
*
*
* int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The index to set.
* @return This builder for chaining.
*/
public Builder setIndex(int value) {
index_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Output only. 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.
*
*
* int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearIndex() {
bitField0_ = (bitField0_ & ~0x00000010);
index_ = 0;
onChanged();
return this;
}
private com.google.cloud.notebooks.v1.LocalDiskInitializeParams initializeParams_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.notebooks.v1.LocalDiskInitializeParams,
com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder,
com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder>
initializeParamsBuilder_;
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*
* @return Whether the initializeParams field is set.
*/
public boolean hasInitializeParams() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*
* @return The initializeParams.
*/
public com.google.cloud.notebooks.v1.LocalDiskInitializeParams getInitializeParams() {
if (initializeParamsBuilder_ == null) {
return initializeParams_ == null
? com.google.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance()
: initializeParams_;
} else {
return initializeParamsBuilder_.getMessage();
}
}
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*/
public Builder setInitializeParams(
com.google.cloud.notebooks.v1.LocalDiskInitializeParams value) {
if (initializeParamsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
initializeParams_ = value;
} else {
initializeParamsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*/
public Builder setInitializeParams(
com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder builderForValue) {
if (initializeParamsBuilder_ == null) {
initializeParams_ = builderForValue.build();
} else {
initializeParamsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*/
public Builder mergeInitializeParams(
com.google.cloud.notebooks.v1.LocalDiskInitializeParams value) {
if (initializeParamsBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& initializeParams_ != null
&& initializeParams_
!= com.google.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance()) {
getInitializeParamsBuilder().mergeFrom(value);
} else {
initializeParams_ = value;
}
} else {
initializeParamsBuilder_.mergeFrom(value);
}
if (initializeParams_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*/
public Builder clearInitializeParams() {
bitField0_ = (bitField0_ & ~0x00000020);
initializeParams_ = null;
if (initializeParamsBuilder_ != null) {
initializeParamsBuilder_.dispose();
initializeParamsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*/
public com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder
getInitializeParamsBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getInitializeParamsFieldBuilder().getBuilder();
}
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*/
public com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder
getInitializeParamsOrBuilder() {
if (initializeParamsBuilder_ != null) {
return initializeParamsBuilder_.getMessageOrBuilder();
} else {
return initializeParams_ == null
? com.google.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance()
: initializeParams_;
}
}
/**
*
*
*
* Input only. Specifies the parameters for a new disk that will be created
* alongside the new instance. Use initialization parameters to create boot
* disks or local SSDs attached to the new instance.
*
* This property is mutually exclusive with the source property; you can only
* define one or the other, but not both.
*
*
*
* .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.notebooks.v1.LocalDiskInitializeParams,
com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder,
com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder>
getInitializeParamsFieldBuilder() {
if (initializeParamsBuilder_ == null) {
initializeParamsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.notebooks.v1.LocalDiskInitializeParams,
com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder,
com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder>(
getInitializeParams(), getParentForChildren(), isClean());
initializeParams_ = null;
}
return initializeParamsBuilder_;
}
private java.lang.Object interface_ = "";
/**
*
*
*
* Specifies 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`
*
*
* string interface = 7;
*
* @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;
}
}
/**
*
*
*
* Specifies 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`
*
*
* string interface = 7;
*
* @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;
}
}
/**
*
*
*
* Specifies 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`
*
*
* string interface = 7;
*
* @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;
}
/**
*
*
*
* Specifies 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`
*
*
* string interface = 7;
*
* @return This builder for chaining.
*/
public Builder clearInterface() {
interface_ = getDefaultInstance().getInterface();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
*
*
* Specifies 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`
*
*
* string interface = 7;
*
* @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_ = "";
/**
*
*
*
* Output only. Type of the resource. Always compute#attachedDisk for attached disks.
*
*
* string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Output only. Type of the resource. Always compute#attachedDisk for attached disks.
*
*
* string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Output only. Type of the resource. Always compute#attachedDisk for attached disks.
*
*
* string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
/**
*
*
*
* Output only. Type of the resource. Always compute#attachedDisk for attached disks.
*
*
* string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearKind() {
kind_ = getDefaultInstance().getKind();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
*
*
* Output only. Type of the resource. Always compute#attachedDisk for attached disks.
*
*
* string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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.LazyStringArrayList licenses_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureLicensesIsMutable() {
if (!licenses_.isModifiable()) {
licenses_ = new com.google.protobuf.LazyStringArrayList(licenses_);
}
bitField0_ |= 0x00000100;
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return A list containing the licenses.
*/
public com.google.protobuf.ProtocolStringList getLicensesList() {
licenses_.makeImmutable();
return licenses_;
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The count of licenses.
*/
public int getLicensesCount() {
return licenses_.size();
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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);
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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);
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param values The licenses to add.
* @return This builder for chaining.
*/
public Builder addAllLicenses(java.lang.Iterable values) {
ensureLicensesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, licenses_);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearLicenses() {
licenses_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
;
onChanged();
return this;
}
/**
*
*
*
* Output only. Any valid publicly visible licenses.
*
*
* repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
private java.lang.Object mode_ = "";
/**
*
*
*
* 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`
*
*
* string mode = 10;
*
* @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;
}
}
/**
*
*
*
* 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`
*
*
* string mode = 10;
*
* @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;
}
}
/**
*
*
*
* 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`
*
*
* string mode = 10;
*
* @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;
}
/**
*
*
*
* 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`
*
*
* string mode = 10;
*
* @return This builder for chaining.
*/
public Builder clearMode() {
mode_ = getDefaultInstance().getMode();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
*
*
*
* 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`
*
*
* string mode = 10;
*
* @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_ = "";
/**
*
*
*
* Specifies a valid partial or full URL to an existing Persistent Disk
* resource.
*
*
* string source = 11;
*
* @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;
}
}
/**
*
*
*
* Specifies a valid partial or full URL to an existing Persistent Disk
* resource.
*
*
* string source = 11;
*
* @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;
}
}
/**
*
*
*
* Specifies a valid partial or full URL to an existing Persistent Disk
* resource.
*
*
* string source = 11;
*
* @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;
}
/**
*
*
*
* Specifies a valid partial or full URL to an existing Persistent Disk
* resource.
*
*
* string source = 11;
*
* @return This builder for chaining.
*/
public Builder clearSource() {
source_ = getDefaultInstance().getSource();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
/**
*
*
*
* Specifies a valid partial or full URL to an existing Persistent Disk
* resource.
*
*
* string source = 11;
*
* @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_ = "";
/**
*
*
*
* Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
* specified, the default is `PERSISTENT`.
* Valid values:
*
* * `PERSISTENT`
* * `SCRATCH`
*
*
* string type = 12;
*
* @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;
}
}
/**
*
*
*
* Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
* specified, the default is `PERSISTENT`.
* Valid values:
*
* * `PERSISTENT`
* * `SCRATCH`
*
*
* string type = 12;
*
* @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;
}
}
/**
*
*
*
* Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
* specified, the default is `PERSISTENT`.
* Valid values:
*
* * `PERSISTENT`
* * `SCRATCH`
*
*
* string type = 12;
*
* @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;
}
/**
*
*
*
* Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
* specified, the default is `PERSISTENT`.
* Valid values:
*
* * `PERSISTENT`
* * `SCRATCH`
*
*
* string type = 12;
*
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = getDefaultInstance().getType();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
return this;
}
/**
*
*
*
* Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not
* specified, the default is `PERSISTENT`.
* Valid values:
*
* * `PERSISTENT`
* * `SCRATCH`
*
*
* string type = 12;
*
* @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.LocalDisk)
}
// @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.LocalDisk)
private static final com.google.cloud.notebooks.v1.LocalDisk DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.LocalDisk();
}
public static com.google.cloud.notebooks.v1.LocalDisk getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LocalDisk parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.notebooks.v1.LocalDisk getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}