# Google Cloud Error Reporting v1beta1 API - Class ReportErrorsServiceClient (3.0.0-beta06)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [3.0.0-beta06 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient)
- [3.0.0-beta05](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/3.0.0-beta05/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient)
- [2.0.0-beta05](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/2.0.0-beta05/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient)

    public abstract class ReportErrorsServiceClient

Reference documentation and code samples for the Google Cloud Error Reporting v1beta1 API class ReportErrorsServiceClient.

ReportErrorsService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ReportErrorsServiceClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[ReportErrorsServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClientImpl)

## Namespace

[Google.Cloud.ErrorReporting.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1)

## Assembly

Google.Cloud.ErrorReporting.V1Beta1.dll

## Remarks

An API for reporting error events.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the ReportErrorsService service, which is a host of
"clouderrorreporting.googleapis.com" and a port of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default ReportErrorsService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default ReportErrorsService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

<br />

### GrpcClient

    public virtual ReportErrorsService.ReportErrorsServiceClient GrpcClient { get; }

The underlying gRPC ReportErrorsService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsService.ReportErrorsServiceClient` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### Create()

    public static ReportErrorsServiceClient Create()

Synchronously creates a [ReportErrorsServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use
[ReportErrorsServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient` | The created [ReportErrorsServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient). |

