# Google Cloud Binary Authorization V1 Client - Class UpdatePolicyRequest (1.1.2)

1.1.2 (latest) 1.1.1 1.0.5 0.8.7 0.7.0 0.6.1 0.5.13 Reference documentation and code samples for the Google Cloud Binary Authorization V1 Client class UpdatePolicyRequest.

Request message for BinauthzManagementService.UpdatePolicy.

Generated from protobuf message `google.cloud.binaryauthorization.v1.UpdatePolicyRequest`

## Namespace

Google \\ Cloud \\ BinaryAuthorization \\ V1

## Methods

### __construct

Constructor.

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

### getPolicy

Required. A new or updated [policy](https://docs.cloud.google.com/php/docs/reference/cloud-binary-authorization/latest/V1.Policy) value. The service will
overwrite the [policy name](https://docs.cloud.google.com/php/docs/reference/cloud-binary-authorization/latest/V1.Policy#_Google_Cloud_BinaryAuthorization_V1_Policy__getName__) field with the resource name in
the request URL, in the format `projects/*/policy`.

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

### hasPolicy

### clearPolicy

### setPolicy

Required. A new or updated [policy](https://docs.cloud.google.com/php/docs/reference/cloud-binary-authorization/latest/V1.Policy) value. The service will
overwrite the [policy name](https://docs.cloud.google.com/php/docs/reference/cloud-binary-authorization/latest/V1.Policy#_Google_Cloud_BinaryAuthorization_V1_Policy__getName__) field with the resource name in
the request URL, in the format `projects/*/policy`.

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

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

### static::build

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `policy` | `https://docs.cloud.google.com/php/docs/reference/cloud-binary-authorization/latest/V1.Policy` Required. A new or updated [policy](https://docs.cloud.google.com/php/docs/reference/cloud-binary-authorization/latest/V1.Policy) value. The service will overwrite the [policy name](https://docs.cloud.google.com/php/docs/reference/cloud-binary-authorization/latest/V1.Policy#_Google_Cloud_BinaryAuthorization_V1_Policy__getName__) field with the resource name in the request URL, in the format `projects/*/policy`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-binary-authorization/latest/V1.UpdatePolicyRequest` |   |