Class Metadata.Builder (1.38.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.compute.v1.Items>
Returns
TypeDescription
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
NameDescription
valueItems
Returns
TypeDescription
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
NameDescription
builderForValueItems.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueItems
Returns
TypeDescription
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
NameDescription
indexint
builderForValueItems.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Items.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Metadata build()
Returns
TypeDescription
Metadata

buildPartial()

public Metadata buildPartial()
Returns
TypeDescription
Metadata

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearKind()

public Metadata.Builder clearKind()

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

optional string kind = 3292052;

Returns
TypeDescription
Metadata.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Metadata.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Metadata.Builder
Overrides

clone()

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

getDefaultInstanceForType()

public Metadata getDefaultInstanceForType()
Returns
TypeDescription
Metadata

getDescriptorForType()

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

The kind.

getKindBytes()

public ByteString getKindBytes()

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

optional string kind = 3292052;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the kind field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Metadata other)

public Metadata.Builder mergeFrom(Metadata other)
Parameter
NameDescription
otherMetadata
Returns
TypeDescription
Metadata.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Metadata.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Metadata.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

The fingerprint to set.

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

The bytes for fingerprint to set.

Returns
TypeDescription
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
NameDescription
indexint
valueItems
Returns
TypeDescription
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
NameDescription
indexint
builderForValueItems.Builder
Returns
TypeDescription
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
NameDescription
valueString

The kind to set.

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

The bytes for kind to set.

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

setUnknownFields(UnknownFieldSet unknownFields)

public final Metadata.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Metadata.Builder
Overrides