yandex.cloud.api.compute.v1.DiskOuterClass Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yandex/cloud/compute/v1/disk.proto
package yandex.cloud.api.compute.v1;
public final class DiskOuterClass {
private DiskOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface DiskOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.Disk)
com.google.protobuf.MessageOrBuilder {
/**
*
* ID of the disk.
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* ID of the disk.
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* ID of the folder that the disk belongs to.
*
*
* string folder_id = 2;
* @return The folderId.
*/
java.lang.String getFolderId();
/**
*
* ID of the folder that the disk belongs to.
*
*
* string folder_id = 2;
* @return The bytes for folderId.
*/
com.google.protobuf.ByteString
getFolderIdBytes();
/**
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
boolean hasCreatedAt();
/**
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
com.google.protobuf.Timestamp getCreatedAt();
/**
* .google.protobuf.Timestamp created_at = 3;
*/
com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder();
/**
*
* Name of the disk. 1-63 characters long.
*
*
* string name = 4;
* @return The name.
*/
java.lang.String getName();
/**
*
* Name of the disk. 1-63 characters long.
*
*
* string name = 4;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Description of the disk. 0-256 characters long.
*
*
* string description = 5;
* @return The description.
*/
java.lang.String getDescription();
/**
*
* Description of the disk. 0-256 characters long.
*
*
* string description = 5;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
int getLabelsCount();
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
boolean containsLabels(
java.lang.String key);
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getLabels();
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
java.util.Map
getLabelsMap();
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
java.lang.String getLabelsOrThrow(
java.lang.String key);
/**
*
* ID of the disk type.
*
*
* string type_id = 7;
* @return The typeId.
*/
java.lang.String getTypeId();
/**
*
* ID of the disk type.
*
*
* string type_id = 7;
* @return The bytes for typeId.
*/
com.google.protobuf.ByteString
getTypeIdBytes();
/**
*
* ID of the availability zone where the disk resides.
*
*
* string zone_id = 8;
* @return The zoneId.
*/
java.lang.String getZoneId();
/**
*
* ID of the availability zone where the disk resides.
*
*
* string zone_id = 8;
* @return The bytes for zoneId.
*/
com.google.protobuf.ByteString
getZoneIdBytes();
/**
*
* Size of the disk, specified in bytes.
*
*
* int64 size = 9;
* @return The size.
*/
long getSize();
/**
*
* Block size of the disk, specified in bytes.
*
*
* int64 block_size = 15;
* @return The blockSize.
*/
long getBlockSize();
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @return A list containing the productIds.
*/
java.util.List
getProductIdsList();
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @return The count of productIds.
*/
int getProductIdsCount();
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @param index The index of the element to return.
* @return The productIds at the given index.
*/
java.lang.String getProductIds(int index);
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @param index The index of the value to return.
* @return The bytes of the productIds at the given index.
*/
com.google.protobuf.ByteString
getProductIdsBytes(int index);
/**
*
* Current status of the disk.
*
*
* .yandex.cloud.compute.v1.Disk.Status status = 11;
* @return The enum numeric value on the wire for status.
*/
int getStatusValue();
/**
*
* Current status of the disk.
*
*
* .yandex.cloud.compute.v1.Disk.Status status = 11;
* @return The status.
*/
yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status getStatus();
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @return Whether the sourceImageId field is set.
*/
boolean hasSourceImageId();
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @return The sourceImageId.
*/
java.lang.String getSourceImageId();
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @return The bytes for sourceImageId.
*/
com.google.protobuf.ByteString
getSourceImageIdBytes();
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @return Whether the sourceSnapshotId field is set.
*/
boolean hasSourceSnapshotId();
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @return The sourceSnapshotId.
*/
java.lang.String getSourceSnapshotId();
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @return The bytes for sourceSnapshotId.
*/
com.google.protobuf.ByteString
getSourceSnapshotIdBytes();
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @return A list containing the instanceIds.
*/
java.util.List
getInstanceIdsList();
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @return The count of instanceIds.
*/
int getInstanceIdsCount();
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @param index The index of the element to return.
* @return The instanceIds at the given index.
*/
java.lang.String getInstanceIds(int index);
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @param index The index of the value to return.
* @return The bytes of the instanceIds at the given index.
*/
com.google.protobuf.ByteString
getInstanceIdsBytes(int index);
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
* @return Whether the diskPlacementPolicy field is set.
*/
boolean hasDiskPlacementPolicy();
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
* @return The diskPlacementPolicy.
*/
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy getDiskPlacementPolicy();
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
*/
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicyOrBuilder getDiskPlacementPolicyOrBuilder();
public yandex.cloud.api.compute.v1.DiskOuterClass.Disk.SourceCase getSourceCase();
}
/**
*
* A Disk resource. For more information, see [Disks](/docs/compute/concepts/disk).
*
*
* Protobuf type {@code yandex.cloud.compute.v1.Disk}
*/
public static final class Disk extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.Disk)
DiskOrBuilder {
private static final long serialVersionUID = 0L;
// Use Disk.newBuilder() to construct.
private Disk(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Disk() {
id_ = "";
folderId_ = "";
name_ = "";
description_ = "";
typeId_ = "";
zoneId_ = "";
productIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
status_ = 0;
instanceIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Disk();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Disk(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
folderId_ = s;
break;
}
case 26: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (createdAt_ != null) {
subBuilder = createdAt_.toBuilder();
}
createdAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(createdAt_);
createdAt_ = subBuilder.buildPartial();
}
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
labels__ = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
labels_.getMutableMap().put(
labels__.getKey(), labels__.getValue());
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
typeId_ = s;
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
zoneId_ = s;
break;
}
case 72: {
size_ = input.readInt64();
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
productIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
productIds_.add(s);
break;
}
case 88: {
int rawValue = input.readEnum();
status_ = rawValue;
break;
}
case 98: {
java.lang.String s = input.readStringRequireUtf8();
sourceCase_ = 12;
source_ = s;
break;
}
case 106: {
java.lang.String s = input.readStringRequireUtf8();
sourceCase_ = 13;
source_ = s;
break;
}
case 114: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
instanceIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
instanceIds_.add(s);
break;
}
case 120: {
blockSize_ = input.readInt64();
break;
}
case 130: {
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.Builder subBuilder = null;
if (diskPlacementPolicy_ != null) {
subBuilder = diskPlacementPolicy_.toBuilder();
}
diskPlacementPolicy_ = input.readMessage(yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(diskPlacementPolicy_);
diskPlacementPolicy_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
productIds_ = productIds_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
instanceIds_ = instanceIds_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.DiskOuterClass.internal_static_yandex_cloud_compute_v1_Disk_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 6:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.DiskOuterClass.internal_static_yandex_cloud_compute_v1_Disk_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.DiskOuterClass.Disk.class, yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.Disk.Status}
*/
public enum Status
implements com.google.protobuf.ProtocolMessageEnum {
/**
* STATUS_UNSPECIFIED = 0;
*/
STATUS_UNSPECIFIED(0),
/**
*
* Disk is being created.
*
*
* CREATING = 1;
*/
CREATING(1),
/**
*
* Disk is ready to use.
*
*
* READY = 2;
*/
READY(2),
/**
*
* Disk encountered a problem and cannot operate.
*
*
* ERROR = 3;
*/
ERROR(3),
/**
*
* Disk is being deleted.
*
*
* DELETING = 4;
*/
DELETING(4),
UNRECOGNIZED(-1),
;
/**
* STATUS_UNSPECIFIED = 0;
*/
public static final int STATUS_UNSPECIFIED_VALUE = 0;
/**
*
* Disk is being created.
*
*
* CREATING = 1;
*/
public static final int CREATING_VALUE = 1;
/**
*
* Disk is ready to use.
*
*
* READY = 2;
*/
public static final int READY_VALUE = 2;
/**
*
* Disk encountered a problem and cannot operate.
*
*
* ERROR = 3;
*/
public static final int ERROR_VALUE = 3;
/**
*
* Disk is being deleted.
*
*
* DELETING = 4;
*/
public static final int DELETING_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Status valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Status forNumber(int value) {
switch (value) {
case 0: return STATUS_UNSPECIFIED;
case 1: return CREATING;
case 2: return READY;
case 3: return ERROR;
case 4: return DELETING;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Status> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Status findValueByNumber(int number) {
return Status.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.DiskOuterClass.Disk.getDescriptor().getEnumTypes().get(0);
}
private static final Status[] VALUES = values();
public static Status valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Status(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.Disk.Status)
}
private int sourceCase_ = 0;
private java.lang.Object source_;
public enum SourceCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SOURCE_IMAGE_ID(12),
SOURCE_SNAPSHOT_ID(13),
SOURCE_NOT_SET(0);
private final int value;
private SourceCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SourceCase valueOf(int value) {
return forNumber(value);
}
public static SourceCase forNumber(int value) {
switch (value) {
case 12: return SOURCE_IMAGE_ID;
case 13: return SOURCE_SNAPSHOT_ID;
case 0: return SOURCE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SourceCase
getSourceCase() {
return SourceCase.forNumber(
sourceCase_);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* ID of the disk.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* ID of the disk.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FOLDER_ID_FIELD_NUMBER = 2;
private volatile java.lang.Object folderId_;
/**
*
* ID of the folder that the disk belongs to.
*
*
* string folder_id = 2;
* @return The folderId.
*/
@java.lang.Override
public java.lang.String getFolderId() {
java.lang.Object ref = folderId_;
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();
folderId_ = s;
return s;
}
}
/**
*
* ID of the folder that the disk belongs to.
*
*
* string folder_id = 2;
* @return The bytes for folderId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFolderIdBytes() {
java.lang.Object ref = folderId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
folderId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATED_AT_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp createdAt_;
/**
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int NAME_FIELD_NUMBER = 4;
private volatile java.lang.Object name_;
/**
*
* Name of the disk. 1-63 characters long.
*
*
* string name = 4;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Name of the disk. 1-63 characters long.
*
*
* string name = 4;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 5;
private volatile java.lang.Object description_;
/**
*
* Description of the disk. 0-256 characters long.
*
*
* string description = 5;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
*
* Description of the disk. 0-256 characters long.
*
*
* string description = 5;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LABELS_FIELD_NUMBER = 6;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
yandex.cloud.api.compute.v1.DiskOuterClass.internal_static_yandex_cloud_compute_v1_Disk_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int TYPE_ID_FIELD_NUMBER = 7;
private volatile java.lang.Object typeId_;
/**
*
* ID of the disk type.
*
*
* string type_id = 7;
* @return The typeId.
*/
@java.lang.Override
public java.lang.String getTypeId() {
java.lang.Object ref = typeId_;
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();
typeId_ = s;
return s;
}
}
/**
*
* ID of the disk type.
*
*
* string type_id = 7;
* @return The bytes for typeId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTypeIdBytes() {
java.lang.Object ref = typeId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
typeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ZONE_ID_FIELD_NUMBER = 8;
private volatile java.lang.Object zoneId_;
/**
*
* ID of the availability zone where the disk resides.
*
*
* string zone_id = 8;
* @return The zoneId.
*/
@java.lang.Override
public java.lang.String getZoneId() {
java.lang.Object ref = zoneId_;
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();
zoneId_ = s;
return s;
}
}
/**
*
* ID of the availability zone where the disk resides.
*
*
* string zone_id = 8;
* @return The bytes for zoneId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getZoneIdBytes() {
java.lang.Object ref = zoneId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
zoneId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SIZE_FIELD_NUMBER = 9;
private long size_;
/**
*
* Size of the disk, specified in bytes.
*
*
* int64 size = 9;
* @return The size.
*/
@java.lang.Override
public long getSize() {
return size_;
}
public static final int BLOCK_SIZE_FIELD_NUMBER = 15;
private long blockSize_;
/**
*
* Block size of the disk, specified in bytes.
*
*
* int64 block_size = 15;
* @return The blockSize.
*/
@java.lang.Override
public long getBlockSize() {
return blockSize_;
}
public static final int PRODUCT_IDS_FIELD_NUMBER = 10;
private com.google.protobuf.LazyStringList productIds_;
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @return A list containing the productIds.
*/
public com.google.protobuf.ProtocolStringList
getProductIdsList() {
return productIds_;
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @return The count of productIds.
*/
public int getProductIdsCount() {
return productIds_.size();
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @param index The index of the element to return.
* @return The productIds at the given index.
*/
public java.lang.String getProductIds(int index) {
return productIds_.get(index);
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @param index The index of the value to return.
* @return The bytes of the productIds at the given index.
*/
public com.google.protobuf.ByteString
getProductIdsBytes(int index) {
return productIds_.getByteString(index);
}
public static final int STATUS_FIELD_NUMBER = 11;
private int status_;
/**
*
* Current status of the disk.
*
*
* .yandex.cloud.compute.v1.Disk.Status status = 11;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Current status of the disk.
*
*
* .yandex.cloud.compute.v1.Disk.Status status = 11;
* @return The status.
*/
@java.lang.Override public yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status result = yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status.valueOf(status_);
return result == null ? yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status.UNRECOGNIZED : result;
}
public static final int SOURCE_IMAGE_ID_FIELD_NUMBER = 12;
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @return Whether the sourceImageId field is set.
*/
public boolean hasSourceImageId() {
return sourceCase_ == 12;
}
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @return The sourceImageId.
*/
public java.lang.String getSourceImageId() {
java.lang.Object ref = "";
if (sourceCase_ == 12) {
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();
if (sourceCase_ == 12) {
source_ = s;
}
return s;
}
}
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @return The bytes for sourceImageId.
*/
public com.google.protobuf.ByteString
getSourceImageIdBytes() {
java.lang.Object ref = "";
if (sourceCase_ == 12) {
ref = source_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (sourceCase_ == 12) {
source_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SOURCE_SNAPSHOT_ID_FIELD_NUMBER = 13;
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @return Whether the sourceSnapshotId field is set.
*/
public boolean hasSourceSnapshotId() {
return sourceCase_ == 13;
}
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @return The sourceSnapshotId.
*/
public java.lang.String getSourceSnapshotId() {
java.lang.Object ref = "";
if (sourceCase_ == 13) {
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();
if (sourceCase_ == 13) {
source_ = s;
}
return s;
}
}
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @return The bytes for sourceSnapshotId.
*/
public com.google.protobuf.ByteString
getSourceSnapshotIdBytes() {
java.lang.Object ref = "";
if (sourceCase_ == 13) {
ref = source_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (sourceCase_ == 13) {
source_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INSTANCE_IDS_FIELD_NUMBER = 14;
private com.google.protobuf.LazyStringList instanceIds_;
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @return A list containing the instanceIds.
*/
public com.google.protobuf.ProtocolStringList
getInstanceIdsList() {
return instanceIds_;
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @return The count of instanceIds.
*/
public int getInstanceIdsCount() {
return instanceIds_.size();
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @param index The index of the element to return.
* @return The instanceIds at the given index.
*/
public java.lang.String getInstanceIds(int index) {
return instanceIds_.get(index);
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @param index The index of the value to return.
* @return The bytes of the instanceIds at the given index.
*/
public com.google.protobuf.ByteString
getInstanceIdsBytes(int index) {
return instanceIds_.getByteString(index);
}
public static final int DISK_PLACEMENT_POLICY_FIELD_NUMBER = 16;
private yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy diskPlacementPolicy_;
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
* @return Whether the diskPlacementPolicy field is set.
*/
@java.lang.Override
public boolean hasDiskPlacementPolicy() {
return diskPlacementPolicy_ != null;
}
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
* @return The diskPlacementPolicy.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy getDiskPlacementPolicy() {
return diskPlacementPolicy_ == null ? yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.getDefaultInstance() : diskPlacementPolicy_;
}
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicyOrBuilder getDiskPlacementPolicyOrBuilder() {
return getDiskPlacementPolicy();
}
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(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, folderId_);
}
if (createdAt_ != null) {
output.writeMessage(3, getCreatedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetLabels(),
LabelsDefaultEntryHolder.defaultEntry,
6);
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, typeId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zoneId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, zoneId_);
}
if (size_ != 0L) {
output.writeInt64(9, size_);
}
for (int i = 0; i < productIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, productIds_.getRaw(i));
}
if (status_ != yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status.STATUS_UNSPECIFIED.getNumber()) {
output.writeEnum(11, status_);
}
if (sourceCase_ == 12) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, source_);
}
if (sourceCase_ == 13) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, source_);
}
for (int i = 0; i < instanceIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 14, instanceIds_.getRaw(i));
}
if (blockSize_ != 0L) {
output.writeInt64(15, blockSize_);
}
if (diskPlacementPolicy_ != null) {
output.writeMessage(16, getDiskPlacementPolicy());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, folderId_);
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCreatedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_);
}
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, labels__);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, typeId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zoneId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, zoneId_);
}
if (size_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(9, size_);
}
{
int dataSize = 0;
for (int i = 0; i < productIds_.size(); i++) {
dataSize += computeStringSizeNoTag(productIds_.getRaw(i));
}
size += dataSize;
size += 1 * getProductIdsList().size();
}
if (status_ != yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status.STATUS_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(11, status_);
}
if (sourceCase_ == 12) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, source_);
}
if (sourceCase_ == 13) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, source_);
}
{
int dataSize = 0;
for (int i = 0; i < instanceIds_.size(); i++) {
dataSize += computeStringSizeNoTag(instanceIds_.getRaw(i));
}
size += dataSize;
size += 1 * getInstanceIdsList().size();
}
if (blockSize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(15, blockSize_);
}
if (diskPlacementPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, getDiskPlacementPolicy());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.compute.v1.DiskOuterClass.Disk)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.DiskOuterClass.Disk other = (yandex.cloud.api.compute.v1.DiskOuterClass.Disk) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getFolderId()
.equals(other.getFolderId())) return false;
if (hasCreatedAt() != other.hasCreatedAt()) return false;
if (hasCreatedAt()) {
if (!getCreatedAt()
.equals(other.getCreatedAt())) return false;
}
if (!getName()
.equals(other.getName())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!internalGetLabels().equals(
other.internalGetLabels())) return false;
if (!getTypeId()
.equals(other.getTypeId())) return false;
if (!getZoneId()
.equals(other.getZoneId())) return false;
if (getSize()
!= other.getSize()) return false;
if (getBlockSize()
!= other.getBlockSize()) return false;
if (!getProductIdsList()
.equals(other.getProductIdsList())) return false;
if (status_ != other.status_) return false;
if (!getInstanceIdsList()
.equals(other.getInstanceIdsList())) return false;
if (hasDiskPlacementPolicy() != other.hasDiskPlacementPolicy()) return false;
if (hasDiskPlacementPolicy()) {
if (!getDiskPlacementPolicy()
.equals(other.getDiskPlacementPolicy())) return false;
}
if (!getSourceCase().equals(other.getSourceCase())) return false;
switch (sourceCase_) {
case 12:
if (!getSourceImageId()
.equals(other.getSourceImageId())) return false;
break;
case 13:
if (!getSourceSnapshotId()
.equals(other.getSourceSnapshotId())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) 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) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + FOLDER_ID_FIELD_NUMBER;
hash = (53 * hash) + getFolderId().hashCode();
if (hasCreatedAt()) {
hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + getCreatedAt().hashCode();
}
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (37 * hash) + TYPE_ID_FIELD_NUMBER;
hash = (53 * hash) + getTypeId().hashCode();
hash = (37 * hash) + ZONE_ID_FIELD_NUMBER;
hash = (53 * hash) + getZoneId().hashCode();
hash = (37 * hash) + SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSize());
hash = (37 * hash) + BLOCK_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBlockSize());
if (getProductIdsCount() > 0) {
hash = (37 * hash) + PRODUCT_IDS_FIELD_NUMBER;
hash = (53 * hash) + getProductIdsList().hashCode();
}
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
if (getInstanceIdsCount() > 0) {
hash = (37 * hash) + INSTANCE_IDS_FIELD_NUMBER;
hash = (53 * hash) + getInstanceIdsList().hashCode();
}
if (hasDiskPlacementPolicy()) {
hash = (37 * hash) + DISK_PLACEMENT_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getDiskPlacementPolicy().hashCode();
}
switch (sourceCase_) {
case 12:
hash = (37 * hash) + SOURCE_IMAGE_ID_FIELD_NUMBER;
hash = (53 * hash) + getSourceImageId().hashCode();
break;
case 13:
hash = (37 * hash) + SOURCE_SNAPSHOT_ID_FIELD_NUMBER;
hash = (53 * hash) + getSourceSnapshotId().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.compute.v1.DiskOuterClass.Disk prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A Disk resource. For more information, see [Disks](/docs/compute/concepts/disk).
*
*
* Protobuf type {@code yandex.cloud.compute.v1.Disk}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.Disk)
yandex.cloud.api.compute.v1.DiskOuterClass.DiskOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.DiskOuterClass.internal_static_yandex_cloud_compute_v1_Disk_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 6:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 6:
return internalGetMutableLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.DiskOuterClass.internal_static_yandex_cloud_compute_v1_Disk_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.DiskOuterClass.Disk.class, yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.DiskOuterClass.Disk.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
folderId_ = "";
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
name_ = "";
description_ = "";
internalGetMutableLabels().clear();
typeId_ = "";
zoneId_ = "";
size_ = 0L;
blockSize_ = 0L;
productIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
status_ = 0;
instanceIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
if (diskPlacementPolicyBuilder_ == null) {
diskPlacementPolicy_ = null;
} else {
diskPlacementPolicy_ = null;
diskPlacementPolicyBuilder_ = null;
}
sourceCase_ = 0;
source_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.DiskOuterClass.internal_static_yandex_cloud_compute_v1_Disk_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.DiskOuterClass.Disk getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.DiskOuterClass.Disk.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.DiskOuterClass.Disk build() {
yandex.cloud.api.compute.v1.DiskOuterClass.Disk result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.DiskOuterClass.Disk buildPartial() {
yandex.cloud.api.compute.v1.DiskOuterClass.Disk result = new yandex.cloud.api.compute.v1.DiskOuterClass.Disk(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.folderId_ = folderId_;
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
result.name_ = name_;
result.description_ = description_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
result.typeId_ = typeId_;
result.zoneId_ = zoneId_;
result.size_ = size_;
result.blockSize_ = blockSize_;
if (((bitField0_ & 0x00000002) != 0)) {
productIds_ = productIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.productIds_ = productIds_;
result.status_ = status_;
if (sourceCase_ == 12) {
result.source_ = source_;
}
if (sourceCase_ == 13) {
result.source_ = source_;
}
if (((bitField0_ & 0x00000004) != 0)) {
instanceIds_ = instanceIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.instanceIds_ = instanceIds_;
if (diskPlacementPolicyBuilder_ == null) {
result.diskPlacementPolicy_ = diskPlacementPolicy_;
} else {
result.diskPlacementPolicy_ = diskPlacementPolicyBuilder_.build();
}
result.sourceCase_ = sourceCase_;
onBuilt();
return result;
}
@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 yandex.cloud.api.compute.v1.DiskOuterClass.Disk) {
return mergeFrom((yandex.cloud.api.compute.v1.DiskOuterClass.Disk)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.DiskOuterClass.Disk other) {
if (other == yandex.cloud.api.compute.v1.DiskOuterClass.Disk.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getFolderId().isEmpty()) {
folderId_ = other.folderId_;
onChanged();
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
if (!other.getTypeId().isEmpty()) {
typeId_ = other.typeId_;
onChanged();
}
if (!other.getZoneId().isEmpty()) {
zoneId_ = other.zoneId_;
onChanged();
}
if (other.getSize() != 0L) {
setSize(other.getSize());
}
if (other.getBlockSize() != 0L) {
setBlockSize(other.getBlockSize());
}
if (!other.productIds_.isEmpty()) {
if (productIds_.isEmpty()) {
productIds_ = other.productIds_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureProductIdsIsMutable();
productIds_.addAll(other.productIds_);
}
onChanged();
}
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
if (!other.instanceIds_.isEmpty()) {
if (instanceIds_.isEmpty()) {
instanceIds_ = other.instanceIds_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureInstanceIdsIsMutable();
instanceIds_.addAll(other.instanceIds_);
}
onChanged();
}
if (other.hasDiskPlacementPolicy()) {
mergeDiskPlacementPolicy(other.getDiskPlacementPolicy());
}
switch (other.getSourceCase()) {
case SOURCE_IMAGE_ID: {
sourceCase_ = 12;
source_ = other.source_;
onChanged();
break;
}
case SOURCE_SNAPSHOT_ID: {
sourceCase_ = 13;
source_ = other.source_;
onChanged();
break;
}
case SOURCE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.compute.v1.DiskOuterClass.Disk parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.DiskOuterClass.Disk) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int sourceCase_ = 0;
private java.lang.Object source_;
public SourceCase
getSourceCase() {
return SourceCase.forNumber(
sourceCase_);
}
public Builder clearSource() {
sourceCase_ = 0;
source_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* ID of the disk.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the disk.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the disk.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* ID of the disk.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* ID of the disk.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object folderId_ = "";
/**
*
* ID of the folder that the disk belongs to.
*
*
* string folder_id = 2;
* @return The folderId.
*/
public java.lang.String getFolderId() {
java.lang.Object ref = folderId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
folderId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the folder that the disk belongs to.
*
*
* string folder_id = 2;
* @return The bytes for folderId.
*/
public com.google.protobuf.ByteString
getFolderIdBytes() {
java.lang.Object ref = folderId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
folderId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the folder that the disk belongs to.
*
*
* string folder_id = 2;
* @param value The folderId to set.
* @return This builder for chaining.
*/
public Builder setFolderId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
folderId_ = value;
onChanged();
return this;
}
/**
*
* ID of the folder that the disk belongs to.
*
*
* string folder_id = 2;
* @return This builder for chaining.
*/
public Builder clearFolderId() {
folderId_ = getDefaultInstance().getFolderId();
onChanged();
return this;
}
/**
*
* ID of the folder that the disk belongs to.
*
*
* string folder_id = 2;
* @param value The bytes for folderId to set.
* @return This builder for chaining.
*/
public Builder setFolderIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
folderId_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createdAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_;
/**
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
public com.google.protobuf.Timestamp getCreatedAt() {
if (createdAtBuilder_ == null) {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
} else {
return createdAtBuilder_.getMessage();
}
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createdAt_ = value;
onChanged();
} else {
createdAtBuilder_.setMessage(value);
}
return this;
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createdAtBuilder_ == null) {
createdAt_ = builderForValue.build();
onChanged();
} else {
createdAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (createdAt_ != null) {
createdAt_ =
com.google.protobuf.Timestamp.newBuilder(createdAt_).mergeFrom(value).buildPartial();
} else {
createdAt_ = value;
}
onChanged();
} else {
createdAtBuilder_.mergeFrom(value);
}
return this;
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreatedAtFieldBuilder() {
if (createdAtBuilder_ == null) {
createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreatedAt(),
getParentForChildren(),
isClean());
createdAt_ = null;
}
return createdAtBuilder_;
}
private java.lang.Object name_ = "";
/**
*
* Name of the disk. 1-63 characters long.
*
*
* string name = 4;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of the disk. 1-63 characters long.
*
*
* string name = 4;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the disk. 1-63 characters long.
*
*
* string name = 4;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Name of the disk. 1-63 characters long.
*
*
* string name = 4;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the disk. 1-63 characters long.
*
*
* string name = 4;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* Description of the disk. 0-256 characters long.
*
*
* string description = 5;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Description of the disk. 0-256 characters long.
*
*
* string description = 5;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Description of the disk. 0-256 characters long.
*
*
* string description = 5;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* Description of the disk. 0-256 characters long.
*
*
* string description = 5;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Description of the disk. 0-256 characters long.
*
*
* string description = 5;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
onChanged();;
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearLabels() {
internalGetMutableLabels().getMutableMap()
.clear();
return this;
}
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
public Builder removeLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableLabels().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableLabels() {
return internalGetMutableLabels().getMutableMap();
}
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
public Builder putLabels(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableLabels().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Resource labels as `key:value` pairs. Maximum of 64 per resource.
*
*
* map<string, string> labels = 6;
*/
public Builder putAllLabels(
java.util.Map values) {
internalGetMutableLabels().getMutableMap()
.putAll(values);
return this;
}
private java.lang.Object typeId_ = "";
/**
*
* ID of the disk type.
*
*
* string type_id = 7;
* @return The typeId.
*/
public java.lang.String getTypeId() {
java.lang.Object ref = typeId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
typeId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the disk type.
*
*
* string type_id = 7;
* @return The bytes for typeId.
*/
public com.google.protobuf.ByteString
getTypeIdBytes() {
java.lang.Object ref = typeId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
typeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the disk type.
*
*
* string type_id = 7;
* @param value The typeId to set.
* @return This builder for chaining.
*/
public Builder setTypeId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
typeId_ = value;
onChanged();
return this;
}
/**
*
* ID of the disk type.
*
*
* string type_id = 7;
* @return This builder for chaining.
*/
public Builder clearTypeId() {
typeId_ = getDefaultInstance().getTypeId();
onChanged();
return this;
}
/**
*
* ID of the disk type.
*
*
* string type_id = 7;
* @param value The bytes for typeId to set.
* @return This builder for chaining.
*/
public Builder setTypeIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
typeId_ = value;
onChanged();
return this;
}
private java.lang.Object zoneId_ = "";
/**
*
* ID of the availability zone where the disk resides.
*
*
* string zone_id = 8;
* @return The zoneId.
*/
public java.lang.String getZoneId() {
java.lang.Object ref = zoneId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
zoneId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the availability zone where the disk resides.
*
*
* string zone_id = 8;
* @return The bytes for zoneId.
*/
public com.google.protobuf.ByteString
getZoneIdBytes() {
java.lang.Object ref = zoneId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
zoneId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the availability zone where the disk resides.
*
*
* string zone_id = 8;
* @param value The zoneId to set.
* @return This builder for chaining.
*/
public Builder setZoneId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
zoneId_ = value;
onChanged();
return this;
}
/**
*
* ID of the availability zone where the disk resides.
*
*
* string zone_id = 8;
* @return This builder for chaining.
*/
public Builder clearZoneId() {
zoneId_ = getDefaultInstance().getZoneId();
onChanged();
return this;
}
/**
*
* ID of the availability zone where the disk resides.
*
*
* string zone_id = 8;
* @param value The bytes for zoneId to set.
* @return This builder for chaining.
*/
public Builder setZoneIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
zoneId_ = value;
onChanged();
return this;
}
private long size_ ;
/**
*
* Size of the disk, specified in bytes.
*
*
* int64 size = 9;
* @return The size.
*/
@java.lang.Override
public long getSize() {
return size_;
}
/**
*
* Size of the disk, specified in bytes.
*
*
* int64 size = 9;
* @param value The size to set.
* @return This builder for chaining.
*/
public Builder setSize(long value) {
size_ = value;
onChanged();
return this;
}
/**
*
* Size of the disk, specified in bytes.
*
*
* int64 size = 9;
* @return This builder for chaining.
*/
public Builder clearSize() {
size_ = 0L;
onChanged();
return this;
}
private long blockSize_ ;
/**
*
* Block size of the disk, specified in bytes.
*
*
* int64 block_size = 15;
* @return The blockSize.
*/
@java.lang.Override
public long getBlockSize() {
return blockSize_;
}
/**
*
* Block size of the disk, specified in bytes.
*
*
* int64 block_size = 15;
* @param value The blockSize to set.
* @return This builder for chaining.
*/
public Builder setBlockSize(long value) {
blockSize_ = value;
onChanged();
return this;
}
/**
*
* Block size of the disk, specified in bytes.
*
*
* int64 block_size = 15;
* @return This builder for chaining.
*/
public Builder clearBlockSize() {
blockSize_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList productIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureProductIdsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
productIds_ = new com.google.protobuf.LazyStringArrayList(productIds_);
bitField0_ |= 0x00000002;
}
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @return A list containing the productIds.
*/
public com.google.protobuf.ProtocolStringList
getProductIdsList() {
return productIds_.getUnmodifiableView();
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @return The count of productIds.
*/
public int getProductIdsCount() {
return productIds_.size();
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @param index The index of the element to return.
* @return The productIds at the given index.
*/
public java.lang.String getProductIds(int index) {
return productIds_.get(index);
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @param index The index of the value to return.
* @return The bytes of the productIds at the given index.
*/
public com.google.protobuf.ByteString
getProductIdsBytes(int index) {
return productIds_.getByteString(index);
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @param index The index to set the value at.
* @param value The productIds to set.
* @return This builder for chaining.
*/
public Builder setProductIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureProductIdsIsMutable();
productIds_.set(index, value);
onChanged();
return this;
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @param value The productIds to add.
* @return This builder for chaining.
*/
public Builder addProductIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureProductIdsIsMutable();
productIds_.add(value);
onChanged();
return this;
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @param values The productIds to add.
* @return This builder for chaining.
*/
public Builder addAllProductIds(
java.lang.Iterable values) {
ensureProductIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, productIds_);
onChanged();
return this;
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @return This builder for chaining.
*/
public Builder clearProductIds() {
productIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*
*
* repeated string product_ids = 10;
* @param value The bytes of the productIds to add.
* @return This builder for chaining.
*/
public Builder addProductIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureProductIdsIsMutable();
productIds_.add(value);
onChanged();
return this;
}
private int status_ = 0;
/**
*
* Current status of the disk.
*
*
* .yandex.cloud.compute.v1.Disk.Status status = 11;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Current status of the disk.
*
*
* .yandex.cloud.compute.v1.Disk.Status status = 11;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
onChanged();
return this;
}
/**
*
* Current status of the disk.
*
*
* .yandex.cloud.compute.v1.Disk.Status status = 11;
* @return The status.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status result = yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status.valueOf(status_);
return result == null ? yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status.UNRECOGNIZED : result;
}
/**
*
* Current status of the disk.
*
*
* .yandex.cloud.compute.v1.Disk.Status status = 11;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(yandex.cloud.api.compute.v1.DiskOuterClass.Disk.Status value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Current status of the disk.
*
*
* .yandex.cloud.compute.v1.Disk.Status status = 11;
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = 0;
onChanged();
return this;
}
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @return Whether the sourceImageId field is set.
*/
@java.lang.Override
public boolean hasSourceImageId() {
return sourceCase_ == 12;
}
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @return The sourceImageId.
*/
@java.lang.Override
public java.lang.String getSourceImageId() {
java.lang.Object ref = "";
if (sourceCase_ == 12) {
ref = source_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (sourceCase_ == 12) {
source_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @return The bytes for sourceImageId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSourceImageIdBytes() {
java.lang.Object ref = "";
if (sourceCase_ == 12) {
ref = source_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (sourceCase_ == 12) {
source_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @param value The sourceImageId to set.
* @return This builder for chaining.
*/
public Builder setSourceImageId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sourceCase_ = 12;
source_ = value;
onChanged();
return this;
}
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @return This builder for chaining.
*/
public Builder clearSourceImageId() {
if (sourceCase_ == 12) {
sourceCase_ = 0;
source_ = null;
onChanged();
}
return this;
}
/**
*
* ID of the image that was used for disk creation.
*
*
* string source_image_id = 12;
* @param value The bytes for sourceImageId to set.
* @return This builder for chaining.
*/
public Builder setSourceImageIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sourceCase_ = 12;
source_ = value;
onChanged();
return this;
}
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @return Whether the sourceSnapshotId field is set.
*/
@java.lang.Override
public boolean hasSourceSnapshotId() {
return sourceCase_ == 13;
}
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @return The sourceSnapshotId.
*/
@java.lang.Override
public java.lang.String getSourceSnapshotId() {
java.lang.Object ref = "";
if (sourceCase_ == 13) {
ref = source_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (sourceCase_ == 13) {
source_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @return The bytes for sourceSnapshotId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSourceSnapshotIdBytes() {
java.lang.Object ref = "";
if (sourceCase_ == 13) {
ref = source_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (sourceCase_ == 13) {
source_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @param value The sourceSnapshotId to set.
* @return This builder for chaining.
*/
public Builder setSourceSnapshotId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sourceCase_ = 13;
source_ = value;
onChanged();
return this;
}
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @return This builder for chaining.
*/
public Builder clearSourceSnapshotId() {
if (sourceCase_ == 13) {
sourceCase_ = 0;
source_ = null;
onChanged();
}
return this;
}
/**
*
* ID of the snapshot that was used for disk creation.
*
*
* string source_snapshot_id = 13;
* @param value The bytes for sourceSnapshotId to set.
* @return This builder for chaining.
*/
public Builder setSourceSnapshotIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sourceCase_ = 13;
source_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList instanceIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureInstanceIdsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
instanceIds_ = new com.google.protobuf.LazyStringArrayList(instanceIds_);
bitField0_ |= 0x00000004;
}
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @return A list containing the instanceIds.
*/
public com.google.protobuf.ProtocolStringList
getInstanceIdsList() {
return instanceIds_.getUnmodifiableView();
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @return The count of instanceIds.
*/
public int getInstanceIdsCount() {
return instanceIds_.size();
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @param index The index of the element to return.
* @return The instanceIds at the given index.
*/
public java.lang.String getInstanceIds(int index) {
return instanceIds_.get(index);
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @param index The index of the value to return.
* @return The bytes of the instanceIds at the given index.
*/
public com.google.protobuf.ByteString
getInstanceIdsBytes(int index) {
return instanceIds_.getByteString(index);
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @param index The index to set the value at.
* @param value The instanceIds to set.
* @return This builder for chaining.
*/
public Builder setInstanceIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInstanceIdsIsMutable();
instanceIds_.set(index, value);
onChanged();
return this;
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @param value The instanceIds to add.
* @return This builder for chaining.
*/
public Builder addInstanceIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInstanceIdsIsMutable();
instanceIds_.add(value);
onChanged();
return this;
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @param values The instanceIds to add.
* @return This builder for chaining.
*/
public Builder addAllInstanceIds(
java.lang.Iterable values) {
ensureInstanceIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, instanceIds_);
onChanged();
return this;
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @return This builder for chaining.
*/
public Builder clearInstanceIds() {
instanceIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Array of instances to which the disk is attached.
*
*
* repeated string instance_ids = 14;
* @param value The bytes of the instanceIds to add.
* @return This builder for chaining.
*/
public Builder addInstanceIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureInstanceIdsIsMutable();
instanceIds_.add(value);
onChanged();
return this;
}
private yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy diskPlacementPolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy, yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.Builder, yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicyOrBuilder> diskPlacementPolicyBuilder_;
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
* @return Whether the diskPlacementPolicy field is set.
*/
public boolean hasDiskPlacementPolicy() {
return diskPlacementPolicyBuilder_ != null || diskPlacementPolicy_ != null;
}
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
* @return The diskPlacementPolicy.
*/
public yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy getDiskPlacementPolicy() {
if (diskPlacementPolicyBuilder_ == null) {
return diskPlacementPolicy_ == null ? yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.getDefaultInstance() : diskPlacementPolicy_;
} else {
return diskPlacementPolicyBuilder_.getMessage();
}
}
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
*/
public Builder setDiskPlacementPolicy(yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy value) {
if (diskPlacementPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
diskPlacementPolicy_ = value;
onChanged();
} else {
diskPlacementPolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
*/
public Builder setDiskPlacementPolicy(
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.Builder builderForValue) {
if (diskPlacementPolicyBuilder_ == null) {
diskPlacementPolicy_ = builderForValue.build();
onChanged();
} else {
diskPlacementPolicyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
*/
public Builder mergeDiskPlacementPolicy(yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy value) {
if (diskPlacementPolicyBuilder_ == null) {
if (diskPlacementPolicy_ != null) {
diskPlacementPolicy_ =
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.newBuilder(diskPlacementPolicy_).mergeFrom(value).buildPartial();
} else {
diskPlacementPolicy_ = value;
}
onChanged();
} else {
diskPlacementPolicyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
*/
public Builder clearDiskPlacementPolicy() {
if (diskPlacementPolicyBuilder_ == null) {
diskPlacementPolicy_ = null;
onChanged();
} else {
diskPlacementPolicy_ = null;
diskPlacementPolicyBuilder_ = null;
}
return this;
}
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
*/
public yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.Builder getDiskPlacementPolicyBuilder() {
onChanged();
return getDiskPlacementPolicyFieldBuilder().getBuilder();
}
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
*/
public yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicyOrBuilder getDiskPlacementPolicyOrBuilder() {
if (diskPlacementPolicyBuilder_ != null) {
return diskPlacementPolicyBuilder_.getMessageOrBuilder();
} else {
return diskPlacementPolicy_ == null ?
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.getDefaultInstance() : diskPlacementPolicy_;
}
}
/**
*
* Placement policy configuration.
*
*
* .yandex.cloud.compute.v1.DiskPlacementPolicy disk_placement_policy = 16;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy, yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.Builder, yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicyOrBuilder>
getDiskPlacementPolicyFieldBuilder() {
if (diskPlacementPolicyBuilder_ == null) {
diskPlacementPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy, yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.Builder, yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicyOrBuilder>(
getDiskPlacementPolicy(),
getParentForChildren(),
isClean());
diskPlacementPolicy_ = null;
}
return diskPlacementPolicyBuilder_;
}
@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:yandex.cloud.compute.v1.Disk)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.Disk)
private static final yandex.cloud.api.compute.v1.DiskOuterClass.Disk DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.DiskOuterClass.Disk();
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.Disk getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Disk parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Disk(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.DiskOuterClass.Disk getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DiskPlacementPolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.DiskPlacementPolicy)
com.google.protobuf.MessageOrBuilder {
/**
*
* Placement group ID.
*
*
* string placement_group_id = 1;
* @return The placementGroupId.
*/
java.lang.String getPlacementGroupId();
/**
*
* Placement group ID.
*
*
* string placement_group_id = 1;
* @return The bytes for placementGroupId.
*/
com.google.protobuf.ByteString
getPlacementGroupIdBytes();
/**
* int64 placement_group_partition = 2;
* @return The placementGroupPartition.
*/
long getPlacementGroupPartition();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.DiskPlacementPolicy}
*/
public static final class DiskPlacementPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.DiskPlacementPolicy)
DiskPlacementPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use DiskPlacementPolicy.newBuilder() to construct.
private DiskPlacementPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DiskPlacementPolicy() {
placementGroupId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DiskPlacementPolicy();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DiskPlacementPolicy(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
placementGroupId_ = s;
break;
}
case 16: {
placementGroupPartition_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.DiskOuterClass.internal_static_yandex_cloud_compute_v1_DiskPlacementPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.DiskOuterClass.internal_static_yandex_cloud_compute_v1_DiskPlacementPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.class, yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.Builder.class);
}
public static final int PLACEMENT_GROUP_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object placementGroupId_;
/**
*
* Placement group ID.
*
*
* string placement_group_id = 1;
* @return The placementGroupId.
*/
@java.lang.Override
public java.lang.String getPlacementGroupId() {
java.lang.Object ref = placementGroupId_;
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();
placementGroupId_ = s;
return s;
}
}
/**
*
* Placement group ID.
*
*
* string placement_group_id = 1;
* @return The bytes for placementGroupId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPlacementGroupIdBytes() {
java.lang.Object ref = placementGroupId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
placementGroupId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PLACEMENT_GROUP_PARTITION_FIELD_NUMBER = 2;
private long placementGroupPartition_;
/**
* int64 placement_group_partition = 2;
* @return The placementGroupPartition.
*/
@java.lang.Override
public long getPlacementGroupPartition() {
return placementGroupPartition_;
}
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(placementGroupId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, placementGroupId_);
}
if (placementGroupPartition_ != 0L) {
output.writeInt64(2, placementGroupPartition_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(placementGroupId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, placementGroupId_);
}
if (placementGroupPartition_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, placementGroupPartition_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy other = (yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy) obj;
if (!getPlacementGroupId()
.equals(other.getPlacementGroupId())) return false;
if (getPlacementGroupPartition()
!= other.getPlacementGroupPartition()) return false;
if (!unknownFields.equals(other.unknownFields)) 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) + PLACEMENT_GROUP_ID_FIELD_NUMBER;
hash = (53 * hash) + getPlacementGroupId().hashCode();
hash = (37 * hash) + PLACEMENT_GROUP_PARTITION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getPlacementGroupPartition());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy 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 yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy 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 yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy 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(yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy 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;
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.DiskPlacementPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.DiskPlacementPolicy)
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.DiskOuterClass.internal_static_yandex_cloud_compute_v1_DiskPlacementPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.DiskOuterClass.internal_static_yandex_cloud_compute_v1_DiskPlacementPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.class, yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
placementGroupId_ = "";
placementGroupPartition_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.DiskOuterClass.internal_static_yandex_cloud_compute_v1_DiskPlacementPolicy_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy build() {
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy buildPartial() {
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy result = new yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy(this);
result.placementGroupId_ = placementGroupId_;
result.placementGroupPartition_ = placementGroupPartition_;
onBuilt();
return result;
}
@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 yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy) {
return mergeFrom((yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy other) {
if (other == yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy.getDefaultInstance()) return this;
if (!other.getPlacementGroupId().isEmpty()) {
placementGroupId_ = other.placementGroupId_;
onChanged();
}
if (other.getPlacementGroupPartition() != 0L) {
setPlacementGroupPartition(other.getPlacementGroupPartition());
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object placementGroupId_ = "";
/**
*
* Placement group ID.
*
*
* string placement_group_id = 1;
* @return The placementGroupId.
*/
public java.lang.String getPlacementGroupId() {
java.lang.Object ref = placementGroupId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
placementGroupId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Placement group ID.
*
*
* string placement_group_id = 1;
* @return The bytes for placementGroupId.
*/
public com.google.protobuf.ByteString
getPlacementGroupIdBytes() {
java.lang.Object ref = placementGroupId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
placementGroupId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Placement group ID.
*
*
* string placement_group_id = 1;
* @param value The placementGroupId to set.
* @return This builder for chaining.
*/
public Builder setPlacementGroupId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
placementGroupId_ = value;
onChanged();
return this;
}
/**
*
* Placement group ID.
*
*
* string placement_group_id = 1;
* @return This builder for chaining.
*/
public Builder clearPlacementGroupId() {
placementGroupId_ = getDefaultInstance().getPlacementGroupId();
onChanged();
return this;
}
/**
*
* Placement group ID.
*
*
* string placement_group_id = 1;
* @param value The bytes for placementGroupId to set.
* @return This builder for chaining.
*/
public Builder setPlacementGroupIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
placementGroupId_ = value;
onChanged();
return this;
}
private long placementGroupPartition_ ;
/**
* int64 placement_group_partition = 2;
* @return The placementGroupPartition.
*/
@java.lang.Override
public long getPlacementGroupPartition() {
return placementGroupPartition_;
}
/**
* int64 placement_group_partition = 2;
* @param value The placementGroupPartition to set.
* @return This builder for chaining.
*/
public Builder setPlacementGroupPartition(long value) {
placementGroupPartition_ = value;
onChanged();
return this;
}
/**
* int64 placement_group_partition = 2;
* @return This builder for chaining.
*/
public Builder clearPlacementGroupPartition() {
placementGroupPartition_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.compute.v1.DiskPlacementPolicy)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.DiskPlacementPolicy)
private static final yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy();
}
public static yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DiskPlacementPolicy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DiskPlacementPolicy(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.DiskOuterClass.DiskPlacementPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_compute_v1_Disk_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_compute_v1_Disk_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_compute_v1_Disk_LabelsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_compute_v1_Disk_LabelsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_compute_v1_DiskPlacementPolicy_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_compute_v1_DiskPlacementPolicy_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\"yandex/cloud/compute/v1/disk.proto\022\027ya" +
"ndex.cloud.compute.v1\032\037google/protobuf/t" +
"imestamp.proto\"\353\004\n\004Disk\022\n\n\002id\030\001 \001(\t\022\021\n\tf" +
"older_id\030\002 \001(\t\022.\n\ncreated_at\030\003 \001(\0132\032.goo" +
"gle.protobuf.Timestamp\022\014\n\004name\030\004 \001(\t\022\023\n\013" +
"description\030\005 \001(\t\0229\n\006labels\030\006 \003(\0132).yand" +
"ex.cloud.compute.v1.Disk.LabelsEntry\022\017\n\007" +
"type_id\030\007 \001(\t\022\017\n\007zone_id\030\010 \001(\t\022\014\n\004size\030\t" +
" \001(\003\022\022\n\nblock_size\030\017 \001(\003\022\023\n\013product_ids\030" +
"\n \003(\t\0224\n\006status\030\013 \001(\0162$.yandex.cloud.com" +
"pute.v1.Disk.Status\022\031\n\017source_image_id\030\014" +
" \001(\tH\000\022\034\n\022source_snapshot_id\030\r \001(\tH\000\022\024\n\014" +
"instance_ids\030\016 \003(\t\022K\n\025disk_placement_pol" +
"icy\030\020 \001(\0132,.yandex.cloud.compute.v1.Disk" +
"PlacementPolicy\032-\n\013LabelsEntry\022\013\n\003key\030\001 " +
"\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"R\n\006Status\022\026\n\022STAT" +
"US_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020" +
"\002\022\t\n\005ERROR\020\003\022\014\n\010DELETING\020\004B\010\n\006source\"T\n\023" +
"DiskPlacementPolicy\022\032\n\022placement_group_i" +
"d\030\001 \001(\t\022!\n\031placement_group_partition\030\002 \001" +
"(\003Bb\n\033yandex.cloud.api.compute.v1ZCgithu" +
"b.com/yandex-cloud/go-genproto/yandex/cl" +
"oud/compute/v1;computeb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.TimestampProto.getDescriptor(),
});
internal_static_yandex_cloud_compute_v1_Disk_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_yandex_cloud_compute_v1_Disk_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_compute_v1_Disk_descriptor,
new java.lang.String[] { "Id", "FolderId", "CreatedAt", "Name", "Description", "Labels", "TypeId", "ZoneId", "Size", "BlockSize", "ProductIds", "Status", "SourceImageId", "SourceSnapshotId", "InstanceIds", "DiskPlacementPolicy", "Source", });
internal_static_yandex_cloud_compute_v1_Disk_LabelsEntry_descriptor =
internal_static_yandex_cloud_compute_v1_Disk_descriptor.getNestedTypes().get(0);
internal_static_yandex_cloud_compute_v1_Disk_LabelsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_compute_v1_Disk_LabelsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_yandex_cloud_compute_v1_DiskPlacementPolicy_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_yandex_cloud_compute_v1_DiskPlacementPolicy_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_compute_v1_DiskPlacementPolicy_descriptor,
new java.lang.String[] { "PlacementGroupId", "PlacementGroupPartition", });
com.google.protobuf.TimestampProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy