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

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

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

## Namespace

Google \\ Cloud \\ VMMigration \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ code` | `int` The warning code. |
| `↳ warning_message` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.LocalizedMessage.html` Output only. The localized warning message. |
| `↳ action_item` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.LocalizedMessage.html` Output only. Suggested action for solving the warning. |
| `↳ 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 warning. |
| `↳ warning_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The time the warning occurred. |

### getCode

The warning code.

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

### setCode

The warning code.

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

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

### getWarningMessage

Output only. The localized warning message.

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

### hasWarningMessage

### clearWarningMessage

### setWarningMessage

Output only. The localized warning 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 warning.

| **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 warning.

| **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 warning.

| **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 warning.

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

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

### getWarningTime

The time the warning occurred.

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

### hasWarningTime

### clearWarningTime

### setWarningTime

The time the warning occurred.

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

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