Compute V1 Client - Class Metadata (1.5.0)

Reference documentation and code samples for the Compute V1 Client class Metadata.

A metadata key/value entry.

Generated from protobuf message google.cloud.compute.v1.Metadata

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ fingerprint string

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.

↳ items array<Google\Cloud\Compute\V1\Items>

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

↳ kind string

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

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.

Generated from protobuf field optional string fingerprint = 234678500;

Returns
TypeDescription
string

hasFingerprint

clearFingerprint

setFingerprint

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.

Generated from protobuf field optional string fingerprint = 234678500;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getItems

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

Generated from protobuf field repeated .google.cloud.compute.v1.Items items = 100526016;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setItems

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

Generated from protobuf field repeated .google.cloud.compute.v1.Items items = 100526016;

Parameter
NameDescription
var array<Google\Cloud\Compute\V1\Items>
Returns
TypeDescription
$this

getKind

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

Generated from protobuf field optional string kind = 3292052;

Returns
TypeDescription
string

hasKind

clearKind

setKind

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

Generated from protobuf field optional string kind = 3292052;

Parameter
NameDescription
var string
Returns
TypeDescription
$this