service.proto 79 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875
  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 google.cloud.channel.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/channel/v1/channel_partner_links.proto";
  21. import "google/cloud/channel/v1/common.proto";
  22. import "google/cloud/channel/v1/customers.proto";
  23. import "google/cloud/channel/v1/entitlements.proto";
  24. import "google/cloud/channel/v1/offers.proto";
  25. import "google/cloud/channel/v1/products.proto";
  26. import "google/longrunning/operations.proto";
  27. import "google/protobuf/empty.proto";
  28. import "google/protobuf/field_mask.proto";
  29. option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
  30. option java_multiple_files = true;
  31. option java_outer_classname = "ServiceProto";
  32. option java_package = "com.google.cloud.channel.v1";
  33. // CloudChannelService lets Google cloud resellers and distributors manage
  34. // their customers, channel partners, entitlements, and reports.
  35. //
  36. // Using this service:
  37. // 1. Resellers and distributors can manage a customer entity.
  38. // 2. Distributors can register an authorized reseller in their channel and
  39. // provide them with delegated admin access.
  40. // 3. Resellers and distributors can manage customer entitlements.
  41. //
  42. // CloudChannelService exposes the following resources:
  43. // - [Customer][google.cloud.channel.v1.Customer]s: An entity—usually an enterprise—managed by a reseller or
  44. // distributor.
  45. //
  46. // - [Entitlement][google.cloud.channel.v1.Entitlement]s: An entity that provides a customer with the means to use
  47. // a service. Entitlements are created or updated as a result of a successful
  48. // fulfillment.
  49. //
  50. // - [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s: An entity that identifies links between
  51. // distributors and their indirect resellers in a channel.
  52. service CloudChannelService {
  53. option (google.api.default_host) = "cloudchannel.googleapis.com";
  54. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/apps.order";
  55. // List [Customer][google.cloud.channel.v1.Customer]s.
  56. //
  57. // Possible error codes:
  58. //
  59. // * PERMISSION_DENIED: The reseller account making the request is different
  60. // from the reseller account in the API request.
  61. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  62. //
  63. // Return value:
  64. // List of [Customer][google.cloud.channel.v1.Customer]s, or an empty list if there are no customers.
  65. rpc ListCustomers(ListCustomersRequest) returns (ListCustomersResponse) {
  66. option (google.api.http) = {
  67. get: "/v1/{parent=accounts/*}/customers"
  68. additional_bindings {
  69. get: "/v1/{parent=accounts/*/channelPartnerLinks/*}/customers"
  70. }
  71. };
  72. }
  73. // Returns the requested [Customer][google.cloud.channel.v1.Customer] resource.
  74. //
  75. // Possible error codes:
  76. //
  77. // * PERMISSION_DENIED: The reseller account making the request is different
  78. // from the reseller account in the API request.
  79. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  80. // * NOT_FOUND: The customer resource doesn't exist. Usually the result of an
  81. // invalid name parameter.
  82. //
  83. // Return value:
  84. // The [Customer][google.cloud.channel.v1.Customer] resource.
  85. rpc GetCustomer(GetCustomerRequest) returns (Customer) {
  86. option (google.api.http) = {
  87. get: "/v1/{name=accounts/*/customers/*}"
  88. additional_bindings {
  89. get: "/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}"
  90. }
  91. };
  92. option (google.api.method_signature) = "name";
  93. }
  94. // Confirms the existence of Cloud Identity accounts based on the domain and
  95. // if the Cloud Identity accounts are owned by the reseller.
  96. //
  97. // Possible error codes:
  98. //
  99. // * PERMISSION_DENIED: The reseller account making the request is different
  100. // from the reseller account in the API request.
  101. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  102. // * INVALID_VALUE: Invalid domain value in the request.
  103. //
  104. // Return value:
  105. // A list of [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources for the domain (may be
  106. // empty)
  107. //
  108. // Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if
  109. // no [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources match the domain.
  110. rpc CheckCloudIdentityAccountsExist(CheckCloudIdentityAccountsExistRequest) returns (CheckCloudIdentityAccountsExistResponse) {
  111. option (google.api.http) = {
  112. post: "/v1/{parent=accounts/*}:checkCloudIdentityAccountsExist"
  113. body: "*"
  114. };
  115. }
  116. // Creates a new [Customer][google.cloud.channel.v1.Customer] resource under the reseller or distributor
  117. // account.
  118. //
  119. // Possible error codes:
  120. //
  121. // * PERMISSION_DENIED: The reseller account making the request is different
  122. // from the reseller account in the API request.
  123. // * INVALID_ARGUMENT:
  124. // * Required request parameters are missing or invalid.
  125. // * Domain field value doesn't match the primary email domain.
  126. //
  127. // Return value:
  128. // The newly created [Customer][google.cloud.channel.v1.Customer] resource.
  129. rpc CreateCustomer(CreateCustomerRequest) returns (Customer) {
  130. option (google.api.http) = {
  131. post: "/v1/{parent=accounts/*}/customers"
  132. body: "customer"
  133. additional_bindings {
  134. post: "/v1/{parent=accounts/*/channelPartnerLinks/*}/customers"
  135. body: "customer"
  136. }
  137. };
  138. }
  139. // Updates an existing [Customer][google.cloud.channel.v1.Customer] resource for the reseller or
  140. // distributor.
  141. //
  142. // Possible error codes:
  143. //
  144. // * PERMISSION_DENIED: The reseller account making the request is different
  145. // from the reseller account in the API request.
  146. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  147. // * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in the request.
  148. //
  149. // Return value:
  150. // The updated [Customer][google.cloud.channel.v1.Customer] resource.
  151. rpc UpdateCustomer(UpdateCustomerRequest) returns (Customer) {
  152. option (google.api.http) = {
  153. patch: "/v1/{customer.name=accounts/*/customers/*}"
  154. body: "customer"
  155. additional_bindings {
  156. patch: "/v1/{customer.name=accounts/*/channelPartnerLinks/*/customers/*}"
  157. body: "customer"
  158. }
  159. };
  160. }
  161. // Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently.
  162. //
  163. // Possible error codes:
  164. //
  165. // * PERMISSION_DENIED: The account making the request does not own
  166. // this customer.
  167. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  168. // * FAILED_PRECONDITION: The customer has existing entitlements.
  169. // * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in the request.
  170. rpc DeleteCustomer(DeleteCustomerRequest) returns (google.protobuf.Empty) {
  171. option (google.api.http) = {
  172. delete: "/v1/{name=accounts/*/customers/*}"
  173. additional_bindings {
  174. delete: "/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}"
  175. }
  176. };
  177. option (google.api.method_signature) = "name";
  178. }
  179. // Creates a Cloud Identity for the given customer using the customer's
  180. // information, or the information provided here.
  181. //
  182. // Possible error codes:
  183. //
  184. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  185. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  186. // * NOT_FOUND: The customer was not found.
  187. // * ALREADY_EXISTS: The customer's primary email already exists. Retry
  188. // after changing the customer's primary contact email.
  189. // * INTERNAL: Any non-user error related to a technical issue in the
  190. // backend. Contact Cloud Channel support.
  191. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  192. // Contact Cloud Channel support.
  193. //
  194. // Return value:
  195. // The ID of a long-running operation.
  196. //
  197. // To get the results of the operation, call the GetOperation method of
  198. // CloudChannelOperationsService. The Operation metadata contains an
  199. // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  200. rpc ProvisionCloudIdentity(ProvisionCloudIdentityRequest) returns (google.longrunning.Operation) {
  201. option (google.api.http) = {
  202. post: "/v1/{customer=accounts/*/customers/*}:provisionCloudIdentity"
  203. body: "*"
  204. };
  205. option (google.longrunning.operation_info) = {
  206. response_type: "Customer"
  207. metadata_type: "OperationMetadata"
  208. };
  209. }
  210. // Lists [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer.
  211. //
  212. // Possible error codes:
  213. //
  214. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  215. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  216. //
  217. // Return value:
  218. // A list of the customer's [Entitlement][google.cloud.channel.v1.Entitlement]s.
  219. rpc ListEntitlements(ListEntitlementsRequest) returns (ListEntitlementsResponse) {
  220. option (google.api.http) = {
  221. get: "/v1/{parent=accounts/*/customers/*}/entitlements"
  222. };
  223. }
  224. // List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on the Cloud Identity ID or
  225. // Customer Name in the request.
  226. //
  227. // Use this method to list the entitlements information of an
  228. // unowned customer. You should provide the customer's
  229. // Cloud Identity ID or Customer Name.
  230. //
  231. // Possible error codes:
  232. //
  233. // * PERMISSION_DENIED:
  234. // * The customer doesn't belong to the reseller and has no auth token.
  235. // * The supplied auth token is invalid.
  236. // * The reseller account making the request is different
  237. // from the reseller account in the query.
  238. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  239. //
  240. // Return value:
  241. // A list of the customer's [TransferableSku][google.cloud.channel.v1.TransferableSku].
  242. rpc ListTransferableSkus(ListTransferableSkusRequest) returns (ListTransferableSkusResponse) {
  243. option (google.api.http) = {
  244. post: "/v1/{parent=accounts/*}:listTransferableSkus"
  245. body: "*"
  246. };
  247. }
  248. // List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on Cloud Identity ID or
  249. // Customer Name in the request.
  250. //
  251. // Use this method when a reseller gets the entitlement information of an
  252. // unowned customer. The reseller should provide the customer's
  253. // Cloud Identity ID or Customer Name.
  254. //
  255. // Possible error codes:
  256. //
  257. // * PERMISSION_DENIED:
  258. // * The customer doesn't belong to the reseller and has no auth token.
  259. // * The supplied auth token is invalid.
  260. // * The reseller account making the request is different
  261. // from the reseller account in the query.
  262. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  263. //
  264. // Return value:
  265. // List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the given customer and SKU.
  266. rpc ListTransferableOffers(ListTransferableOffersRequest) returns (ListTransferableOffersResponse) {
  267. option (google.api.http) = {
  268. post: "/v1/{parent=accounts/*}:listTransferableOffers"
  269. body: "*"
  270. };
  271. }
  272. // Returns the requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
  273. //
  274. // Possible error codes:
  275. //
  276. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  277. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  278. // * NOT_FOUND: The customer entitlement was not found.
  279. //
  280. // Return value:
  281. // The requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
  282. rpc GetEntitlement(GetEntitlementRequest) returns (Entitlement) {
  283. option (google.api.http) = {
  284. get: "/v1/{name=accounts/*/customers/*/entitlements/*}"
  285. };
  286. }
  287. // Creates an entitlement for a customer.
  288. //
  289. // Possible error codes:
  290. //
  291. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  292. // * INVALID_ARGUMENT:
  293. // * Required request parameters are missing or invalid.
  294. // * There is already a customer entitlement for a SKU from the same
  295. // product family.
  296. // * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact
  297. // Google Channel support for further troubleshooting.
  298. // * NOT_FOUND: The customer or offer resource was not found.
  299. // * ALREADY_EXISTS:
  300. // * The SKU was already purchased for the customer.
  301. // * The customer's primary email already exists. Retry
  302. // after changing the customer's primary contact email.
  303. // * CONDITION_NOT_MET or FAILED_PRECONDITION:
  304. // * The domain required for purchasing a SKU has not been verified.
  305. // * A pre-requisite SKU required to purchase an Add-On SKU is missing.
  306. // For example, Google Workspace Business Starter is required to purchase
  307. // Vault or Drive.
  308. // * (Developer accounts only) Reseller and resold domain must meet the
  309. // following naming requirements:
  310. // * Domain names must start with goog-test.
  311. // * Domain names must include the reseller domain.
  312. // * INTERNAL: Any non-user error related to a technical issue in the
  313. // backend. Contact Cloud Channel support.
  314. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  315. // Contact Cloud Channel support.
  316. //
  317. // Return value:
  318. // The ID of a long-running operation.
  319. //
  320. // To get the results of the operation, call the GetOperation method of
  321. // CloudChannelOperationsService. The Operation metadata will contain an
  322. // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  323. rpc CreateEntitlement(CreateEntitlementRequest) returns (google.longrunning.Operation) {
  324. option (google.api.http) = {
  325. post: "/v1/{parent=accounts/*/customers/*}/entitlements"
  326. body: "*"
  327. };
  328. option (google.longrunning.operation_info) = {
  329. response_type: "Entitlement"
  330. metadata_type: "OperationMetadata"
  331. };
  332. }
  333. // Change parameters of the entitlement.
  334. //
  335. // An entitlement update is a long-running operation and it updates the
  336. // entitlement as a result of fulfillment.
  337. //
  338. // Possible error codes:
  339. //
  340. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  341. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  342. // For example, the number of seats being changed is greater than the allowed
  343. // number of max seats, or decreasing seats for a commitment based plan.
  344. // * NOT_FOUND: Entitlement resource not found.
  345. // * INTERNAL: Any non-user error related to a technical issue in the
  346. // backend. Contact Cloud Channel support.
  347. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  348. // Contact Cloud Channel support.
  349. //
  350. // Return value:
  351. // The ID of a long-running operation.
  352. //
  353. // To get the results of the operation, call the GetOperation method of
  354. // CloudChannelOperationsService. The Operation metadata will contain an
  355. // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  356. rpc ChangeParameters(ChangeParametersRequest) returns (google.longrunning.Operation) {
  357. option (google.api.http) = {
  358. post: "/v1/{name=accounts/*/customers/*/entitlements/*}:changeParameters"
  359. body: "*"
  360. };
  361. option (google.longrunning.operation_info) = {
  362. response_type: "Entitlement"
  363. metadata_type: "OperationMetadata"
  364. };
  365. }
  366. // Updates the renewal settings for an existing customer entitlement.
  367. //
  368. // An entitlement update is a long-running operation and it updates the
  369. // entitlement as a result of fulfillment.
  370. //
  371. // Possible error codes:
  372. //
  373. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  374. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  375. // * NOT_FOUND: Entitlement resource not found.
  376. // * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a
  377. // commitment plan. Can't enable or disable renewals for non-commitment plans.
  378. // * INTERNAL: Any non-user error related to a technical issue in the
  379. // backend. Contact Cloud Channel support.
  380. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  381. // Contact Cloud Channel support.
  382. //
  383. // Return value:
  384. // The ID of a long-running operation.
  385. //
  386. // To get the results of the operation, call the GetOperation method of
  387. // CloudChannelOperationsService. The Operation metadata will contain an
  388. // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  389. rpc ChangeRenewalSettings(ChangeRenewalSettingsRequest) returns (google.longrunning.Operation) {
  390. option (google.api.http) = {
  391. post: "/v1/{name=accounts/*/customers/*/entitlements/*}:changeRenewalSettings"
  392. body: "*"
  393. };
  394. option (google.longrunning.operation_info) = {
  395. response_type: "Entitlement"
  396. metadata_type: "OperationMetadata"
  397. };
  398. }
  399. // Updates the Offer for an existing customer entitlement.
  400. //
  401. // An entitlement update is a long-running operation and it updates the
  402. // entitlement as a result of fulfillment.
  403. //
  404. // Possible error codes:
  405. //
  406. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  407. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  408. // * NOT_FOUND: Offer or Entitlement resource not found.
  409. // * INTERNAL: Any non-user error related to a technical issue in the
  410. // backend. Contact Cloud Channel support.
  411. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  412. // Contact Cloud Channel support.
  413. //
  414. // Return value:
  415. // The ID of a long-running operation.
  416. //
  417. // To get the results of the operation, call the GetOperation method of
  418. // CloudChannelOperationsService. The Operation metadata will contain an
  419. // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  420. rpc ChangeOffer(ChangeOfferRequest) returns (google.longrunning.Operation) {
  421. option (google.api.http) = {
  422. post: "/v1/{name=accounts/*/customers/*/entitlements/*}:changeOffer"
  423. body: "*"
  424. };
  425. option (google.longrunning.operation_info) = {
  426. response_type: "Entitlement"
  427. metadata_type: "OperationMetadata"
  428. };
  429. }
  430. // Starts paid service for a trial entitlement.
  431. //
  432. // Starts paid service for a trial entitlement immediately. This method is
  433. // only applicable if a plan is set up for a trial entitlement but has some
  434. // trial days remaining.
  435. //
  436. // Possible error codes:
  437. //
  438. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  439. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  440. // * NOT_FOUND: Entitlement resource not found.
  441. // * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for
  442. // entitlement on trial plans.
  443. // * INTERNAL: Any non-user error related to a technical issue in the
  444. // backend. Contact Cloud Channel support.
  445. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  446. // Contact Cloud Channel support.
  447. //
  448. // Return value:
  449. // The ID of a long-running operation.
  450. //
  451. // To get the results of the operation, call the GetOperation method of
  452. // CloudChannelOperationsService. The Operation metadata will contain an
  453. // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  454. rpc StartPaidService(StartPaidServiceRequest) returns (google.longrunning.Operation) {
  455. option (google.api.http) = {
  456. post: "/v1/{name=accounts/*/customers/*/entitlements/*}:startPaidService"
  457. body: "*"
  458. };
  459. option (google.longrunning.operation_info) = {
  460. response_type: "Entitlement"
  461. metadata_type: "OperationMetadata"
  462. };
  463. }
  464. // Suspends a previously fulfilled entitlement.
  465. //
  466. // An entitlement suspension is a long-running operation.
  467. //
  468. // Possible error codes:
  469. //
  470. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  471. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  472. // * NOT_FOUND: Entitlement resource not found.
  473. // * NOT_ACTIVE: Entitlement is not active.
  474. // * INTERNAL: Any non-user error related to a technical issue in the
  475. // backend. Contact Cloud Channel support.
  476. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  477. // Contact Cloud Channel support.
  478. //
  479. // Return value:
  480. // The ID of a long-running operation.
  481. //
  482. // To get the results of the operation, call the GetOperation method of
  483. // CloudChannelOperationsService. The Operation metadata will contain an
  484. // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  485. rpc SuspendEntitlement(SuspendEntitlementRequest) returns (google.longrunning.Operation) {
  486. option (google.api.http) = {
  487. post: "/v1/{name=accounts/*/customers/*/entitlements/*}:suspend"
  488. body: "*"
  489. };
  490. option (google.longrunning.operation_info) = {
  491. response_type: "Entitlement"
  492. metadata_type: "OperationMetadata"
  493. };
  494. }
  495. // Cancels a previously fulfilled entitlement.
  496. //
  497. // An entitlement cancellation is a long-running operation.
  498. //
  499. // Possible error codes:
  500. //
  501. // * PERMISSION_DENIED: The reseller account making the request is different
  502. // from the reseller account in the API request.
  503. // * FAILED_PRECONDITION: There are Google Cloud projects linked to the
  504. // Google Cloud entitlement's Cloud Billing subaccount.
  505. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  506. // * NOT_FOUND: Entitlement resource not found.
  507. // * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace
  508. // add-ons, or entitlements for Google Cloud's development platform.
  509. // * INTERNAL: Any non-user error related to a technical issue in the
  510. // backend. Contact Cloud Channel support.
  511. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  512. // Contact Cloud Channel support.
  513. //
  514. // Return value:
  515. // The ID of a long-running operation.
  516. //
  517. // To get the results of the operation, call the GetOperation method of
  518. // CloudChannelOperationsService. The response will contain
  519. // google.protobuf.Empty on success. The Operation metadata will contain an
  520. // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  521. rpc CancelEntitlement(CancelEntitlementRequest) returns (google.longrunning.Operation) {
  522. option (google.api.http) = {
  523. post: "/v1/{name=accounts/*/customers/*/entitlements/*}:cancel"
  524. body: "*"
  525. };
  526. option (google.longrunning.operation_info) = {
  527. response_type: "google.protobuf.Empty"
  528. metadata_type: "OperationMetadata"
  529. };
  530. }
  531. // Activates a previously suspended entitlement. Entitlements suspended for
  532. // pending ToS acceptance can't be activated using this method.
  533. //
  534. // An entitlement activation is a long-running operation and it updates
  535. // the state of the customer entitlement.
  536. //
  537. // Possible error codes:
  538. //
  539. // * PERMISSION_DENIED: The reseller account making the request is different
  540. // from the reseller account in the API request.
  541. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  542. // * NOT_FOUND: Entitlement resource not found.
  543. // * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated
  544. // suspensions and entitlements that have accepted the TOS.
  545. // * NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE
  546. // state.
  547. // * INTERNAL: Any non-user error related to a technical issue in the
  548. // backend. Contact Cloud Channel support.
  549. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  550. // Contact Cloud Channel support.
  551. //
  552. // Return value:
  553. // The ID of a long-running operation.
  554. //
  555. // To get the results of the operation, call the GetOperation method of
  556. // CloudChannelOperationsService. The Operation metadata will contain an
  557. // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  558. rpc ActivateEntitlement(ActivateEntitlementRequest) returns (google.longrunning.Operation) {
  559. option (google.api.http) = {
  560. post: "/v1/{name=accounts/*/customers/*/entitlements/*}:activate"
  561. body: "*"
  562. };
  563. option (google.longrunning.operation_info) = {
  564. response_type: "Entitlement"
  565. metadata_type: "OperationMetadata"
  566. };
  567. }
  568. // Transfers customer entitlements to new reseller.
  569. //
  570. // Possible error codes:
  571. //
  572. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  573. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  574. // * NOT_FOUND: The customer or offer resource was not found.
  575. // * ALREADY_EXISTS: The SKU was already transferred for the customer.
  576. // * CONDITION_NOT_MET or FAILED_PRECONDITION:
  577. // * The SKU requires domain verification to transfer, but the domain is
  578. // not verified.
  579. // * An Add-On SKU (example, Vault or Drive) is missing the
  580. // pre-requisite SKU (example, G Suite Basic).
  581. // * (Developer accounts only) Reseller and resold domain must meet the
  582. // following naming requirements:
  583. // * Domain names must start with goog-test.
  584. // * Domain names must include the reseller domain.
  585. // * Specify all transferring entitlements.
  586. // * INTERNAL: Any non-user error related to a technical issue in the
  587. // backend. Contact Cloud Channel support.
  588. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  589. // Contact Cloud Channel support.
  590. //
  591. // Return value:
  592. // The ID of a long-running operation.
  593. //
  594. // To get the results of the operation, call the GetOperation method of
  595. // CloudChannelOperationsService. The Operation metadata will contain an
  596. // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  597. rpc TransferEntitlements(TransferEntitlementsRequest) returns (google.longrunning.Operation) {
  598. option (google.api.http) = {
  599. post: "/v1/{parent=accounts/*/customers/*}:transferEntitlements"
  600. body: "*"
  601. };
  602. option (google.longrunning.operation_info) = {
  603. response_type: "TransferEntitlementsResponse"
  604. metadata_type: "OperationMetadata"
  605. };
  606. }
  607. // Transfers customer entitlements from their current reseller to Google.
  608. //
  609. // Possible error codes:
  610. //
  611. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  612. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  613. // * NOT_FOUND: The customer or offer resource was not found.
  614. // * ALREADY_EXISTS: The SKU was already transferred for the customer.
  615. // * CONDITION_NOT_MET or FAILED_PRECONDITION:
  616. // * The SKU requires domain verification to transfer, but the domain is
  617. // not verified.
  618. // * An Add-On SKU (example, Vault or Drive) is missing the
  619. // pre-requisite SKU (example, G Suite Basic).
  620. // * (Developer accounts only) Reseller and resold domain must meet the
  621. // following naming requirements:
  622. // * Domain names must start with goog-test.
  623. // * Domain names must include the reseller domain.
  624. // * INTERNAL: Any non-user error related to a technical issue in the
  625. // backend. Contact Cloud Channel support.
  626. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  627. // Contact Cloud Channel support.
  628. //
  629. // Return value:
  630. // The ID of a long-running operation.
  631. //
  632. // To get the results of the operation, call the GetOperation method of
  633. // CloudChannelOperationsService. The response will contain
  634. // google.protobuf.Empty on success. The Operation metadata will contain an
  635. // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
  636. rpc TransferEntitlementsToGoogle(TransferEntitlementsToGoogleRequest) returns (google.longrunning.Operation) {
  637. option (google.api.http) = {
  638. post: "/v1/{parent=accounts/*/customers/*}:transferEntitlementsToGoogle"
  639. body: "*"
  640. };
  641. option (google.longrunning.operation_info) = {
  642. response_type: "google.protobuf.Empty"
  643. metadata_type: "OperationMetadata"
  644. };
  645. }
  646. // List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a distributor.
  647. // You must be a distributor to call this method.
  648. //
  649. // Possible error codes:
  650. //
  651. // * PERMISSION_DENIED: The reseller account making the request is different
  652. // from the reseller account in the API request.
  653. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  654. //
  655. // Return value:
  656. // The list of the distributor account's [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources.
  657. rpc ListChannelPartnerLinks(ListChannelPartnerLinksRequest) returns (ListChannelPartnerLinksResponse) {
  658. option (google.api.http) = {
  659. get: "/v1/{parent=accounts/*}/channelPartnerLinks"
  660. };
  661. }
  662. // Returns the requested [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
  663. // You must be a distributor to call this method.
  664. //
  665. // Possible error codes:
  666. //
  667. // * PERMISSION_DENIED: The reseller account making the request is different
  668. // from the reseller account in the API request.
  669. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  670. // * NOT_FOUND: ChannelPartnerLink resource not found because of an
  671. // invalid channel partner link name.
  672. //
  673. // Return value:
  674. // The [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
  675. rpc GetChannelPartnerLink(GetChannelPartnerLinkRequest) returns (ChannelPartnerLink) {
  676. option (google.api.http) = {
  677. get: "/v1/{name=accounts/*/channelPartnerLinks/*}"
  678. };
  679. }
  680. // Initiates a channel partner link between a distributor and a reseller, or
  681. // between resellers in an n-tier reseller channel.
  682. // Invited partners need to follow the invite_link_uri provided in the
  683. // response to accept. After accepting the invitation, a link is set up
  684. // between the two parties.
  685. // You must be a distributor to call this method.
  686. //
  687. // Possible error codes:
  688. //
  689. // * PERMISSION_DENIED: The reseller account making the request is different
  690. // from the reseller account in the API request.
  691. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  692. // * ALREADY_EXISTS: The ChannelPartnerLink sent in the request already
  693. // exists.
  694. // * NOT_FOUND: No Cloud Identity customer exists for provided domain.
  695. // * INTERNAL: Any non-user error related to a technical issue in the
  696. // backend. Contact Cloud Channel support.
  697. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  698. // Contact Cloud Channel support.
  699. //
  700. // Return value:
  701. // The new [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
  702. rpc CreateChannelPartnerLink(CreateChannelPartnerLinkRequest) returns (ChannelPartnerLink) {
  703. option (google.api.http) = {
  704. post: "/v1/{parent=accounts/*}/channelPartnerLinks"
  705. body: "channel_partner_link"
  706. };
  707. }
  708. // Updates a channel partner link. Distributors call this method to change a
  709. // link's status. For example, to suspend a partner link.
  710. // You must be a distributor to call this method.
  711. //
  712. // Possible error codes:
  713. //
  714. // * PERMISSION_DENIED: The reseller account making the request is different
  715. // from the reseller account in the API request.
  716. // * INVALID_ARGUMENT:
  717. // * Required request parameters are missing or invalid.
  718. // * Link state cannot change from invited to active or suspended.
  719. // * Cannot send reseller_cloud_identity_id, invite_url, or name in update
  720. // mask.
  721. // * NOT_FOUND: ChannelPartnerLink resource not found.
  722. // * INTERNAL: Any non-user error related to a technical issue in the
  723. // backend. Contact Cloud Channel support.
  724. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  725. // Contact Cloud Channel support.
  726. //
  727. // Return value:
  728. // The updated [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
  729. rpc UpdateChannelPartnerLink(UpdateChannelPartnerLinkRequest) returns (ChannelPartnerLink) {
  730. option (google.api.http) = {
  731. patch: "/v1/{name=accounts/*/channelPartnerLinks/*}"
  732. body: "*"
  733. };
  734. }
  735. // Returns the requested [Offer][google.cloud.channel.v1.Offer] resource.
  736. //
  737. // Possible error codes:
  738. //
  739. // * PERMISSION_DENIED: The entitlement doesn't belong to the reseller.
  740. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  741. // * NOT_FOUND: Entitlement or offer was not found.
  742. //
  743. // Return value:
  744. // The [Offer][google.cloud.channel.v1.Offer] resource.
  745. rpc LookupOffer(LookupOfferRequest) returns (Offer) {
  746. option (google.api.http) = {
  747. get: "/v1/{entitlement=accounts/*/customers/*/entitlements/*}:lookupOffer"
  748. };
  749. }
  750. // Lists the Products the reseller is authorized to sell.
  751. //
  752. // Possible error codes:
  753. //
  754. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  755. rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) {
  756. option (google.api.http) = {
  757. get: "/v1/products"
  758. };
  759. }
  760. // Lists the SKUs for a product the reseller is authorized to sell.
  761. //
  762. // Possible error codes:
  763. //
  764. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  765. rpc ListSkus(ListSkusRequest) returns (ListSkusResponse) {
  766. option (google.api.http) = {
  767. get: "/v1/{parent=products/*}/skus"
  768. };
  769. }
  770. // Lists the Offers the reseller can sell.
  771. //
  772. // Possible error codes:
  773. //
  774. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  775. rpc ListOffers(ListOffersRequest) returns (ListOffersResponse) {
  776. option (google.api.http) = {
  777. get: "/v1/{parent=accounts/*}/offers"
  778. };
  779. }
  780. // Lists the following:
  781. //
  782. // * SKUs that you can purchase for a customer
  783. // * SKUs that you can upgrade or downgrade for an entitlement.
  784. //
  785. // Possible error codes:
  786. //
  787. // * PERMISSION_DENIED: The customer doesn't belong to the reseller.
  788. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  789. rpc ListPurchasableSkus(ListPurchasableSkusRequest) returns (ListPurchasableSkusResponse) {
  790. option (google.api.http) = {
  791. get: "/v1/{customer=accounts/*/customers/*}:listPurchasableSkus"
  792. };
  793. }
  794. // Lists the following:
  795. //
  796. // * Offers that you can purchase for a customer.
  797. // * Offers that you can change for an entitlement.
  798. //
  799. // Possible error codes:
  800. //
  801. // * PERMISSION_DENIED: The customer doesn't belong to the reseller
  802. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  803. rpc ListPurchasableOffers(ListPurchasableOffersRequest) returns (ListPurchasableOffersResponse) {
  804. option (google.api.http) = {
  805. get: "/v1/{customer=accounts/*/customers/*}:listPurchasableOffers"
  806. };
  807. }
  808. // Registers a service account with subscriber privileges on the Cloud Pub/Sub
  809. // topic for this Channel Services account. After you create a
  810. // subscriber, you get the events through [SubscriberEvent][google.cloud.channel.v1.SubscriberEvent]
  811. //
  812. // Possible error codes:
  813. //
  814. // * PERMISSION_DENIED: The reseller account making the request and the
  815. // provided reseller account are different, or the impersonated user
  816. // is not a super admin.
  817. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  818. // * INTERNAL: Any non-user error related to a technical issue in the
  819. // backend. Contact Cloud Channel support.
  820. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  821. // Contact Cloud Channel support.
  822. //
  823. // Return value:
  824. // The topic name with the registered service email address.
  825. rpc RegisterSubscriber(RegisterSubscriberRequest) returns (RegisterSubscriberResponse) {
  826. option (google.api.http) = {
  827. post: "/v1/{account=accounts/*}:register"
  828. body: "*"
  829. };
  830. }
  831. // Unregisters a service account with subscriber privileges on the Cloud
  832. // Pub/Sub topic created for this Channel Services account. If there are no
  833. // service accounts left with subscriber privileges, this deletes the topic.
  834. // You can call ListSubscribers to check for these accounts.
  835. //
  836. // Possible error codes:
  837. //
  838. // * PERMISSION_DENIED: The reseller account making the request and the
  839. // provided reseller account are different, or the impersonated user
  840. // is not a super admin.
  841. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  842. // * NOT_FOUND: The topic resource doesn't exist.
  843. // * INTERNAL: Any non-user error related to a technical issue in the
  844. // backend. Contact Cloud Channel support.
  845. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  846. // Contact Cloud Channel support.
  847. //
  848. // Return value:
  849. // The topic name that unregistered the service email address.
  850. // Returns a success response if the service email address wasn't registered
  851. // with the topic.
  852. rpc UnregisterSubscriber(UnregisterSubscriberRequest) returns (UnregisterSubscriberResponse) {
  853. option (google.api.http) = {
  854. post: "/v1/{account=accounts/*}:unregister"
  855. body: "*"
  856. };
  857. }
  858. // Lists service accounts with subscriber privileges on the Cloud Pub/Sub
  859. // topic created for this Channel Services account.
  860. //
  861. // Possible error codes:
  862. //
  863. // * PERMISSION_DENIED: The reseller account making the request and the
  864. // provided reseller account are different, or the impersonated user
  865. // is not a super admin.
  866. // * INVALID_ARGUMENT: Required request parameters are missing or invalid.
  867. // * NOT_FOUND: The topic resource doesn't exist.
  868. // * INTERNAL: Any non-user error related to a technical issue in the
  869. // backend. Contact Cloud Channel support.
  870. // * UNKNOWN: Any non-user error related to a technical issue in the backend.
  871. // Contact Cloud Channel support.
  872. //
  873. // Return value:
  874. // A list of service email addresses.
  875. rpc ListSubscribers(ListSubscribersRequest) returns (ListSubscribersResponse) {
  876. option (google.api.http) = {
  877. get: "/v1/{account=accounts/*}:listSubscribers"
  878. };
  879. }
  880. }
  881. // Request message for [CloudChannelService.CheckCloudIdentityAccountsExist][google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist].
  882. message CheckCloudIdentityAccountsExistRequest {
  883. // Required. The reseller account's resource name.
  884. // Parent uses the format: accounts/{account_id}
  885. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  886. // Required. Domain to fetch for Cloud Identity account customer.
  887. string domain = 2 [(google.api.field_behavior) = REQUIRED];
  888. }
  889. // Entity representing a Cloud Identity account that may be
  890. // associated with a Channel Services API partner.
  891. message CloudIdentityCustomerAccount {
  892. // Returns true if a Cloud Identity account exists for a specific domain.
  893. bool existing = 1;
  894. // Returns true if the Cloud Identity account is associated with a customer
  895. // of the Channel Services partner.
  896. bool owned = 2;
  897. // If owned = true, the name of the customer that owns the Cloud Identity
  898. // account.
  899. // Customer_name uses the format:
  900. // accounts/{account_id}/customers/{customer_id}
  901. string customer_name = 3;
  902. // If existing = true, the Cloud Identity ID of the customer.
  903. string customer_cloud_identity_id = 4;
  904. }
  905. // Response message for
  906. // [CloudChannelService.CheckCloudIdentityAccountsExist][google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist].
  907. message CheckCloudIdentityAccountsExistResponse {
  908. // The Cloud Identity accounts associated with the domain.
  909. repeated CloudIdentityCustomerAccount cloud_identity_accounts = 1;
  910. }
  911. // Request message for [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers]
  912. message ListCustomersRequest {
  913. // Required. The resource name of the reseller account to list customers from.
  914. // Parent uses the format: accounts/{account_id}.
  915. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  916. // Optional. The maximum number of customers to return. The service may return fewer
  917. // than this value. If unspecified, returns at most 10 customers. The
  918. // maximum value is 50.
  919. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  920. // Optional. A token identifying a page of results other than the first page.
  921. // Obtained through
  922. // [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous
  923. // [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call.
  924. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  925. }
  926. // Response message for [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers].
  927. message ListCustomersResponse {
  928. // The customers belonging to a reseller or distributor.
  929. repeated Customer customers = 1;
  930. // A token to retrieve the next page of results.
  931. // Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page.
  932. string next_page_token = 2;
  933. }
  934. // Request message for [CloudChannelService.GetCustomer][google.cloud.channel.v1.CloudChannelService.GetCustomer].
  935. message GetCustomerRequest {
  936. // Required. The resource name of the customer to retrieve.
  937. // Name uses the format: accounts/{account_id}/customers/{customer_id}
  938. string name = 1 [
  939. (google.api.field_behavior) = REQUIRED,
  940. (google.api.resource_reference) = {
  941. type: "cloudchannel.googleapis.com/Customer"
  942. }
  943. ];
  944. }
  945. // Request message for [CloudChannelService.CreateCustomer][google.cloud.channel.v1.CloudChannelService.CreateCustomer]
  946. message CreateCustomerRequest {
  947. // Required. The resource name of reseller account in which to create the customer.
  948. // Parent uses the format: accounts/{account_id}
  949. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  950. // Required. The customer to create.
  951. Customer customer = 2 [(google.api.field_behavior) = REQUIRED];
  952. }
  953. // Request message for [CloudChannelService.UpdateCustomer][google.cloud.channel.v1.CloudChannelService.UpdateCustomer].
  954. message UpdateCustomerRequest {
  955. // Required. New contents of the customer.
  956. Customer customer = 2 [(google.api.field_behavior) = REQUIRED];
  957. // The update mask that applies to the resource.
  958. // Optional.
  959. google.protobuf.FieldMask update_mask = 3;
  960. }
  961. // Request message for [CloudChannelService.DeleteCustomer][google.cloud.channel.v1.CloudChannelService.DeleteCustomer].
  962. message DeleteCustomerRequest {
  963. // Required. The resource name of the customer to delete.
  964. string name = 1 [
  965. (google.api.field_behavior) = REQUIRED,
  966. (google.api.resource_reference) = {
  967. type: "cloudchannel.googleapis.com/Customer"
  968. }
  969. ];
  970. }
  971. // Request message for [CloudChannelService.ProvisionCloudIdentity][google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity]
  972. message ProvisionCloudIdentityRequest {
  973. // Required. Resource name of the customer.
  974. // Format: accounts/{account_id}/customers/{customer_id}
  975. string customer = 1 [
  976. (google.api.field_behavior) = REQUIRED,
  977. (google.api.resource_reference) = {
  978. type: "cloudchannel.googleapis.com/Customer"
  979. }
  980. ];
  981. // CloudIdentity-specific customer information.
  982. CloudIdentityInfo cloud_identity_info = 2;
  983. // Admin user information.
  984. AdminUser user = 3;
  985. // Validate the request and preview the review, but do not post it.
  986. bool validate_only = 4;
  987. }
  988. // Request message for [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements]
  989. message ListEntitlementsRequest {
  990. // Required. The resource name of the reseller's customer account to list
  991. // entitlements for.
  992. // Parent uses the format: accounts/{account_id}/customers/{customer_id}
  993. string parent = 1 [
  994. (google.api.field_behavior) = REQUIRED,
  995. (google.api.resource_reference) = {
  996. type: "cloudchannel.googleapis.com/Customer"
  997. }
  998. ];
  999. // Optional. Requested page size. Server might return fewer results than requested.
  1000. // If unspecified, return at most 50 entitlements.
  1001. // The maximum value is 100; the server will coerce values above 100.
  1002. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  1003. // Optional. A token for a page of results other than the first page.
  1004. // Obtained using
  1005. // [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous
  1006. // [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call.
  1007. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  1008. }
  1009. // Response message for [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements].
  1010. message ListEntitlementsResponse {
  1011. // The reseller customer's entitlements.
  1012. repeated Entitlement entitlements = 1;
  1013. // A token to list the next page of results.
  1014. // Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page.
  1015. string next_page_token = 2;
  1016. }
  1017. // Request message for [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus]
  1018. message ListTransferableSkusRequest {
  1019. // Specifies the identity of transferred customer.
  1020. // Either a cloud_identity_id of the customer or the customer name is
  1021. // required to look up transferable SKUs.
  1022. oneof transferred_customer_identity {
  1023. // Customer's Cloud Identity ID
  1024. string cloud_identity_id = 4;
  1025. // A reseller is required to create a customer and use the resource name of
  1026. // the created customer here.
  1027. // Customer_name uses the format:
  1028. // accounts/{account_id}/customers/{customer_id}
  1029. string customer_name = 7;
  1030. }
  1031. // Required. The reseller account's resource name.
  1032. // Parent uses the format: accounts/{account_id}
  1033. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  1034. // The requested page size. Server might return fewer results than requested.
  1035. // If unspecified, returns at most 100 SKUs.
  1036. // The maximum value is 1000; the server will coerce values above 1000.
  1037. // Optional.
  1038. int32 page_size = 2;
  1039. // A token for a page of results other than the first page.
  1040. // Obtained using
  1041. // [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous
  1042. // [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call.
  1043. // Optional.
  1044. string page_token = 3;
  1045. // The super admin of the resold customer generates this token to
  1046. // authorize a reseller to access their Cloud Identity and purchase
  1047. // entitlements on their behalf. You can omit this token after authorization.
  1048. // See https://support.google.com/a/answer/7643790 for more details.
  1049. string auth_token = 5;
  1050. // The BCP-47 language code. For example, "en-US". The
  1051. // response will localize in the corresponding language code, if specified.
  1052. // The default value is "en-US".
  1053. // Optional.
  1054. string language_code = 6;
  1055. }
  1056. // Response message for [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus].
  1057. message ListTransferableSkusResponse {
  1058. // Information about existing SKUs for a customer that needs a transfer.
  1059. repeated TransferableSku transferable_skus = 1;
  1060. // A token to retrieve the next page of results.
  1061. // Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain
  1062. // that page.
  1063. string next_page_token = 2;
  1064. }
  1065. // Request message for [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers]
  1066. message ListTransferableOffersRequest {
  1067. // Specifies the identity of transferred customer.
  1068. // Either a cloud_identity_id of the customer or the customer name is
  1069. // required to look up transferrable Offers.
  1070. oneof transferred_customer_identity {
  1071. // Customer's Cloud Identity ID
  1072. string cloud_identity_id = 4;
  1073. // A reseller should create a customer and use the resource name of
  1074. // that customer here.
  1075. string customer_name = 5;
  1076. }
  1077. // Required. The resource name of the reseller's account.
  1078. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  1079. // Requested page size. Server might return fewer results than requested.
  1080. // If unspecified, returns at most 100 offers.
  1081. // The maximum value is 1000; the server will coerce values above 1000.
  1082. int32 page_size = 2;
  1083. // A token for a page of results other than the first page.
  1084. // Obtained using
  1085. // [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous
  1086. // [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call.
  1087. string page_token = 3;
  1088. // Required. The SKU to look up Offers for.
  1089. string sku = 6 [(google.api.field_behavior) = REQUIRED];
  1090. // The BCP-47 language code. For example, "en-US". The
  1091. // response will localize in the corresponding language code, if specified.
  1092. // The default value is "en-US".
  1093. string language_code = 7;
  1094. }
  1095. // Response message for [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers].
  1096. message ListTransferableOffersResponse {
  1097. // Information about Offers for a customer that can be used for
  1098. // transfer.
  1099. repeated TransferableOffer transferable_offers = 1;
  1100. // A token to retrieve the next page of results.
  1101. // Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain
  1102. // that page.
  1103. string next_page_token = 2;
  1104. }
  1105. // TransferableOffer represents an Offer that can be used in Transfer.
  1106. // Read-only.
  1107. message TransferableOffer {
  1108. // Offer with parameter constraints updated to allow the Transfer.
  1109. Offer offer = 1;
  1110. }
  1111. // Request message for [CloudChannelService.GetEntitlement][google.cloud.channel.v1.CloudChannelService.GetEntitlement].
  1112. message GetEntitlementRequest {
  1113. // Required. The resource name of the entitlement to retrieve.
  1114. // Name uses the format:
  1115. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  1116. string name = 1 [
  1117. (google.api.field_behavior) = REQUIRED,
  1118. (google.api.resource_reference) = {
  1119. type: "cloudchannel.googleapis.com/Entitlement"
  1120. }
  1121. ];
  1122. }
  1123. // Request message for [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks]
  1124. message ListChannelPartnerLinksRequest {
  1125. // Required. The resource name of the reseller account for listing channel partner
  1126. // links.
  1127. // Parent uses the format: accounts/{account_id}
  1128. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  1129. // Optional. Requested page size. Server might return fewer results than requested.
  1130. // If unspecified, server will pick a default size (25).
  1131. // The maximum value is 200; the server will coerce values above 200.
  1132. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  1133. // Optional. A token for a page of results other than the first page.
  1134. // Obtained using
  1135. // [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous
  1136. // [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call.
  1137. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  1138. // Optional. The level of granularity the ChannelPartnerLink will display.
  1139. ChannelPartnerLinkView view = 4 [(google.api.field_behavior) = OPTIONAL];
  1140. }
  1141. // Response message for [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks].
  1142. message ListChannelPartnerLinksResponse {
  1143. // The Channel partner links for a reseller.
  1144. repeated ChannelPartnerLink channel_partner_links = 1;
  1145. // A token to retrieve the next page of results.
  1146. // Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page.
  1147. string next_page_token = 2;
  1148. }
  1149. // Request message for [CloudChannelService.GetChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink].
  1150. message GetChannelPartnerLinkRequest {
  1151. // Required. The resource name of the channel partner link to retrieve.
  1152. // Name uses the format: accounts/{account_id}/channelPartnerLinks/{id}
  1153. // where {id} is the Cloud Identity ID of the partner.
  1154. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1155. // Optional. The level of granularity the ChannelPartnerLink will display.
  1156. ChannelPartnerLinkView view = 2 [(google.api.field_behavior) = OPTIONAL];
  1157. }
  1158. // Request message for [CloudChannelService.CreateChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerLink]
  1159. message CreateChannelPartnerLinkRequest {
  1160. // Required. Create a channel partner link for the provided reseller account's
  1161. // resource name.
  1162. // Parent uses the format: accounts/{account_id}
  1163. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  1164. // Required. The channel partner link to create.
  1165. // Either channel_partner_link.reseller_cloud_identity_id or domain can be
  1166. // used to create a link.
  1167. ChannelPartnerLink channel_partner_link = 2 [(google.api.field_behavior) = REQUIRED];
  1168. }
  1169. // Request message for [CloudChannelService.UpdateChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink]
  1170. message UpdateChannelPartnerLinkRequest {
  1171. // Required. The resource name of the channel partner link to cancel.
  1172. // Name uses the format: accounts/{account_id}/channelPartnerLinks/{id}
  1173. // where {id} is the Cloud Identity ID of the partner.
  1174. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1175. // Required. The channel partner link to update. Only channel_partner_link.link_state
  1176. // is allowed for updates.
  1177. ChannelPartnerLink channel_partner_link = 2 [(google.api.field_behavior) = REQUIRED];
  1178. // Required. The update mask that applies to the resource.
  1179. // The only allowable value for an update mask is
  1180. // channel_partner_link.link_state.
  1181. google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED];
  1182. }
  1183. // Request message for [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement]
  1184. message CreateEntitlementRequest {
  1185. // Required. The resource name of the reseller's customer account in which to create the
  1186. // entitlement.
  1187. // Parent uses the format: accounts/{account_id}/customers/{customer_id}
  1188. string parent = 1 [
  1189. (google.api.field_behavior) = REQUIRED,
  1190. (google.api.resource_reference) = {
  1191. type: "cloudchannel.googleapis.com/Customer"
  1192. }
  1193. ];
  1194. // Required. The entitlement to create.
  1195. Entitlement entitlement = 2 [(google.api.field_behavior) = REQUIRED];
  1196. // Optional. You can specify an optional unique request ID, and if you need to retry
  1197. // your request, the server will know to ignore the request if it's complete.
  1198. //
  1199. // For example, you make an initial request and the request times out. If you
  1200. // make the request again with the same request ID, the server can check if
  1201. // it received the original operation with the same request ID. If it did, it
  1202. // will ignore the second request.
  1203. //
  1204. // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  1205. // with the exception that zero UUID is not supported
  1206. // (`00000000-0000-0000-0000-000000000000`).
  1207. string request_id = 5 [(google.api.field_behavior) = OPTIONAL];
  1208. }
  1209. // Request message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
  1210. message TransferEntitlementsRequest {
  1211. // Required. The resource name of the reseller's customer account that will receive
  1212. // transferred entitlements.
  1213. // Parent uses the format: accounts/{account_id}/customers/{customer_id}
  1214. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  1215. // Required. The new entitlements to create or transfer.
  1216. repeated Entitlement entitlements = 2 [(google.api.field_behavior) = REQUIRED];
  1217. // The super admin of the resold customer generates this token to
  1218. // authorize a reseller to access their Cloud Identity and purchase
  1219. // entitlements on their behalf. You can omit this token after authorization.
  1220. // See https://support.google.com/a/answer/7643790 for more details.
  1221. string auth_token = 4;
  1222. // Optional. You can specify an optional unique request ID, and if you need to retry
  1223. // your request, the server will know to ignore the request if it's complete.
  1224. //
  1225. // For example, you make an initial request and the request times out. If you
  1226. // make the request again with the same request ID, the server can check if
  1227. // it received the original operation with the same request ID. If it did, it
  1228. // will ignore the second request.
  1229. //
  1230. // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  1231. // with the exception that zero UUID is not supported
  1232. // (`00000000-0000-0000-0000-000000000000`).
  1233. string request_id = 6 [(google.api.field_behavior) = OPTIONAL];
  1234. }
  1235. // Response message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
  1236. // This is put in the response field of google.longrunning.Operation.
  1237. message TransferEntitlementsResponse {
  1238. // The transferred entitlements.
  1239. repeated Entitlement entitlements = 1;
  1240. }
  1241. // Request message for [CloudChannelService.TransferEntitlementsToGoogle][google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle].
  1242. message TransferEntitlementsToGoogleRequest {
  1243. // Required. The resource name of the reseller's customer account where the entitlements
  1244. // transfer from.
  1245. // Parent uses the format: accounts/{account_id}/customers/{customer_id}
  1246. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  1247. // Required. The entitlements to transfer to Google.
  1248. repeated Entitlement entitlements = 2 [(google.api.field_behavior) = REQUIRED];
  1249. // Optional. You can specify an optional unique request ID, and if you need to retry
  1250. // your request, the server will know to ignore the request if it's complete.
  1251. //
  1252. // For example, you make an initial request and the request times out. If you
  1253. // make the request again with the same request ID, the server can check if
  1254. // it received the original operation with the same request ID. If it did, it
  1255. // will ignore the second request.
  1256. //
  1257. // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  1258. // with the exception that zero UUID is not supported
  1259. // (`00000000-0000-0000-0000-000000000000`).
  1260. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  1261. }
  1262. // Request message for [CloudChannelService.ChangeParametersRequest][].
  1263. message ChangeParametersRequest {
  1264. // Required. The name of the entitlement to update.
  1265. // Name uses the format:
  1266. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  1267. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1268. // Required. Entitlement parameters to update. You can only change editable parameters.
  1269. repeated Parameter parameters = 2 [(google.api.field_behavior) = REQUIRED];
  1270. // Optional. You can specify an optional unique request ID, and if you need to retry
  1271. // your request, the server will know to ignore the request if it's complete.
  1272. //
  1273. // For example, you make an initial request and the request times out. If you
  1274. // make the request again with the same request ID, the server can check if
  1275. // it received the original operation with the same request ID. If it did, it
  1276. // will ignore the second request.
  1277. //
  1278. // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  1279. // with the exception that zero UUID is not supported
  1280. // (`00000000-0000-0000-0000-000000000000`).
  1281. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  1282. // Optional. Purchase order ID provided by the reseller.
  1283. string purchase_order_id = 5 [(google.api.field_behavior) = OPTIONAL];
  1284. }
  1285. // Request message for [CloudChannelService.ChangeRenewalSettings][google.cloud.channel.v1.CloudChannelService.ChangeRenewalSettings].
  1286. message ChangeRenewalSettingsRequest {
  1287. // Required. The name of the entitlement to update.
  1288. // Name uses the format:
  1289. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  1290. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1291. // Required. New renewal settings.
  1292. RenewalSettings renewal_settings = 4 [(google.api.field_behavior) = REQUIRED];
  1293. // Optional. You can specify an optional unique request ID, and if you need to retry
  1294. // your request, the server will know to ignore the request if it's complete.
  1295. //
  1296. // For example, you make an initial request and the request times out. If you
  1297. // make the request again with the same request ID, the server can check if
  1298. // it received the original operation with the same request ID. If it did, it
  1299. // will ignore the second request.
  1300. //
  1301. // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  1302. // with the exception that zero UUID is not supported
  1303. // (`00000000-0000-0000-0000-000000000000`).
  1304. string request_id = 5 [(google.api.field_behavior) = OPTIONAL];
  1305. }
  1306. // Request message for [CloudChannelService.ChangeOffer][google.cloud.channel.v1.CloudChannelService.ChangeOffer].
  1307. message ChangeOfferRequest {
  1308. // Required. The resource name of the entitlement to update.
  1309. // Name uses the format:
  1310. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  1311. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1312. // Required. New Offer.
  1313. // Format: accounts/{account_id}/offers/{offer_id}.
  1314. string offer = 2 [
  1315. (google.api.field_behavior) = REQUIRED,
  1316. (google.api.resource_reference) = {
  1317. type: "cloudchannel.googleapis.com/Offer"
  1318. }
  1319. ];
  1320. // Optional. Parameters needed to purchase the Offer.
  1321. repeated Parameter parameters = 3 [(google.api.field_behavior) = OPTIONAL];
  1322. // Optional. Purchase order id provided by the reseller.
  1323. string purchase_order_id = 5 [(google.api.field_behavior) = OPTIONAL];
  1324. // Optional. You can specify an optional unique request ID, and if you need to retry
  1325. // your request, the server will know to ignore the request if it's complete.
  1326. //
  1327. // For example, you make an initial request and the request times out. If you
  1328. // make the request again with the same request ID, the server can check if
  1329. // it received the original operation with the same request ID. If it did, it
  1330. // will ignore the second request.
  1331. //
  1332. // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  1333. // with the exception that zero UUID is not supported
  1334. // (`00000000-0000-0000-0000-000000000000`).
  1335. string request_id = 6 [(google.api.field_behavior) = OPTIONAL];
  1336. }
  1337. // Request message for [CloudChannelService.StartPaidService][google.cloud.channel.v1.CloudChannelService.StartPaidService].
  1338. message StartPaidServiceRequest {
  1339. // Required. The name of the entitlement to start a paid service for.
  1340. // Name uses the format:
  1341. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  1342. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1343. // Optional. You can specify an optional unique request ID, and if you need to retry
  1344. // your request, the server will know to ignore the request if it's complete.
  1345. //
  1346. // For example, you make an initial request and the request times out. If you
  1347. // make the request again with the same request ID, the server can check if
  1348. // it received the original operation with the same request ID. If it did, it
  1349. // will ignore the second request.
  1350. //
  1351. // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  1352. // with the exception that zero UUID is not supported
  1353. // (`00000000-0000-0000-0000-000000000000`).
  1354. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  1355. }
  1356. // Request message for [CloudChannelService.CancelEntitlement][google.cloud.channel.v1.CloudChannelService.CancelEntitlement].
  1357. message CancelEntitlementRequest {
  1358. // Required. The resource name of the entitlement to cancel.
  1359. // Name uses the format:
  1360. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  1361. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1362. // Optional. You can specify an optional unique request ID, and if you need to retry
  1363. // your request, the server will know to ignore the request if it's complete.
  1364. //
  1365. // For example, you make an initial request and the request times out. If you
  1366. // make the request again with the same request ID, the server can check if
  1367. // it received the original operation with the same request ID. If it did, it
  1368. // will ignore the second request.
  1369. //
  1370. // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  1371. // with the exception that zero UUID is not supported
  1372. // (`00000000-0000-0000-0000-000000000000`).
  1373. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  1374. }
  1375. // Request message for [CloudChannelService.SuspendEntitlement][google.cloud.channel.v1.CloudChannelService.SuspendEntitlement].
  1376. message SuspendEntitlementRequest {
  1377. // Required. The resource name of the entitlement to suspend.
  1378. // Name uses the format:
  1379. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  1380. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1381. // Optional. You can specify an optional unique request ID, and if you need to retry
  1382. // your request, the server will know to ignore the request if it's complete.
  1383. //
  1384. // For example, you make an initial request and the request times out. If you
  1385. // make the request again with the same request ID, the server can check if
  1386. // it received the original operation with the same request ID. If it did, it
  1387. // will ignore the second request.
  1388. //
  1389. // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  1390. // with the exception that zero UUID is not supported
  1391. // (`00000000-0000-0000-0000-000000000000`).
  1392. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  1393. }
  1394. // Request message for [CloudChannelService.ActivateEntitlement][google.cloud.channel.v1.CloudChannelService.ActivateEntitlement].
  1395. message ActivateEntitlementRequest {
  1396. // Required. The resource name of the entitlement to activate.
  1397. // Name uses the format:
  1398. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  1399. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1400. // Optional. You can specify an optional unique request ID, and if you need to retry
  1401. // your request, the server will know to ignore the request if it's complete.
  1402. //
  1403. // For example, you make an initial request and the request times out. If you
  1404. // make the request again with the same request ID, the server can check if
  1405. // it received the original operation with the same request ID. If it did, it
  1406. // will ignore the second request.
  1407. //
  1408. // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
  1409. // with the exception that zero UUID is not supported
  1410. // (`00000000-0000-0000-0000-000000000000`).
  1411. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  1412. }
  1413. // Request message for LookupOffer.
  1414. message LookupOfferRequest {
  1415. // Required. The resource name of the entitlement to retrieve the Offer.
  1416. // Entitlement uses the format:
  1417. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  1418. string entitlement = 1 [
  1419. (google.api.field_behavior) = REQUIRED,
  1420. (google.api.resource_reference) = {
  1421. type: "cloudchannel.googleapis.com/Entitlement"
  1422. }
  1423. ];
  1424. }
  1425. // Request message for ListProducts.
  1426. message ListProductsRequest {
  1427. // Required. The resource name of the reseller account.
  1428. // Format: accounts/{account_id}.
  1429. string account = 1 [(google.api.field_behavior) = REQUIRED];
  1430. // Optional. Requested page size. Server might return fewer results than requested.
  1431. // If unspecified, returns at most 100 Products.
  1432. // The maximum value is 1000; the server will coerce values above 1000.
  1433. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  1434. // Optional. A token for a page of results other than the first page.
  1435. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  1436. // Optional. The BCP-47 language code. For example, "en-US". The
  1437. // response will localize in the corresponding language code, if specified.
  1438. // The default value is "en-US".
  1439. string language_code = 4 [(google.api.field_behavior) = OPTIONAL];
  1440. }
  1441. // Response message for ListProducts.
  1442. message ListProductsResponse {
  1443. // List of Products requested.
  1444. repeated Product products = 1;
  1445. // A token to retrieve the next page of results.
  1446. string next_page_token = 2;
  1447. }
  1448. // Request message for ListSkus.
  1449. message ListSkusRequest {
  1450. // Required. The resource name of the Product to list SKUs for.
  1451. // Parent uses the format: products/{product_id}.
  1452. // Supports products/- to retrieve SKUs for all products.
  1453. string parent = 1 [
  1454. (google.api.field_behavior) = REQUIRED,
  1455. (google.api.resource_reference) = {
  1456. type: "cloudchannel.googleapis.com/Product"
  1457. }
  1458. ];
  1459. // Required. Resource name of the reseller.
  1460. // Format: accounts/{account_id}.
  1461. string account = 2 [(google.api.field_behavior) = REQUIRED];
  1462. // Optional. Requested page size. Server might return fewer results than requested.
  1463. // If unspecified, returns at most 100 SKUs.
  1464. // The maximum value is 1000; the server will coerce values above 1000.
  1465. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
  1466. // Optional. A token for a page of results other than the first page.
  1467. // Optional.
  1468. string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
  1469. // Optional. The BCP-47 language code. For example, "en-US". The
  1470. // response will localize in the corresponding language code, if specified.
  1471. // The default value is "en-US".
  1472. string language_code = 5 [(google.api.field_behavior) = OPTIONAL];
  1473. }
  1474. // Response message for ListSkus.
  1475. message ListSkusResponse {
  1476. // The list of SKUs requested.
  1477. repeated Sku skus = 1;
  1478. // A token to retrieve the next page of results.
  1479. string next_page_token = 2;
  1480. }
  1481. // Request message for ListOffers.
  1482. message ListOffersRequest {
  1483. // Required. The resource name of the reseller account from which to list Offers.
  1484. // Parent uses the format: accounts/{account_id}.
  1485. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  1486. // Optional. Requested page size. Server might return fewer results than requested.
  1487. // If unspecified, returns at most 500 Offers.
  1488. // The maximum value is 1000; the server will coerce values above 1000.
  1489. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  1490. // Optional. A token for a page of results other than the first page.
  1491. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  1492. // Optional. The expression to filter results by name (name of
  1493. // the Offer), sku.name (name of the SKU), or sku.product.name (name of the
  1494. // Product).
  1495. // Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
  1496. // Example 2: name=accounts/a1/offers/o1
  1497. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  1498. // Optional. The BCP-47 language code. For example, "en-US". The
  1499. // response will localize in the corresponding language code, if specified.
  1500. // The default value is "en-US".
  1501. string language_code = 5 [(google.api.field_behavior) = OPTIONAL];
  1502. }
  1503. // Response message for ListOffers.
  1504. message ListOffersResponse {
  1505. // The list of Offers requested.
  1506. repeated Offer offers = 1;
  1507. // A token to retrieve the next page of results.
  1508. string next_page_token = 2;
  1509. }
  1510. // Request message for ListPurchasableSkus.
  1511. message ListPurchasableSkusRequest {
  1512. // List SKUs for a new entitlement. Make the purchase using
  1513. // [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement].
  1514. message CreateEntitlementPurchase {
  1515. // Required. List SKUs belonging to this Product.
  1516. // Format: products/{product_id}.
  1517. // Supports products/- to retrieve SKUs for all products.
  1518. string product = 1 [(google.api.field_behavior) = REQUIRED];
  1519. }
  1520. // List SKUs for upgrading or downgrading an entitlement. Make the purchase
  1521. // using [CloudChannelService.ChangeOffer][google.cloud.channel.v1.CloudChannelService.ChangeOffer].
  1522. message ChangeOfferPurchase {
  1523. // Change Type enum.
  1524. enum ChangeType {
  1525. // Not used.
  1526. CHANGE_TYPE_UNSPECIFIED = 0;
  1527. // SKU is an upgrade on the current entitlement.
  1528. UPGRADE = 1;
  1529. // SKU is a downgrade on the current entitlement.
  1530. DOWNGRADE = 2;
  1531. }
  1532. // Required. Resource name of the entitlement.
  1533. // Format:
  1534. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  1535. string entitlement = 1 [(google.api.field_behavior) = REQUIRED];
  1536. // Required. Change Type for the entitlement.
  1537. ChangeType change_type = 2 [(google.api.field_behavior) = REQUIRED];
  1538. }
  1539. // Defines the intended purchase.
  1540. oneof purchase_option {
  1541. // List SKUs for CreateEntitlement purchase.
  1542. CreateEntitlementPurchase create_entitlement_purchase = 2;
  1543. // List SKUs for ChangeOffer purchase with a new SKU.
  1544. ChangeOfferPurchase change_offer_purchase = 3;
  1545. }
  1546. // Required. The resource name of the customer to list SKUs for.
  1547. // Format: accounts/{account_id}/customers/{customer_id}.
  1548. string customer = 1 [
  1549. (google.api.field_behavior) = REQUIRED,
  1550. (google.api.resource_reference) = {
  1551. type: "cloudchannel.googleapis.com/Customer"
  1552. }
  1553. ];
  1554. // Optional. Requested page size. Server might return fewer results than requested.
  1555. // If unspecified, returns at most 100 SKUs.
  1556. // The maximum value is 1000; the server will coerce values above 1000.
  1557. int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL];
  1558. // Optional. A token for a page of results other than the first page.
  1559. string page_token = 5 [(google.api.field_behavior) = OPTIONAL];
  1560. // Optional. The BCP-47 language code. For example, "en-US". The
  1561. // response will localize in the corresponding language code, if specified.
  1562. // The default value is "en-US".
  1563. string language_code = 6 [(google.api.field_behavior) = OPTIONAL];
  1564. }
  1565. // Response message for ListPurchasableSkus.
  1566. message ListPurchasableSkusResponse {
  1567. // The list of SKUs requested.
  1568. repeated PurchasableSku purchasable_skus = 1;
  1569. // A token to retrieve the next page of results.
  1570. string next_page_token = 2;
  1571. }
  1572. // SKU that you can purchase. This is used in ListPurchasableSku API
  1573. // response.
  1574. message PurchasableSku {
  1575. // SKU
  1576. Sku sku = 1;
  1577. }
  1578. // Request message for ListPurchasableOffers.
  1579. message ListPurchasableOffersRequest {
  1580. // List Offers for CreateEntitlement purchase.
  1581. message CreateEntitlementPurchase {
  1582. // Required. SKU that the result should be restricted to.
  1583. // Format: products/{product_id}/skus/{sku_id}.
  1584. string sku = 1 [(google.api.field_behavior) = REQUIRED];
  1585. }
  1586. // List Offers for ChangeOffer purchase.
  1587. message ChangeOfferPurchase {
  1588. // Required. Resource name of the entitlement.
  1589. // Format:
  1590. // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
  1591. string entitlement = 1 [(google.api.field_behavior) = REQUIRED];
  1592. // Optional. Resource name of the new target SKU. Provide this SKU when
  1593. // upgrading or downgrading an entitlement. Format:
  1594. // products/{product_id}/skus/{sku_id}
  1595. string new_sku = 2 [(google.api.field_behavior) = OPTIONAL];
  1596. }
  1597. // Defines the intended purchase.
  1598. oneof purchase_option {
  1599. // List Offers for CreateEntitlement purchase.
  1600. CreateEntitlementPurchase create_entitlement_purchase = 2;
  1601. // List Offers for ChangeOffer purchase.
  1602. ChangeOfferPurchase change_offer_purchase = 3;
  1603. }
  1604. // Required. The resource name of the customer to list Offers for.
  1605. // Format: accounts/{account_id}/customers/{customer_id}.
  1606. string customer = 1 [
  1607. (google.api.field_behavior) = REQUIRED,
  1608. (google.api.resource_reference) = {
  1609. type: "cloudchannel.googleapis.com/Customer"
  1610. }
  1611. ];
  1612. // Optional. Requested page size. Server might return fewer results than requested.
  1613. // If unspecified, returns at most 100 Offers.
  1614. // The maximum value is 1000; the server will coerce values above 1000.
  1615. int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL];
  1616. // Optional. A token for a page of results other than the first page.
  1617. string page_token = 5 [(google.api.field_behavior) = OPTIONAL];
  1618. // Optional. The BCP-47 language code. For example, "en-US". The
  1619. // response will localize in the corresponding language code, if specified.
  1620. // The default value is "en-US".
  1621. string language_code = 6 [(google.api.field_behavior) = OPTIONAL];
  1622. }
  1623. // Response message for ListPurchasableOffers.
  1624. message ListPurchasableOffersResponse {
  1625. // The list of Offers requested.
  1626. repeated PurchasableOffer purchasable_offers = 1;
  1627. // A token to retrieve the next page of results.
  1628. string next_page_token = 2;
  1629. }
  1630. // Offer that you can purchase for a customer. This is used in the
  1631. // ListPurchasableOffer API response.
  1632. message PurchasableOffer {
  1633. // Offer.
  1634. Offer offer = 1;
  1635. }
  1636. // Request Message for RegisterSubscriber.
  1637. message RegisterSubscriberRequest {
  1638. // Required. Resource name of the account.
  1639. string account = 1 [(google.api.field_behavior) = REQUIRED];
  1640. // Required. Service account that provides subscriber access to the registered topic.
  1641. string service_account = 2 [(google.api.field_behavior) = REQUIRED];
  1642. }
  1643. // Response Message for RegisterSubscriber.
  1644. message RegisterSubscriberResponse {
  1645. // Name of the topic the subscriber will listen to.
  1646. string topic = 1;
  1647. }
  1648. // Request Message for UnregisterSubscriber.
  1649. message UnregisterSubscriberRequest {
  1650. // Required. Resource name of the account.
  1651. string account = 1 [(google.api.field_behavior) = REQUIRED];
  1652. // Required. Service account to unregister from subscriber access to the topic.
  1653. string service_account = 2 [(google.api.field_behavior) = REQUIRED];
  1654. }
  1655. // Response Message for UnregisterSubscriber.
  1656. message UnregisterSubscriberResponse {
  1657. // Name of the topic the service account subscriber access was removed from.
  1658. string topic = 1;
  1659. }
  1660. // Request Message for ListSubscribers.
  1661. message ListSubscribersRequest {
  1662. // Required. Resource name of the account.
  1663. string account = 1 [(google.api.field_behavior) = REQUIRED];
  1664. // Optional. The maximum number of service accounts to return. The service may return
  1665. // fewer than this value.
  1666. // If unspecified, returns at most 100 service accounts.
  1667. // The maximum value is 1000; the server will coerce values above 1000.
  1668. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  1669. // Optional. A page token, received from a previous `ListSubscribers` call.
  1670. // Provide this to retrieve the subsequent page.
  1671. //
  1672. // When paginating, all other parameters provided to `ListSubscribers` must
  1673. // match the call that provided the page token.
  1674. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  1675. }
  1676. // Response Message for ListSubscribers.
  1677. message ListSubscribersResponse {
  1678. // Name of the topic registered with the reseller.
  1679. string topic = 1;
  1680. // List of service accounts which have subscriber access to the topic.
  1681. repeated string service_accounts = 2;
  1682. // A token that can be sent as `page_token` to retrieve the next page.
  1683. // If this field is omitted, there are no subsequent pages.
  1684. string next_page_token = 3;
  1685. }