google-cloud-retail-v2 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2.rb +2 -0
  3. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -0
  4. data/lib/google/cloud/retail/v2/catalog_service/client.rb +203 -4
  5. data/lib/google/cloud/retail/v2/catalog_service/paths.rb +21 -0
  6. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +16 -0
  7. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +46 -0
  8. data/lib/google/cloud/retail/v2/common_pb.rb +46 -0
  9. data/lib/google/cloud/retail/v2/completion_service.rb +54 -0
  10. data/lib/google/cloud/retail/v2/completion_service/client.rb +546 -0
  11. data/lib/google/cloud/retail/v2/completion_service/credentials.rb +51 -0
  12. data/lib/google/cloud/retail/v2/completion_service/operations.rb +655 -0
  13. data/lib/google/cloud/retail/v2/completion_service/paths.rb +52 -0
  14. data/lib/google/cloud/retail/v2/completion_service_pb.rb +50 -0
  15. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +61 -0
  16. data/lib/google/cloud/retail/v2/import_config_pb.rb +32 -0
  17. data/lib/google/cloud/retail/v2/prediction_service/client.rb +34 -33
  18. data/lib/google/cloud/retail/v2/product_pb.rb +21 -0
  19. data/lib/google/cloud/retail/v2/product_service/client.rb +632 -4
  20. data/lib/google/cloud/retail/v2/product_service_pb.rb +56 -0
  21. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +75 -0
  22. data/lib/google/cloud/retail/v2/search_service.rb +53 -0
  23. data/lib/google/cloud/retail/v2/search_service/client.rb +541 -0
  24. data/lib/google/cloud/retail/v2/search_service/credentials.rb +51 -0
  25. data/lib/google/cloud/retail/v2/search_service/paths.rb +54 -0
  26. data/lib/google/cloud/retail/v2/search_service_pb.rb +131 -0
  27. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +53 -0
  28. data/lib/google/cloud/retail/v2/user_event_pb.rb +11 -0
  29. data/lib/google/cloud/retail/v2/user_event_service/client.rb +1 -1
  30. data/lib/google/cloud/retail/v2/user_event_service/paths.rb +19 -0
  31. data/lib/google/cloud/retail/v2/version.rb +1 -1
  32. data/proto_docs/google/cloud/retail/v2/catalog.rb +6 -6
  33. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +53 -4
  34. data/proto_docs/google/cloud/retail/v2/common.rb +272 -4
  35. data/proto_docs/google/cloud/retail/v2/completion_service.rb +162 -0
  36. data/proto_docs/google/cloud/retail/v2/import_config.rb +122 -6
  37. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +32 -31
  38. data/proto_docs/google/cloud/retail/v2/product.rb +266 -10
  39. data/proto_docs/google/cloud/retail/v2/product_service.rb +362 -2
  40. data/proto_docs/google/cloud/retail/v2/purge_config.rb +1 -1
  41. data/proto_docs/google/cloud/retail/v2/search_service.rb +820 -0
  42. data/proto_docs/google/cloud/retail/v2/user_event.rb +95 -3
  43. data/proto_docs/google/type/date.rb +53 -0
  44. metadata +18 -2
@@ -31,7 +31,7 @@ module Google
31
31
  # files, such as `gs://bucket/directory/*.json`. A request can
32
32
  # contain at most 100 files, and each file can be up to 2 GB. See
33
33
  # [Importing product
34
- # information](https://cloud.google.com/recommendations-ai/docs/upload-catalog)
34
+ # information](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog)
35
35
  # for the expected file format and setup instructions.
36
36
  # @!attribute [rw] data_schema
37
37
  # @return [::String]
@@ -50,18 +50,25 @@ module Google
50
50
  # * `user_event` (default): One JSON
51
51
  # {::Google::Cloud::Retail::V2::UserEvent UserEvent} per line.
52
52
  # * `user_event_ga360`: Using
53
- # https://support.google.com/analytics/answer/3437719?hl=en.
53
+ # https://support.google.com/analytics/answer/3437719.
54
54
  class GcsSource
55
55
  include ::Google::Protobuf::MessageExts
56
56
  extend ::Google::Protobuf::MessageExts::ClassMethods
57
57
  end
58
58
 
59
59
  # BigQuery source import data from.
60
+ # @!attribute [rw] partition_date
61
+ # @return [::Google::Type::Date]
62
+ # BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
63
+ #
64
+ # Only supported when
65
+ # {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
66
+ # is set to `FULL`.
60
67
  # @!attribute [rw] project_id
61
68
  # @return [::String]
