# Eventarc Publishing V1 API - Class Google::Cloud::Eventarc::Publishing::V1::PublishRequest (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::PublishRequest.

The request message for the Publish method.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #avro_message

    def avro_message() -> ::String

**Returns**

- (::String) --- The Avro format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md

  Note: The following fields are mutually exclusive: `avro_message`, `proto_message`, `json_message`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #avro_message=

    def avro_message=(value) -> ::String

**Parameter**

- **value** (::String) --- The Avro format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md


  Note: The following fields are mutually exclusive: `avro_message`, `proto_message`, `json_message`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- The Avro format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md

  Note: The following fields are mutually exclusive: `avro_message`, `proto_message`, `json_message`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #json_message

    def json_message() -> ::String

**Returns**

- (::String) --- The JSON format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md

  Note: The following fields are mutually exclusive: `json_message`, `proto_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #json_message=

    def json_message=(value) -> ::String

**Parameter**

- **value** (::String) --- The JSON format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md


  Note: The following fields are mutually exclusive: `json_message`, `proto_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- The JSON format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md

  Note: The following fields are mutually exclusive: `json_message`, `proto_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #message_bus

    def message_bus() -> ::String

**Returns**

- (::String) --- Required. The full name of the message bus to publish events to. Format: `projects/{project}/locations/{location}/messageBuses/{messageBus}`.

### #message_bus=

    def message_bus=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The full name of the message bus to publish events to. Format: `projects/{project}/locations/{location}/messageBuses/{messageBus}`.
**Returns**

- (::String) --- Required. The full name of the message bus to publish events to. Format: `projects/{project}/locations/{location}/messageBuses/{messageBus}`.

### #proto_message

    def proto_message() -> ::Google::Cloud::Eventarc::Publishing::V1::CloudEvent

**Returns**

- ([::Google::Cloud::Eventarc::Publishing::V1::CloudEvent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest/Google-Cloud-Eventarc-Publishing-V1-CloudEvent)) --- The Protobuf format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md


  Note: The following fields are mutually exclusive: `proto_message`, `json_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #proto_message=

    def proto_message=(value) -> ::Google::Cloud::Eventarc::Publishing::V1::CloudEvent

**Parameter**

- **value** ([::Google::Cloud::Eventarc::Publishing::V1::CloudEvent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest/Google-Cloud-Eventarc-Publishing-V1-CloudEvent)) --- The Protobuf format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md


  Note: The following fields are mutually exclusive: `proto_message`, `json_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Eventarc::Publishing::V1::CloudEvent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest/Google-Cloud-Eventarc-Publishing-V1-CloudEvent)) --- The Protobuf format of the CloudEvent being published. Specification can be found here: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md


  Note: The following fields are mutually exclusive: `proto_message`, `json_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared.