Class BlockDevice.Builder (0.61.0)

public static final class BlockDevice.Builder extends GeneratedMessageV3.Builder<BlockDevice.Builder> implements BlockDeviceOrBuilder

Block device represents the device(s) which are stored in the block volume.

Protobuf type google.cloud.netapp.v1.BlockDevice

Static Methods

getDescriptor()

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

Methods

addAllHostGroups(Iterable<String> values)

public BlockDevice.Builder addAllHostGroups(Iterable<String> values)

Optional. A list of host groups that identify hosts that can mount the block volume. Format: projects/{project_id}/locations/{location}/hostGroups/{host_group_id} This field can be updated after the block device is created.

repeated string host_groups = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The hostGroups to add.

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

addHostGroups(String value)

public BlockDevice.Builder addHostGroups(String value)

Optional. A list of host groups that identify hosts that can mount the block volume. Format: projects/{project_id}/locations/{location}/hostGroups/{host_group_id} This field can be updated after the block device is created.

repeated string host_groups = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The hostGroups to add.

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

addHostGroupsBytes(ByteString value)

public BlockDevice.Builder addHostGroupsBytes(ByteString value)

Optional. A list of host groups that identify hosts that can mount the block volume. Format: projects/{project_id}/locations/{location}/hostGroups/{host_group_id} This field can be updated after the block device is created.

repeated string host_groups = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the hostGroups to add.

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public BlockDevice build()
Returns
Type Description
BlockDevice

buildPartial()

public BlockDevice buildPartial()
Returns
Type Description
BlockDevice

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearHostGroups()

public BlockDevice.Builder clearHostGroups()

Optional. A list of host groups that identify hosts that can mount the block volume. Format: projects/{project_id}/locations/{location}/hostGroups/{host_group_id} This field can be updated after the block device is created.

repeated string host_groups = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

clearIdentifier()

public BlockDevice.Builder clearIdentifier()

Output only. Device identifier of the block volume. This represents lun_serial_number for iSCSI volumes.

string identifier = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

clearName()

public BlockDevice.Builder clearName()

Optional. User-defined name for the block device, unique within the volume. In case no user input is provided, name will be auto-generated in the backend. The name must meet the following requirements:

  • Be between 1 and 255 characters long.
  • Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), and the following special characters: "-", "_", "}", "{", ".".
  • Spaces are not allowed.

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

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOsType()

public BlockDevice.Builder clearOsType()

Required. Immutable. The OS type of the volume. This field can't be changed after the block device is created.

.google.cloud.netapp.v1.OsType os_type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

clearSizeGib()

public BlockDevice.Builder clearSizeGib()

Optional. The size of the block device in GiB. Any value provided for the size_gib field during volume creation is ignored. The block device's size is system-managed and will be set to match the parent Volume's capacity_gib.

optional int64 size_gib = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public BlockDevice getDefaultInstanceForType()
Returns
Type Description
BlockDevice

getDescriptorForType()

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

getHostGroups(int index)

public String getHostGroups(int index)

Optional. A list of host groups that identify hosts that can mount the block volume. Format: projects/{project_id}/locations/{location}/hostGroups/{host_group_id} This field can be updated after the block device is created.

