google-cloud-retail-v2 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/README.md +1 -1
  5. data/lib/google/cloud/retail/v2/catalog_pb.rb +0 -3
  6. data/lib/google/cloud/retail/v2/catalog_service/client.rb +9 -9
  7. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +1 -0
  8. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +0 -8
  9. data/lib/google/cloud/retail/v2/common_pb.rb +6 -4
  10. data/lib/google/cloud/retail/v2/completion_service/client.rb +18 -18
  11. data/lib/google/cloud/retail/v2/completion_service.rb +1 -2
  12. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
  13. data/lib/google/cloud/retail/v2/import_config_pb.rb +0 -1
  14. data/lib/google/cloud/retail/v2/prediction_service/client.rb +6 -3
  15. data/lib/google/cloud/retail/v2/product_pb.rb +1 -1
  16. data/lib/google/cloud/retail/v2/product_service/client.rb +320 -18
  17. data/lib/google/cloud/retail/v2/product_service_pb.rb +27 -1
  18. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +45 -7
  19. data/lib/google/cloud/retail/v2/promotion_pb.rb +22 -0
  20. data/lib/google/cloud/retail/v2/purge_config_pb.rb +1 -1
  21. data/lib/google/cloud/retail/v2/search_service/client.rb +28 -15
  22. data/lib/google/cloud/retail/v2/search_service.rb +1 -2
  23. data/lib/google/cloud/retail/v2/search_service_pb.rb +14 -2
  24. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +2 -4
  25. data/lib/google/cloud/retail/v2/user_event_pb.rb +0 -1
  26. data/lib/google/cloud/retail/v2/user_event_service/client.rb +6 -4
  27. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +1 -0
  28. data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +4 -3
  29. data/lib/google/cloud/retail/v2/version.rb +1 -1
  30. data/lib/google/cloud/retail/v2.rb +2 -0
  31. data/proto_docs/google/api/resource.rb +10 -71
  32. data/proto_docs/google/cloud/retail/v2/catalog.rb +6 -6
  33. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +9 -0
  34. data/proto_docs/google/cloud/retail/v2/common.rb +88 -25
  35. data/proto_docs/google/cloud/retail/v2/completion_service.rb +18 -15
  36. data/proto_docs/google/cloud/retail/v2/import_config.rb +29 -21
  37. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +6 -3
  38. data/proto_docs/google/cloud/retail/v2/product.rb +48 -39
  39. data/proto_docs/google/cloud/retail/v2/product_service.rb +134 -2
  40. data/proto_docs/google/cloud/retail/v2/promotion.rb +43 -0
  41. data/proto_docs/google/cloud/retail/v2/search_service.rb +69 -10
  42. data/proto_docs/google/cloud/retail/v2/user_event.rb +25 -12
  43. metadata +5 -3
@@ -35,22 +35,21 @@ module Google
35
35
  # The maximum number of allowed characters is 255.
36
36
  # @!attribute [rw] visitor_id
37
37
  # @return [::String]
38
- # A unique identifier for tracking visitors. For example, this could be
39
- # implemented with an HTTP cookie, which should be able to uniquely identify
40
- # a visitor on a single device. This unique identifier should not change if
41
- # the visitor logs in or out of the website.
38
+ # Required field. A unique identifier for tracking visitors. For example,
39
+ # this could be implemented with an HTTP cookie, which should be able to
40
+ # uniquely identify a visitor on a single device. This unique identifier
41
+ # should not change if the visitor logs in or out of the website.
42
42
  #
43
43
  # The field must be a UTF-8 encoded string with a length limit of 128
44
44
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
45
45
  # @!attribute [rw] language_codes
46
46
  # @return [::Array<::String>]
47
- # The list of languages of the query. This is
48
- # the BCP-47 language code, such as "en-US" or "sr-Latn".
49
- # For more information, see
50
- # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
51
- #
52
- # The maximum number of allowed characters is 255.
53
- # Only "en-US" is currently supported.
47
+ # The language filters applied to the output suggestions. If set, it should
48
+ # contain the language of the query. If not set, suggestions are returned
49
+ # without considering language restrictions. This is the BCP-47 language
50
+ # code, such as "en-US" or "sr-Latn". For more information, see [Tags for
51
+ # Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum
52
+ # number of language codes is 3.
54
53
  # @!attribute [rw] device_type
55
54
  # @return [::String]
56
55
  # The device type context for completion suggestions.
@@ -102,9 +101,9 @@ module Google
102
101
  # @!attribute [rw] attribution_token
103
102
  # @return [::String]
104
103
  # A unique complete token. This should be included in the
105
- # {::Google::Cloud::Retail::V2::SearchRequest SearchRequest} resulting from this
106
- # completion, which enables accurate attribution of complete model
107
- # performance.
104
+ # {::Google::Cloud::Retail::V2::UserEvent#completion_detail UserEvent.completion_detail}
105
+ # for search events resulting from this completion, which enables accurate
106
+ # attribution of complete model performance.
108
107
  # @!attribute [rw] recent_search_results
109
108
  # @return [::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::RecentSearchResult>]
110
109
  # Matched recent searches of this user. The maximum number of recent searches
@@ -134,7 +133,11 @@ module Google
134
133
  # The suggestion for the query.
135
134
  # @!attribute [rw] attributes
