[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ePublishRequest\u003c/code\u003e class is the request message used for the \u003ccode\u003ePublish\u003c/code\u003e method within the Eventarc Publishing v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThis class supports publishing CloudEvents in Avro, JSON, or Protobuf formats, as indicated by the \u003ccode\u003eAvroMessage\u003c/code\u003e, \u003ccode\u003eJsonMessage\u003c/code\u003e, and \u003ccode\u003eProtoMessage\u003c/code\u003e properties, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMessageBus\u003c/code\u003e property is required and specifies the full name of the message bus where events are published, following the format: \u003ccode\u003eprojects/{project}/locations/{location}/messageBuses/{messageBus}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePublishRequest\u003c/code\u003e class implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThere are two constructors provided for the \u003ccode\u003ePublishRequest\u003c/code\u003e class, one is a parameterless constructor and the other is a copy constructor that takes another \u003ccode\u003ePublishRequest\u003c/code\u003e instance.\u003c/p\u003e\n"]]],[],null,["# Eventarc Publishing v1 API - Class PublishRequest (2.0.0-beta07)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-beta07 (latest)](/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishRequest)\n- [2.0.0-beta06](/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/2.0.0-beta06/Google.Cloud.Eventarc.Publishing.V1.PublishRequest)\n- [1.0.0-beta02](/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/1.0.0-beta02/Google.Cloud.Eventarc.Publishing.V1.PublishRequest) \n\n public sealed class PublishRequest : IMessage\u003cPublishRequest\u003e, IEquatable\u003cPublishRequest\u003e, IDeepCloneable\u003cPublishRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Eventarc Publishing v1 API class PublishRequest.\n\nThe request message for the Publish method. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PublishRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PublishRequest](/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PublishRequest](/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[PublishRequest](/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1.PublishRequest), [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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Eventarc.Publishing.V1](/dotnet/docs/reference/Google.Cloud.Eventarc.Publishing.V1/latest/Google.Cloud.Eventarc.Publishing.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Eventarc.Publishing.V1.dll\n\nConstructors\n------------\n\n### PublishRequest()\n\n public PublishRequest()\n\n### PublishRequest(PublishRequest)\n\n public PublishRequest(PublishRequest other)\n\nProperties\n----------\n\n### AvroMessage\n\n public ByteString AvroMessage { get; set; }\n\nThe Avro format of the CloudEvent being published. Specification can\nbe found here:\n\u003chttps://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md\u003e\n\n### FormatCase\n\n public PublishRequest.FormatOneofCase FormatCase { get; }\n\n### HasAvroMessage\n\n public bool HasAvroMessage { get; }\n\nGets whether the \"avro_message\" field is set\n\n### HasJsonMessage\n\n public bool HasJsonMessage { get; }\n\nGets whether the \"json_message\" field is set\n\n### JsonMessage\n\n public string JsonMessage { get; set; }\n\nThe JSON format of the CloudEvent being published. Specification can be\nfound here:\n\u003chttps://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md\u003e\n\n### MessageBus\n\n public string MessageBus { get; set; }\n\nRequired. The full name of the message bus to publish events to. Format:\n`projects/{project}/locations/{location}/messageBuses/{messageBus}`.\n\n### ProtoMessage\n\n public CloudEvent ProtoMessage { get; set; }\n\nThe Protobuf format of the CloudEvent being published. Specification can\nbe found here:\n\u003chttps://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md\u003e"]]