# Google Cloud Workflows V1 Client - Class StateError (1.3.0)

1.3.0 (latest) 1.2.1 1.1.1 1.0.3 0.5.5 0.4.2 0.3.0 0.2.17 Reference documentation and code samples for the Google Cloud Workflows V1 Client class StateError.

Describes an error related to the current state of the workflow.

Generated from protobuf message `google.cloud.workflows.v1.Workflow.StateError`

## Namespace

Google \\ Cloud \\ Workflows \\ V1 \\ Workflow

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ details` | `string` Provides specifics about the error. |
| `↳ type` | `int` The type of this state error. |

### getDetails

Provides specifics about the error.

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

### setDetails

Provides specifics about the error.

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

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

### getType

The type of this state error.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-workflows/latest/V1.Workflow.StateError.Type). |

### setType

The type of this state error.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-workflows/latest/V1.Workflow.StateError.Type). |

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