# Google Cloud Eventarc V1 Client - Class StateCondition (2.3.1)

2.3.1 (latest) 2.3.0 2.2.1 2.1.5 2.0.1 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Eventarc V1 Client class StateCondition.

A condition that is part of the trigger state computation.

Generated from protobuf message `google.cloud.eventarc.v1.StateCondition`

## Namespace

Google \\ Cloud \\ Eventarc \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ code` | `int` The canonical code of the condition. |
| `↳ message` | `string` Human-readable message. |

### getCode

The canonical code of the condition.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Code](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Code.html). |

### setCode

The canonical code of the condition.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Code](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Code.html). |

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

### getMessage

Human-readable message.

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

### setMessage

Human-readable message.

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

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