62
- # The project id (can be project # or id) that the BigQuery source is in with
69
+ # The project ID (can be project # or ID) that the BigQuery source is in with
63
70
  # a length limit of 128 characters. If not specified, inherits the project
64
- # id from the parent request.
71
+ # ID from the parent request.
65
72
  # @!attribute [rw] dataset_id
66
73
  # @return [::String]
67
74
  # Required. The BigQuery data set to copy the data from with a length limit
@@ -92,7 +99,7 @@ module Google
92
99
  # * `user_event` (default): One JSON
93
100
  # {::Google::Cloud::Retail::V2::UserEvent UserEvent} per line.
94
101
  # * `user_event_ga360`: Using
95
- # https://support.google.com/analytics/answer/3437719?hl=en.
102
+ # https://support.google.com/analytics/answer/3437719.
96
103
  class BigQuerySource
97
104
  include ::Google::Protobuf::MessageExts
98
105
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -103,7 +110,7 @@ module Google
103
110
  # @return [::Array<::Google::Cloud::Retail::V2::Product>]
104
111
  # Required. A list of products to update/create. Each product must have a
105
112
  # valid {::Google::Cloud::Retail::V2::Product#id Product.id}. Recommended max of
106
- # 10k items.
113
+ # 100 items.
107
114
  class ProductInlineSource
108
115
  include ::Google::Protobuf::MessageExts
109
116
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -138,6 +145,17 @@ module Google
138
145
  #
139
146
  # If no updateMask is specified, requires products.create permission.
140
147
  # If updateMask is specified, requires products.update permission.
148
+ # @!attribute [rw] request_id
149
+ # @return [::String]
150
+ # Unique identifier provided by client, within the ancestor
151
+ # dataset scope. Ensures idempotency and used for request deduplication.
152
+ # Server-generated if unspecified. Up to 128 characters long and must match
153
+ # the pattern: "[a-zA-Z0-9_]+". This is returned as [Operation.name][] in
154
+ # {::Google::Cloud::Retail::V2::ImportMetadata ImportMetadata}.
155
+ #
156
+ # Only supported when
157
+ # {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
158
+ # is set to `FULL`.
141
159
  # @!attribute [rw] input_config
142
160
  # @return [::Google::Cloud::Retail::V2::ProductInputConfig]
143
161
  # Required. The desired input location of the data.
@@ -148,9 +166,50 @@ module Google
148
166
  # @return [::Google::Protobuf::FieldMask]
149
167
  # Indicates which fields in the provided imported 'products' to update. If
150
168
  # not set, will by default update all fields.
169
+ # @!attribute [rw] reconciliation_mode
170
+ # @return [::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode]
171
+ # The mode of reconciliation between existing products and the products to be
172
+ # imported. Defaults to
173
+ # {::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
174
+ # @!attribute [rw] notification_pubsub_topic
175
+ # @return [::String]
176
+ # Pub/Sub topic for receiving notification. If this field is set,
177
+ # when the import is finished, a notification will be sent to
178
+ # specified Pub/Sub topic. The message data will be JSON string of a
179
+ # {::Google::Longrunning::Operation Operation}.
180
+ # Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
181
+ #
182
+ # Only supported when
183
+ # {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
184
+ # is set to `FULL`.
151
185
  class ImportProductsRequest
152
186
  include ::Google::Protobuf::MessageExts
153
187
  extend ::Google::Protobuf::MessageExts::ClassMethods
188
+
189
+ # Indicates how imported products are reconciled with the existing products
190
+ # created or imported before.
191
+ module ReconciliationMode
192
+ # Defaults to INCREMENTAL.
193
+ RECONCILIATION_MODE_UNSPECIFIED = 0
194
+
195
+ # Inserts new products or updates existing products.
196
+ INCREMENTAL = 1
197
+
198
+ # Calculates diff and replaces the entire product dataset. Existing
199
+ # products may be deleted if they are not present in the source location.
200
+ #
201
+ # Can only be while using
202
+ # {::Google::Cloud::Retail::V2::BigQuerySource BigQuerySource}.
203
+ #
204
+ # Add the IAM permission “BigQuery Data Viewer” for
205
+ # cloud-retail-customer-data-access@system.gserviceaccount.com before
206
+ # using this feature otherwise an error is thrown.
207
+ #
208
+ # This feature is only available for users who have Retail Search enabled.
209
+ # Contact Retail Support (retail-search-support@google.com) if you are
210
+ # interested in using Retail Search.
211
+ FULL = 2
212
+ end
154
213
  end
155
214
 
156
215
  # Request message for the ImportUserEvents request.
