Class Items.Builder (1.93.0)

public static final class Items.Builder extends GeneratedMessage.Builder<Items.Builder> implements ItemsOrBuilder

Metadata

Protobuf type google.cloud.compute.v1.Items

Implements

ItemsOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Items build()
Returns
Type Description
Items

buildPartial()

public Items buildPartial()
Returns
Type Description
Items

clear()

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

clearKey()

public Items.Builder clearKey()

Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.

optional string key = 106079;

Returns
Type Description
Items.Builder

This builder for chaining.

clearValue()

public Items.Builder clearValue()

Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

optional string value = 111972721;

Returns
Type Description
Items.Builder

This builder for chaining.

getDefaultInstanceForType()

public Items getDefaultInstanceForType()
Returns
Type Description
Items

getDescriptorForType()

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

getKey()

public String getKey()

Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.

optional string key = 106079;

Returns
Type Description
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.

optional string key = 106079;

Returns
Type Description
ByteString

The bytes for key.

getValue()

public String getValue()

Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

optional string value = 111972721;

Returns
Type Description
String

The value.

getValueBytes()

public ByteString getValueBytes()

Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

optional string value = 111972721;

Returns
Type Description
ByteString

The bytes for value.

hasKey()

public boolean hasKey()

Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.

optional string key = 106079;

Returns
Type Description
boolean

Whether the key field is set.

hasValue()

public boolean hasValue()

Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

optional string value = 111972721;

Returns
Type Description
boolean

Whether the value field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Items other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setKey(String value)

public Items.Builder setKey(String value)

Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.

optional string key = 106079;

Parameter
Name Description
value String

The key to set.

Returns
Type Description
Items.Builder

This builder for chaining.

setKeyBytes(ByteString value)

public Items.Builder setKeyBytes(ByteString value)

Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.

optional string key = 106079;

Parameter
Name Description
value ByteString

The bytes for key to set.

Returns
Type Description
Items.Builder

This builder for chaining.

setValue(String value)

public Items.Builder setValue(String value)

Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

optional string value = 111972721;

Parameter
Name Description
value String

The value to set.

Returns
Type Description
Items.Builder

This builder for chaining.

setValueBytes(ByteString value)

public Items.Builder setValueBytes(ByteString value)

Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

optional string value = 111972721;

Parameter
Name Description
value ByteString

The bytes for value to set.

Returns
Type Description
Items.Builder

This builder for chaining.