Skip to content

Commit 726dac2

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add publishing methods for channel resources
PiperOrigin-RevId: 442858558
1 parent 0d5e4e2 commit 726dac2

2 files changed

Lines changed: 31 additions & 4 deletions

File tree

google/cloud/eventarc/publishing/v1/eventarcpublishing_v1.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ authentication:
1212
oauth:
1313
canonical_scopes: |-
1414
https://www.googleapis.com/auth/cloud-platform
15+
- selector: google.cloud.eventarc.publishing.v1.Publisher.PublishEvents
16+
oauth:
17+
canonical_scopes: |-
18+
https://www.googleapis.com/auth/cloud-platform

google/cloud/eventarc/publishing/v1/publisher.proto

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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";
1717
package google.cloud.eventarc.publishing.v1;
1818

1919
import "google/api/annotations.proto";
20-
import "google/protobuf/any.proto";
2120
import "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";
2325
option java_multiple_files = true;
2426
option java_outer_classname = "PublisherProto";
2527
option 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";
2828
option php_namespace = "Google\\Cloud\\Eventarc\\Publishing\\V1";
2929
option 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 {
7987
message 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

Comments
 (0)