// This is a service level custom method. rpc Watch(WatchRequest) returns (WatchResponse) { // Custom method maps to HTTP POST. All request parameters go into body. option (google.api.http) = { post: "/v1:watch" body: "*" }; }
// This is a collection level custom method. rpc ClearEvents(ClearEventsRequest) returns (ClearEventsResponse) { option (google.api.http) = { post: "/v3/events:clear" body: "*" }; }
// This is a resource level custom method. rpc CancelEvent(CancelEventRequest) returns (CancelEventResponse) { option (google.api.http) = { post: "/v3/{name=events/*}:cancel" body: "*" }; }
// This is a batch get custom method. rpc BatchGetEvents(BatchGetEventsRequest) returns (BatchGetEventsResponse) { // The batch get method maps to HTTP GET verb. option (google.api.http) = { get: "/v3/events:batchGet" }; }