products.proto 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // Copyright 2022 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/resource.proto";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "ProductsProto";
  20. option java_package = "com.google.cloud.channel.v1";
  21. // Type of media used.
  22. enum MediaType {
  23. // Not used.
  24. MEDIA_TYPE_UNSPECIFIED = 0;
  25. // Type of image.
  26. MEDIA_TYPE_IMAGE = 1;
  27. }
  28. // A Product is the entity a customer uses when placing an order. For example,
  29. // Google Workspace, Google Voice, etc.
  30. message Product {
  31. option (google.api.resource) = {
  32. type: "cloudchannel.googleapis.com/Product"
  33. pattern: "products/{product}"
  34. };
  35. // Resource Name of the Product.
  36. // Format: products/{product_id}
  37. string name = 1;
  38. // Marketing information for the product.
  39. MarketingInfo marketing_info = 2;
  40. }
  41. // Represents a product's purchasable Stock Keeping Unit (SKU).
  42. // SKUs represent the different variations of the product. For example, Google
  43. // Workspace Business Standard and Google Workspace Business Plus are Google
  44. // Workspace product SKUs.
  45. message Sku {
  46. option (google.api.resource) = {
  47. type: "cloudchannel.googleapis.com/Sku"
  48. pattern: "products/{product}/skus/{sku}"
  49. };
  50. // Resource Name of the SKU.
  51. // Format: products/{product_id}/skus/{sku_id}
  52. string name = 1;
  53. // Marketing information for the SKU.
  54. MarketingInfo marketing_info = 2;
  55. // Product the SKU is associated with.
  56. Product product = 3;
  57. }
  58. // Represents the marketing information for a Product, SKU or Offer.
  59. message MarketingInfo {
  60. // Human readable name.
  61. string display_name = 1;
  62. // Human readable description. Description can contain HTML.
  63. string description = 2;
  64. // Default logo.
  65. Media default_logo = 3;
  66. }
  67. // Represents media information.
  68. message Media {
  69. // Title of the media.
  70. string title = 1;
  71. // URL of the media.
  72. string content = 2;
  73. // Type of the media.
  74. MediaType type = 3;
  75. }