# Eventarc Publishing v1 API - Class PublishEventsRequest (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.PublishEventsRequest)
- [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.PublishEventsRequest)
- [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.PublishEventsRequest)

    public sealed class PublishEventsRequest : IMessage<PublishEventsRequest>, IEquatable<PublishEventsRequest>, IDeepCloneable<PublishEventsRequest>, IBufferMessage, IMessage

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

The request message for the PublishEvents method.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PublishEventsRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishEventsRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PublishEventsRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishEventsRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[PublishEventsRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishEventsRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## 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.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

## Constructors

### PublishEventsRequest()

    public PublishEventsRequest()

### PublishEventsRequest(PublishEventsRequest)

    public PublishEventsRequest(PublishEventsRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishEventsRequest` |

## Properties

### Channel

    public string Channel { get; set; }

The full name of the channel to publish to. For example:
`projects/{project}/locations/{location}/channels/{channel-id}`.

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

### Events

    public RepeatedField<Any> Events { get; }

The CloudEvents v1.0 events to publish. No other types are allowed.
If this field is set, then the `text_events` fields must not be set.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Any.html` |   |

### TextEvents

    public RepeatedField<string> TextEvents { get; }

The text representation of events to publish.
CloudEvent v1.0 in JSON format is the only allowed type. Refer to
<https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md>
for specification.
If this field is set, then the `events` fields must not be set.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |