# Google Cloud Vm Migration V1 Client - Class FetchStorageInventoryRequest (1.4.0)

1.4.0 (latest) 1.3.0 1.2.1 1.1.0 1.0.5 0.6.5 0.5.2 0.4.2 0.3.2 0.2.3 Reference documentation and code samples for the Google Cloud Vm Migration V1 Client class FetchStorageInventoryRequest.

Request message for
[fetchStorageInventory](https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.Client.VmMigrationClient#_Google_Cloud_VMMigration_V1_Client_VmMigrationClient__fetchStorageInventory__).

Generated from protobuf message `google.cloud.vmmigration.v1.FetchStorageInventoryRequest`

## Namespace

Google \\ Cloud \\ VMMigration \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ source` | `string` Required. The name of the Source. |
| `↳ type` | `int` Required. The type of the storage inventory to fetch. |
| `↳ force_refresh` | `bool` Optional. If this flag is set to true, the source will be queried instead of using cached results. Using this flag will make the call slower. |
| `↳ page_size` | `int` Optional. The maximum number of VMs to return. The service may return fewer than this value. |
| `↳ page_token` | `string` Optional. A page token, received from a previous `FetchStorageInventory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchStorageInventory` must match the call that provided the page token. |

### getSource

Required. The name of the Source.

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

### setSource

Required. The name of the Source.

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

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

### getType

Required. The type of the storage inventory to fetch.

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

### setType

Required. The type of the storage inventory to fetch.

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

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

### getForceRefresh

Optional. If this flag is set to true, the source will be queried instead
of using cached results. Using this flag will make the call slower.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setForceRefresh

Optional. If this flag is set to true, the source will be queried instead
of using cached results. Using this flag will make the call slower.

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

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

### getPageSize

Optional. The maximum number of VMs to return. The service may return
fewer than this value.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setPageSize

Optional. The maximum number of VMs to return. The service may return
fewer than this value.

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

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

### getPageToken

Optional. A page token, received from a previous `FetchStorageInventory`
call. Provide this to retrieve the subsequent page. When paginating, all
other parameters provided to `FetchStorageInventory` must match the call
that provided the page token.

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

### setPageToken

Optional. A page token, received from a previous `FetchStorageInventory`
call. Provide this to retrieve the subsequent page. When paginating, all
other parameters provided to `FetchStorageInventory` must match the call
that provided the page token.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `source` | `string` Required. The name of the Source. Please see VmMigrationClient::sourceName() for help formatting this field. |
| `type` | `int` Required. The type of the storage inventory to fetch. For allowed values, use constants defined on [FetchStorageInventoryRequest\\StorageType](https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.FetchStorageInventoryRequest.StorageType) |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.FetchStorageInventoryRequest` |   |