Class BlockDevice (0.61.0)

public final class BlockDevice extends GeneratedMessageV3 implements BlockDeviceOrBuilder

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

Protobuf type google.cloud.netapp.v1.BlockDevice

Static Fields

HOST_GROUPS_FIELD_NUMBER

public static final int HOST_GROUPS_FIELD_NUMBER
Field Value
Type Description
int

IDENTIFIER_FIELD_NUMBER

public static final int IDENTIFIER_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

OS_TYPE_FIELD_NUMBER

public static final int OS_TYPE_FIELD_NUMBER
Field Value
Type Description
int

SIZE_GIB_FIELD_NUMBER

public static final int SIZE_GIB_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static BlockDevice getDefaultInstance()
Returns
Type Description
BlockDevice

getDescriptor()

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

newBuilder()

public static BlockDevice.Builder newBuilder()
Returns
Type Description
BlockDevice.Builder

newBuilder(BlockDevice prototype)

public static BlockDevice.Builder newBuilder(BlockDevice prototype)
Parameter
Name Description
prototype BlockDevice
Returns
Type Description
BlockDevice.Builder

parseDelimitedFrom(InputStream input)

public static BlockDevice parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
BlockDevice
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BlockDevice parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BlockDevice
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static BlockDevice parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
BlockDevice
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static BlockDevice parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BlockDevice
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static BlockDevice parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
BlockDevice
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static BlockDevice parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BlockDevice
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static BlockDevice parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
BlockDevice
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static BlockDevice parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BlockDevice
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static BlockDevice parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
BlockDevice
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BlockDevice parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BlockDevice
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static BlockDevice parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
BlockDevice
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static BlockDevice parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BlockDevice
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<BlockDevice> parser()
Returns
Type Description
Parser<BlockDevice>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public BlockDevice getDefaultInstanceForType()
Returns
Type Description
BlockDevice

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.

getParserForType()

public Parser<BlockDevice> getParserForType()
Returns
Type Description
Parser<BlockDevice>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public BlockDevice.Builder newBuilderForType()
Returns
Type Description
BlockDevice.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected BlockDevice.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
BlockDevice.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public BlockDevice.Builder toBuilder()
Returns
Type Description
BlockDevice.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException