# Google Cloud OsConfig V1 Client - Class PatchJob (2.2.3)

2.2.3 (latest) 2.2.2 2.1.0 2.0.5 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud OsConfig V1 Client class PatchJob.

A high level representation of a patch job that is either in progress
or has completed.

Instance details are not included in the job. To paginate through instance
details, use ListPatchJobInstanceDetails.
For more information about patch jobs, see
[Creating patch
jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).

Generated from protobuf message `google.cloud.osconfig.v1.PatchJob`

## Namespace

Google \\ Cloud \\ OsConfig \\ V1

## Methods

### __construct

Constructor.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `mixed` |

### getName

Unique identifier for this patch job in the form
`projects/*/patchJobs/*`

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

### setName

Unique identifier for this patch job in the form
`projects/*/patchJobs/*`

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

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

### getDisplayName

Display name for this patch job. This is not a unique identifier.

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

### setDisplayName

Display name for this patch job. This is not a unique identifier.

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

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

### getDescription

Description of the patch job. Length of the description is limited
to 1024 characters.

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

### setDescription

Description of the patch job. Length of the description is limited
to 1024 characters.

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

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

### getCreateTime

Time this patch job was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Time this patch job was created.

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

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

### getUpdateTime

Last time this patch job was updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Last time this patch job was updated.

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

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

### getState

The current state of the PatchJob.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.PatchJob.State). |

### setState

The current state of the PatchJob.

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

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

### getInstanceFilter

Instances to patch.

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

### hasInstanceFilter

### clearInstanceFilter

### setInstanceFilter

Instances to patch.

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

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

### getPatchConfig

Patch configuration being applied.

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

### hasPatchConfig

### clearPatchConfig

### setPatchConfig

Patch configuration being applied.

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

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

### getDuration

Duration of the patch job. After the duration ends, the
patch job times out.

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

### hasDuration

### clearDuration

### setDuration

Duration of the patch job. After the duration ends, the
patch job times out.

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

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

### getInstanceDetailsSummary

Summary of instance details.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.PatchJob.InstanceDetailsSummary|null` |   |

### hasInstanceDetailsSummary

### clearInstanceDetailsSummary

### setInstanceDetailsSummary

Summary of instance details.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.PatchJob.InstanceDetailsSummary` |

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

### getDryRun

If this patch job is a dry run, the agent reports that it has
finished without running any updates on the VM instance.

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

### setDryRun

If this patch job is a dry run, the agent reports that it has
finished without running any updates on the VM instance.

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

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

### getErrorMessage

If this patch job failed, this message provides information about the
failure.

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

### setErrorMessage

If this patch job failed, this message provides information about the
failure.

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

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

### getPercentComplete

Reflects the overall progress of the patch job in the range of
0.0 being no progress to 100.0 being complete.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setPercentComplete

Reflects the overall progress of the patch job in the range of
0.0 being no progress to 100.0 being complete.

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

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

### getPatchDeployment

Output only. Name of the patch deployment that created this patch job.

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

### setPatchDeployment

Output only. Name of the patch deployment that created this patch job.

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

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

### getRollout

Rollout strategy being applied.

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

### hasRollout

### clearRollout

### setRollout

Rollout strategy being applied.

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

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