google-cloud-retail-v2 0.6.4 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/retail/v2/catalog_pb.rb +0 -3
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +9 -9
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +0 -8
- data/lib/google/cloud/retail/v2/common_pb.rb +6 -4
- data/lib/google/cloud/retail/v2/completion_service/client.rb +17 -18
- data/lib/google/cloud/retail/v2/completion_service.rb +1 -2
- data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
- data/lib/google/cloud/retail/v2/import_config_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +6 -3
- data/lib/google/cloud/retail/v2/product_pb.rb +1 -1
- data/lib/google/cloud/retail/v2/product_service/client.rb +319 -18
- data/lib/google/cloud/retail/v2/product_service_pb.rb +27 -1
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +45 -7
- data/lib/google/cloud/retail/v2/promotion_pb.rb +22 -0
- data/lib/google/cloud/retail/v2/purge_config_pb.rb +1 -1
- data/lib/google/cloud/retail/v2/search_service/client.rb +25 -15
- data/lib/google/cloud/retail/v2/search_service.rb +1 -2
- data/lib/google/cloud/retail/v2/search_service_pb.rb +14 -2
- data/lib/google/cloud/retail/v2/search_service_services_pb.rb +2 -4
- data/lib/google/cloud/retail/v2/user_event_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +4 -3
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +4 -3
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/lib/google/cloud/retail/v2.rb +2 -0
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +9 -0
- data/proto_docs/google/cloud/retail/v2/common.rb +88 -25
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +18 -15
- data/proto_docs/google/cloud/retail/v2/import_config.rb +29 -21
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +6 -3
- data/proto_docs/google/cloud/retail/v2/product.rb +48 -39
- data/proto_docs/google/cloud/retail/v2/product_service.rb +134 -2
- data/proto_docs/google/cloud/retail/v2/promotion.rb +43 -0
- data/proto_docs/google/cloud/retail/v2/search_service.rb +64 -10
- data/proto_docs/google/cloud/retail/v2/user_event.rb +25 -12
- metadata +5 -3
@@ -73,9 +73,12 @@ module Google
|
|
73
73
|
# * filterOutOfStockItems tag=(-"promotional")
|
74
74
|
# * filterOutOfStockItems
|
75
75
|
#
|
76
|
-
# If your filter blocks all prediction results,
|
77
|
-
#
|
78
|
-
# `strictFiltering` to
|
76
|
+
# If your filter blocks all prediction results, the API will return generic
|
77
|
+
# (unfiltered) popular products. If you only want results strictly matching
|
78
|
+
# the filters, set `strictFiltering` to True in `PredictRequest.params` to
|
79
|
+
# receive empty results instead.
|
80
|
+
# Note that the API will never return items with storageStatus of "EXPIRED"
|
81
|
+
# or "DELETED" regardless of filter choices.
|
79
82
|
# @!attribute [rw] validate_only
|
80
83
|
# @return [::Boolean]
|
81
84
|
# Use validate only mode for this prediction query. If set to true, a
|
@@ -42,7 +42,7 @@ module Google
|
|
42
42
|
# {::Google::Cloud::Retail::V2::Product#publish_time publish_time}, otherwise an
|
43
43
|
# INVALID_ARGUMENT error is thrown.
|
44
44
|
#
|
45
|
-
# Google Merchant Center property
|
45
|
+
# Corresponding properties: Google Merchant Center property
|
46
46
|
# [expiration_date](https://support.google.com/merchants/answer/6324499).
|
47
47
|
# @!attribute [rw] ttl
|
48
48
|
# @return [::Google::Protobuf::Duration]
|
@@ -77,9 +77,9 @@ module Google
|
|
77
77
|
# This field must be a UTF-8 encoded string with a length limit of 128
|
78
78
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
79
79
|
#
|
80
|
-
# Google Merchant Center property
|
80
|
+
# Corresponding properties: Google Merchant Center property
|
81
81
|
# [id](https://support.google.com/merchants/answer/6324405). Schema.org
|
82
|
-
#
|
82
|
+
# property [Product.sku](https://schema.org/sku).
|
83
83
|
# @!attribute [rw] type
|
84
84
|
# @return [::Google::Cloud::Retail::V2::Product::Type]
|
85
85
|
# Immutable. The type of the product. Default to
|
@@ -101,21 +101,23 @@ module Google
|
|
101
101
|
# {::Google::Cloud::Retail::V2::Product Product}. Otherwise, an INVALID_ARGUMENT
|
102
102
|
# error is returned.
|
103
103
|
#
|
104
|
-
# Google Merchant Center
|
104
|
+
# Corresponding properties: Google Merchant Center property
|
105
105
|
# [item_group_id](https://support.google.com/merchants/answer/6324507).
|
106
|
-
# Schema.org
|
106
|
+
# Schema.org property
|
107
107
|
# [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
|
108
|
-
#
|
109
|
-
# This field must be enabled before it can be used. [Learn
|
110
|
-
# more](/recommendations-ai/docs/catalog#item-group-id).
|
111
108
|
# @!attribute [rw] collection_member_ids
|
112
109
|
# @return [::Array<::String>]
|
113
110
|
# The {::Google::Cloud::Retail::V2::Product#id id} of the collection members when
|
114
111
|
# {::Google::Cloud::Retail::V2::Product#type type} is
|
115
112
|
# {::Google::Cloud::Retail::V2::Product::Type::COLLECTION Type.COLLECTION}.
|
116
113
|
#
|
117
|
-
#
|
118
|
-
#
|
114
|
+
# Non-existent product ids are allowed.
|
115
|
+
# The {::Google::Cloud::Retail::V2::Product#type type} of the members must be
|
116
|
+
# either {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY} or
|
117
|
+
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT} otherwise and
|
118
|
+
# INVALID_ARGUMENT error is thrown. Should not set it for other types. A
|
119
|
+
# maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
|
120
|
+
# return.
|
119
121
|
# @!attribute [rw] gtin
|
120
122
|
# @return [::String]
|
121
123
|
# The Global Trade Item Number (GTIN) of the product.
|
@@ -126,13 +128,13 @@ module Google
|
|
126
128
|
# This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is
|
127
129
|
# returned.
|
128
130
|
#
|
129
|
-
# Google Merchant Center property
|
131
|
+
# Corresponding properties: Google Merchant Center property
|
130
132
|
# [gtin](https://support.google.com/merchants/answer/6324461).
|
131
133
|
# Schema.org property
|
132
|
-
# [Product.isbn](https://schema.org/isbn)
|
133
|
-
# [Product.gtin8](https://schema.org/gtin8)
|
134
|
-
# [Product.gtin12](https://schema.org/gtin12)
|
135
|
-
# [Product.gtin13](https://schema.org/gtin13) or
|
134
|
+
# [Product.isbn](https://schema.org/isbn),
|
135
|
+
# [Product.gtin8](https://schema.org/gtin8),
|
136
|
+
# [Product.gtin12](https://schema.org/gtin12),
|
137
|
+
# [Product.gtin13](https://schema.org/gtin13), or
|
136
138
|
# [Product.gtin14](https://schema.org/gtin14).
|
137
139
|
#
|
138
140
|
# If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
|
@@ -166,7 +168,7 @@ module Google
|
|
166
168
|
# Each value must be a UTF-8 encoded string with a length limit of 5,000
|
167
169
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
168
170
|
#
|
169
|
-
# Google Merchant Center property
|
171
|
+
# Corresponding properties: Google Merchant Center property
|
170
172
|
# [google_product_category][mc_google_product_category]. Schema.org property
|
171
173
|
# [Product.category] (https://schema.org/category).
|
172
174
|
#
|
@@ -179,7 +181,7 @@ module Google
|
|
179
181
|
# This field must be a UTF-8 encoded string with a length limit of 1,000
|
180
182
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
181
183
|
#
|
182
|
-
# Google Merchant Center property
|
184
|
+
# Corresponding properties: Google Merchant Center property
|
183
185
|
# [title](https://support.google.com/merchants/answer/6324415). Schema.org
|
184
186
|
# property [Product.name](https://schema.org/name).
|
185
187
|
# @!attribute [rw] brands
|
@@ -190,7 +192,7 @@ module Google
|
|
190
192
|
# string with a length limit of 1,000 characters. Otherwise, an
|
191
193
|
# INVALID_ARGUMENT error is returned.
|
192
194
|
#
|
193
|
-
# Google Merchant Center property
|
195
|
+
# Corresponding properties: Google Merchant Center property
|
194
196
|
# [brand](https://support.google.com/merchants/answer/6324351). Schema.org
|
195
197
|
# property [Product.brand](https://schema.org/brand).
|
196
198
|
# @!attribute [rw] description
|
@@ -200,13 +202,13 @@ module Google
|
|
200
202
|
# This field must be a UTF-8 encoded string with a length limit of 5,000
|
201
203
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
202
204
|
#
|
203
|
-
# Google Merchant Center property
|
205
|
+
# Corresponding properties: Google Merchant Center property
|
204
206
|
# [description](https://support.google.com/merchants/answer/6324468).
|
205
|
-
#
|
207
|
+
# Schema.org property [Product.description](https://schema.org/description).
|
206
208
|
# @!attribute [rw] language_code
|
207
209
|
# @return [::String]
|
208
210
|
# Language of the title/description and other string attributes. Use language
|
209
|
-
# tags defined by [BCP 47]
|
211
|
+
# tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
|
210
212
|
#
|
211
213
|
# For product prediction, this field is ignored and the model automatically
|
212
214
|
# detects the text language. The {::Google::Cloud::Retail::V2::Product Product}
|
@@ -240,7 +242,12 @@ module Google
|
|
240
242
|
# * The key must be a UTF-8 encoded string with a length limit of 128
|
241
243
|
# characters.
|
242
244
|
# * For indexable attribute, the key must match the pattern:
|
243
|
-
# `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, key0LikeThis or
|
245
|
+
# `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or
|
246
|
+
# `KEY_1_LIKE_THIS`.
|
247
|
+
# * For text attributes, at most 400 values are allowed. Empty values are not
|
248
|
+
# allowed. Each value must be a non-empty UTF-8 encoded string with a
|
249
|
+
# length limit of 256 characters.
|
250
|
+
# * For number attributes, at most 400 values are allowed.
|
244
251
|
# @!attribute [rw] tags
|
245
252
|
# @return [::Array<::String>]
|
246
253
|
# Custom tags associated with the product.
|
@@ -254,13 +261,13 @@ module Google
|
|
254
261
|
# tag as part of the
|
255
262
|
# {::Google::Cloud::Retail::V2::PredictRequest#filter PredictRequest.filter}.
|
256
263
|
#
|
257
|
-
# Google Merchant Center property
|
264
|
+
# Corresponding properties: Google Merchant Center property
|
258
265
|
# [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
|
259
266
|
# @!attribute [rw] price_info
|
260
267
|
# @return [::Google::Cloud::Retail::V2::PriceInfo]
|
261
268
|
# Product price and cost information.
|
262
269
|
#
|
263
|
-
# Google Merchant Center property
|
270
|
+
# Corresponding properties: Google Merchant Center property
|
264
271
|
# [price](https://support.google.com/merchants/answer/6324371).
|
265
272
|
# @!attribute [rw] rating
|
266
273
|
# @return [::Google::Cloud::Retail::V2::Rating]
|
@@ -276,9 +283,9 @@ module Google
|
|
276
283
|
# Default to
|
277
284
|
# {::Google::Cloud::Retail::V2::Product::Availability::IN_STOCK Availability.IN_STOCK}.
|
278
285
|
#
|
279
|
-
# Google Merchant Center
|
286
|
+
# Corresponding properties: Google Merchant Center property
|
280
287
|
# [availability](https://support.google.com/merchants/answer/6324448).
|
281
|
-
# Schema.org
|
288
|
+
# Schema.org property [Offer.availability](https://schema.org/availability).
|
282
289
|
# @!attribute [rw] available_quantity
|
283
290
|
# @return [::Google::Protobuf::Int32Value]
|
284
291
|
# The available quantity of the item.
|
@@ -300,17 +307,17 @@ module Google
|
|
300
307
|
# This field must be a UTF-8 encoded string with a length limit of 5,000
|
301
308
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
302
309
|
#
|
303
|
-
# Google Merchant Center property
|
310
|
+
# Corresponding properties: Google Merchant Center property
|
304
311
|
# [link](https://support.google.com/merchants/answer/6324416). Schema.org
|
305
312
|
# property [Offer.url](https://schema.org/url).
|
306
313
|
# @!attribute [rw] images
|
307
314
|
# @return [::Array<::Google::Cloud::Retail::V2::Image>]
|
308
|
-
# Product images for the product.
|
309
|
-
#
|
315
|
+
# Product images for the product. We highly recommend putting the main
|
316
|
+
# image first.
|
310
317
|
#
|
311
318
|
# A maximum of 300 images are allowed.
|
312
319
|
#
|
313
|
-
# Google Merchant Center property
|
320
|
+
# Corresponding properties: Google Merchant Center property
|
314
321
|
# [image_link](https://support.google.com/merchants/answer/6324350).
|
315
322
|
# Schema.org property [Product.image](https://schema.org/image).
|
316
323
|
# @!attribute [rw] audience
|
@@ -321,7 +328,7 @@ module Google
|
|
321
328
|
# @return [::Google::Cloud::Retail::V2::ColorInfo]
|
322
329
|
# The color of the product.
|
323
330
|
#
|
324
|
-
# Google Merchant Center property
|
331
|
+
# Corresponding properties: Google Merchant Center property
|
325
332
|
# [color](https://support.google.com/merchants/answer/6324487). Schema.org
|
326
333
|
# property [Product.color](https://schema.org/color).
|
327
334
|
# @!attribute [rw] sizes
|
@@ -339,9 +346,9 @@ module Google
|
|
339
346
|
# encoded string with a length limit of 128 characters. Otherwise, an
|
340
347
|
# INVALID_ARGUMENT error is returned.
|
341
348
|
#
|
342
|
-
# Google Merchant Center property
|
349
|
+
# Corresponding properties: Google Merchant Center property
|
343
350
|
# [size](https://support.google.com/merchants/answer/6324492),
|
344
|
-
# [size_type](https://support.google.com/merchants/answer/6324497) and
|
351
|
+
# [size_type](https://support.google.com/merchants/answer/6324497), and
|
345
352
|
# [size_system](https://support.google.com/merchants/answer/6324502).
|
346
353
|
# Schema.org property [Product.size](https://schema.org/size).
|
347
354
|
# @!attribute [rw] materials
|
@@ -349,10 +356,10 @@ module Google
|
|
349
356
|
# The material of the product. For example, "leather", "wooden".
|
350
357
|
#
|
351
358
|
# A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
|
352
|
-
# string with a length limit of
|
359
|
+
# string with a length limit of 200 characters. Otherwise, an
|
353
360
|
# INVALID_ARGUMENT error is returned.
|
354
361
|
#
|
355
|
-
# Google Merchant Center property
|
362
|
+
# Corresponding properties: Google Merchant Center property
|
356
363
|
# [material](https://support.google.com/merchants/answer/6324410). Schema.org
|
357
364
|
# property [Product.material](https://schema.org/material).
|
358
365
|
# @!attribute [rw] patterns
|
@@ -365,7 +372,7 @@ module Google
|
|
365
372
|
# encoded string with a length limit of 128 characters. Otherwise, an
|
366
373
|
# INVALID_ARGUMENT error is returned.
|
367
374
|
#
|
368
|
-
# Google Merchant Center property
|
375
|
+
# Corresponding properties: Google Merchant Center property
|
369
376
|
# [pattern](https://support.google.com/merchants/answer/6324483). Schema.org
|
370
377
|
# property [Product.pattern](https://schema.org/pattern).
|
371
378
|
# @!attribute [rw] conditions
|
@@ -373,19 +380,21 @@ module Google
|
|
373
380
|
# The condition of the product. Strongly encouraged to use the standard
|
374
381
|
# values: "new", "refurbished", "used".
|
375
382
|
#
|
376
|
-
# A maximum of
|
383
|
+
# A maximum of 1 value is allowed per
|
377
384
|
# {::Google::Cloud::Retail::V2::Product Product}. Each value must be a UTF-8
|
378
385
|
# encoded string with a length limit of 128 characters. Otherwise, an
|
379
386
|
# INVALID_ARGUMENT error is returned.
|
380
387
|
#
|
381
|
-
# Google Merchant Center property
|
388
|
+
# Corresponding properties: Google Merchant Center property
|
382
389
|
# [condition](https://support.google.com/merchants/answer/6324469).
|
383
390
|
# Schema.org property
|
384
391
|
# [Offer.itemCondition](https://schema.org/itemCondition).
|
385
392
|
# @!attribute [rw] promotions
|
386
393
|
# @return [::Array<::Google::Cloud::Retail::V2::Promotion>]
|
387
394
|
# The promotions applied to the product. A maximum of 10 values are allowed
|
388
|
-
# per {::Google::Cloud::Retail::V2::Product Product}.
|
395
|
+
# per {::Google::Cloud::Retail::V2::Product Product}. Only
|
396
|
+
# {::Google::Cloud::Retail::V2::Promotion#promotion_id Promotion.promotion_id}
|
397
|
+
# will be used, other fields will be ignored if set.
|
389
398
|
# @!attribute [rw] publish_time
|
390
399
|
# @return [::Google::Protobuf::Timestamp]
|
391
400
|
# The timestamp when the product is published by the retailer for the first
|
@@ -263,6 +263,24 @@ module Google
|
|
263
263
|
# provided or default value for
|
264
264
|
# {::Google::Cloud::Retail::V2::SetInventoryRequest#set_time SetInventoryRequest.set_time}.
|
265
265
|
#
|
266
|
+
# The caller can replace place IDs for a subset of fulfillment types in the
|
267
|
+
# following ways:
|
268
|
+
#
|
269
|
+
# * Adds "fulfillment_info" in
|
270
|
+
# {::Google::Cloud::Retail::V2::SetInventoryRequest#set_mask SetInventoryRequest.set_mask}
|
271
|
+
# * Specifies only the desired fulfillment types and corresponding place IDs
|
272
|
+
# to update in [SetInventoryRequest.inventory.fulfillment_info][]
|
273
|
+
#
|
274
|
+
# The caller can clear all place IDs from a subset of fulfillment types in
|
275
|
+
# the following ways:
|
276
|
+
#
|
277
|
+
# * Adds "fulfillment_info" in
|
278
|
+
# {::Google::Cloud::Retail::V2::SetInventoryRequest#set_mask SetInventoryRequest.set_mask}
|
279
|
+
# * Specifies only the desired fulfillment types to clear in
|
280
|
+
# [SetInventoryRequest.inventory.fulfillment_info][]
|
281
|
+
# * Checks that only the desired fulfillment info types have empty
|
282
|
+
# [SetInventoryRequest.inventory.fulfillment_info.place_ids][]
|
283
|
+
#
|
266
284
|
# The last update time is recorded for the following inventory fields:
|
267
285
|
# * {::Google::Cloud::Retail::V2::Product#price_info Product.price_info}
|
268
286
|
# * {::Google::Cloud::Retail::V2::Product#availability Product.availability}
|
@@ -274,8 +292,9 @@ module Google
|
|
274
292
|
# @!attribute [rw] set_mask
|
275
293
|
# @return [::Google::Protobuf::FieldMask]
|
276
294
|
# Indicates which inventory fields in the provided
|
277
|
-
# {::Google::Cloud::Retail::V2::Product Product} to update.
|
278
|
-
#
|
295
|
+
# {::Google::Cloud::Retail::V2::Product Product} to update.
|
296
|
+
#
|
297
|
+
# At least one field must be provided.
|
279
298
|
#
|
280
299
|
# If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
|
281
300
|
# is returned and the entire update will be ignored.
|
@@ -395,6 +414,119 @@ module Google
|
|
395
414
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
396
415
|
end
|
397
416
|
|
417
|
+
# Request message for [AddLocalInventories][] method.
|
418
|
+
# @!attribute [rw] product
|
419
|
+
# @return [::String]
|
420
|
+
# Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
|
421
|
+
# such as
|
422
|
+
# `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
|
423
|
+
#
|
424
|
+
# If the caller does not have permission to access the
|
425
|
+
# {::Google::Cloud::Retail::V2::Product Product}, regardless of whether or not it
|
426
|
+
# exists, a PERMISSION_DENIED error is returned.
|
427
|
+
# @!attribute [rw] local_inventories
|
428
|
+
# @return [::Array<::Google::Cloud::Retail::V2::LocalInventory>]
|
429
|
+
# Required. A list of inventory information at difference places. Each place
|
430
|
+
# is identified by its place ID. At most 3000 inventories are allowed per
|
431
|
+
# request.
|
432
|
+
# @!attribute [rw] add_mask
|
433
|
+
# @return [::Google::Protobuf::FieldMask]
|
434
|
+
# Indicates which inventory fields in the provided list of
|
435
|
+
# {::Google::Cloud::Retail::V2::LocalInventory LocalInventory} to update. The
|
436
|
+
# field is updated to the provided value.
|
437
|
+
#
|
438
|
+
# If a field is set while the place does not have a previous local inventory,
|
439
|
+
# the local inventory at that store is created.
|
440
|
+
#
|
441
|
+
# If a field is set while the value of that field is not provided, the
|
442
|
+
# original field value, if it exists, is deleted.
|
443
|
+
#
|
444
|
+
# If the mask is not set or set with empty paths, all inventory fields will
|
445
|
+
# be updated.
|
446
|
+
#
|
447
|
+
# If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
|
448
|
+
# is returned and the entire update will be ignored.
|
449
|
+
# @!attribute [rw] add_time
|
450
|
+
# @return [::Google::Protobuf::Timestamp]
|
451
|
+
# The time when the inventory updates are issued. Used to prevent
|
452
|
+
# out-of-order updates on local inventory fields. If not provided, the
|
453
|
+
# internal system time will be used.
|
454
|
+
# @!attribute [rw] allow_missing
|
455
|
+
# @return [::Boolean]
|
456
|
+
# If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
|
457
|
+
# found, the local inventory will still be processed and retained for at most
|
458
|
+
# 1 day and processed once the {::Google::Cloud::Retail::V2::Product Product} is
|
459
|
+
# created. If set to false, a NOT_FOUND error is returned if the
|
460
|
+
# {::Google::Cloud::Retail::V2::Product Product} is not found.
|
461
|
+
class AddLocalInventoriesRequest
|
462
|
+
include ::Google::Protobuf::MessageExts
|
463
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
464
|
+
end
|
465
|
+
|
466
|
+
# Metadata related to the progress of the AddLocalInventories operation.
|
467
|
+
# Currently empty because there is no meaningful metadata populated from the
|
468
|
+
# [AddLocalInventories][] method.
|
469
|
+
class AddLocalInventoriesMetadata
|
470
|
+
include ::Google::Protobuf::MessageExts
|
471
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
472
|
+
end
|
473
|
+
|
474
|
+
# Response of the [AddLocalInventories][] API. Currently empty because
|
475
|
+
# there is no meaningful response populated from the [AddLocalInventories][]
|
476
|
+
# method.
|
477
|
+
class AddLocalInventoriesResponse
|
478
|
+
include ::Google::Protobuf::MessageExts
|
479
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
480
|
+
end
|
481
|
+
|
482
|
+
# Request message for [RemoveLocalInventories][] method.
|
483
|
+
# @!attribute [rw] product
|
484
|
+
# @return [::String]
|
485
|
+
# Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
|
486
|
+
# such as
|
487
|
+
# `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
|
488
|
+
#
|
489
|
+
# If the caller does not have permission to access the
|
490
|
+
# {::Google::Cloud::Retail::V2::Product Product}, regardless of whether or not it
|
491
|
+
# exists, a PERMISSION_DENIED error is returned.
|
492
|
+
# @!attribute [rw] place_ids
|
493
|
+
# @return [::Array<::String>]
|
494
|
+
# Required. A list of place IDs to have their inventory deleted.
|
495
|
+
# At most 3000 place IDs are allowed per request.
|
496
|
+
# @!attribute [rw] remove_time
|
497
|
+
# @return [::Google::Protobuf::Timestamp]
|
498
|
+
# The time when the inventory deletions are issued. Used to prevent
|
499
|
+
# out-of-order updates and deletions on local inventory fields. If not
|
500
|
+
# provided, the internal system time will be used.
|
501
|
+
# @!attribute [rw] allow_missing
|
502
|
+
# @return [::Boolean]
|
503
|
+
# If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
|
504
|
+
# found, the local inventory removal request will still be processed and
|
505
|
+
# retained for at most 1 day and processed once the
|
506
|
+
# {::Google::Cloud::Retail::V2::Product Product} is created. If set to false, a
|
507
|
+
# NOT_FOUND error is returned if the
|
508
|
+
# {::Google::Cloud::Retail::V2::Product Product} is not found.
|
509
|
+
class RemoveLocalInventoriesRequest
|
510
|
+
include ::Google::Protobuf::MessageExts
|
511
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
512
|
+
end
|
513
|
+
|
514
|
+
# Metadata related to the progress of the RemoveLocalInventories operation.
|
515
|
+
# Currently empty because there is no meaningful metadata populated from the
|
516
|
+
# [RemoveLocalInventories][] method.
|
517
|
+
class RemoveLocalInventoriesMetadata
|
518
|
+
include ::Google::Protobuf::MessageExts
|
519
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
520
|
+
end
|
521
|
+
|
522
|
+
# Response of the [RemoveLocalInventories][] API. Currently empty because
|
523
|
+
# there is no meaningful response populated from the [RemoveLocalInventories][]
|
524
|
+
# method.
|
525
|
+
class RemoveLocalInventoriesResponse
|
526
|
+
include ::Google::Protobuf::MessageExts
|
527
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
528
|
+
end
|
529
|
+
|
398
530
|
# Request message for [RemoveFulfillmentPlaces][] method.
|
399
531
|
# @!attribute [rw] product
|
400
532
|
# @return [::String]
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Retail
|
23
|
+
module V2
|
24
|
+
# Promotion information.
|
25
|
+
# @!attribute [rw] promotion_id
|
26
|
+
# @return [::String]
|
27
|
+
# ID of the promotion. For example, "free gift".
|
28
|
+
#
|
29
|
+
# The value must be a UTF-8 encoded string with a length limit of 128
|
30
|
+
# characters, and match the pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example,
|
31
|
+
# id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
|
32
|
+
# returned.
|
33
|
+
#
|
34
|
+
# Google Merchant Center property
|
35
|
+
# [promotion](https://support.google.com/merchants/answer/7050148).
|
36
|
+
class Promotion
|
37
|
+
include ::Google::Protobuf::MessageExts
|
38
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# @!attribute [rw] placement
|
27
27
|
# @return [::String]
|
28
28
|
# Required. The resource name of the search engine placement, such as
|
29
|
-
# `projects/*/locations/global/catalogs/default_catalog/placements/default_search
|
29
|
+
# `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
|
30
30
|
# This field is used to identify the serving configuration name and the set
|
31
31
|
# of models that will be used to make the search.
|
32
32
|
# @!attribute [rw] branch
|
@@ -46,6 +46,9 @@ module Google
|
|
46
46
|
# identify a visitor on a single device. This unique identifier should not
|
47
47
|
# change if the visitor logs in or out of the website.
|
48
48
|
#
|
49
|
+
# This should be the same identifier as
|
50
|
+
# {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id}.
|
51
|
+
#
|
49
52
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
50
53
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
51
54
|
# @!attribute [rw] user_info
|
@@ -89,6 +92,9 @@ module Google
|
|
89
92
|
# If this field is unrecognizable, an INVALID_ARGUMENT is returned.
|
90
93
|
# @!attribute [rw] canonical_filter
|
91
94
|
# @return [::String]
|
95
|
+
# The default filter that is applied when a user performs a search without
|
96
|
+
# checking any filters on the search page.
|
97
|
+
#
|
92
98
|
# The filter applied to every search request when quality improvement such as
|
93
99
|
# query expansion is needed. For example, if a query does not have enough
|
94
100
|
# results, an expanded query with
|
@@ -115,11 +121,11 @@ module Google
|
|
115
121
|
# is returned.
|
116
122
|
# @!attribute [rw] dynamic_facet_spec
|
117
123
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec]
|
124
|
+
# Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic
|
125
|
+
# to enable dynamic facets. Do not set this field.
|
126
|
+
#
|
118
127
|
# The specification for dynamically generated facets. Notice that only
|
119
128
|
# textual facets can be dynamically generated.
|
120
|
-
#
|
121
|
-
# This feature requires additional allowlisting. Contact Retail Search
|
122
|
-
# support team if you are interested in using dynamic facet feature.
|
123
129
|
# @!attribute [rw] boost_spec
|
124
130
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::BoostSpec]
|
125
131
|
# Boost specification to boost certain products. See more details at this
|
@@ -139,12 +145,15 @@ module Google
|
|
139
145
|
# @return [::Array<::String>]
|
140
146
|
# The keys to fetch and rollup the matching
|
141
147
|
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
|
142
|
-
# {::Google::Cloud::Retail::V2::Product Product}s attributes
|
143
|
-
#
|
144
|
-
# {::Google::Cloud::Retail::V2::
|
145
|
-
#
|
146
|
-
# {::Google::Cloud::Retail::V2::Product
|
147
|
-
#
|
148
|
+
# {::Google::Cloud::Retail::V2::Product Product}s attributes,
|
149
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo} or
|
150
|
+
# {::Google::Cloud::Retail::V2::LocalInventory LocalInventory}s attributes. The
|
151
|
+
# attributes from all the matching
|
152
|
+
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
|
153
|
+
# {::Google::Cloud::Retail::V2::Product Product}s or
|
154
|
+
# {::Google::Cloud::Retail::V2::LocalInventory LocalInventory}s are merged and
|
155
|
+
# de-duplicated. Notice that rollup attributes will lead to extra query
|
156
|
+
# latency. Maximum number of keys is 30.
|
148
157
|
#
|
149
158
|
# For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, a
|
150
159
|
# fulfillment type and a fulfillment ID must be provided in the format of
|
@@ -159,6 +168,7 @@ module Google
|
|
159
168
|
# * discount
|
160
169
|
# * variantId
|
161
170
|
# * inventory(place_id,price)
|
171
|
+
# * inventory(place_id,original_price)
|
162
172
|
# * inventory(place_id,attributes.key), where key is any key in the
|
163
173
|
# [Product.inventories.attributes][] map.
|
164
174
|
# * attributes.key, where key is any key in the
|
@@ -220,6 +230,9 @@ module Google
|
|
220
230
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::SearchMode]
|
221
231
|
# The search mode of the search request. If not specified, a single search
|
222
232
|
# request triggers both product search and faceted search.
|
233
|
+
# @!attribute [rw] personalization_spec
|
234
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec]
|
235
|
+
# The specification for personalization.
|
223
236
|
class SearchRequest
|
224
237
|
include ::Google::Protobuf::MessageExts
|
225
238
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -331,6 +344,7 @@ module Google
|
|
331
344
|
# * "ratingCount"
|
332
345
|
# * "attributes.key"
|
333
346
|
# * "inventory(place_id,price)"
|
347
|
+
# * "inventory(place_id,original_price)"
|
334
348
|
# * "inventory(place_id,attributes.key)"
|
335
349
|
# @!attribute [rw] intervals
|
336
350
|
# @return [::Array<::Google::Cloud::Retail::V2::Interval>]
|
@@ -457,6 +471,14 @@ module Google
|
|
457
471
|
# in the specifictions, boost scores from these specifications are all
|
458
472
|
# applied and combined in a non-linear way. Maximum number of
|
459
473
|
# specifications is 10.
|
474
|
+
# @!attribute [rw] skip_boost_spec_validation
|
475
|
+
# @return [::Boolean]
|
476
|
+
# Whether to skip boostspec validation. If this field is set to true,
|
477
|
+
# invalid
|
478
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::BoostSpec#condition_boost_specs BoostSpec.condition_boost_specs}
|
479
|
+
# will be ignored and valid
|
480
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::BoostSpec#condition_boost_specs BoostSpec.condition_boost_specs}
|
481
|
+
# will still be applied.
|
460
482
|
class BoostSpec
|
461
483
|
include ::Google::Protobuf::MessageExts
|
462
484
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -532,6 +554,29 @@ module Google
|
|
532
554
|
end
|
533
555
|
end
|
534
556
|
|
557
|
+
# The specification for personalization.
|
558
|
+
# @!attribute [rw] mode
|
559
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode]
|
560
|
+
# Defaults to
|
561
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO Mode.AUTO}.
|
562
|
+
class PersonalizationSpec
|
563
|
+
include ::Google::Protobuf::MessageExts
|
564
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
565
|
+
|
566
|
+
# The personalization mode of each search request.
|
567
|
+
module Mode
|
568
|
+
# Default value. Defaults to
|
569
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO Mode.AUTO}.
|
570
|
+
MODE_UNSPECIFIED = 0
|
571
|
+
|
572
|
+
# Let CRS decide whether to use personalization.
|
573
|
+
AUTO = 1
|
574
|
+
|
575
|
+
# Disable personalization.
|
576
|
+
DISABLED = 2
|
577
|
+
end
|
578
|
+
end
|
579
|
+
|
535
580
|
# The search mode of each search request.
|
536
581
|
module SearchMode
|
537
582
|
# Default value. In this case both product search and faceted search will
|
@@ -601,6 +646,15 @@ module Google
|
|
601
646
|
# {::Google::Cloud::Retail::V2::SearchResponse#redirect_uri redirect_uri} and
|
602
647
|
# {::Google::Cloud::Retail::V2::SearchResponse#attribution_token attribution_token}
|
603
648
|
# will be set in the response.
|
649
|
+
# @!attribute [rw] applied_controls
|
650
|
+
# @return [::Array<::String>]
|
651
|
+
# The fully qualified resource name of applied
|
652
|
+
# [controls](https://cloud.google.com/retail/docs/serving-control-rules).
|
653
|
+
# @!attribute [rw] invalid_condition_boost_specs
|
654
|
+
# @return [::Array<::Google::Cloud::Retail::V2::SearchRequest::BoostSpec::ConditionBoostSpec>]
|
655
|
+
# The invalid
|
656
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::BoostSpec#condition_boost_specs SearchRequest.BoostSpec.condition_boost_specs}
|
657
|
+
# that are not applied during serving.
|
604
658
|
class SearchResponse
|
605
659
|
include ::Google::Protobuf::MessageExts
|
606
660
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|