# Google Cloud OsConfig V1 Client - Class Inventory (2.2.3)

2.2.3 (latest) 2.2.2 2.1.0 2.0.5 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud OsConfig V1 Client class Inventory.

This API resource represents the available inventory data for a
Compute Engine virtual machine (VM) instance at a given point in time.

You can use this API resource to determine the inventory data of your VM.
For more information, see [Information provided by OS inventory
management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected).

Generated from protobuf message `google.cloud.osconfig.v1.Inventory`

## Namespace

Google \\ Cloud \\ OsConfig \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The `Inventory` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` |
| `↳ os_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.Inventory.OsInfo` Base level operating system information for the VM. |
| `↳ items` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp of the last reported inventory for the VM. |

### getName

Output only. The `Inventory` API resource name.

Format:
`projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Output only. The `Inventory` API resource name.

Format:
`projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOsInfo

Base level operating system information for the VM.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.Inventory.OsInfo|null` |   |

### hasOsInfo

### clearOsInfo

### setOsInfo

Base level operating system information for the VM.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.Inventory.OsInfo` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getItems

Inventory items related to the VM keyed by an opaque unique identifier for
each inventory item. The identifier is unique to each distinct and
addressable inventory item and will change, when there is a new package
version.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setItems

Inventory items related to the VM keyed by an opaque unique identifier for
each inventory item. The identifier is unique to each distinct and
addressable inventory item and will change, when there is a new package
version.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpdateTime

Output only. Timestamp of the last reported inventory for the VM.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Timestamp of the last reported inventory for the VM.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |