1- // Copyright 2021 Google LLC
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -17,14 +17,14 @@ syntax = "proto3";
1717package google.cloud.eventarc.publishing.v1 ;
1818
1919import "google/api/annotations.proto" ;
20- import "google/protobuf/any.proto" ;
2120import "google/api/client.proto" ;
21+ import "google/protobuf/any.proto" ;
2222
23+ option csharp_namespace = "Google.Cloud.Eventarc.Publishing.V1" ;
24+ option go_package = "google.golang.org/genproto/googleapis/cloud/eventarc/publishing/v1;publisher" ;
2325option java_multiple_files = true ;
2426option java_outer_classname = "PublisherProto" ;
2527option java_package = "com.google.cloud.eventarc.publishing.v1" ;
26- option go_package = "google.golang.org/genproto/googleapis/cloud/eventarc/publishing/v1;publisher" ;
27- option csharp_namespace = "Google.Cloud.Eventarc.Publishing.V1" ;
2828option php_namespace = "Google\\Cloud\\Eventarc\\Publishing\\V1" ;
2929option ruby_package = "Google::Cloud::Eventarc::Publishing::V1" ;
3030
@@ -63,6 +63,14 @@ service Publisher {
6363 body : "*"
6464 };
6565 }
66+
67+ // Publish events to a subscriber's channel.
68+ rpc PublishEvents (PublishEventsRequest ) returns (PublishEventsResponse ) {
69+ option (google.api.http ) = {
70+ post : "/v1/{channel=projects/*/locations/*/channels/*}:publishEvents"
71+ body : "*"
72+ };
73+ }
6674}
6775
6876// The request message for the PublishChannelConnectionEvents method.
@@ -79,3 +87,18 @@ message PublishChannelConnectionEventsRequest {
7987message PublishChannelConnectionEventsResponse {
8088
8189}
90+
91+ // The request message for the PublishEvents method.
92+ message PublishEventsRequest {
93+ // The full name of the channel to publish to. For example:
94+ // `projects/{project}/locations/{location}/channels/{channel-id}`.
95+ string channel = 1 ;
96+
97+ // The CloudEvents v1.0 events to publish. No other types are allowed.
98+ repeated google.protobuf.Any events = 2 ;
99+ }
100+
101+ // The response message for the PublishEvents method.
102+ message PublishEventsResponse {
103+
104+ }
0 commit comments