Class ComputeEngineDisk.Builder (1.74.0)

public static final class ComputeEngineDisk.Builder extends GeneratedMessageV3.Builder<ComputeEngineDisk.Builder> implements ComputeEngineDiskOrBuilder

Compute Engine disk target details.

Protobuf type google.cloud.vmmigration.v1.ComputeEngineDisk

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllReplicaZones(Iterable<String> values)

public ComputeEngineDisk.Builder addAllReplicaZones(Iterable<String> values)

Optional. Replication zones of the regional disk. Should be of the form: projects/{target-project}/locations/{replica-zone} Currently only one replica zone is supported.

repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The replicaZones to add.

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ComputeEngineDisk.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ComputeEngineDisk.Builder
Overrides

addReplicaZones(String value)

public ComputeEngineDisk.Builder addReplicaZones(String value)

Optional. Replication zones of the regional disk. Should be of the form: projects/{target-project}/locations/{replica-zone} Currently only one replica zone is supported.

repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The replicaZones to add.

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

addReplicaZonesBytes(ByteString value)

public ComputeEngineDisk.Builder addReplicaZonesBytes(ByteString value)

Optional. Replication zones of the regional disk. Should be of the form: projects/{target-project}/locations/{replica-zone} Currently only one replica zone is supported.

repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the replicaZones to add.

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

build()

public ComputeEngineDisk build()
Returns
Type Description
ComputeEngineDisk

buildPartial()

public ComputeEngineDisk buildPartial()
Returns
Type Description
ComputeEngineDisk

clear()

public ComputeEngineDisk.Builder clear()
Returns
Type Description
ComputeEngineDisk.Builder
Overrides

clearDiskId()

public ComputeEngineDisk.Builder clearDiskId()

Optional. Target Compute Engine Disk ID. This is the resource ID segment of the Compute Engine Disk to create. In the resource name compute/v1/projects/{project}/zones/{zone}/disks/disk1 "disk1" is the resource ID for the disk.

string disk_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

clearDiskType()

public ComputeEngineDisk.Builder clearDiskType()

Required. The disk type to use.

.google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ComputeEngineDisk.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ComputeEngineDisk.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public ComputeEngineDisk.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ComputeEngineDisk.Builder
Overrides

clearReplicaZones()

public ComputeEngineDisk.Builder clearReplicaZones()

Optional. Replication zones of the regional disk. Should be of the form: projects/{target-project}/locations/{replica-zone} Currently only one replica zone is supported.

repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

clearZone()

public ComputeEngineDisk.Builder clearZone()

Required. The Compute Engine zone in which to create the disk. Should be of the form: projects/{target-project}/locations/{zone}

string zone = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

clone()

public ComputeEngineDisk.Builder clone()
Returns
Type Description
ComputeEngineDisk.Builder
Overrides

getDefaultInstanceForType()

public ComputeEngineDisk getDefaultInstanceForType()
Returns
Type Description
ComputeEngineDisk

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDiskId()

public String getDiskId()

Optional. Target Compute Engine Disk ID. This is the resource ID segment of the Compute Engine Disk to create. In the resource name compute/v1/projects/{project}/zones/{zone}/disks/disk1 "disk1" is the resource ID for the disk.

string disk_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The diskId.

getDiskIdBytes()

public ByteString getDiskIdBytes()

Optional. Target Compute Engine Disk ID. This is the resource ID segment of the Compute Engine Disk to create. In the resource name compute/v1/projects/{project}/zones/{zone}/disks/disk1 "disk1" is the resource ID for the disk.

string disk_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for diskId.

getDiskType()

public ComputeEngineDiskType getDiskType()

Required. The disk type to use.

.google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ComputeEngineDiskType

The diskType.

getDiskTypeValue()

public int getDiskTypeValue()

Required. The disk type to use.

.google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for diskType.

getReplicaZones(int index)

public String getReplicaZones(int index)

