Reference documentation and code samples for the Google Cloud Asset V1 Client class VersionedResource.
Resource representation as defined by the corresponding service providing the
resource for a given API version.
Generated from protobuf messagegoogle.cloud.asset.v1.VersionedResource
Namespace
Google \ Cloud \ Asset \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ version
string
API version of the resource. Example: If the resource is an instance provided by Compute Engine v1 API as defined inhttps://cloud.google.com/compute/docs/reference/rest/v1/instances, version will be "v1".
JSON representation of the resource as defined by the corresponding service providing this resource. Example: If the resource is an instance provided by Compute Engine, this field will contain the JSON representation of the instance as defined by Compute Engine:https://cloud.google.com/compute/docs/reference/rest/v1/instances. You can find the resource definition for each supported resource type in this table:https://cloud.google.com/asset-inventory/docs/supported-asset-types
getVersion
API version of the resource.
Example:
If the resource is an instance provided by Compute Engine v1 API as defined
inhttps://cloud.google.com/compute/docs/reference/rest/v1/instances,
version will be "v1".
Returns
Type
Description
string
setVersion
API version of the resource.
Example:
If the resource is an instance provided by Compute Engine v1 API as defined
inhttps://cloud.google.com/compute/docs/reference/rest/v1/instances,
version will be "v1".
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getResource
JSON representation of the resource as defined by the corresponding
service providing this resource.
Example:
If the resource is an instance provided by Compute Engine, this field will
contain the JSON representation of the instance as defined by Compute
Engine:https://cloud.google.com/compute/docs/reference/rest/v1/instances.
You can find the resource definition for each supported resource type in
this table:https://cloud.google.com/asset-inventory/docs/supported-asset-types
JSON representation of the resource as defined by the corresponding
service providing this resource.
Example:
If the resource is an instance provided by Compute Engine, this field will
contain the JSON representation of the instance as defined by Compute
Engine:https://cloud.google.com/compute/docs/reference/rest/v1/instances.
You can find the resource definition for each supported resource type in
this table:https://cloud.google.com/asset-inventory/docs/supported-asset-types
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Asset V1 Client - Class VersionedResource (2.2.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.3 (latest)](/php/docs/reference/cloud-asset/latest/V1.VersionedResource)\n- [2.2.2](/php/docs/reference/cloud-asset/2.2.2/V1.VersionedResource)\n- [2.1.3](/php/docs/reference/cloud-asset/2.1.3/V1.VersionedResource)\n- [2.0.1](/php/docs/reference/cloud-asset/2.0.1/V1.VersionedResource)\n- [1.16.4](/php/docs/reference/cloud-asset/1.16.4/V1.VersionedResource)\n- [1.14.1](/php/docs/reference/cloud-asset/1.14.1/V1.VersionedResource)\n- [1.13.2](/php/docs/reference/cloud-asset/1.13.2/V1.VersionedResource)\n- [1.12.2](/php/docs/reference/cloud-asset/1.12.2/V1.VersionedResource)\n- [1.11.3](/php/docs/reference/cloud-asset/1.11.3/V1.VersionedResource)\n- [1.10.2](/php/docs/reference/cloud-asset/1.10.2/V1.VersionedResource)\n- [1.9.2](/php/docs/reference/cloud-asset/1.9.2/V1.VersionedResource) \nReference documentation and code samples for the Google Cloud Asset V1 Client class VersionedResource.\n\nResource representation as defined by the corresponding service providing the\nresource for a given API version.\n\nGenerated from protobuf message `google.cloud.asset.v1.VersionedResource`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Asset \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getVersion\n\nAPI version of the resource.\n\nExample:\nIf the resource is an instance provided by Compute Engine v1 API as defined\nin `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,\nversion will be \"v1\".\n\n### setVersion\n\nAPI version of the resource.\n\nExample:\nIf the resource is an instance provided by Compute Engine v1 API as defined\nin `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,\nversion will be \"v1\".\n\n### getResource\n\nJSON representation of the resource as defined by the corresponding\nservice providing this resource.\n\nExample:\nIf the resource is an instance provided by Compute Engine, this field will\ncontain the JSON representation of the instance as defined by Compute\nEngine:\n`https://cloud.google.com/compute/docs/reference/rest/v1/instances`.\nYou can find the resource definition for each supported resource type in\nthis table:\n`https://cloud.google.com/asset-inventory/docs/supported-asset-types`\n\n### hasResource\n\n### clearResource\n\n### setResource\n\nJSON representation of the resource as defined by the corresponding\nservice providing this resource.\n\nExample:\nIf the resource is an instance provided by Compute Engine, this field will\ncontain the JSON representation of the instance as defined by Compute\nEngine:\n`https://cloud.google.com/compute/docs/reference/rest/v1/instances`.\nYou can find the resource definition for each supported resource type in\nthis table:\n`https://cloud.google.com/asset-inventory/docs/supported-asset-types`"]]