# Google Cloud Profiler V2 Client - Class UpdateProfileRequest (2.1.2)

2.1.2 (latest) 2.1.1 2.0.4 1.4.3 1.3.0 1.2.4 1.1.1 1.0.3 Reference documentation and code samples for the Google Cloud Profiler V2 Client class UpdateProfileRequest.

UpdateProfileRequest contains the profile to update.

Generated from protobuf message `google.devtools.cloudprofiler.v2.UpdateProfileRequest`

## Namespace

Google \\ Cloud \\ Profiler \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ profile` | `https://docs.cloud.google.com/php/docs/reference/cloud-profiler/latest/V2.Profile` Profile to update. |
| `↳ update_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Field mask used to specify the fields to be overwritten. Currently only profile_bytes and labels fields are supported by UpdateProfile, so only those fields can be specified in the mask. When no mask is provided, all fields are overwritten. |

### getProfile

Profile to update.

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

### hasProfile

### clearProfile

### setProfile

Profile to update.

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

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

### getUpdateMask

Field mask used to specify the fields to be overwritten. Currently only
profile_bytes and labels fields are supported by UpdateProfile, so only
those fields can be specified in the mask. When no mask is provided, all
fields are overwritten.

| **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. Currently only
profile_bytes and labels fields are supported by UpdateProfile, so only
those fields can be specified in the mask. When no mask is provided, all
fields are overwritten.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `profile` | `https://docs.cloud.google.com/php/docs/reference/cloud-profiler/latest/V2.Profile` Profile to update. |
| `updateMask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Field mask used to specify the fields to be overwritten. Currently only profile_bytes and labels fields are supported by UpdateProfile, so only those fields can be specified in the mask. When no mask is provided, all fields are overwritten. |

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