# Google Cloud Network Connectivity V1 Client - Class StateReason (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.0 2.2.2 2.1.2 2.0.2 1.5.5 1.4.2 1.3.0 1.2.0 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Network Connectivity V1 Client class StateReason.

The reason a spoke is inactive.

Generated from protobuf message `google.cloud.networkconnectivity.v1.Spoke.StateReason`

## Namespace

Google \\ Cloud \\ NetworkConnectivity \\ V1 \\ Spoke

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ code` | `int` The code associated with this reason. |
| `↳ message` | `string` Human-readable details about this reason. |
| `↳ user_details` | `string` Additional information provided by the user in the RejectSpoke call. |

### getCode

The code associated with this reason.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Code](https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.Spoke.StateReason.Code). |

### setCode

The code associated with this reason.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Code](https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.Spoke.StateReason.Code). |

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

### getMessage

Human-readable details about this reason.

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

### setMessage

Human-readable details about this reason.

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

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

### getUserDetails

Additional information provided by the user in the RejectSpoke call.

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

### setUserDetails

Additional information provided by the user in the RejectSpoke call.

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

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