# Google Cloud Vm Migration V1 Client - Class UtilizationReport (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 UtilizationReport.

Utilization report details the utilization (CPU, memory, etc.) of selected
source VMs.

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

## Namespace

Google \\ Cloud \\ VMMigration \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The report unique name. |
| `↳ display_name` | `string` The report display name, as assigned by the user. |
| `↳ state` | `int` Output only. Current state of the report. |
| `↳ state_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time the state was last set. |
| `↳ error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` Output only. Provides details on the state of the report in case of an error. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time the report was created (this refers to the time of the request, not the time the report creation completed). |
| `↳ time_frame` | `int` Time frame of the report. |
| `↳ frame_end_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The point in time when the time frame ends. Notice that the time frame is counted backwards. For instance if the "frame_end_time" value is 2021/01/20 and the time frame is WEEK then the report covers the week between 2021/01/20 and 2021/01/14. |
| `↳ vm_count` | `int` Output only. Total number of VMs included in the report. |
| `↳ vms` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.VmUtilizationInfo>` List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored. |

### getName

Output only. The report unique name.

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

### setName

Output only. The report unique name.

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

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

### getDisplayName

The report display name, as assigned by the user.

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

### setDisplayName

The report display name, as assigned by the user.

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

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

### getState

Output only. Current state of the report.

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

### setState

Output only. Current state of the report.

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

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

### getStateTime

Output only. The time the state was last set.

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

### hasStateTime

### clearStateTime

### setStateTime

Output only. The time the state was last set.

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

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

### getError

Output only. Provides details on the state of the report in case of an
error.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasError

### clearError

### setError

Output only. Provides details on the state of the report in case of an
error.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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

### getCreateTime

Output only. The time the report was created (this refers to the time of
the request, not the time the report creation completed).

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time the report was created (this refers to the time of
the request, not the time the report creation completed).

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

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

### getTimeFrame

Time frame of the report.

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

### setTimeFrame

Time frame of the report.

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

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

### getFrameEndTime

Output only. The point in time when the time frame ends. Notice that the
time frame is counted backwards. For instance if the "frame_end_time" value
is 2021/01/20 and the time frame is WEEK then the report covers the week
between 2021/01/20 and 2021/01/14.

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

### hasFrameEndTime

### clearFrameEndTime

### setFrameEndTime

Output only. The point in time when the time frame ends. Notice that the
time frame is counted backwards. For instance if the "frame_end_time" value
is 2021/01/20 and the time frame is WEEK then the report covers the week
between 2021/01/20 and 2021/01/14.

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

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

### getVmCount

Output only. Total number of VMs included in the report.

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

### setVmCount

Output only. Total number of VMs included in the report.

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

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

### getVms

List of utilization information per VM.

When sent as part of the request, the "vm_id" field is used in order to
specify which VMs to include in the report. In that case all other fields
are ignored.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.VmUtilizationInfo>` |   |

### setVms

List of utilization information per VM.

When sent as part of the request, the "vm_id" field is used in order to
specify which VMs to include in the report. In that case all other fields
are ignored.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vm-migration/latest/V1.VmUtilizationInfo>` |

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