[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Eventarc Publishing V1 Client - Class PublishEventsRequest (1.1.6)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.6 (latest)](/php/docs/reference/cloud-eventarc-publishing/latest/V1.PublishEventsRequest)\n- [1.1.5](/php/docs/reference/cloud-eventarc-publishing/1.1.5/V1.PublishEventsRequest)\n- [1.0.0](/php/docs/reference/cloud-eventarc-publishing/1.0.0/V1.PublishEventsRequest)\n- [0.6.4](/php/docs/reference/cloud-eventarc-publishing/0.6.4/V1.PublishEventsRequest)\n- [0.5.1](/php/docs/reference/cloud-eventarc-publishing/0.5.1/V1.PublishEventsRequest)\n- [0.4.1](/php/docs/reference/cloud-eventarc-publishing/0.4.1/V1.PublishEventsRequest)\n- [0.3.4](/php/docs/reference/cloud-eventarc-publishing/0.3.4/V1.PublishEventsRequest) \nReference documentation and code samples for the Google Cloud Eventarc Publishing V1 Client class PublishEventsRequest.\n\nThe request message for the PublishEvents method.\n\nGenerated from protobuf message `google.cloud.eventarc.publishing.v1.PublishEventsRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Eventarc \\\\ Publishing \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getChannel\n\nThe full name of the channel to publish to. For example:\n`projects/{project}/locations/{location}/channels/{channel-id}`.\n\n### setChannel\n\nThe full name of the channel to publish to. For example:\n`projects/{project}/locations/{location}/channels/{channel-id}`.\n\n### getEvents\n\nThe CloudEvents v1.0 events to publish. No other types are allowed.\n\nIf this field is set, then the `text_events` fields must not be set.\n\n### setEvents\n\nThe CloudEvents v1.0 events to publish. No other types are allowed.\n\nIf this field is set, then the `text_events` fields must not be set.\n\n### getTextEvents\n\nThe text representation of events to publish.\n\nCloudEvent v1.0 in JSON format is the only allowed type. Refer to\n\u003chttps://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md\u003e\nfor specification.\nIf this field is set, then the `events` fields must not be set.\n\n### setTextEvents\n\nThe text representation of events to publish.\n\nCloudEvent v1.0 in JSON format is the only allowed type. Refer to\n\u003chttps://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md\u003e\nfor specification.\nIf this field is set, then the `events` fields must not be set."]]