Class Metadata.Builder (1.56.0)

public static final class Metadata.Builder extends GeneratedMessageV3.Builder<Metadata.Builder> implements MetadataOrBuilder

A metadata key/value entry.

Protobuf type google.cloud.compute.v1.Metadata

Implements

MetadataOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllItems(Iterable<? extends Items> values)

public Metadata.Builder addAllItems(Iterable<? extends Items> values)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameter
Name Description
values Iterable<? extends com.google.cloud.compute.v1.Items>
Returns
Type Description
Metadata.Builder

addItems(Items value)

public Metadata.Builder addItems(Items value)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameter
Name Description
value Items
Returns
Type Description
Metadata.Builder

addItems(Items.Builder builderForValue)

public Metadata.Builder addItems(Items.Builder builderForValue)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameter
Name Description
builderForValue Items.Builder
Returns
Type Description
Metadata.Builder

addItems(int index, Items value)

public Metadata.Builder addItems(int index, Items value)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameters
Name Description
index int
value Items
Returns
Type Description
Metadata.Builder

addItems(int index, Items.Builder builderForValue)

public Metadata.Builder addItems(int index, Items.Builder builderForValue)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameters
Name Description
index int
builderForValue Items.Builder
Returns
Type Description
Metadata.Builder

addItemsBuilder()

public Items.Builder addItemsBuilder()

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Returns
Type Description
Items.Builder

addItemsBuilder(int index)

public Items.Builder addItemsBuilder(int index)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameter
Name Description
index int
Returns
Type Description
Items.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Metadata build()
Returns
Type Description
Metadata

buildPartial()

public Metadata buildPartial()
Returns
Type Description
Metadata

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearFingerprint()

public Metadata.Builder clearFingerprint()

Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Returns
Type Description
Metadata.Builder

This builder for chaining.

clearItems()

public Metadata.Builder clearItems()

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Returns
Type Description
Metadata.Builder

clearKind()

public Metadata.Builder clearKind()

[Output Only] Type of the resource. Always compute#metadata for metadata.

optional string kind = 3292052;

Returns
Type Description
Metadata.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

public Metadata getDefaultInstanceForType()
Returns
Type Description
Metadata

getDescriptorForType()

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

getFingerprint()

public String getFingerprint()

Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Returns
Type Description
String

The fingerprint.

getFingerprintBytes()

public ByteString getFingerprintBytes()

Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Returns
Type Description
ByteString

The bytes for fingerprint.

getItems(int index)

public Items getItems(int index)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameter
Name Description
index int
Returns
Type Description
Items

getItemsBuilder(int index)

public Items.Builder getItemsBuilder(int index)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameter
Name Description
index int
Returns
Type Description
Items.Builder

getItemsBuilderList()

public List<Items.Builder> getItemsBuilderList()

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Returns
Type Description
List<Builder>

getItemsCount()

public int getItemsCount()

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Returns
Type Description
int

getItemsList()

public List<Items> getItemsList()

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Returns
Type Description
List<Items>

getItemsOrBuilder(int index)

public ItemsOrBuilder getItemsOrBuilder(int index)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameter
Name Description
index int
Returns
Type Description
ItemsOrBuilder

getItemsOrBuilderList()

public List<? extends ItemsOrBuilder> getItemsOrBuilderList()

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.ItemsOrBuilder>

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#metadata for metadata.

optional string kind = 3292052;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#metadata for metadata.

optional string kind = 3292052;

Returns
Type Description
ByteString

The bytes for kind.

hasFingerprint()

public boolean hasFingerprint()

Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Returns
Type Description
boolean

Whether the fingerprint field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of the resource. Always compute#metadata for metadata.

optional string kind = 3292052;

Returns
Type Description
boolean

Whether the kind field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Metadata other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeItems(int index)

public Metadata.Builder removeItems(int index)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameter
Name Description
index int
Returns
Type Description
Metadata.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setFingerprint(String value)

public Metadata.Builder setFingerprint(String value)

Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Parameter
Name Description
value String

The fingerprint to set.

Returns
Type Description
Metadata.Builder

This builder for chaining.

setFingerprintBytes(ByteString value)

public Metadata.Builder setFingerprintBytes(ByteString value)

Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Parameter
Name Description
value ByteString

The bytes for fingerprint to set.

Returns
Type Description
Metadata.Builder

This builder for chaining.

setItems(int index, Items value)

public Metadata.Builder setItems(int index, Items value)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameters
Name Description
index int
value Items
Returns
Type Description
Metadata.Builder

setItems(int index, Items.Builder builderForValue)

public Metadata.Builder setItems(int index, Items.Builder builderForValue)

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

repeated .google.cloud.compute.v1.Items items = 100526016;

Parameters
Name Description
index int
builderForValue Items.Builder
Returns
Type Description
Metadata.Builder

setKind(String value)

public Metadata.Builder setKind(String value)

[Output Only] Type of the resource. Always compute#metadata for metadata.

optional string kind = 3292052;

Parameter
Name Description
value String

The kind to set.

Returns
Type Description
Metadata.Builder

This builder for chaining.

setKindBytes(ByteString value)

public Metadata.Builder setKindBytes(ByteString value)

[Output Only] Type of the resource. Always compute#metadata for metadata.

optional string kind = 3292052;

Parameter
Name Description
value ByteString

The bytes for kind to set.

Returns
Type Description
Metadata.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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