@@ -169,6 +228,27 @@ module Google
169
228
  extend ::Google::Protobuf::MessageExts::ClassMethods
170
229
  end
171
230
 
231
+ # Request message for ImportCompletionData methods.
232
+ # @!attribute [rw] parent
233
+ # @return [::String]
234
+ # Required. The catalog which the suggestions dataset belongs to.
235
+ #
236
+ # Format: `projects/1234/locations/global/catalogs/default_catalog`.
237
+ # @!attribute [rw] input_config
238
+ # @return [::Google::Cloud::Retail::V2::CompletionDataInputConfig]
239
+ # Required. The desired input location of the data.
240
+ # @!attribute [rw] notification_pubsub_topic
241
+ # @return [::String]
242
+ # Pub/Sub topic for receiving notification. If this field is set,
243
+ # when the import is finished, a notification will be sent to
244
+ # specified Pub/Sub topic. The message data will be JSON string of a
245
+ # {::Google::Longrunning::Operation Operation}.
246
+ # Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
247
+ class ImportCompletionDataRequest
248
+ include ::Google::Protobuf::MessageExts
249
+ extend ::Google::Protobuf::MessageExts::ClassMethods
250
+ end
251
+
172
252
  # The input config source for products.
173
253
  # @!attribute [rw] product_inline_source
174
254
  # @return [::Google::Cloud::Retail::V2::ProductInlineSource]
@@ -199,6 +279,19 @@ module Google
199
279
  extend ::Google::Protobuf::MessageExts::ClassMethods
200
280
  end
201
281
 
282
+ # The input config source for completion data.
283
+ # @!attribute [rw] big_query_source
284
+ # @return [::Google::Cloud::Retail::V2::BigQuerySource]
285
+ # Required. BigQuery input source.
286
+ #
287
+ # Add the IAM permission “BigQuery Data Viewer” for
288
+ # cloud-retail-customer-data-access@system.gserviceaccount.com before
289
+ # using this feature otherwise an error is thrown.
290
+ class CompletionDataInputConfig
291
+ include ::Google::Protobuf::MessageExts
292
+ extend ::Google::Protobuf::MessageExts::ClassMethods
293
+ end
294
+
202
295
  # Metadata related to the progress of the Import operation. This will be
203
296
  # returned by the google.longrunning.Operation.metadata field.
204
297
  # @!attribute [rw] create_time
@@ -214,6 +307,17 @@ module Google
214
307
  # @!attribute [rw] failure_count
215
308
  # @return [::Integer]
216
309
  # Count of entries that encountered errors while processing.
310
+ # @!attribute [rw] request_id
311
+ # @return [::String]
312
+ # Id of the request / operation. This is parroting back the requestId
313
+ # that was passed in the request.
314
+ # @!attribute [rw] notification_pubsub_topic
315
+ # @return [::String]
316
+ # Pub/Sub topic for receiving notification. If this field is set,
317
+ # when the import is finished, a notification will be sent to
318
+ # specified Pub/Sub topic. The message data will be JSON string of a
319
+ # {::Google::Longrunning::Operation Operation}.
320
+ # Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
217
321
  class ImportMetadata
218
322
  include ::Google::Protobuf::MessageExts
219
323
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -265,6 +369,18 @@ module Google
265
369
  include ::Google::Protobuf::MessageExts
266
370
  extend ::Google::Protobuf::MessageExts::ClassMethods
267
371
  end
372
+
373
+ # Response of the
374
+ # {::Google::Cloud::Retail::V2::ImportCompletionDataRequest ImportCompletionDataRequest}.
375
+ # If the long running operation is done, this message is returned by the
376
+ # google.longrunning.Operations.response field if the operation is successful.
377
+ # @!attribute [rw] error_samples
378
+ # @return [::Array<::Google::Rpc::Status>]
379
+ # A sample of errors encountered while processing the request.
380
+ class ImportCompletionDataResponse
381
+ include ::Google::Protobuf::MessageExts
382
+ extend ::Google::Protobuf::MessageExts::ClassMethods
383
+ end
268
384
  end
269
385
  end
270
386
  end
@@ -26,30 +26,10 @@ module Google
26
26
  # @return [::String]
27
27
  # Required. Full resource name of the format:
28
28
  # \\{name=projects/*/locations/global/catalogs/default_catalog/placements/*}
