catalog.proto 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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.retail.v2beta;
  16. import "google/api/annotations.proto";
  17. import "google/api/field_behavior.proto";
  18. import "google/api/resource.proto";
  19. import "google/cloud/retail/v2beta/common.proto";
  20. import "google/cloud/retail/v2beta/import_config.proto";
  21. option csharp_namespace = "Google.Cloud.Retail.V2Beta";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2beta;retail";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "CatalogProto";
  25. option java_package = "com.google.cloud.retail.v2beta";
  26. option objc_class_prefix = "RETAIL";
  27. option php_namespace = "Google\\Cloud\\Retail\\V2beta";
  28. option ruby_package = "Google::Cloud::Retail::V2beta";
  29. // Configures what level the product should be uploaded with regards to
  30. // how users will be send events and how predictions will be made.
  31. message ProductLevelConfig {
  32. // The type of [Product][google.cloud.retail.v2beta.Product]s allowed to be
  33. // ingested into the catalog. Acceptable values are:
  34. //
  35. // * `primary` (default): You can only ingest
  36. // [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY]
  37. // [Product][google.cloud.retail.v2beta.Product]s. This means
  38. // [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id]
  39. // can only be empty or set to the same value as
  40. // [Product.id][google.cloud.retail.v2beta.Product.id].
  41. // * `variant`: You can only ingest
  42. // [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]
  43. // [Product][google.cloud.retail.v2beta.Product]s.
  44. // This means
  45. // [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id]
  46. // cannot be empty.
  47. //
  48. // If this field is set to an invalid value other than these, an
  49. // INVALID_ARGUMENT error is returned.
  50. //
  51. // If this field is `variant` and
  52. // [merchant_center_product_id_field][google.cloud.retail.v2beta.ProductLevelConfig.merchant_center_product_id_field]
  53. // is `itemGroupId`, an INVALID_ARGUMENT error is returned.
  54. //
  55. // See [Using product
  56. // levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels)
  57. // for more details.
  58. string ingestion_product_type = 1;
  59. // Which field of [Merchant Center
  60. // Product](/bigquery-transfer/docs/merchant-center-products-schema) should be
  61. // imported as [Product.id][google.cloud.retail.v2beta.Product.id]. Acceptable
  62. // values are:
  63. //
  64. // * `offerId` (default): Import `offerId` as the product ID.
  65. // * `itemGroupId`: Import `itemGroupId` as the product ID. Notice that Retail
  66. // API will choose one item from the ones with the same `itemGroupId`, and
  67. // use it to represent the item group.
  68. //
  69. // If this field is set to an invalid value other than these, an
  70. // INVALID_ARGUMENT error is returned.
  71. //
  72. // If this field is `itemGroupId` and
  73. // [ingestion_product_type][google.cloud.retail.v2beta.ProductLevelConfig.ingestion_product_type]
  74. // is `variant`, an INVALID_ARGUMENT error is returned.
  75. //
  76. // See [Using product
  77. // levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels)
  78. // for more details.
  79. string merchant_center_product_id_field = 2;
  80. }
  81. // The catalog configuration.
  82. message Catalog {
  83. option (google.api.resource) = {
  84. type: "retail.googleapis.com/Catalog"
  85. pattern: "projects/{project}/locations/{location}/catalogs/{catalog}"
  86. };
  87. // Required. Immutable. The fully qualified resource name of the catalog.
  88. string name = 1 [
  89. (google.api.field_behavior) = REQUIRED,
  90. (google.api.field_behavior) = IMMUTABLE
  91. ];
  92. // Required. Immutable. The catalog display name.
  93. //
  94. // This field must be a UTF-8 encoded string with a length limit of 128
  95. // characters. Otherwise, an INVALID_ARGUMENT error is returned.
  96. string display_name = 2 [
  97. (google.api.field_behavior) = REQUIRED,
  98. (google.api.field_behavior) = IMMUTABLE
  99. ];
  100. // Required. The product level configuration.
  101. ProductLevelConfig product_level_config = 4
  102. [(google.api.field_behavior) = REQUIRED];
  103. }