# Stackdriver Error Reporting V1beta1 Client - Class ReportErrorEventRequest (0.26.1)

0.26.1 (latest) 0.26.0 0.25.3 0.24.0 0.23.1 0.22.10 0.21.1 0.20.2 0.19.12

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Stackdriver Error Reporting V1beta1 Client class ReportErrorEventRequest.

A request for reporting an individual error event.

Generated from protobuf message `google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest`

## Namespace

Google \\ Cloud \\ ErrorReporting \\ V1beta1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ project_name` | `string` Required. The resource name of the Google Cloud Platform project. Written as `projects/{projectId}`, where `{projectId}` is the [Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840). Example: // `projects/my-project-123`. |
| `↳ event` | `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ReportedErrorEvent` Required. The error event to be reported. |

### getProjectName

Required. The resource name of the Google Cloud Platform project. Written
as `projects/{projectId}`, where `{projectId}` is the
[Google Cloud Platform project
ID](https://support.google.com/cloud/answer/6158840).

Example: // `projects/my-project-123`.

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

### setProjectName

Required. The resource name of the Google Cloud Platform project. Written
as `projects/{projectId}`, where `{projectId}` is the
[Google Cloud Platform project
ID](https://support.google.com/cloud/answer/6158840).

Example: // `projects/my-project-123`.

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

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

### getEvent

Required. The error event to be reported.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ReportedErrorEvent|null` |   |

### hasEvent

### clearEvent

### setEvent

Required. The error event to be reported.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ReportedErrorEvent` |

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectName` | `string` Required. The resource name of the Google Cloud Platform project. Written as `projects/{projectId}`, where `{projectId}` is the [Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840). Example: // `projects/my-project-123`. Please see ReportErrorsServiceClient::projectName() for help formatting this field. |
| `event` | `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ReportedErrorEvent` Required. The error event to be reported. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-error-reporting/latest/V1beta1.ReportErrorEventRequest` |   |