# Recommender V1 Client - Class InsightStateInfo (2.2.0)

2.2.0 (latest) 2.1.3 2.0.5 1.11.5 1.10.0 1.9.1 1.8.2 1.7.8 Reference documentation and code samples for the Recommender V1 Client class InsightStateInfo.

Information related to insight state.

Generated from protobuf message `google.cloud.recommender.v1.InsightStateInfo`

## Namespace

Google \\ Cloud \\ Recommender \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ state` | `int` Insight state. |
| `↳ state_metadata` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` A map of metadata for the state, provided by user or automations systems. |

### getState

Insight state.

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

### setState

Insight state.

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

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

### getStateMetadata

A map of metadata for the state, provided by user or automations systems.

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

### setStateMetadata

A map of metadata for the state, provided by user or automations systems.

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

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