2023-12-28 23:45:50 +00:00
|
|
|
// Copyright (C) 2023 The Licensing Authors
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2023-12-28 22:50:20 +00:00
|
|
|
//
|
|
|
|
// This file attempts to follow common styles and design patterns described by
|
|
|
|
// Google Cloud based on their extensive use of protocol buffers.
|
|
|
|
//
|
|
|
|
// - See here for more: https://cloud.google.com/apis/design/design_patterns
|
|
|
|
//
|
2023-12-28 23:45:50 +00:00
|
|
|
|
2023-12-28 22:50:20 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2023-12-28 23:45:50 +00:00
|
|
|
package licenses.v1;
|
2023-12-28 22:50:20 +00:00
|
|
|
|
2023-12-29 20:01:47 +00:00
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
|
|
|
message ListRequest {}
|
|
|
|
message ListResponse {}
|
|
|
|
|
|
|
|
message PurchaseRequest {}
|
|
|
|
message PurchaseResponse {}
|
|
|
|
|
|
|
|
message CancelRequest {}
|
|
|
|
message CancelResponse {}
|
|
|
|
|
2023-12-28 22:50:20 +00:00
|
|
|
service LicenseService {
|
2023-12-29 20:01:47 +00:00
|
|
|
rpc List(ListRequest) returns (ListResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/v1/licenses"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
rpc Purchase(PurchaseRequest) returns (PurchaseResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/licenses"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
};
|
2023-12-28 22:50:20 +00:00
|
|
|
|
2023-12-29 20:01:47 +00:00
|
|
|
rpc Cancel(CancelRequest) returns (CancelResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/licenses/{license_id}"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
};
|
2023-12-28 22:50:20 +00:00
|
|
|
}
|