# Data Loss Prevention V2 Client - Class JobTrigger (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 JobTrigger.

Contains a configuration to make API calls on a repeating basis.

See
<https://cloud.google.com/sensitive-data-protection/docs/concepts-job-triggers>
to learn more.

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

## Namespace

Google \\ Cloud \\ Dlp \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Unique resource name for the triggeredJob, assigned by the service when the triggeredJob is created, for example `projects/dlp-test-project/jobTriggers/53234423`. |
| `↳ display_name` | `string` Display name (max 100 chars) |
| `↳ description` | `string` User provided description (max 256 chars) |
| `↳ inspect_job` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.InspectJobConfig` For inspect jobs, a snapshot of the configuration. |
| `↳ triggers` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.JobTrigger.Trigger>` A list of triggers which will be OR'ed together. Only one in the list needs to trigger for a job to be started. The list may contain only a single Schedule trigger and must have at least one object. |
| `↳ errors` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Error>` Output only. A stream of errors encountered when the trigger was activated. Repeated errors may result in the JobTrigger automatically being paused. Will return the last 100 errors. Whenever the JobTrigger is modified this list will be cleared. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The creation timestamp of a triggeredJob. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The last update timestamp of a triggeredJob. |
| `↳ last_run_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp of the last time this trigger executed. |
| `↳ status` | `int` Required. A status for this trigger. |

### getName

Unique resource name for the triggeredJob, assigned by the service when the
triggeredJob is created, for example
`projects/dlp-test-project/jobTriggers/53234423`.

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

### setName

Unique resource name for the triggeredJob, assigned by the service when the
triggeredJob is created, for example
`projects/dlp-test-project/jobTriggers/53234423`.

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

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

### getDisplayName

Display name (max 100 chars)

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

### setDisplayName

Display name (max 100 chars)

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

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

### getDescription

User provided description (max 256 chars)

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

### setDescription

User provided description (max 256 chars)

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

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

### getInspectJob

For inspect jobs, a snapshot of the configuration.

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

### hasInspectJob

### setInspectJob

For inspect jobs, a snapshot of the configuration.

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

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

### getTriggers

A list of triggers which will be OR'ed together. Only one in the list
needs to trigger for a job to be started. The list may contain only
a single Schedule trigger and must have at least one object.

| **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.JobTrigger.Trigger>` |   |

### setTriggers

A list of triggers which will be OR'ed together. Only one in the list
needs to trigger for a job to be started. The list may contain only
a single Schedule trigger and must have at least one object.

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

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

### getErrors

Output only. A stream of errors encountered when the trigger was activated.

Repeated errors may result in the JobTrigger automatically being paused.
Will return the last 100 errors. Whenever the JobTrigger is modified
this list will be cleared.

| **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

Output only. A stream of errors encountered when the trigger was activated.

Repeated errors may result in the JobTrigger automatically being paused.
Will return the last 100 errors. Whenever the JobTrigger is modified
this list will be cleared.

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

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

### getCreateTime

Output only. The creation timestamp of a triggeredJob.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The creation timestamp of a triggeredJob.

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

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

### getUpdateTime

Output only. The last update timestamp of a triggeredJob.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The last update timestamp of a triggeredJob.

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

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

### getLastRunTime

Output only. The timestamp of the last time this trigger executed.

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

### hasLastRunTime

### clearLastRunTime

### setLastRunTime

Output only. The timestamp of the last time this trigger executed.

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

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

### getStatus

Required. A status for this trigger.

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

### setStatus

Required. A status for this trigger.

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

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

### getJob

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