google-cloud-retail-v2 0.6.3 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/README.md +6 -1
  5. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -4
  6. data/lib/google/cloud/retail/v2/catalog_service/client.rb +9 -9
  7. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +3 -1
  8. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +0 -8
  9. data/lib/google/cloud/retail/v2/common_pb.rb +8 -5
  10. data/lib/google/cloud/retail/v2/completion_service/client.rb +21 -21
  11. data/lib/google/cloud/retail/v2/completion_service.rb +1 -2
  12. data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -1
  13. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
  14. data/lib/google/cloud/retail/v2/import_config_pb.rb +2 -2
  15. data/lib/google/cloud/retail/v2/prediction_service/client.rb +17 -4
  16. data/lib/google/cloud/retail/v2/prediction_service_pb.rb +2 -1
  17. data/lib/google/cloud/retail/v2/product_pb.rb +3 -2
  18. data/lib/google/cloud/retail/v2/product_service/client.rb +338 -23
  19. data/lib/google/cloud/retail/v2/product_service_pb.rb +29 -2
  20. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +47 -9
  21. data/lib/google/cloud/retail/v2/promotion_pb.rb +22 -0
  22. data/lib/google/cloud/retail/v2/purge_config_pb.rb +3 -2
  23. data/lib/google/cloud/retail/v2/search_service/client.rb +56 -19
  24. data/lib/google/cloud/retail/v2/search_service.rb +1 -2
  25. data/lib/google/cloud/retail/v2/search_service_pb.rb +28 -3
  26. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +2 -4
  27. data/lib/google/cloud/retail/v2/user_event_pb.rb +2 -2
  28. data/lib/google/cloud/retail/v2/user_event_service/client.rb +5 -3
  29. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +3 -1
  30. data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +4 -3
  31. data/lib/google/cloud/retail/v2/version.rb +1 -1
  32. data/lib/google/cloud/retail/v2.rb +2 -0
  33. data/proto_docs/google/api/resource.rb +10 -71
  34. data/proto_docs/google/cloud/retail/v2/catalog.rb +8 -8
  35. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +9 -0
  36. data/proto_docs/google/cloud/retail/v2/common.rb +100 -25
  37. data/proto_docs/google/cloud/retail/v2/completion_service.rb +28 -18
  38. data/proto_docs/google/cloud/retail/v2/import_config.rb +38 -23
  39. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +19 -6
  40. data/proto_docs/google/cloud/retail/v2/product.rb +50 -41
  41. data/proto_docs/google/cloud/retail/v2/product_service.rb +154 -6
  42. data/proto_docs/google/cloud/retail/v2/promotion.rb +43 -0
  43. data/proto_docs/google/cloud/retail/v2/search_service.rb +162 -28
  44. data/proto_docs/google/cloud/retail/v2/user_event.rb +30 -14
  45. data/proto_docs/google/protobuf/any.rb +3 -3
  46. data/proto_docs/google/protobuf/struct.rb +2 -2
  47. metadata +5 -3
@@ -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
- # Property [Product.sku](https://schema.org/sku).
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 Property
104
+ # Corresponding properties: Google Merchant Center property
105
105
  # [item_group_id](https://support.google.com/merchants/answer/6324507).
