# Google Cloud Video Transcoder V1 Client - Class Job (1.4.0)

1.4.0 (latest) 1.3.2 1.2.0 1.1.0 1.0.3 0.10.5 0.9.1 0.8.2 0.7.1 0.6.0 0.5.3 Reference documentation and code samples for the Google Cloud Video Transcoder V1 Client class Job.

Transcoding job resource.

Generated from protobuf message `google.cloud.video.transcoder.v1.Job`

## Namespace

Google \\ Cloud \\ Video \\ Transcoder \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The resource name of the job. Format: `projects/{project_number}/locations/{location}/jobs/{job}` |
| `↳ input_uri` | `string` Input only. Specify the `input_uri` to populate empty `uri` fields in each element of `Job.config.inputs` or `JobTemplate.config.inputs` when using template. URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). |
| `↳ output_uri` | `string` Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or `JobTemplate.config.output.uri` when using template. URI for the output file(s). For example, `gs://my-bucket/outputs/`. See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). |
| `↳ template_id` | `string` Input only. Specify the `template_id` to use for populating `Job.config`. The default is `preset/web-hd`, which is the only supported preset. User defined JobTemplate: `{job_template_id}` |
| `↳ config` | `https://docs.cloud.google.com/php/docs/reference/cloud-video-transcoder/latest/V1.JobConfig` The configuration for this job. |
| `↳ state` | `int` Output only. The current state of the job. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time the job was created. |
| `↳ start_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time the transcoding started. |
| `↳ end_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time the transcoding finished. |
| `↳ ttl_after_completion_days` | `int` Job time to live value in days, which will be effective after job completion. Job should be deleted automatically after the given TTL. Enter a value between 1 and 90. The default is 30. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` The labels associated with this job. You can use these to organize and group your jobs. |
| `↳ error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` Output only. An error object that describes the reason for the failure. This property is always present when [ProcessingState](https://docs.cloud.google.com/php/docs/reference/cloud-video-transcoder/latest/V1.Job.ProcessingState) is `FAILED`. |
| `↳ mode` | `int` The processing mode of the job. The default is `PROCESSING_MODE_INTERACTIVE`. |
| `↳ batch_mode_priority` | `int` The processing priority of a batch job. This field can only be set for batch mode jobs. The default value is 0. This value cannot be negative. Higher values correspond to higher priorities for the job. |
| `↳ optimization` | `int` Optional. The optimization strategy of the job. The default is `AUTODETECT`. |
| `↳ fill_content_gaps` | `bool` Optional. Insert silence and duplicate frames when timestamp gaps are detected in a given stream. |

### getName

The resource name of the job.

Format: `projects/{project_number}/locations/{location}/jobs/{job}`

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

### setName

The resource name of the job.

Format: `projects/{project_number}/locations/{location}/jobs/{job}`

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

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

### getInputUri

Input only. Specify the `input_uri` to populate empty `uri` fields in each
element of `Job.config.inputs` or `JobTemplate.config.inputs` when using
template. URI of the media. Input files must be at least 5 seconds in
duration and stored in Cloud Storage (for example,
`gs://bucket/inputs/file.mp4`). See [Supported input and output
formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).

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

### setInputUri

Input only. Specify the `input_uri` to populate empty `uri` fields in each
element of `Job.config.inputs` or `JobTemplate.config.inputs` when using
template. URI of the media. Input files must be at least 5 seconds in
duration and stored in Cloud Storage (for example,
`gs://bucket/inputs/file.mp4`). See [Supported input and output
formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).

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

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

### getOutputUri

Input only. Specify the `output_uri` to populate an empty
`Job.config.output.uri` or `JobTemplate.config.output.uri` when using
template. URI for the output file(s). For example,
`gs://my-bucket/outputs/`. See [Supported input and output
formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).

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

### setOutputUri