### CreateAsync(CancellationToken)

    public static Task<ReportErrorsServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [ReportErrorsServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use
[ReportErrorsServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient` | The task representing the created [ReportErrorsServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient). |

### ReportErrorEvent(ProjectName, ReportedErrorEvent, CallSettings)

    public virtual ReportErrorEventResponse ReportErrorEvent(ProjectName projectName, ReportedErrorEvent @event, CallSettings callSettings = null)

Report an individual error event and record the event to a log.

This endpoint accepts **either** an OAuth token,
**or** an [API key](https://support.google.com/cloud/answer/6158862)
for authentication. To use an API key, append it to the URL as the value of
a `key` parameter. For example:

`POST
https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456`

**Note:** [Error Reporting](https://cloud.google.com/error-reporting)
is a service built on Cloud Logging and can analyze log entries when all of
the following are true:

- Customer-managed encryption keys (CMEK) are disabled on the log bucket.
- The log bucket satisfies one of the following:
- The log bucket is stored in the same project where the logs originated.
- The logs were routed to a project, and then that project stored those logs in a log bucket that it owns.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectName` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` 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/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportedErrorEvent` Required. The error event to be reported. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventResponse` | The RPC response. |

**Example**

    ReportErrorsServiceClient client = ReportErrorsServiceClient.Create();
    ProjectName projectName = new ProjectName(projectId);
    ReportedErrorEvent error = new ReportedErrorEvent
    {
        Context = new ErrorContext
        {
            ReportLocation = new SourceLocation
            {
                FilePath = "SampleApp.BusinessLogic/ComplexLogic.cs",
                FunctionName = "ComputeTrickyAnswer",
                LineNumber = 100
            },
            User = "userid"
        },

        // If this is a stack trace, the service will parse it.
        Message = "Computation failed",

        EventTime = Timestamp.FromDateTime(DateTime.UtcNow),
        ServiceContext = new ServiceContext
        {
            Service = "SampleApp",
            Version = "1.0.0"
        }
    };
    client.ReportErrorEvent(projectName, error);

### ReportErrorEvent(ReportErrorEventRequest, CallSettings)

    public virtual ReportErrorEventResponse ReportErrorEvent(ReportErrorEventRequest request, CallSettings callSettings = null)

Report an individual error event and record the event to a log.

This endpoint accepts **either** an OAuth token,
**or** an [API key](https://support.google.com/cloud/answer/6158862)
for authentication. To use an API key, append it to the URL as the value of
a `key` parameter. For example:

`POST
https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456`

**Note:** [Error Reporting](https://cloud.google.com/error-reporting)
is a service built on Cloud Logging and can analyze log entries when all of
the following are true:

- Customer-managed encryption keys (CMEK) are disabled on the log bucket.
- The log bucket satisfies one of the following:
- The log bucket is stored in the same project where the logs originated.
- The logs were routed to a project, and then that project stored those logs in a log bucket that it owns.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventResponse` | The RPC response. |

**Example**

    // Create client
    ReportErrorsServiceClient reportErrorsServiceClient = ReportErrorsServiceClient.Create();
    // Initialize request argument(s)
    ReportErrorEventRequest request = new ReportErrorEventRequest
    {
        ProjectNameAsProjectName = ProjectName.FromProject("[PROJECT]"),
        Event = new ReportedErrorEvent(),
    };
    // Make the request
    ReportErrorEventResponse response = reportErrorsServiceClient.ReportErrorEvent(request);

### ReportErrorEvent(string, ReportedErrorEvent, CallSettings)

    public virtual ReportErrorEventResponse ReportErrorEvent(string projectName, ReportedErrorEvent @event, CallSettings callSettings = null)

Report an individual error event and record the event to a log.

This endpoint accepts **either** an OAuth token,
**or** an [API key](https://support.google.com/cloud/answer/6158862)
for authentication. To use an API key, append it to the URL as the value of
a `key` parameter. For example:

`POST
https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456`

**Note:** [Error Reporting](https://cloud.google.com/error-reporting)
is a service built on Cloud Logging and can analyze log entries when all of
the following are true:

- Customer-managed encryption keys (CMEK) are disabled on the log bucket.
- The log bucket satisfies one of the following:
- The log bucket is stored in the same project where the logs originated.
- The logs were routed to a project, and then that project stored those logs in a log bucket that it owns.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectName` | `https://learn.microsoft.com/dotnet/api/system.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/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportedErrorEvent` Required. The error event to be reported. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventResponse` | The RPC response. |

**Example**

    // Create client
    ReportErrorsServiceClient reportErrorsServiceClient = ReportErrorsServiceClient.Create();
    // Initialize request argument(s)
    string projectName = "projects/[PROJECT]";
    ReportedErrorEvent @event = new ReportedErrorEvent();
    // Make the request
    ReportErrorEventResponse response = reportErrorsServiceClient.ReportErrorEvent(projectName, @event);

### ReportErrorEventAsync(ProjectName, ReportedErrorEvent, CallSettings)

    public virtual Task<ReportErrorEventResponse> ReportErrorEventAsync(ProjectName projectName, ReportedErrorEvent @event, CallSettings callSettings = null)

Report an individual error event and record the event to a log.

This endpoint accepts **either** an OAuth token,
**or** an [API key](https://support.google.com/cloud/answer/6158862)
for authentication. To use an API key, append it to the URL as the value of
a `key` parameter. For example:

`POST
https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456`

**Note:** [Error Reporting](https://cloud.google.com/error-reporting)
is a service built on Cloud Logging and can analyze log entries when all of
the following are true:

- Customer-managed encryption keys (CMEK) are disabled on the log bucket.
- The log bucket satisfies one of the following:
- The log bucket is stored in the same project where the logs originated.
- The logs were routed to a project, and then that project stored those logs in a log bucket that it owns.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectName` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` 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/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportedErrorEvent` Required. The error event to be reported. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    ReportErrorsServiceClient reportErrorsServiceClient = await ReportErrorsServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProjectName projectName = ProjectName.FromProject("[PROJECT]");
    ReportedErrorEvent @event = new ReportedErrorEvent();
    // Make the request
    ReportErrorEventResponse response = await reportErrorsServiceClient.ReportErrorEventAsync(projectName, @event);

### ReportErrorEventAsync(ProjectName, ReportedErrorEvent, CancellationToken)

    public virtual Task<ReportErrorEventResponse> ReportErrorEventAsync(ProjectName projectName, ReportedErrorEvent @event, CancellationToken cancellationToken)

Report an individual error event and record the event to a log.

This endpoint accepts **either** an OAuth token,
**or** an [API key](https://support.google.com/cloud/answer/6158862)
for authentication. To use an API key, append it to the URL as the value of
a `key` parameter. For example:

`POST
https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456`

**Note:** [Error Reporting](https://cloud.google.com/error-reporting)
is a service built on Cloud Logging and can analyze log entries when all of
the following are true:

- Customer-managed encryption keys (CMEK) are disabled on the log bucket.
- The log bucket satisfies one of the following:
- The log bucket is stored in the same project where the logs originated.
- The logs were routed to a project, and then that project stored those logs in a log bucket that it owns.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectName` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html` 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/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportedErrorEvent` Required. The error event to be reported. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    ReportErrorsServiceClient reportErrorsServiceClient = await ReportErrorsServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProjectName projectName = ProjectName.FromProject("[PROJECT]");
    ReportedErrorEvent @event = new ReportedErrorEvent();
    // Make the request
    ReportErrorEventResponse response = await reportErrorsServiceClient.ReportErrorEventAsync(projectName, @event);

### ReportErrorEventAsync(ReportErrorEventRequest, CallSettings)

    public virtual Task<ReportErrorEventResponse> ReportErrorEventAsync(ReportErrorEventRequest request, CallSettings callSettings = null)

Report an individual error event and record the event to a log.

This endpoint accepts **either** an OAuth token,
**or** an [API key](https://support.google.com/cloud/answer/6158862)
for authentication. To use an API key, append it to the URL as the value of
a `key` parameter. For example:

`POST
https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456`

**Note:** [Error Reporting](https://cloud.google.com/error-reporting)
is a service built on Cloud Logging and can analyze log entries when all of
the following are true:

- Customer-managed encryption keys (CMEK) are disabled on the log bucket.
- The log bucket satisfies one of the following:
- The log bucket is stored in the same project where the logs originated.
- The logs were routed to a project, and then that project stored those logs in a log bucket that it owns.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    ReportErrorsServiceClient reportErrorsServiceClient = await ReportErrorsServiceClient.CreateAsync();
    // Initialize request argument(s)
    ReportErrorEventRequest request = new ReportErrorEventRequest
    {
        ProjectNameAsProjectName = ProjectName.FromProject("[PROJECT]"),
        Event = new ReportedErrorEvent(),
    };
    // Make the request
    ReportErrorEventResponse response = await reportErrorsServiceClient.ReportErrorEventAsync(request);

### ReportErrorEventAsync(ReportErrorEventRequest, CancellationToken)

    public virtual Task<ReportErrorEventResponse> ReportErrorEventAsync(ReportErrorEventRequest request, CancellationToken cancellationToken)

Report an individual error event and record the event to a log.

This endpoint accepts **either** an OAuth token,
**or** an [API key](https://support.google.com/cloud/answer/6158862)
for authentication. To use an API key, append it to the URL as the value of
a `key` parameter. For example:

`POST
https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456`

**Note:** [Error Reporting](https://cloud.google.com/error-reporting)
is a service built on Cloud Logging and can analyze log entries when all of
the following are true:

- Customer-managed encryption keys (CMEK) are disabled on the log bucket.
- The log bucket satisfies one of the following:
- The log bucket is stored in the same project where the logs originated.
- The logs were routed to a project, and then that project stored those logs in a log bucket that it owns.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    ReportErrorsServiceClient reportErrorsServiceClient = await ReportErrorsServiceClient.CreateAsync();
    // Initialize request argument(s)
    ReportErrorEventRequest request = new ReportErrorEventRequest
    {
        ProjectNameAsProjectName = ProjectName.FromProject("[PROJECT]"),
        Event = new ReportedErrorEvent(),
    };
    // Make the request
    ReportErrorEventResponse response = await reportErrorsServiceClient.ReportErrorEventAsync(request);

### ReportErrorEventAsync(string, ReportedErrorEvent, CallSettings)

    public virtual Task<ReportErrorEventResponse> ReportErrorEventAsync(string projectName, ReportedErrorEvent @event, CallSettings callSettings = null)

Report an individual error event and record the event to a log.

This endpoint accepts **either** an OAuth token,
**or** an [API key](https://support.google.com/cloud/answer/6158862)
for authentication. To use an API key, append it to the URL as the value of
a `key` parameter. For example:

`POST
https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456`

**Note:** [Error Reporting](https://cloud.google.com/error-reporting)
is a service built on Cloud Logging and can analyze log entries when all of
the following are true:

- Customer-managed encryption keys (CMEK) are disabled on the log bucket.
- The log bucket satisfies one of the following:
- The log bucket is stored in the same project where the logs originated.
- The logs were routed to a project, and then that project stored those logs in a log bucket that it owns.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectName` | `https://learn.microsoft.com/dotnet/api/system.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/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportedErrorEvent` Required. The error event to be reported. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    ReportErrorsServiceClient reportErrorsServiceClient = await ReportErrorsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string projectName = "projects/[PROJECT]";
    ReportedErrorEvent @event = new ReportedErrorEvent();
    // Make the request
    ReportErrorEventResponse response = await reportErrorsServiceClient.ReportErrorEventAsync(projectName, @event);

### ReportErrorEventAsync(string, ReportedErrorEvent, CancellationToken)

    public virtual Task<ReportErrorEventResponse> ReportErrorEventAsync(string projectName, ReportedErrorEvent @event, CancellationToken cancellationToken)

Report an individual error event and record the event to a log.

This endpoint accepts **either** an OAuth token,
**or** an [API key](https://support.google.com/cloud/answer/6158862)
for authentication. To use an API key, append it to the URL as the value of
a `key` parameter. For example:

`POST
https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456`

**Note:** [Error Reporting](https://cloud.google.com/error-reporting)
is a service built on Cloud Logging and can analyze log entries when all of
the following are true:

- Customer-managed encryption keys (CMEK) are disabled on the log bucket.
- The log bucket satisfies one of the following:
- The log bucket is stored in the same project where the logs originated.
- The logs were routed to a project, and then that project stored those logs in a log bucket that it owns.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectName` | `https://learn.microsoft.com/dotnet/api/system.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/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportedErrorEvent` Required. The error event to be reported. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorEventResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    ReportErrorsServiceClient reportErrorsServiceClient = await ReportErrorsServiceClient.CreateAsync();
    // Initialize request argument(s)
    string projectName = "projects/[PROJECT]";
    ReportedErrorEvent @event = new ReportedErrorEvent();
    // Make the request
    ReportErrorEventResponse response = await reportErrorsServiceClient.ReportErrorEventAsync(projectName, @event);

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient#Google_Cloud_ErrorReporting_V1Beta1_ReportErrorsServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient#Google_Cloud_ErrorReporting_V1Beta1_ReportErrorsServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient#Google_Cloud_ErrorReporting_V1Beta1_ReportErrorsServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ErrorReporting.V1Beta1/latest/Google.Cloud.ErrorReporting.V1Beta1.ReportErrorsServiceClient#Google_Cloud_ErrorReporting_V1Beta1_ReportErrorsServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.