# Google Cloud OsConfig V1 Client - Class GetInventoryRequest (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 GetInventoryRequest.

A request message for getting inventory data for the specified VM.

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

## Namespace

Google \\ Cloud \\ OsConfig \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. API resource name for inventory resource. Format: `projects/{project}/locations/{location}/instances/{instance}/inventory` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided. |
| `↳ view` | `int` Inventory view indicating what information should be included in the inventory resource. If unspecified, the default view is BASIC. |

### getName

Required. API resource name for inventory resource.

Format:
`projects/{project}/locations/{location}/instances/{instance}/inventory`
For `{project}`, either `project-number` or `project-id` can be provided.
For `{instance}`, either Compute Engine `instance-id` or `instance-name`
can be provided.

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

### setName

Required. API resource name for inventory resource.

Format:
`projects/{project}/locations/{location}/instances/{instance}/inventory`
For `{project}`, either `project-number` or `project-id` can be provided.
For `{instance}`, either Compute Engine `instance-id` or `instance-name`
can be provided.

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

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

### getView

Inventory view indicating what information should be included in the
inventory resource. If unspecified, the default view is BASIC.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [InventoryView](https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.InventoryView). |

### setView

Inventory view indicating what information should be included in the
inventory resource. If unspecified, the default view is BASIC.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [InventoryView](https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.InventoryView). |

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

### static::build

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. API resource name for inventory resource. Format: `projects/{project}/locations/{location}/instances/{instance}/inventory` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided. Please see OsConfigZonalServiceClient::inventoryName() for help formatting this field. |

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