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

Apt patching is completed by executing `apt-get update && apt-get
upgrade`. Additional options can be set to control how this is executed.

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

## Namespace

Google \\ Cloud \\ OsConfig \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `int` By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead. |
| `↳ excludes` | `string[]` List of packages to exclude from update. These packages will be excluded |
| `↳ exclusive_packages` | `string[]` An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields. |

### getType

By changing the type to DIST, the patching is performed
using `apt-get dist-upgrade` instead.

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

### setType

By changing the type to DIST, the patching is performed
using `apt-get dist-upgrade` instead.

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

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

### getExcludes

List of packages to exclude from update. These packages will be excluded

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setExcludes

List of packages to exclude from update. These packages will be excluded

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

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

### getExclusivePackages

An exclusive list of packages to be updated. These are the only packages
that will be updated. If these packages are not installed, they will be
ignored. This field cannot be specified with any other patch configuration
fields.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setExclusivePackages

An exclusive list of packages to be updated. These are the only packages
that will be updated. If these packages are not installed, they will be
ignored. This field cannot be specified with any other patch configuration
fields.

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

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