Class Items.Builder (1.56.0)

public static final class Items.Builder extends GeneratedMessageV3.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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

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

clearField(Descriptors.FieldDescriptor field)

public Items.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
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.

clearOneof(Descriptors.OneofDescriptor oneof)

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

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.

clone()

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

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 GeneratedMessageV3.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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public Items.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
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.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

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.