# Google Cloud KMS Inventory V1 Client - Class Warning (1.4.0)

1.4.0 (latest) 1.3.0 1.2.3 1.1.1 1.0.4 0.4.5 0.3.1 0.2.3 0.1.2 Reference documentation and code samples for the Google Cloud KMS Inventory V1 Client class Warning.

A warning message that indicates potential problems with the response data.

Generated from protobuf message `google.cloud.kms.inventory.v1.Warning`

## Namespace

Google \\ Cloud \\ Kms \\ Inventory \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ warning_code` | `int` The specific warning code for the displayed message. |
| `↳ display_message` | `string` The literal message providing context and details about the warnings. |

### getWarningCode

The specific warning code for the displayed message.

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

### setWarningCode

The specific warning code for the displayed message.

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

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

### getDisplayMessage

The literal message providing context and details about the warnings.

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

### setDisplayMessage

The literal message providing context and details about the warnings.

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

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