# Data Loss Prevention V2 Client - Class DlpJob (2.13.0)

2.13.0 (latest) 2.12.0 2.11.0 2.10.0 2.9.2 2.8.1 2.7.0 2.6.1 2.4.1 2.3.0 2.2.3 2.1.0 2.0.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.1 1.14.0 1.13.2 1.12.0 1.11.0 1.10.2 1.9.0 1.8.6 Reference documentation and code samples for the Data Loss Prevention V2 Client class DlpJob.

Combines all of the information about a DLP job.

Generated from protobuf message `google.privacy.dlp.v2.DlpJob`

## Namespace

Google \\ Cloud \\ Dlp \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The server-assigned name. |
| `↳ type` | `int` The type of job. |
| `↳ state` | `int` State of a job. |
| `↳ risk_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.AnalyzeDataSourceRiskDetails` Results from analyzing risk of a data source. |
| `↳ inspect_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.InspectDataSourceDetails` Results from inspecting a data source. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Time when the job was created. |
| `↳ start_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Time when the job started. |
| `↳ end_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Time when the job finished. |
| `↳ last_modified` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Time when the job was last modified by the system. |
| `↳ job_trigger_name` | `string` If created by a job trigger, the resource name of the trigger that instantiated the job. |
| `↳ errors` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Error>` A stream of errors encountered running the job. |
| `↳ action_details` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ActionDetails>` Events that should occur after the job has completed. |

### getName

The server-assigned name.

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

### setName

The server-assigned name.

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

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

### getType

The type of job.

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

### setType

The type of job.

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

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

### getState

State of a job.

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

### setState

State of a job.

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

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

### getRiskDetails

Results from analyzing risk of a data source.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.AnalyzeDataSourceRiskDetails|null` |   |

### hasRiskDetails

### setRiskDetails

Results from analyzing risk of a data source.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.AnalyzeDataSourceRiskDetails` |

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

### getInspectDetails

Results from inspecting a data source.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.InspectDataSourceDetails|null` |   |

### hasInspectDetails

### setInspectDetails

Results from inspecting a data source.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.InspectDataSourceDetails` |

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

### getCreateTime

Time when the job was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Time when the job was created.

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

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

### getStartTime

Time when the job started.

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

### hasStartTime

### clearStartTime

### setStartTime

Time when the job started.

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

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

### getEndTime

Time when the job finished.

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

### hasEndTime

### clearEndTime

### setEndTime

Time when the job finished.

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

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

### getLastModified

Time when the job was last modified by the system.

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

### hasLastModified

### clearLastModified

### setLastModified

Time when the job was last modified by the system.

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

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

### getJobTriggerName

If created by a job trigger, the resource name of the trigger that
instantiated the job.

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

### setJobTriggerName

If created by a job trigger, the resource name of the trigger that
instantiated the job.

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

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

### getErrors

A stream of errors encountered running the job.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Error>` |   |

### setErrors

A stream of errors encountered running the job.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Error>` |

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

### getActionDetails

Events that should occur after the job has completed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ActionDetails>` |   |

### setActionDetails

Events that should occur after the job has completed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ActionDetails>` |

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

### getDetails

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