Optional. Replication zones of the regional disk. Should be of the form: projects/{target-project}/locations/{replica-zone} Currently only one replica zone is supported.

repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The replicaZones at the given index.

getReplicaZonesBytes(int index)

public ByteString getReplicaZonesBytes(int index)

Optional. Replication zones of the regional disk. Should be of the form: projects/{target-project}/locations/{replica-zone} Currently only one replica zone is supported.

repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the replicaZones at the given index.

getReplicaZonesCount()

public int getReplicaZonesCount()

Optional. Replication zones of the regional disk. Should be of the form: projects/{target-project}/locations/{replica-zone} Currently only one replica zone is supported.

repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of replicaZones.

getReplicaZonesList()

public ProtocolStringList getReplicaZonesList()

Optional. Replication zones of the regional disk. Should be of the form: projects/{target-project}/locations/{replica-zone} Currently only one replica zone is supported.

repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the replicaZones.

getZone()

public String getZone()

Required. The Compute Engine zone in which to create the disk. Should be of the form: projects/{target-project}/locations/{zone}

string zone = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The zone.

getZoneBytes()

public ByteString getZoneBytes()

Required. The Compute Engine zone in which to create the disk. Should be of the form: projects/{target-project}/locations/{zone}

string zone = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for zone.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ComputeEngineDisk other)

public ComputeEngineDisk.Builder mergeFrom(ComputeEngineDisk other)
Parameter
Name Description
other ComputeEngineDisk
Returns
Type Description
ComputeEngineDisk.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ComputeEngineDisk.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ComputeEngineDisk.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ComputeEngineDisk.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ComputeEngineDisk.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ComputeEngineDisk.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ComputeEngineDisk.Builder
Overrides

setDiskId(String value)

public ComputeEngineDisk.Builder setDiskId(String value)

Optional. Target Compute Engine Disk ID. This is the resource ID segment of the Compute Engine Disk to create. In the resource name compute/v1/projects/{project}/zones/{zone}/disks/disk1 "disk1" is the resource ID for the disk.

string disk_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The diskId to set.

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

setDiskIdBytes(ByteString value)

public ComputeEngineDisk.Builder setDiskIdBytes(ByteString value)

Optional. Target Compute Engine Disk ID. This is the resource ID segment of the Compute Engine Disk to create. In the resource name compute/v1/projects/{project}/zones/{zone}/disks/disk1 "disk1" is the resource ID for the disk.

string disk_id = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for diskId to set.

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

setDiskType(ComputeEngineDiskType value)

public ComputeEngineDisk.Builder setDiskType(ComputeEngineDiskType value)

Required. The disk type to use.

.google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ComputeEngineDiskType

The diskType to set.

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

setDiskTypeValue(int value)

public ComputeEngineDisk.Builder setDiskTypeValue(int value)

Required. The disk type to use.

.google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for diskType to set.

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ComputeEngineDisk.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ComputeEngineDisk.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ComputeEngineDisk.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ComputeEngineDisk.Builder
Overrides

setReplicaZones(int index, String value)

public ComputeEngineDisk.Builder setReplicaZones(int index, String value)

Optional. Replication zones of the regional disk. Should be of the form: projects/{target-project}/locations/{replica-zone} Currently only one replica zone is supported.

repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The replicaZones to set.

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ComputeEngineDisk.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ComputeEngineDisk.Builder
Overrides

setZone(String value)

public ComputeEngineDisk.Builder setZone(String value)

Required. The Compute Engine zone in which to create the disk. Should be of the form: projects/{target-project}/locations/{zone}

string zone = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The zone to set.

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.

setZoneBytes(ByteString value)

public ComputeEngineDisk.Builder setZoneBytes(ByteString value)

Required. The Compute Engine zone in which to create the disk. Should be of the form: projects/{target-project}/locations/{zone}

string zone = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for zone to set.

Returns
Type Description
ComputeEngineDisk.Builder

This builder for chaining.