# Google Cloud Functions V2 Client - Class StateMessage (2.1.3)

2.1.3 (latest) 2.1.2 2.0.6 1.7.0 1.6.5 1.5.0 1.4.2 1.3.1 1.2.0 1.1.2 1.0.3 Reference documentation and code samples for the Google Cloud Functions V2 Client class StateMessage.

Informational messages about the state of the Cloud Function or Operation.

Generated from protobuf message `google.cloud.functions.v2.StateMessage`

## Namespace

Google \\ Cloud \\ Functions \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ severity` | `int` Severity of the state message. |
| `↳ type` | `string` One-word CamelCase type of the state message. |
| `↳ message` | `string` The message. |

### getSeverity

Severity of the state message.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Severity](https://docs.cloud.google.com/php/docs/reference/cloud-functions/latest/V2.StateMessage.Severity). |

### setSeverity

Severity of the state message.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Severity](https://docs.cloud.google.com/php/docs/reference/cloud-functions/latest/V2.StateMessage.Severity). |

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

### getType

One-word CamelCase type of the state message.

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

### setType

One-word CamelCase type of the state message.

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

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

### getMessage

The message.

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

### setMessage

The message.

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

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