29
- # The id of the recommendation engine placement. This id is used to identify
30
- # the set of models that will be used to make the prediction.
31
- #
32
- # We currently support three placements with the following IDs by default:
33
- #
34
- # * `shopping_cart`: Predicts products frequently bought together with one or
35
- # more products in the same shopping session. Commonly displayed after
36
- # `add-to-cart` events, on product detail pages, or on the shopping cart
37
- # page.
38
- #
39
- # * `home_page`: Predicts the next product that a user will most likely
40
- # engage with or purchase based on the shopping or viewing history of the
41
- # specified `userId` or `visitorId`. For example - Recommendations for you.
42
- #
43
- # * `product_detail`: Predicts the next product that a user will most likely
44
- # engage with or purchase. The prediction is based on the shopping or
45
- # viewing history of the specified `userId` or `visitorId` and its
46
- # relevance to a specified `CatalogItem`. Typically used on product detail
47
- # pages. For example - More products like this.
48
- #
49
- # * `recently_viewed_default`: Returns up to 75 products recently viewed by
50
- # the specified `userId` or `visitorId`, most recent ones first. Returns
51
- # nothing if neither of them has viewed any products yet. For example -
52
- # Recently viewed.
29
+ # The ID of the Recommendations AI placement. Before you can request
30
+ # predictions from your model, you must create at least one placement for it.
31
+ # For more information, see [Managing
32
+ # placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
53
33
  #
54
34
  # The full list of available placements can be seen at
55
35
  # https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
@@ -80,6 +60,9 @@ module Google
80
60
  # `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings
81
61
  # with a size limit of 1,000 characters.
82
62
  #
63
+ # Note: "Recently viewed" models don't support tag filtering at the
64
+ # moment.
65
+ #
83
66
  # * filterOutOfStockItems. Restricts predictions to products that do not
84
67
  # have a
85
68
  # stockState value of OUT_OF_STOCK.
@@ -116,17 +99,35 @@ module Google
116
99
  # * `strictFiltering`: Boolean. True by default. If set to false, the service
117
100
  # will return generic (unfiltered) popular products instead of empty if
118
101
  # your filter blocks all prediction results.
102
+ # * `priceRerankLevel`: String. Default empty. If set to be non-empty, then
103
+ # it needs to be one of {'no-price-reranking', 'low-price-reranking',
104
+ # 'medium-price-reranking', 'high-price-reranking'}. This gives
105
+ # request-level control and adjusts prediction results based on product
106
+ # price.
107
+ # * `diversityLevel`: String. Default empty. If set to be non-empty, then
108
+ # it needs to be one of {'no-diversity', 'low-diversity',
109
+ # 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives
110
+ # request-level control and adjusts prediction results based on product
111
+ # category.
119
112
  # @!attribute [rw] labels
120
113
  # @return [::Google::Protobuf::Map{::String => ::String}]
121
- # The labels for the predict request.
114
+ # The labels applied to a resource must meet the following requirements:
122
115
  #
123
- # * Label keys can contain lowercase letters, digits and hyphens, must start
124
- # with a letter, and must end with a letter or digit.
125
- # * Non-zero label values can contain lowercase letters, digits and hyphens,
126
- # must start with a letter, and must end with a letter or digit.
127
- # * No more than 64 labels can be associated with a given request.
116
+ # * Each resource can have multiple labels, up to a maximum of 64.
117
+ # * Each label must be a key-value pair.
118
+ # * Keys have a minimum length of 1 character and a maximum length of 63
119
+ # characters, and cannot be empty. Values can be empty, and have a maximum
120
+ # length of 63 characters.
121
+ # * Keys and values can contain only lowercase letters, numeric characters,
122
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
123
+ # international characters are allowed.
124
+ # * The key portion of a label must be unique. However, you can use the same
125
+ # key with multiple resources.
126
+ # * Keys must start with a lowercase letter or international character.
128
127
  #
129
- # See https://goo.gl/xmQnxf for more information on and examples of labels.
128
+ # See [Google Cloud
129
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
130
+ # for more details.
130
131
  class PredictRequest
131
132
  include ::Google::Protobuf::MessageExts
132
133
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -23,6 +23,40 @@ module Google
23
23
  module V2
24
24
  # Product captures all metadata information of items to be recommended or
25
25
  # searched.
