services.proto 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package ccc.hosted.marketplace.v2;
  16. import "google/api/annotations.proto";
  17. import "google/apps/market/v2/resources.proto";
  18. import "google/api/client.proto";
  19. option go_package = "google.golang.org/genproto/googleapis/ccc/hosted/marketplace/v2;marketplace";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "ServiceProto";
  22. option java_package = "com.google.ccc.hosted.marketplace.v2";
  23. option php_namespace = "Google\\Apps\\Market\\V2";
  24. service CustomerLicenseService {
  25. option (google.api.default_host) = "appsmarket.googleapis.com";
  26. option (google.api.oauth_scopes) =
  27. "https://www.googleapis.com/auth/appsmarketplace.license";
  28. // Get the status of a license for a customer to determine if they have access
  29. // for a given app.
  30. rpc Get(CustomerLicenseGetRequest) returns (CustomerLicense) {
  31. option (google.api.http) = {
  32. get: "/appsmarket/v2/customerLicense/{application_id}/{customer_id}"
  33. };
  34. }
  35. }
  36. service LicenseNotificationService {
  37. option (google.api.default_host) = "appsmarket.googleapis.com";
  38. option (google.api.oauth_scopes) =
  39. "https://www.googleapis.com/auth/appsmarketplace.license";
  40. // Get a list of licensing notifications with regards to a given app.
  41. rpc List(LicenseNotificationListRequest) returns (LicenseNotificationList) {
  42. option (google.api.http) = {
  43. get: "/appsmarket/v2/licenseNotification/{application_id}"
  44. body: "*"
  45. };
  46. }
  47. }
  48. service UserLicenseService {
  49. option (google.api.default_host) = "appsmarket.googleapis.com";
  50. option (google.api.oauth_scopes) =
  51. "https://www.googleapis.com/auth/appsmarketplace.license";
  52. // Get the user's licensing status for their permission to use a given app.
  53. rpc Get(UserLicenseGetRequest) returns (UserLicense) {
  54. option (google.api.http) = {
  55. get: "/appsmarket/v2/userLicense/{application_id}/{user_id}"
  56. };
  57. }
  58. }
  59. message CustomerLicenseGetRequest {
  60. // Application Id
  61. string application_id = 1;
  62. // Customer Id
  63. string customer_id = 2;
  64. }
  65. message LicenseNotificationListRequest {
  66. // Application Id
  67. string application_id = 1;
  68. uint32 max_results = 2;
  69. string start_token = 3;
  70. // Timestamp in milliseconds since epoch
  71. uint64 timestamp = 4;
  72. }
  73. message UserLicenseGetRequest {
  74. // Application Id
  75. string application_id = 1;
  76. // User Id
  77. string user_id = 2;
  78. }