Reference documentation and code samples for the Compute V1 Client class ResourceMetadata.
Standardized resource metadata common to all compute resources.
Generated from protobuf message google.cloud.compute.v1.ResourceMetadata
Namespace
Google \ Cloud \ Compute \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ api_version |
string
The version of the API interface that this resource was retrieved through. For example, |
↳ resource_type |
string
The canonical resource type name in the format of a resource type as defined by AIP-123. For example, |
getApiVersion
The version of the API interface that this resource was retrieved through.
For example, "2025-01-01" or "2025-01-01-preview".
| Returns | |
|---|---|
| Type | Description |
string |
|
hasApiVersion
clearApiVersion
setApiVersion
The version of the API interface that this resource was retrieved through.
For example, "2025-01-01" or "2025-01-01-preview".
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getResourceType
The canonical resource type name in the format of a resource type as defined by AIP-123.
For example, "compute.googleapis.com/Instance".
| Returns | |
|---|---|
| Type | Description |
string |
|
hasResourceType
clearResourceType
setResourceType
The canonical resource type name in the format of a resource type as defined by AIP-123.
For example, "compute.googleapis.com/Instance".
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|