# Google Cloud Profiler V2 Client - Class CreateProfileRequest (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 CreateProfileRequest.

CreateProfileRequest describes a profile resource online creation request.

The deployment field must be populated. The profile_type specifies the list
of profile types supported by the agent. The creation call will hang until a
profile of one of these types needs to be collected.

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

## Namespace

Google \\ Cloud \\ Profiler \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Parent project to create the profile in. |
| `↳ deployment` | `https://docs.cloud.google.com/php/docs/reference/cloud-profiler/latest/V2.Deployment` Deployment details. |
| `↳ profile_type` | `int[]` One or more profile types that the agent is capable of providing. |

### getParent

Parent project to create the profile in.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setParent

Parent project to create the profile in.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getDeployment

Deployment details.

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

### hasDeployment

### clearDeployment

### setDeployment

Deployment details.

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

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

### getProfileType

One or more profile types that the agent is capable of providing.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setProfileType

One or more profile types that the agent is capable of providing.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

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