# Google Cloud Shell V1 Client - Class CloudShellErrorDetails (2.2.0)

2.2.0 (latest) 2.1.2 2.0.5 1.3.5 1.2.2 1.1.1 1.0.4 Reference documentation and code samples for the Google Cloud Shell V1 Client class CloudShellErrorDetails.

Cloud-shell specific information that will be included as details in failure
responses.

Generated from protobuf message `google.cloud.shell.v1.CloudShellErrorDetails`

## Namespace

Google \\ Cloud \\ Shell \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ code` | `int` Code indicating the specific error the occurred. |

### getCode

Code indicating the specific error the occurred.

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

### setCode

Code indicating the specific error the occurred.

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

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