repeated string host_groups = 2 [(.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 hostGroups at the given index.

getHostGroupsBytes(int index)

public ByteString getHostGroupsBytes(int index)

Optional. A list of host groups that identify hosts that can mount the block volume. Format: projects/{project_id}/locations/{location}/hostGroups/{host_group_id} This field can be updated after the block device is created.

repeated string host_groups = 2 [(.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 hostGroups at the given index.

getHostGroupsCount()

public int getHostGroupsCount()

Optional. A list of host groups that identify hosts that can mount the block volume. Format: projects/{project_id}/locations/{location}/hostGroups/{host_group_id} This field can be updated after the block device is created.

repeated string host_groups = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of hostGroups.

getHostGroupsList()

public ProtocolStringList getHostGroupsList()

Optional. A list of host groups that identify hosts that can mount the block volume. Format: projects/{project_id}/locations/{location}/hostGroups/{host_group_id} This field can be updated after the block device is created.

repeated string host_groups = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the hostGroups.

getIdentifier()

public String getIdentifier()

Output only. Device identifier of the block volume. This represents lun_serial_number for iSCSI volumes.

string identifier = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The identifier.

getIdentifierBytes()

public ByteString getIdentifierBytes()

Output only. Device identifier of the block volume. This represents lun_serial_number for iSCSI volumes.

string identifier = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for identifier.

getName()

public String getName()

Optional. User-defined name for the block device, unique within the volume. In case no user input is provided, name will be auto-generated in the backend. The name must meet the following requirements:

  • Be between 1 and 255 characters long.
  • Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), and the following special characters: "-", "_", "}", "{", ".".
  • Spaces are not allowed.

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Optional. User-defined name for the block device, unique within the volume. In case no user input is provided, name will be auto-generated in the backend. The name must meet the following requirements:

  • Be between 1 and 255 characters long.
  • Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), and the following special characters: "-", "_", "}", "{", ".".
  • Spaces are not allowed.

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

Returns
Type Description
ByteString

The bytes for name.

getOsType()

public OsType getOsType()

Required. Immutable. The OS type of the volume. This field can't be changed after the block device is created.

.google.cloud.netapp.v1.OsType os_type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
OsType

The osType.

getOsTypeValue()

public int getOsTypeValue()

Required. Immutable. The OS type of the volume. This field can't be changed after the block device is created.

.google.cloud.netapp.v1.OsType os_type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
int

The enum numeric value on the wire for osType.

getSizeGib()

public long getSizeGib()

Optional. The size of the block device in GiB. Any value provided for the size_gib field during volume creation is ignored. The block device's size is system-managed and will be set to match the parent Volume's capacity_gib.

optional int64 size_gib = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The sizeGib.

hasName()

public boolean hasName()

Optional. User-defined name for the block device, unique within the volume. In case no user input is provided, name will be auto-generated in the backend. The name must meet the following requirements:

  • Be between 1 and 255 characters long.
  • Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), and the following special characters: "-", "_", "}", "{", ".".
  • Spaces are not allowed.

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

Returns
Type Description
boolean

Whether the name field is set.

hasSizeGib()

public boolean hasSizeGib()

Optional. The size of the block device in GiB. Any value provided for the size_gib field during volume creation is ignored. The block device's size is system-managed and will be set to match the parent Volume's capacity_gib.

optional int64 size_gib = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the sizeGib field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(BlockDevice other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setHostGroups(int index, String value)

public BlockDevice.Builder setHostGroups(int index, String value)

Optional. A list of host groups that identify hosts that can mount the block volume. Format: projects/{project_id}/locations/{location}/hostGroups/{host_group_id} This field can be updated after the block device is created.

repeated string host_groups = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The hostGroups to set.

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

setIdentifier(String value)

public BlockDevice.Builder setIdentifier(String value)

Output only. Device identifier of the block volume. This represents lun_serial_number for iSCSI volumes.

string identifier = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The identifier to set.

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

setIdentifierBytes(ByteString value)

public BlockDevice.Builder setIdentifierBytes(ByteString value)

Output only. Device identifier of the block volume. This represents lun_serial_number for iSCSI volumes.

string identifier = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for identifier to set.

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

setName(String value)

public BlockDevice.Builder setName(String value)

Optional. User-defined name for the block device, unique within the volume. In case no user input is provided, name will be auto-generated in the backend. The name must meet the following requirements:

  • Be between 1 and 255 characters long.
  • Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), and the following special characters: "-", "_", "}", "{", ".".
  • Spaces are not allowed.

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

setNameBytes(ByteString value)

public BlockDevice.Builder setNameBytes(ByteString value)

Optional. User-defined name for the block device, unique within the volume. In case no user input is provided, name will be auto-generated in the backend. The name must meet the following requirements:

  • Be between 1 and 255 characters long.
  • Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), and the following special characters: "-", "_", "}", "{", ".".
  • Spaces are not allowed.

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

setOsType(OsType value)

public BlockDevice.Builder setOsType(OsType value)

Required. Immutable. The OS type of the volume. This field can't be changed after the block device is created.

.google.cloud.netapp.v1.OsType os_type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value OsType

The osType to set.

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

setOsTypeValue(int value)

public BlockDevice.Builder setOsTypeValue(int value)

Required. Immutable. The OS type of the volume. This field can't be changed after the block device is created.

.google.cloud.netapp.v1.OsType os_type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value int

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

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

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

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

setSizeGib(long value)

public BlockDevice.Builder setSizeGib(long value)

Optional. The size of the block device in GiB. Any value provided for the size_gib field during volume creation is ignored. The block device's size is system-managed and will be set to match the parent Volume's capacity_gib.

optional int64 size_gib = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The sizeGib to set.

Returns
Type Description
BlockDevice.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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