# Google Cloud OsConfig V1 Client - Class PatchConfig (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 PatchConfig.

Patch configuration specifications. Contains details on how to apply the
patch(es) to a VM instance.

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

## Namespace

Google \\ Cloud \\ OsConfig \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ reboot_config` | `int` Post-patch reboot settings. |
| `↳ apt` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.AptSettings` Apt update settings. Use this setting to override the default `apt` patch rules. |
| `↳ yum` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.YumSettings` Yum update settings. Use this setting to override the default `yum` patch rules. |
| `↳ goo` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.GooSettings` Goo update settings. Use this setting to override the default `goo` patch rules. |
| `↳ zypper` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.ZypperSettings` Zypper update settings. Use this setting to override the default `zypper` patch rules. |
| `↳ windows_update` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.WindowsUpdateSettings` Windows update settings. Use this override the default windows patch rules. |
| `↳ pre_step` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.ExecStep` The `ExecStep` to run before the patch update. |
| `↳ post_step` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.ExecStep` The `ExecStep` to run after the patch update. |
| `↳ mig_instances_allowed` | `bool` Allows the patch job to run on Managed instance groups (MIGs). |

### getRebootConfig

Post-patch reboot settings.

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

### setRebootConfig

Post-patch reboot settings.

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

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

### getApt

Apt update settings. Use this setting to override the default `apt` patch
rules.

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

### hasApt

### clearApt

### setApt

Apt update settings. Use this setting to override the default `apt` patch
rules.

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

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

### getYum

Yum update settings. Use this setting to override the default `yum` patch
rules.

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

### hasYum

### clearYum

### setYum

Yum update settings. Use this setting to override the default `yum` patch
rules.

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

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

### getGoo

Goo update settings. Use this setting to override the default `goo` patch
rules.

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

### hasGoo

### clearGoo

### setGoo

Goo update settings. Use this setting to override the default `goo` patch
rules.

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

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

### getZypper

Zypper update settings. Use this setting to override the default `zypper`
patch rules.

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

### hasZypper

### clearZypper

### setZypper

Zypper update settings. Use this setting to override the default `zypper`
patch rules.

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

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

### getWindowsUpdate

Windows update settings. Use this override the default windows patch rules.

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

### hasWindowsUpdate

### clearWindowsUpdate

### setWindowsUpdate

Windows update settings. Use this override the default windows patch rules.

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

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

### getPreStep

The `ExecStep` to run before the patch update.

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

### hasPreStep

### clearPreStep

### setPreStep

The `ExecStep` to run before the patch update.

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

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

### getPostStep

The `ExecStep` to run after the patch update.

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

### hasPostStep

### clearPostStep

### setPostStep

The `ExecStep` to run after the patch update.

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

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

### getMigInstancesAllowed

Allows the patch job to run on Managed instance groups (MIGs).

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

### setMigInstancesAllowed

Allows the patch job to run on Managed instance groups (MIGs).

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

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