Class AttachedDisk.InitializeParams.Builder (0.42.0)

public static final class AttachedDisk.InitializeParams.Builder extends GeneratedMessage.Builder<AttachedDisk.InitializeParams.Builder> implements AttachedDisk.InitializeParamsOrBuilder

Specifies the parameters to initialize this disk.

Protobuf type google.cloud.backupdr.v1.AttachedDisk.InitializeParams

Static Methods

getDescriptor()

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

Methods

addAllReplicaZones(Iterable<String> values)

public AttachedDisk.InitializeParams.Builder addAllReplicaZones(Iterable<String> values)

Optional. URL of the zone where the disk should be created. Required for each regional disk associated with the instance.

repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The replicaZones to add.

Returns
Type Description
AttachedDisk.InitializeParams.Builder

This builder for chaining.

addReplicaZones(String value)

public AttachedDisk.InitializeParams.Builder addReplicaZones(String value)

Optional. URL of the zone where the disk should be created. Required for each regional disk associated with the instance.

repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The replicaZones to add.

Returns
Type Description
AttachedDisk.InitializeParams.Builder

This builder for chaining.

addReplicaZonesBytes(ByteString value)

public AttachedDisk.InitializeParams.Builder addReplicaZonesBytes(ByteString value)

Optional. URL of the zone where the disk should be created. Required for each regional disk associated with the instance.

repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the replicaZones to add.

Returns
Type Description
AttachedDisk.InitializeParams.Builder

This builder for chaining.

build()

public AttachedDisk.InitializeParams build()
Returns
Type Description
AttachedDisk.InitializeParams

buildPartial()

public AttachedDisk.InitializeParams buildPartial()
Returns
Type Description
AttachedDisk.InitializeParams

clear()

public AttachedDisk.InitializeParams.Builder clear()
Returns
Type Description
AttachedDisk.InitializeParams.Builder
Overrides

clearDiskName()

public AttachedDisk.InitializeParams.Builder clearDiskName()

Optional. Specifies the disk name. If not specified, the default is to use the name of the instance.

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

Returns
Type Description
AttachedDisk.InitializeParams.Builder

This builder for chaining.

clearReplicaZones()

public AttachedDisk.InitializeParams.Builder clearReplicaZones()

Optional. URL of the zone where the disk should be created. Required for each regional disk associated with the instance.

repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AttachedDisk.InitializeParams.Builder

This builder for chaining.

getDefaultInstanceForType()

public AttachedDisk.InitializeParams getDefaultInstanceForType()
Returns
Type Description
AttachedDisk.InitializeParams

getDescriptorForType()

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

getDiskName()

public String getDiskName()

Optional. Specifies the disk name. If not specified, the default is to use the name of the instance.

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

Returns
Type Description
String

The diskName.

getDiskNameBytes()

public ByteString getDiskNameBytes()

Optional. Specifies the disk name. If not specified, the default is to use the name of the instance.

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

Returns
Type Description
ByteString

The bytes for diskName.

getReplicaZones(int index)

public String getReplicaZones(int index)

Optional. URL of the zone where the disk should be created. Required for each regional disk associated with the instance.

repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];

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. URL of the zone where the disk should be created. Required for each regional disk associated with the instance.

repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];

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. URL of the zone where the disk should be created. Required for each regional disk associated with the instance.

repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of replicaZones.

getReplicaZonesList()

public ProtocolStringList getReplicaZonesList()

Optional. URL of the zone where the disk should be created. Required for each regional disk associated with the instance.

repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the replicaZones.

hasDiskName()

public boolean hasDiskName()

Optional. Specifies the disk name. If not specified, the default is to use the name of the instance.

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

Returns
Type Description
boolean

Whether the diskName field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AttachedDisk.InitializeParams other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setDiskName(String value)

public AttachedDisk.InitializeParams.Builder setDiskName(String value)

Optional. Specifies the disk name. If not specified, the default is to use the name of the instance.

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

Parameter
Name Description
value String

The diskName to set.

Returns
Type Description
AttachedDisk.InitializeParams.Builder

This builder for chaining.

setDiskNameBytes(ByteString value)

public AttachedDisk.InitializeParams.Builder setDiskNameBytes(ByteString value)

Optional. Specifies the disk name. If not specified, the default is to use the name of the instance.

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

Parameter
Name Description
value ByteString

The bytes for diskName to set.

Returns
Type Description
AttachedDisk.InitializeParams.Builder

This builder for chaining.

setReplicaZones(int index, String value)

public AttachedDisk.InitializeParams.Builder setReplicaZones(int index, String value)

Optional. URL of the zone where the disk should be created. Required for each regional disk associated with the instance.

repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The replicaZones to set.

Returns
Type Description
AttachedDisk.InitializeParams.Builder

This builder for chaining.