# Google Cloud Org Policy V2 Client - Class UpdatePolicyRequest (1.3.3)

1.3.3 (latest) 1.3.2 1.2.2 1.1.3 1.0.0 0.7.0 0.6.5 0.5.3 0.4.2 0.3.7 Reference documentation and code samples for the Google Cloud Org Policy V2 Client class UpdatePolicyRequest.

The request sent to the [UpdatePolicyRequest](https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Client.OrgPolicyClient#_Google_Cloud_OrgPolicy_V2_Client_OrgPolicyClient__updatePolicy__) method.

Generated from protobuf message `google.cloud.orgpolicy.v2.UpdatePolicyRequest`

## Namespace

Google \\ Cloud \\ OrgPolicy \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ policy` | `https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Policy` Required. Policy to update. |
| `↳ update_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request. |

### getPolicy

Required. Policy to update.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Policy|null` |   |

### hasPolicy

### clearPolicy

### setPolicy

Required. Policy to update.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Policy` |

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

### getUpdateMask

Field mask used to specify the fields to be overwritten in the policy
by the set. The fields specified in the update_mask are relative to the
policy, not the full request.

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

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

Field mask used to specify the fields to be overwritten in the policy
by the set. The fields specified in the update_mask are relative to the
policy, not the full request.

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

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

### static::build

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `policy` | `https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Policy` Required. Policy to update. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.UpdatePolicyRequest` |   |