# Google Cloud Functions V2 Client - Class UpdateFunctionRequest (2.1.3)

2.1.3 (latest) 2.1.2 2.0.6 1.7.0 1.6.5 1.5.0 1.4.2 1.3.1 1.2.0 1.1.2 1.0.3 Reference documentation and code samples for the Google Cloud Functions V2 Client class UpdateFunctionRequest.

Request for the `UpdateFunction` method.

Generated from protobuf message `google.cloud.functions.v2.UpdateFunctionRequest`

## Namespace

Google \\ Cloud \\ Functions \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ function` | `https://docs.cloud.google.com/php/docs/reference/cloud-functions/latest/V2.PBFunction` Required. New version of the function. |
| `↳ update_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` The list of fields to be updated. If no field mask is provided, all fields will be updated. |

### getFunction

Required. New version of the function.

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

### hasFunction

### clearFunction

### setFunction

Required. New version of the function.

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

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

### getUpdateMask

The list of fields to be updated.

If no field mask is provided, all fields will be updated.

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

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

The list of fields to be updated.

If no field mask is provided, all fields will 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** |
| `function` | `https://docs.cloud.google.com/php/docs/reference/cloud-functions/latest/V2.PBFunction` Required. New version of the function. |
| `updateMask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` The list of fields to be updated. If no field mask is provided, all fields will be updated. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-functions/latest/V2.UpdateFunctionRequest` |   |