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

Represents migration resource error information that can be used with
google.rpc.Status message. MigrationError is used to present the user with
error information in migration operations.

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

## Namespace

Google \\ Cloud \\ VMMigration \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ code` | `int` Output only. The error code. |
| `↳ error_message` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.LocalizedMessage.html` Output only. The localized error message. |
| `↳ action_item` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.LocalizedMessage.html` Output only. Suggested action for solving the error. |
| `↳ help_links` | `array<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Help.Link.html>` Output only. URL(s) pointing to additional information on handling the current error. |
| `↳ error_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time the error occurred. |

### getCode

Output only. The error code.

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

### setCode

Output only. The error code.

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

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

### getErrorMessage

Output only. The localized error message.

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

### hasErrorMessage

### clearErrorMessage

### setErrorMessage

Output only. The localized error message.

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

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

### getActionItem

Output only. Suggested action for solving the error.

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

### hasActionItem

### clearActionItem

### setActionItem

Output only. Suggested action for solving the error.

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

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

### getHelpLinks

Output only. URL(s) pointing to additional information on handling the
current error.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Help.Link.html>` |   |

### setHelpLinks

Output only. URL(s) pointing to additional information on handling the
current error.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Help.Link.html>` |

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

### getErrorTime

Output only. The time the error occurred.

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

### hasErrorTime

### clearErrorTime

### setErrorTime

Output only. The time the error occurred.

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

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