Class Items.Builder (1.42.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Items.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Items.Builder
Overrides

build()

public Items build()
Returns
TypeDescription
Items

buildPartial()

public Items buildPartial()
Returns
TypeDescription
Items

clear()

public Items.Builder clear()
Returns
TypeDescription
Items.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Items.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
Items.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Items.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
Items.Builder

This builder for chaining.

clone()

public Items.Builder clone()
Returns
TypeDescription
Items.Builder
Overrides

getDefaultInstanceForType()

public Items getDefaultInstanceForType()
Returns
TypeDescription
Items

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the value field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Items other)

public Items.Builder mergeFrom(Items other)
Parameter
NameDescription
otherItems
Returns
TypeDescription
Items.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Items.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Items.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Items.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Items.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Items.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Items.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Items.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The key to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for key to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Items.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Items.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The value to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for value to set.

Returns
TypeDescription
Items.Builder

This builder for chaining.