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 15syntax = "proto3"; 16 17package ccc.hosted.marketplace.v2; 18 19import "google/api/annotations.proto"; 20import "google/apps/market/v2/resources.proto"; 21import "google/api/client.proto"; 22 23option go_package = "google.golang.org/genproto/googleapis/ccc/hosted/marketplace/v2;marketplace"; 24option java_multiple_files = true; 25option java_outer_classname = "ServiceProto"; 26option java_package = "com.google.ccc.hosted.marketplace.v2"; 27option php_namespace = "Google\\Apps\\Market\\V2"; 28 29service CustomerLicenseService { 30 option (google.api.default_host) = "appsmarket.googleapis.com"; 31 option (google.api.oauth_scopes) = 32 "https://www.googleapis.com/auth/appsmarketplace.license"; 33 34 // Get the status of a license for a customer to determine if they have access 35 // for a given app. 36 rpc Get(CustomerLicenseGetRequest) returns (CustomerLicense) { 37 option (google.api.http) = { 38 get: "/appsmarket/v2/customerLicense/{application_id}/{customer_id}" 39 }; 40 } 41} 42 43service LicenseNotificationService { 44 option (google.api.default_host) = "appsmarket.googleapis.com"; 45 option (google.api.oauth_scopes) = 46 "https://www.googleapis.com/auth/appsmarketplace.license"; 47 48 // Get a list of licensing notifications with regards to a given app. 49 rpc List(LicenseNotificationListRequest) returns (LicenseNotificationList) { 50 option (google.api.http) = { 51 get: "/appsmarket/v2/licenseNotification/{application_id}" 52 body: "*" 53 }; 54 } 55} 56 57service UserLicenseService { 58 option (google.api.default_host) = "appsmarket.googleapis.com"; 59 option (google.api.oauth_scopes) = 60 "https://www.googleapis.com/auth/appsmarketplace.license"; 61 62 // Get the user's licensing status for their permission to use a given app. 63 rpc Get(UserLicenseGetRequest) returns (UserLicense) { 64 option (google.api.http) = { 65 get: "/appsmarket/v2/userLicense/{application_id}/{user_id}" 66 }; 67 } 68} 69 70message CustomerLicenseGetRequest { 71 // Application Id 72 string application_id = 1; 73 74 // Customer Id 75 string customer_id = 2; 76} 77 78message LicenseNotificationListRequest { 79 // Application Id 80 string application_id = 1; 81 82 uint32 max_results = 2; 83 84 string start_token = 3; 85 86 // Timestamp in milliseconds since epoch 87 uint64 timestamp = 4; 88} 89 90message UserLicenseGetRequest { 91 // Application Id 92 string application_id = 1; 93 94 // User Id 95 string user_id = 2; 96} 97