# Google Cloud Security Command Center V2 Client - Class Job (2.5.1)

2.5.1 (latest) 2.5.0 2.4.2 2.3.0 2.2.1 2.1.1 2.0.4 1.32.0 1.31.0 1.30.0 1.29.0 1.28.2 1.21.0 1.20.2 1.19.1 1.18.0 1.17.0 1.16.0 1.15.1 1.14.2 1.13.1 Reference documentation and code samples for the Google Cloud Security Command Center V2 Client class Job.

Describes a job

Generated from protobuf message `google.cloud.securitycenter.v2.Job`

## Namespace

Google \\ Cloud \\ SecurityCenter \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The fully-qualified name for a job. e.g. `projects/<project_id>/jobs/<job_id>` |
| `↳ state` | `int` Output only. State of the job, such as `RUNNING` or `PENDING`. |
| `↳ error_code` | `int` Optional. If the job did not complete successfully, this field describes why. |
| `↳ location` | `string` Optional. Gives the location where the job ran, such as `US` or `europe-west1` |

### getName

The fully-qualified name for a job.

e.g. `projects/<project_id>/jobs/<job_id>`

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

### setName

The fully-qualified name for a job.

e.g. `projects/<project_id>/jobs/<job_id>`

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

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

### getState

Output only. State of the job, such as `RUNNING` or `PENDING`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [JobState](https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.JobState). |

### setState

Output only. State of the job, such as `RUNNING` or `PENDING`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [JobState](https://docs.cloud.google.com/php/docs/reference/cloud-security-center/latest/V2.JobState). |

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

### getErrorCode

Optional. If the job did not complete successfully, this field describes
why.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setErrorCode

Optional. If the job did not complete successfully, this field describes
why.

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

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

### getLocation

Optional. Gives the location where the job ran, such as `US` or
`europe-west1`

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

### setLocation

Optional. Gives the location where the job ran, such as `US` or
`europe-west1`

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

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