# Google Cloud Service Control V1 Client - Class CheckError (2.2.0)

2.2.0 (latest) 2.1.1 2.0.4 1.4.4 1.3.0 1.2.1 1.1.1 1.0.6 Reference documentation and code samples for the Google Cloud Service Control V1 Client class CheckError.

Defines the errors to be returned in
[google.api.servicecontrol.v1.CheckResponse.check_errors](https://docs.cloud.google.com/php/docs/reference/cloud-service-control/latest/V1.CheckResponse#_Google_Cloud_ServiceControl_V1_CheckResponse__getCheckErrors__).

Generated from protobuf message `google.api.servicecontrol.v1.CheckError`

## Namespace

Google \\ Cloud \\ ServiceControl \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ code` | `int` The error code. |
| `↳ subject` | `string` Subject to whom this error applies. See the specific code enum for more details on this field. For example: - "project: |
| `↳ detail` | `string` Free-form text providing details on the error cause of the error. |
| `↳ status` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` Contains public information about the check error. If available, `status.code` will be non zero and client can propagate it out as public error. |

### getCode

The error code.

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

### setCode

The error code.

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

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

### getSubject

Subject to whom this error applies. See the specific code enum for more
details on this field. For example:

- "project:
- "folder:
- "organization:

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

### setSubject

Subject to whom this error applies. See the specific code enum for more
details on this field. For example:

- "project:
- "folder:
- "organization:

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

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

### getDetail

Free-form text providing details on the error cause of the error.

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

### setDetail

Free-form text providing details on the error cause of the error.

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

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

### getStatus

Contains public information about the check error. If available,
`status.code` will be non zero and client can propagate it out as public
error.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasStatus

### clearStatus

### setStatus

Contains public information about the check error. If available,
`status.code` will be non zero and client can propagate it out as public
error.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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