26
+ # @!attribute [rw] expire_time
27
+ # @return [::Google::Protobuf::Timestamp]
28
+ # The timestamp when this product becomes unavailable for
29
+ # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
30
+ #
31
+ # If it is set, the {::Google::Cloud::Retail::V2::Product Product} is not
32
+ # available for
33
+ # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search} after
34
+ # {::Google::Cloud::Retail::V2::Product#expire_time expire_time}. However, the
35
+ # product can still be retrieved by
36
+ # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}
37
+ # and
38
+ # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts}.
39
+ #
40
+ # Google Merchant Center property
41
+ # [expiration_date](https://support.google.com/merchants/answer/6324499).
42
+ # @!attribute [rw] ttl
43
+ # @return [::Google::Protobuf::Duration]
44
+ # Input only. The TTL (time to live) of the product.
45
+ #
46
+ # If it is set, {::Google::Cloud::Retail::V2::Product#expire_time expire_time}
47
+ # is set as current timestamp plus
48
+ # {::Google::Cloud::Retail::V2::Product#ttl ttl}. The derived
49
+ # {::Google::Cloud::Retail::V2::Product#expire_time expire_time} is returned in
50
+ # the output and {::Google::Cloud::Retail::V2::Product#ttl ttl} is left blank
51
+ # when retrieving the {::Google::Cloud::Retail::V2::Product Product}.
52
+ #
53
+ # If it is set, the product is not available for
54
+ # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search} after
55
+ # current timestamp plus {::Google::Cloud::Retail::V2::Product#ttl ttl}.
56
+ # However, the product can still be retrieved by
57
+ # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}
58
+ # and
59
+ # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts}.
26
60
  # @!attribute [rw] name
27
61
  # @return [::String]
28
62
  # Immutable. Full resource name of the product, such as
@@ -45,7 +79,9 @@ module Google
45
79
  # Property [Product.sku](https://schema.org/sku).
46
80
  # @!attribute [rw] type
47
81
  # @return [::Google::Cloud::Retail::V2::Product::Type]
48
- # Immutable. The type of the product. This field is output-only.
82
+ # Immutable. The type of the product. Default to
83
+ # {::Google::Cloud::Retail::V2::ProductLevelConfig#ingestion_product_type Catalog.product_level_config.ingestion_product_type}
84
+ # if unset.
49
85
  # @!attribute [rw] primary_product_id
50
86
  # @return [::String]
51
87
  # Variant group identifier. Must be an
@@ -69,6 +105,31 @@ module Google
69
105
  #
70
106
  # This field must be enabled before it can be used. [Learn
71
107
  # more](/recommendations-ai/docs/catalog#item-group-id).
108
+ # @!attribute [rw] collection_member_ids
109
+ # @return [::Array<::String>]
110
+ # The {::Google::Cloud::Retail::V2::Product#id id} of the collection members when
111
+ # {::Google::Cloud::Retail::V2::Product#type type} is
112
+ # {::Google::Cloud::Retail::V2::Product::Type::COLLECTION Type.COLLECTION}.
113
+ #
114
+ # Should not set it for other types. A maximum of 1000 values are allowed.
115
+ # Otherwise, an INVALID_ARGUMENT error is return.
116
+ # @!attribute [rw] gtin
117
+ # @return [::String]
118
+ # The Global Trade Item Number (GTIN) of the product.
119
+ #
120
+ # This field must be a UTF-8 encoded string with a length limit of 128
121
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
122
+ #
123
+ # Google Merchant Center property
124
+ # [gtin](https://support.google.com/merchants/answer/6324461).
125
+ # Schema.org property
126
+ # [Product.isbn](https://schema.org/isbn) or
127
+ # [Product.gtin8](https://schema.org/gtin8) or
128
+ # [Product.gtin12](https://schema.org/gtin12) or
129
+ # [Product.gtin13](https://schema.org/gtin13) or
130
+ # [Product.gtin14](https://schema.org/gtin14).
131
+ #
132
+ # If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
72
133
  # @!attribute [rw] categories
73
134
  # @return [::Array<::String>]
74
135
  # Product categories. This field is repeated for supporting one product
@@ -109,12 +170,23 @@ module Google
109
170
  # @return [::String]
110
171
  # Required. Product title.
111
172
  #
112
- # This field must be a UTF-8 encoded string with a length limit of 128
173
+ # This field must be a UTF-8 encoded string with a length limit of 1,000
113
174
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
114
175
  #
115
176
  # Google Merchant Center property
116
177
  # [title](https://support.google.com/merchants/answer/6324415). Schema.org
117
178
  # property [Product.name](https://schema.org/name).
179
+ # @!attribute [rw] brands
180
+ # @return [::Array<::String>]
181
+ # The brands of the product.
182
+ #
183
+ # A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
184
+ # string with a length limit of 1,000 characters. Otherwise, an
185
+ # INVALID_ARGUMENT error is returned.
186
+ #
187
+ # Google Merchant Center property
188
+ # [brand](https://support.google.com/merchants/answer/6324351). Schema.org
189
+ # property [Product.brand](https://schema.org/brand).
118
190
  # @!attribute [rw] description