136
135
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
137
- # Additional custom attributes ingested through BigQuery.
136
+ # Custom attributes for the suggestion term.
137
+ # * For "user-data", the attributes are additional custom attributes
138
+ # ingested through BigQuery.
139
+ # * For "cloud-retail", the attributes are product attributes generated
140
+ # by Cloud Retail.
138
141
  class CompletionResult
139
142
  include ::Google::Protobuf::MessageExts
140
143
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -51,6 +51,14 @@ module Google
51
51
  # {::Google::Cloud::Retail::V2::UserEvent UserEvent} per line.
52
52
  # * `user_event_ga360`: Using
53
53
  # https://support.google.com/analytics/answer/3437719.
54
+ #
55
+ # Supported values for control imports:
56
+ #
57
+ # * 'control' (default): One JSON [Control][] per line.
58
+ #
59
+ # Supported values for catalog attribute imports:
60
+ #
61
+ # * 'catalog_attribute' (default): One CSV [CatalogAttribute][] per line.
54
62
  class GcsSource
55
63
  include ::Google::Protobuf::MessageExts
56
64
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -98,8 +106,19 @@ module Google
98
106
  #
99
107
  # * `user_event` (default): One JSON
100
108
  # {::Google::Cloud::Retail::V2::UserEvent UserEvent} per line.
101
- # * `user_event_ga360`: Using
109
+ # * `user_event_ga360`:
110
+ # The schema is available here:
102
111
  # https://support.google.com/analytics/answer/3437719.
112
+ # * `user_event_ga4`: This feature is in private preview. Please contact the
113
+ # support team for importing Google Analytics 4 events.
114
+ # The schema is available here:
115
+ # https://support.google.com/analytics/answer/7029846.
116
+ #
117
+ # Supported values for auto-completion imports:
118
+ #
119
+ # * `suggestions` (default): One JSON completion suggestion per line.
120
+ # * `denylist`: One JSON deny suggestion per line.
121
+ # * `allowlist`: One JSON allow suggestion per line.
103
122
  class BigQuerySource
104
123
  include ::Google::Protobuf::MessageExts
105
124
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -128,9 +147,9 @@ module Google
128
147
  # Configuration of destination for Import related errors.
129
148
  # @!attribute [rw] gcs_prefix
130
149
  # @return [::String]
131
- # Google Cloud Storage path for import errors. This must be an empty,
132
- # existing Cloud Storage bucket. Import errors will be written to a file in
133
- # this bucket, one per line, as a JSON-encoded
150
+ # Google Cloud Storage prefix for import errors. This must be an empty,
151
+ # existing Cloud Storage directory. Import errors will be written to
152
+ # sharded files in this directory, one per line, as a JSON-encoded
134
153
  # `google.rpc.Status` message.
135
154
  class ImportErrorsConfig
136
155
  include ::Google::Protobuf::MessageExts
@@ -147,15 +166,7 @@ module Google
147
166
  # If updateMask is specified, requires products.update permission.
148
167
  # @!attribute [rw] request_id
149
168
  # @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`.
169
+ # Deprecated. This field has no effect.
159
170
  # @!attribute [rw] input_config
160
171
  # @return [::Google::Cloud::Retail::V2::ProductInputConfig]
161
172
  # Required. The desired input location of the data.
@@ -198,16 +209,14 @@ module Google
198
209
  # Calculates diff and replaces the entire product dataset. Existing
199
210
  # products may be deleted if they are not present in the source location.
200
211
  #
201
- # Can only be while using
202
- # {::Google::Cloud::Retail::V2::BigQuerySource BigQuerySource}.
212
+ # Can only be set while using
213
+ # {::Google::Cloud::Retail::V2::BigQuerySource BigQuerySource}. And the BigQuery
214
+ # dataset must be created in the data location "us (multiple regions in
215
+ # United States)", otherwise a PERMISSION_DENIED error is thrown.
203
216
  #
204
217
  # Add the IAM permission "BigQuery Data Viewer" for
205
218
  # cloud-retail-customer-data-access@system.gserviceaccount.com before
206
219
  # using this feature otherwise an error is thrown.
207
- #
208
- # This feature is only available for users who have Retail Search enabled.
209
- # Please submit a form [here](https://cloud.google.com/contact) to contact
210
- # cloud sales if you are interested in using Retail Search.
211
220
  FULL = 2
212
221
  end
213
222
  end
@@ -309,8 +318,7 @@ module Google
309
318
  # Count of entries that encountered errors while processing.
310
319
  # @!attribute [rw] request_id
311
320
  # @return [::String]
312
- # Id of the request / operation. This is parroting back the requestId
313
- # that was passed in the request.
321
+ # Deprecated. This field is never set.
314
322
  # @!attribute [rw] notification_pubsub_topic
315
323
  # @return [::String]
316
324
  # Pub/Sub topic for receiving notification. If this field is set,
@@ -73,9 +73,12 @@ module Google
73
73
  # * filterOutOfStockItems tag=(-"promotional")
74
74
  # * filterOutOfStockItems
75
75
  #
76
- # If your filter blocks all prediction results, nothing will be returned. If
77
- # you want generic (unfiltered) popular products to be returned instead, set
78
- # `strictFiltering` to false in `PredictRequest.params`.
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
- # 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
@@ -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. If not set or set with
278
- # empty paths, all inventory fields will be updated.
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