# Eventarc Publishing v1 API - Class PublisherClientImpl (2.0.0-beta08)

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

- [2.0.0-beta08 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClientImpl)
- [2.0.0-beta07](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/2.0.0-beta07/Google.Cloud.Eventarc.Publishing.V1.PublisherClientImpl)
- [1.0.0-beta02](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/1.0.0-beta02/Google.Cloud.Eventarc.Publishing.V1.PublisherClientImpl)

    public sealed class PublisherClientImpl : PublisherClient

Reference documentation and code samples for the Eventarc Publishing v1 API class PublisherClientImpl.

Publisher client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [PublisherClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient) \> PublisherClientImpl

## Inherited Members

[PublisherClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_DefaultEndpoint) [PublisherClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_DefaultScopes) [PublisherClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_ServiceMetadata) [PublisherClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_CreateAsync_System_Threading_CancellationToken_) [PublisherClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_Create) [PublisherClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_ShutdownDefaultChannelsAsync) [PublisherClient.PublishChannelConnectionEventsAsync(PublishChannelConnectionEventsRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_PublishChannelConnectionEventsAsync_Google_Cloud_Eventarc_Publishing_V1_PublishChannelConnectionEventsRequest_System_Threading_CancellationToken_) [PublisherClient.PublishEventsAsync(PublishEventsRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_PublishEventsAsync_Google_Cloud_Eventarc_Publishing_V1_PublishEventsRequest_System_Threading_CancellationToken_) [PublisherClient.PublishAsync(PublishRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_PublishAsync_Google_Cloud_Eventarc_Publishing_V1_PublishRequest_System_Threading_CancellationToken_) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Eventarc.Publishing.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1)

## Assembly

Google.Cloud.Eventarc.Publishing.V1.dll

## Remarks

Eventarc processes events generated by an event provider and delivers them to
a subscriber.

An event provider is a software-as-a-service (SaaS) system or
product that can generate and deliver events through Eventarc.

A third-party event provider is an event provider from outside of Google.

A partner is a third-party event provider that is integrated with Eventarc.

A subscriber is a Google Cloud customer interested in receiving events.

Channel is a first-class Eventarc resource that is created and managed
by the subscriber in their Google Cloud project. A Channel represents a
subscriber's intent to receive events from an event provider. A Channel is
associated with exactly one event provider.

ChannelConnection is a first-class Eventarc resource that
is created and managed by the partner in their Google Cloud project. A
ChannelConnection represents a connection between a partner and a
subscriber's Channel. A ChannelConnection has a one-to-one mapping with a
Channel.

Bus is a first-class Eventarc resource that is created and managed in a
Google Cloud project. A Bus provides a discoverable endpoint for events and
is a router that receives all events published by event providers and
delivers them to zero or more subscribers.

Publisher allows an event provider to publish events to Eventarc.

## Constructors

### PublisherClientImpl(PublisherClient, PublisherSettings, ILogger)

    public PublisherClientImpl(Publisher.PublisherClient grpcClient, PublisherSettings settings, ILogger logger)

Constructs a client wrapper for the Publisher service, with the specified gRPC client and settings.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.Publisherhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.Publisher.PublisherClient` The underlying gRPC client. |
| `settings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherSettings` The base [PublisherSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherSettings) used within this client. |
| `logger` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### GrpcClient

    public override Publisher.PublisherClient GrpcClient { get; }

The underlying gRPC Publisher client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.Publisherhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.Publisher.PublisherClient` |   |

**Overrides** [PublisherClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_GrpcClient)

## Methods

### Publish(PublishRequest, CallSettings)

    public override PublishResponse Publish(PublishRequest request, CallSettings callSettings = null)

Publish events to a message bus.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishRequest` 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.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishResponse` | The RPC response. |

**Overrides** [PublisherClient.Publish(PublishRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_Publish_Google_Cloud_Eventarc_Publishing_V1_PublishRequest_Google_Api_Gax_Grpc_CallSettings_)

### PublishAsync(PublishRequest, CallSettings)

    public override Task<PublishResponse> PublishAsync(PublishRequest request, CallSettings callSettings = null)

Publish events to a message bus.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishRequest` 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.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishResponse` | A Task containing the RPC response. |

**Overrides** [PublisherClient.PublishAsync(PublishRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_PublishAsync_Google_Cloud_Eventarc_Publishing_V1_PublishRequest_Google_Api_Gax_Grpc_CallSettings_)

### PublishChannelConnectionEvents(PublishChannelConnectionEventsRequest, CallSettings)

    public override PublishChannelConnectionEventsResponse PublishChannelConnectionEvents(PublishChannelConnectionEventsRequest request, CallSettings callSettings = null)

Publish events to a ChannelConnection in a partner's project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishChannelConnectionEventsRequest` 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.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishChannelConnectionEventsResponse` | The RPC response. |

**Overrides** [PublisherClient.PublishChannelConnectionEvents(PublishChannelConnectionEventsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_PublishChannelConnectionEvents_Google_Cloud_Eventarc_Publishing_V1_PublishChannelConnectionEventsRequest_Google_Api_Gax_Grpc_CallSettings_)

### PublishChannelConnectionEventsAsync(PublishChannelConnectionEventsRequest, CallSettings)

    public override Task<PublishChannelConnectionEventsResponse> PublishChannelConnectionEventsAsync(PublishChannelConnectionEventsRequest request, CallSettings callSettings = null)

Publish events to a ChannelConnection in a partner's project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishChannelConnectionEventsRequest` 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.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishChannelConnectionEventsResponse` | A Task containing the RPC response. |

**Overrides** [PublisherClient.PublishChannelConnectionEventsAsync(PublishChannelConnectionEventsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_PublishChannelConnectionEventsAsync_Google_Cloud_Eventarc_Publishing_V1_PublishChannelConnectionEventsRequest_Google_Api_Gax_Grpc_CallSettings_)

### PublishEvents(PublishEventsRequest, CallSettings)

    public override PublishEventsResponse PublishEvents(PublishEventsRequest request, CallSettings callSettings = null)

Publish events to a subscriber's channel.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishEventsRequest` 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.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishEventsResponse` | The RPC response. |

**Overrides** [PublisherClient.PublishEvents(PublishEventsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_PublishEvents_Google_Cloud_Eventarc_Publishing_V1_PublishEventsRequest_Google_Api_Gax_Grpc_CallSettings_)

### PublishEventsAsync(PublishEventsRequest, CallSettings)

    public override Task<PublishEventsResponse> PublishEventsAsync(PublishEventsRequest request, CallSettings callSettings = null)

Publish events to a subscriber's channel.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishEventsRequest` 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.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishEventsResponse` | A Task containing the RPC response. |

**Overrides** [PublisherClient.PublishEventsAsync(PublishEventsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublisherClient#Google_Cloud_Eventarc_Publishing_V1_PublisherClient_PublishEventsAsync_Google_Cloud_Eventarc_Publishing_V1_PublishEventsRequest_Google_Api_Gax_Grpc_CallSettings_)