Input only. Specify the `output_uri` to populate an empty
`Job.config.output.uri` or `JobTemplate.config.output.uri` when using
template. URI for the output file(s). For example,
`gs://my-bucket/outputs/`. See [Supported input and output
formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).

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

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

### getTemplateId

Input only. Specify the `template_id` to use for populating `Job.config`.

The default is `preset/web-hd`, which is the only supported preset.
User defined JobTemplate: `{job_template_id}`

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

### hasTemplateId

### setTemplateId

Input only. Specify the `template_id` to use for populating `Job.config`.

The default is `preset/web-hd`, which is the only supported preset.
User defined JobTemplate: `{job_template_id}`

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

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

### getConfig

The configuration for this job.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-video-transcoder/latest/V1.JobConfig|null` |   |

### hasConfig

### setConfig

The configuration for this job.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-video-transcoder/latest/V1.JobConfig` |

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

### getState

Output only. The current state of the job.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ProcessingState](https://docs.cloud.google.com/php/docs/reference/cloud-video-transcoder/latest/V1.Job.ProcessingState). |

### setState

Output only. The current state of the job.

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

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

### getCreateTime

Output only. The time the job was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time the job was created.

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

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

### getStartTime

Output only. The time the transcoding started.

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

### hasStartTime

### clearStartTime

### setStartTime

Output only. The time the transcoding started.

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

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

### getEndTime

Output only. The time the transcoding finished.

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

### hasEndTime

### clearEndTime

### setEndTime

Output only. The time the transcoding finished.

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

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

### getTtlAfterCompletionDays

Job time to live value in days, which will be effective after job
completion. Job should be deleted automatically after the given TTL. Enter
a value between 1 and 90. The default is 30.

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

### setTtlAfterCompletionDays

Job time to live value in days, which will be effective after job
completion. Job should be deleted automatically after the given TTL. Enter
a value between 1 and 90. The default is 30.

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

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

### getLabels

The labels associated with this job. You can use these to organize and
group your jobs.

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

### setLabels

The labels associated with this job. You can use these to organize and
group your jobs.

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

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

### getError

Output only. An error object that describes the reason for the failure.

This property is always present when
[ProcessingState](https://docs.cloud.google.com/php/docs/reference/cloud-video-transcoder/latest/V1.Job.ProcessingState) is
`FAILED`.

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

### hasError

### clearError

### setError

Output only. An error object that describes the reason for the failure.

This property is always present when
[ProcessingState](https://docs.cloud.google.com/php/docs/reference/cloud-video-transcoder/latest/V1.Job.ProcessingState) is
`FAILED`.

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

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

### getMode

The processing mode of the job.

The default is `PROCESSING_MODE_INTERACTIVE`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ProcessingMode](https://docs.cloud.google.com/php/docs/reference/cloud-video-transcoder/latest/V1.Job.ProcessingMode). |

### setMode

The processing mode of the job.

The default is `PROCESSING_MODE_INTERACTIVE`.

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

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

### getBatchModePriority

The processing priority of a batch job.

This field can only be set for batch mode jobs. The default value is 0.
This value cannot be negative. Higher values correspond to higher
priorities for the job.

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

### setBatchModePriority

The processing priority of a batch job.

This field can only be set for batch mode jobs. The default value is 0.
This value cannot be negative. Higher values correspond to higher
priorities for the job.

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

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

### getOptimization

Optional. The optimization strategy of the job. The default is
`AUTODETECT`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [OptimizationStrategy](https://docs.cloud.google.com/php/docs/reference/cloud-video-transcoder/latest/V1.Job.OptimizationStrategy). |

### setOptimization

Optional. The optimization strategy of the job. The default is
`AUTODETECT`.

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

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

### getFillContentGaps

Optional. Insert silence and duplicate frames when timestamp gaps are
detected in a given stream.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setFillContentGaps

Optional. Insert silence and duplicate frames when timestamp gaps are
detected in a given stream.

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

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

### getJobConfig

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