119
191
  # @return [::String]
120
192
  # Product description.
@@ -125,6 +197,18 @@ module Google
125
197
  # Google Merchant Center property
126
198
  # [description](https://support.google.com/merchants/answer/6324468).
127
199
  # schema.org property [Product.description](https://schema.org/description).
200
+ # @!attribute [rw] language_code
201
+ # @return [::String]
202
+ # Language of the title/description and other string attributes. Use language
203
+ # tags defined by [BCP 47][https://www.rfc-editor.org/rfc/bcp/bcp47.txt].
204
+ #
205
+ # For product prediction, this field is ignored and the model automatically
206
+ # detects the text language. The {::Google::Cloud::Retail::V2::Product Product}
207
+ # can include text in different languages, but duplicating
208
+ # {::Google::Cloud::Retail::V2::Product Product}s to provide text in multiple
209
+ # languages can result in degraded model performance.
210
+ #
211
+ # For product search this field is in use. It defaults to "en-US" if unset.
128
212
  # @!attribute [rw] attributes
129
213
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
130
214
  # Highly encouraged. Extra product attributes to be included. For example,
@@ -143,11 +227,18 @@ module Google
143
227
  # "lengths_cm": \\{"numbers":[2.3, 15.4]}, "heights_cm": \\{"numbers":[8.1, 6.4]}
144
228
  # }`.
145
229
  #
146
- # A maximum of 150 attributes are allowed. Otherwise, an INVALID_ARGUMENT
147
- # error is returned.
148
- #
149
- # The key must be a UTF-8 encoded string with a length limit of 5,000
150
- # characters. Otherwise, an INVALID_ARGUMENT error is returned.
230
+ # This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
231
+ # error is returned:
232
+ #
233
+ # * Max entries count: 200 by default; 100 for
234
+ # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}.
235
+ # * The key must be a UTF-8 encoded string with a length limit of 128
236
+ # characters.
237
+ # * Max indexable entries count: 200 by default; 40 for
238
+ # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}.
239
+ # * Max searchable entries count: 30.
240
+ # * For indexable attribute, the key must match the pattern:
241
+ # [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS.
151
242
  # @!attribute [rw] tags
152
243
  # @return [::Array<::String>]
153
244
  # Custom tags associated with the product.
@@ -169,10 +260,14 @@ module Google
169
260
  #
170
261
  # Google Merchant Center property
171
262
  # [price](https://support.google.com/merchants/answer/6324371).
263
+ # @!attribute [rw] rating
264
+ # @return [::Google::Cloud::Retail::V2::Rating]
265
+ # The rating of this product.
172
266
  # @!attribute [rw] available_time
173
267
  # @return [::Google::Protobuf::Timestamp]
174
268
  # The timestamp when this {::Google::Cloud::Retail::V2::Product Product} becomes
175
- # available recommendation and search.
269
+ # available for
270
+ # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
176
271
  # @!attribute [rw] availability
177
272
  # @return [::Google::Cloud::Retail::V2::Product::Availability]
178
273
  # The online availability of the {::Google::Cloud::Retail::V2::Product Product}.
@@ -185,10 +280,21 @@ module Google
185
280
  # @!attribute [rw] available_quantity
186
281
  # @return [::Google::Protobuf::Int32Value]
187
282
  # The available quantity of the item.
283
+ # @!attribute [rw] fulfillment_info
284
+ # @return [::Array<::Google::Cloud::Retail::V2::FulfillmentInfo>]
285
+ # Fulfillment information, such as the store IDs for in-store pickup or
286
+ # region IDs for different shipping methods.
287
+ #
288
+ # All the elements must have distinct
289
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}.
290
+ # Otherwise, an INVALID_ARGUMENT error is returned.
188
291
  # @!attribute [rw] uri
189
292
  # @return [::String]
190
293
  # Canonical URL directly linking to the product detail page.
191
294
  #
295
+ # It is strongly recommended to provide a valid uri for the product,
296
+ # otherwise the service performance could be significantly degraded.
297
+ #
192
298
  # This field must be a UTF-8 encoded string with a length limit of 5,000
193
299
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
194
300
  #
@@ -197,13 +303,162 @@ module Google
197
303
  # property [Offer.url](https://schema.org/url).
198
304
  # @!attribute [rw] images
199
305
  # @return [::Array<::Google::Cloud::Retail::V2::Image>]
200
- # Product images for the product.
306
+ # Product images for the product.Highly recommended to put the main image
307
+ # to the first.
201
308
  #
