# Stackdriver Trace V1 Client - Class PatchTracesRequest (2.0.0)

2.0.0 (latest) 2.0.0-RC1 1.9.5 1.8.10 1.7.0 1.6.5 1.5.3 1.4.11 Reference documentation and code samples for the Stackdriver Trace V1 Client class PatchTracesRequest.

The request message for the `PatchTraces` method.

Generated from protobuf message `google.devtools.cloudtrace.v1.PatchTracesRequest`

## Namespace

Google \\ Cloud \\ Trace \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ project_id` | `string` Required. ID of the Cloud project where the trace data is stored. |
| `↳ traces` | `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V1.Traces` Required. The body of the message. |

### getProjectId

Required. ID of the Cloud project where the trace data is stored.

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

### setProjectId

Required. ID of the Cloud project where the trace data is stored.

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

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

### getTraces

Required. The body of the message.

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

### hasTraces

### clearTraces

### setTraces

Required. The body of the message.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectId` | `string` Required. ID of the Cloud project where the trace data is stored. |
| `traces` | `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V1.Traces` Required. The body of the message. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-trace/latest/V1.PatchTracesRequest` |   |