106
- # Schema.org Property
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
- # Should not set it for other types. A maximum of 1000 values are allowed.
118
- # Otherwise, an INVALID_ARGUMENT error is return.
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) or
133
- # [Product.gtin8](https://schema.org/gtin8) or
134
- # [Product.gtin12](https://schema.org/gtin12) or
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
- # schema.org property [Product.description](https://schema.org/description).
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][https://www.rfc-editor.org/rfc/bcp/bcp47.txt].
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 KEY_1_LIKE_THIS.
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 Property
286
+ # Corresponding properties: Google Merchant Center property
280
287
  # [availability](https://support.google.com/merchants/answer/6324448).
281
- # Schema.org Property [Offer.availability](https://schema.org/availability).
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.Highly recommended to put the main image
309
- # to the first.
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 128 characters. Otherwise, an
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 5 values are allowed per
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
@@ -447,11 +456,11 @@ module Google
447
456
  # * {::Google::Cloud::Retail::V2::Product#name name}
448
457
  # * {::Google::Cloud::Retail::V2::Product#color_info color_info}
449
458
  #
450
- # Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
459
+ # The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
451
460
  # returned.
452
461
  #
453
462
  # Note: Returning more fields in
454
- # {::Google::Cloud::Retail::V2::SearchResponse SearchResponse} may increase
463
+ # {::Google::Cloud::Retail::V2::SearchResponse SearchResponse} can increase
455
464
  # response payload size and serving latency.
456
465
  # @!attribute [r] variants
457
466
  # @return [::Array<::Google::Cloud::Retail::V2::Product>]
@@ -91,6 +91,11 @@ module Google
91
91
  #
92
92
  # If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
93
93
  # is returned.
94
+ #
95
+ # The attribute key can be updated by setting the mask path as
96
+ # "attributes.$\\{key_name}". If a key name is present in the mask but not in
97
+ # the patching product from the request, this key will be deleted after the
98
+ # update.
94
99
  # @!attribute [rw] allow_missing
95
100
  # @return [::Boolean]
96
101
  # If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
@@ -263,6 +268,24 @@ module Google
263
268
  # provided or default value for
264
269
  # {::Google::Cloud::Retail::V2::SetInventoryRequest#set_time SetInventoryRequest.set_time}.
265
270
  #
271
+ # The caller can replace place IDs for a subset of fulfillment types in the
272
+ # following ways:
273
+ #
274
+ # * Adds "fulfillment_info" in
275
+ # {::Google::Cloud::Retail::V2::SetInventoryRequest#set_mask SetInventoryRequest.set_mask}
276
+ # * Specifies only the desired fulfillment types and corresponding place IDs
277
+ # to update in [SetInventoryRequest.inventory.fulfillment_info][]
278
+ #
279
+ # The caller can clear all place IDs from a subset of fulfillment types in
280
+ # the following ways:
281
+ #
282
+ # * Adds "fulfillment_info" in
283
+ # {::Google::Cloud::Retail::V2::SetInventoryRequest#set_mask SetInventoryRequest.set_mask}
284
+ # * Specifies only the desired fulfillment types to clear in
285
+ # [SetInventoryRequest.inventory.fulfillment_info][]
286
+ # * Checks that only the desired fulfillment info types have empty
287
+ # [SetInventoryRequest.inventory.fulfillment_info.place_ids][]
288
+ #
266
289
  # The last update time is recorded for the following inventory fields:
267
290
  # * {::Google::Cloud::Retail::V2::Product#price_info Product.price_info}
268
291
  # * {::Google::Cloud::Retail::V2::Product#availability Product.availability}
@@ -274,8 +297,9 @@ module Google
274
297
  # @!attribute [rw] set_mask
275
298
  # @return [::Google::Protobuf::FieldMask]
276
299
  # Indicates which inventory fields in the provided
277
- # {::Google::Cloud::Retail::V2::Product Product} to update. If not set or set with
278
- # empty paths, all inventory fields will be updated.
300
+ # {::Google::Cloud::Retail::V2::Product Product} to update.
301
+ #
302
+ # At least one field must be provided.
279
303
  #
280
304
  # If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
281
305
  # is returned and the entire update will be ignored.
@@ -313,7 +337,9 @@ module Google
313
337
  extend ::Google::Protobuf::MessageExts::ClassMethods
314
338
  end
315
339
 
316
- # Request message for [AddFulfillmentPlaces][] method.
340
+ # Request message for
341
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
342
+ # method.
317
343
  # @!attribute [rw] product
318
344
  # @return [::String]
319
345
  # Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
@@ -381,20 +407,141 @@ module Google
381
407
 
382
408
  # Metadata related to the progress of the AddFulfillmentPlaces operation.
383
409
  # Currently empty because there is no meaningful metadata populated from the
384
- # [AddFulfillmentPlaces][] method.
410
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
411
+ # method.
385
412
  class AddFulfillmentPlacesMetadata
386
413
  include ::Google::Protobuf::MessageExts
387
414
  extend ::Google::Protobuf::MessageExts::ClassMethods
388
415
  end
389
416
 
390
417
  # Response of the AddFulfillmentPlacesRequest. Currently empty because
391
- # there is no meaningful response populated from the [AddFulfillmentPlaces][]
418
+ # there is no meaningful response populated from the
419
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
392
420
  # method.
393
421
  class AddFulfillmentPlacesResponse
394
422
  include ::Google::Protobuf::MessageExts
395
423
  extend ::Google::Protobuf::MessageExts::ClassMethods
396
424
  end
397
425
 
426
+ # Request message for
427
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
428
+ # method.
429
+ # @!attribute [rw] product
430
+ # @return [::String]
431
+ # Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
432
+ # such as
433
+ # `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
434
+ #
435
+ # If the caller does not have permission to access the
436
+ # {::Google::Cloud::Retail::V2::Product Product}, regardless of whether or not it
437
+ # exists, a PERMISSION_DENIED error is returned.
438
+ # @!attribute [rw] local_inventories
439
+ # @return [::Array<::Google::Cloud::Retail::V2::LocalInventory>]
440
+ # Required. A list of inventory information at difference places. Each place
441
+ # is identified by its place ID. At most 3000 inventories are allowed per
442
+ # request.
443
+ # @!attribute [rw] add_mask
444
+ # @return [::Google::Protobuf::FieldMask]
445
+ # Indicates which inventory fields in the provided list of
446
+ # {::Google::Cloud::Retail::V2::LocalInventory LocalInventory} to update. The
447
+ # field is updated to the provided value.
448
+ #
449
+ # If a field is set while the place does not have a previous local inventory,
450
+ # the local inventory at that store is created.
451
+ #
452
+ # If a field is set while the value of that field is not provided, the
453
+ # original field value, if it exists, is deleted.
454
+ #
455
+ # If the mask is not set or set with empty paths, all inventory fields will
456
+ # be updated.
457
+ #
458
+ # If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
459
+ # is returned and the entire update will be ignored.
460
+ # @!attribute [rw] add_time
461
+ # @return [::Google::Protobuf::Timestamp]
462
+ # The time when the inventory updates are issued. Used to prevent
463
+ # out-of-order updates on local inventory fields. If not provided, the
464
+ # internal system time will be used.
465
+ # @!attribute [rw] allow_missing
466
+ # @return [::Boolean]
467
+ # If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
468
+ # found, the local inventory will still be processed and retained for at most
469
+ # 1 day and processed once the {::Google::Cloud::Retail::V2::Product Product} is
470
+ # created. If set to false, a NOT_FOUND error is returned if the
471
+ # {::Google::Cloud::Retail::V2::Product Product} is not found.
472
+ class AddLocalInventoriesRequest
473
+ include ::Google::Protobuf::MessageExts
474
+ extend ::Google::Protobuf::MessageExts::ClassMethods
475
+ end
476
+
477
+ # Metadata related to the progress of the AddLocalInventories operation.
478
+ # Currently empty because there is no meaningful metadata populated from the
479
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
480
+ # method.
481
+ class AddLocalInventoriesMetadata
482
+ include ::Google::Protobuf::MessageExts
483
+ extend ::Google::Protobuf::MessageExts::ClassMethods
484
+ end
485
+
486
+ # Response of the
487
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
488
+ # API. Currently empty because there is no meaningful response populated from
489
+ # the
490
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
491
+ # method.
492
+ class AddLocalInventoriesResponse
493
+ include ::Google::Protobuf::MessageExts
494
+ extend ::Google::Protobuf::MessageExts::ClassMethods
495
+ end
496
+
497
+ # Request message for [RemoveLocalInventories][] method.
498
+ # @!attribute [rw] product
499
+ # @return [::String]
500
+ # Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
501
+ # such as
502
+ # `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.
503
+ #
504
+ # If the caller does not have permission to access the
505
+ # {::Google::Cloud::Retail::V2::Product Product}, regardless of whether or not it
506
+ # exists, a PERMISSION_DENIED error is returned.
507
+ # @!attribute [rw] place_ids
508
+ # @return [::Array<::String>]
509
+ # Required. A list of place IDs to have their inventory deleted.
510
+ # At most 3000 place IDs are allowed per request.
511
+ # @!attribute [rw] remove_time
512
+ # @return [::Google::Protobuf::Timestamp]
513
+ # The time when the inventory deletions are issued. Used to prevent
514
+ # out-of-order updates and deletions on local inventory fields. If not
515
+ # provided, the internal system time will be used.
516
+ # @!attribute [rw] allow_missing
517
+ # @return [::Boolean]
518
+ # If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
519
+ # found, the local inventory removal request will still be processed and
520
+ # retained for at most 1 day and processed once the
521
+ # {::Google::Cloud::Retail::V2::Product Product} is created. If set to false, a
522
+ # NOT_FOUND error is returned if the
523
+ # {::Google::Cloud::Retail::V2::Product Product} is not found.
524
+ class RemoveLocalInventoriesRequest
525
+ include ::Google::Protobuf::MessageExts
526
+ extend ::Google::Protobuf::MessageExts::ClassMethods
527
+ end
528
+
529
+ # Metadata related to the progress of the RemoveLocalInventories operation.
530
+ # Currently empty because there is no meaningful metadata populated from the
531
+ # [RemoveLocalInventories][] method.
532
+ class RemoveLocalInventoriesMetadata
533
+ include ::Google::Protobuf::MessageExts
534
+ extend ::Google::Protobuf::MessageExts::ClassMethods
535
+ end
536
+
537
+ # Response of the [RemoveLocalInventories][] API. Currently empty because
538
+ # there is no meaningful response populated from the [RemoveLocalInventories][]
539
+ # method.
540
+ class RemoveLocalInventoriesResponse
541
+ include ::Google::Protobuf::MessageExts
542
+ extend ::Google::Protobuf::MessageExts::ClassMethods
543
+ end
544
+
398
545
  # Request message for [RemoveFulfillmentPlaces][] method.
399
546
  # @!attribute [rw] product
400
547
  # @return [::String]
@@ -425,7 +572,8 @@ module Google
425
572
  # If this field is set to an invalid value other than these, an
426
573
  # INVALID_ARGUMENT error is returned.
427
574
  #
428
- # This field directly corresponds to [Product.fulfillment_info.type][].
575
+ # This field directly corresponds to
576
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#type Product.fulfillment_info.type}.
429
577
  # @!attribute [rw] place_ids
430
578
  # @return [::Array<::String>]
431
579
  # Required. The IDs for this
@@ -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