202
309
  # A maximum of 300 images are allowed.
203
310
  #
204
311
  # Google Merchant Center property
205
312
  # [image_link](https://support.google.com/merchants/answer/6324350).
206
313
  # Schema.org property [Product.image](https://schema.org/image).
314
+ # @!attribute [rw] audience
315
+ # @return [::Google::Cloud::Retail::V2::Audience]
316
+ # The target group associated with a given audience (e.g. male, veterans,
317
+ # car owners, musicians, etc.) of the product.
318
+ # @!attribute [rw] color_info
319
+ # @return [::Google::Cloud::Retail::V2::ColorInfo]
320
+ # The color of the product.
321
+ #
322
+ # Google Merchant Center property
323
+ # [color](https://support.google.com/merchants/answer/6324487). Schema.org
324
+ # property [Product.color](https://schema.org/color).
325
+ # @!attribute [rw] sizes
326
+ # @return [::Array<::String>]
327
+ # The size of the product. To represent different size systems or size types,
328
+ # consider using this format: [[[size_system:]size_type:]size_value].
329
+ #
330
+ # For example, in "US:MENS:M", "US" represents size system; "MENS" represents
331
+ # size type; "M" represents size value. In "GIRLS:27", size system is empty;
332
+ # "GIRLS" represents size type; "27" represents size value. In "32 inches",
333
+ # both size system and size type are empty, while size value is "32 inches".
334
+ #
335
+ # A maximum of 20 values are allowed per
336
+ # {::Google::Cloud::Retail::V2::Product Product}. Each value must be a UTF-8
337
+ # encoded string with a length limit of 128 characters. Otherwise, an
338
+ # INVALID_ARGUMENT error is returned.
339
+ #
340
+ # Google Merchant Center property
341
+ # [size](https://support.google.com/merchants/answer/6324492),
342
+ # [size_type](https://support.google.com/merchants/answer/6324497) and
343
+ # [size_system](https://support.google.com/merchants/answer/6324502).
344
+ # Schema.org property [Product.size](https://schema.org/size).
345
+ # @!attribute [rw] materials
346
+ # @return [::Array<::String>]
347
+ # The material of the product. For example, "leather", "wooden".
348
+ #
349
+ # A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
350
+ # string with a length limit of 128 characters. Otherwise, an
351
+ # INVALID_ARGUMENT error is returned.
352
+ #
353
+ # Google Merchant Center property
354
+ # [material](https://support.google.com/merchants/answer/6324410). Schema.org
355
+ # property [Product.material](https://schema.org/material).
356
+ # @!attribute [rw] patterns
357
+ # @return [::Array<::String>]
358
+ # The pattern or graphic print of the product. For example, "striped", "polka
359
+ # dot", "paisley".
360
+ #
361
+ # A maximum of 5 values are allowed per
362
+ # {::Google::Cloud::Retail::V2::Product Product}. Each value must be a UTF-8
363
+ # encoded string with a length limit of 128 characters. Otherwise, an
364
+ # INVALID_ARGUMENT error is returned.
365
+ #
366
+ # Google Merchant Center property
367
+ # [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
368
+ # property [Product.pattern](https://schema.org/pattern).
369
+ # @!attribute [rw] conditions
370
+ # @return [::Array<::String>]
371
+ # The condition of the product. Strongly encouraged to use the standard
372
+ # values: "new", "refurbished", "used".
373
+ #
374
+ # A maximum of 5 values are allowed per
375
+ # {::Google::Cloud::Retail::V2::Product Product}. Each value must be a UTF-8
376
+ # encoded string with a length limit of 128 characters. Otherwise, an
377
+ # INVALID_ARGUMENT error is returned.
378
+ #
379
+ # Google Merchant Center property
380
+ # [condition](https://support.google.com/merchants/answer/6324469).
381
+ # Schema.org property
382
+ # [Offer.itemCondition](https://schema.org/itemCondition).
383
+ # @!attribute [rw] promotions
384
+ # @return [::Array<::Google::Cloud::Retail::V2::Promotion>]
385
+ # The promotions applied to the product. A maximum of 10 values are allowed
386
+ # per {::Google::Cloud::Retail::V2::Product Product}.
387
+ # @!attribute [rw] publish_time
388
+ # @return [::Google::Protobuf::Timestamp]
389
+ # The timestamp when the product is published by the retailer for the first
390
+ # time, which indicates the freshness of the products. Note that this field
391
+ # is different from
392
+ # {::Google::Cloud::Retail::V2::Product#available_time available_time}, given it
393
+ # purely describes product freshness regardless of when it is available on
394
+ # search and recommendation.
395
+ # @!attribute [rw] retrievable_fields
396
+ # @return [::Google::Protobuf::FieldMask]
397
+ # Indicates which fields in the {::Google::Cloud::Retail::V2::Product Product}s
398
+ # are returned in {::Google::Cloud::Retail::V2::SearchResponse SearchResponse}.
399
+ #
400
+ # Supported fields for all {::Google::Cloud::Retail::V2::Product#type type}s:
401
+ #
402
+ # * {::Google::Cloud::Retail::V2::Product#audience audience}
403
+ # * {::Google::Cloud::Retail::V2::Product#availability availability}
404
+ # * {::Google::Cloud::Retail::V2::Product#brands brands}
405
+ # * {::Google::Cloud::Retail::V2::Product#color_info color_info}
406
+ # * {::Google::Cloud::Retail::V2::Product#conditions conditions}
407
+ # * {::Google::Cloud::Retail::V2::Product#gtin gtin}
408
+ # * {::Google::Cloud::Retail::V2::Product#materials materials}
409
+ # * {::Google::Cloud::Retail::V2::Product#name name}
410
+ # * {::Google::Cloud::Retail::V2::Product#patterns patterns}
411
+ # * {::Google::Cloud::Retail::V2::Product#price_info price_info}
412
+ # * {::Google::Cloud::Retail::V2::Product#rating rating}
413
+ # * {::Google::Cloud::Retail::V2::Product#sizes sizes}
414
+ # * {::Google::Cloud::Retail::V2::Product#title title}
415
+ # * {::Google::Cloud::Retail::V2::Product#uri uri}
416
+ #
417
+ # Supported fields only for
418
+ # {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY} and
419
+ # {::Google::Cloud::Retail::V2::Product::Type::COLLECTION Type.COLLECTION}:
420
+ #
421
+ # * {::Google::Cloud::Retail::V2::Product#categories categories}
422
+ # * {::Google::Cloud::Retail::V2::Product#description description}
423
+ # * {::Google::Cloud::Retail::V2::Product#images images}
424
+ #
425
+ # Supported fields only for
426
+ # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}:
427
+ #
428
+ # * Only the first image in {::Google::Cloud::Retail::V2::Product#images images}
429
+ #
430
+ # To mark {::Google::Cloud::Retail::V2::Product#attributes attributes} as
431
+ # retrievable, include paths of the form "attributes.key" where "key" is the
432
+ # key of a custom attribute, as specified in
433
+ # {::Google::Cloud::Retail::V2::Product#attributes attributes}.
434
+ #
435
+ # For {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY} and
436
+ # {::Google::Cloud::Retail::V2::Product::Type::COLLECTION Type.COLLECTION}, the
437
+ # following fields are always returned in
438
+ # {::Google::Cloud::Retail::V2::SearchResponse SearchResponse} by default:
439
+ #
440
+ # * {::Google::Cloud::Retail::V2::Product#name name}
441
+ #
442
+ # For {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}, the
443
+ # following fields are always returned in by default:
444
+ #
445
+ # * {::Google::Cloud::Retail::V2::Product#name name}
446
+ # * {::Google::Cloud::Retail::V2::Product#color_info color_info}
447
+ #
448
+ # Maximum number of paths is 20. Otherwise, an INVALID_ARGUMENT error is
449
+ # returned.
450
+ # @!attribute [r] variants
451
+ # @return [::Array<::Google::Cloud::Retail::V2::Product>]
452
+ # Output only. Product variants grouped together on primary product which
453
+ # share similar product attributes. It's automatically grouped by
454
+ # {::Google::Cloud::Retail::V2::Product#primary_product_id primary_product_id} for
455
+ # all the product variants. Only populated for
456
+ # {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY}
457
+ # {::Google::Cloud::Retail::V2::Product Product}s.
458
+ #
459
+ # Note: This field is OUTPUT_ONLY for
460
+ # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}.
461
+ # Do not set this field in API requests.
207
462
  class Product
208
463
  include ::Google::Protobuf::MessageExts
209
464
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -220,7 +475,8 @@ module Google
220
475
  # The type of this product.
221
476
  module Type
222
477
  # Default value. Default to
223
- # {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY} if unset.
478
+ # {::Google::Cloud::Retail::V2::ProductLevelConfig#ingestion_product_type Catalog.product_level_config.ingestion_product_type}
479
+ # if unset.
224
480
  TYPE_UNSPECIFIED = 0
225
481
 
226
482
  # The primary type.