# Eventarc Publishing V1 API - Class Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest (v1.7.1)

1.7.1 (latest) 1.7.0 1.6.0 1.5.2 1.4.1 1.3.3 1.2.0 1.1.0 1.0.1 0.9.0 0.8.2 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Eventarc Publishing V1 API class Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.

The request message for the PublishEvents method.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #channel

    def channel() -> ::String

**Returns**

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

### #channel=

    def channel=(value) -> ::String

**Parameter**

- **value** (::String) --- The full name of the channel to publish to. For example: `projects/{project}/locations/{location}/channels/{channel-id}`.
**Returns**

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

### #events

    def events() -> ::Array<::Google::Protobuf::Any>

**Returns**

- (::Array\<[::Google::Protobuf::Any](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest/Google-Protobuf-Any)\>) --- 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.

### #events=

    def events=(value) -> ::Array<::Google::Protobuf::Any>

**Parameter**

- **value** (::Array\<[::Google::Protobuf::Any](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest/Google-Protobuf-Any)\>) --- 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.
**Returns**

- (::Array\<[::Google::Protobuf::Any](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest/Google-Protobuf-Any)\>) --- 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.

### #text_events

    def text_events() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- 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.

### #text_events=

    def text_events=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- 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.
**Returns**

- (::Array\<::String\>) --- 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.