Compute V1 Client - Class Metadata (1.11.1)

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

Namespace

Google \ Cloud \ Compute \ V1

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.

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.

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.

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.

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

getKind

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

Returns
TypeDescription
string

hasKind

clearKind

setKind

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this