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

A request message to update an OS policy assignment

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

## Namespace

Google \\ Cloud \\ OsConfig \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ os_policy_assignment` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.OSPolicyAssignment` Required. The updated OS policy assignment. |
| `↳ update_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Optional. Field mask that controls which fields of the assignment should be updated. |

### getOsPolicyAssignment

Required. The updated OS policy assignment.

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

### hasOsPolicyAssignment

### clearOsPolicyAssignment

### setOsPolicyAssignment

Required. The updated OS policy assignment.

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

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

### getUpdateMask

Optional. Field mask that controls which fields of the assignment should be
updated.

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

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

Optional. Field mask that controls which fields of the assignment should be
updated.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `osPolicyAssignment` | `https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.OSPolicyAssignment` Required. The updated OS policy assignment. |
| `updateMask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Optional. Field mask that controls which fields of the assignment should be updated. |

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