google-cloud-retail-v2 0.20.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/retail/v2/analytics_service/client.rb +5 -1
  4. data/lib/google/cloud/retail/v2/analytics_service/operations.rb +13 -5
  5. data/lib/google/cloud/retail/v2/analytics_service/rest/client.rb +5 -1
  6. data/lib/google/cloud/retail/v2/analytics_service/rest/operations.rb +11 -4
  7. data/lib/google/cloud/retail/v2/catalog_pb.rb +9 -1
  8. data/lib/google/cloud/retail/v2/catalog_service/client.rb +25 -11
  9. data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +25 -11
  10. data/lib/google/cloud/retail/v2/common_pb.rb +4 -1
  11. data/lib/google/cloud/retail/v2/completion_service/client.rb +15 -6
  12. data/lib/google/cloud/retail/v2/completion_service/operations.rb +13 -5
  13. data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +15 -6
  14. data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +11 -4
  15. data/lib/google/cloud/retail/v2/completion_service_pb.rb +1 -1
  16. data/lib/google/cloud/retail/v2/control_service/client.rb +13 -5
  17. data/lib/google/cloud/retail/v2/control_service/rest/client.rb +13 -5
  18. data/lib/google/cloud/retail/v2/model_pb.rb +4 -1
  19. data/lib/google/cloud/retail/v2/model_service/client.rb +19 -8
  20. data/lib/google/cloud/retail/v2/model_service/operations.rb +13 -5
  21. data/lib/google/cloud/retail/v2/model_service/rest/client.rb +19 -8
  22. data/lib/google/cloud/retail/v2/model_service/rest/operations.rb +11 -4
  23. data/lib/google/cloud/retail/v2/prediction_service/client.rb +5 -1
  24. data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +5 -1
  25. data/lib/google/cloud/retail/v2/product_service/client.rb +206 -21
  26. data/lib/google/cloud/retail/v2/product_service/operations.rb +13 -5
  27. data/lib/google/cloud/retail/v2/product_service/rest/client.rb +199 -21
  28. data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +11 -4
  29. data/lib/google/cloud/retail/v2/product_service/rest/service_stub.rb +60 -0
  30. data/lib/google/cloud/retail/v2/product_service_pb.rb +2 -1
  31. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +26 -6
  32. data/lib/google/cloud/retail/v2/purge_config_pb.rb +6 -1
  33. data/lib/google/cloud/retail/v2/search_service/client.rb +27 -23
  34. data/lib/google/cloud/retail/v2/search_service/rest/client.rb +27 -23
  35. data/lib/google/cloud/retail/v2/serving_config_pb.rb +1 -1
  36. data/lib/google/cloud/retail/v2/serving_config_service/client.rb +17 -7
  37. data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +17 -7
  38. data/lib/google/cloud/retail/v2/user_event_service/client.rb +14 -6
  39. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +13 -5
  40. data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +14 -6
  41. data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +11 -4
  42. data/lib/google/cloud/retail/v2/version.rb +1 -1
  43. data/proto_docs/google/api/client.rb +4 -0
  44. data/proto_docs/google/cloud/retail/v2/catalog.rb +143 -4
  45. data/proto_docs/google/cloud/retail/v2/common.rb +104 -10
  46. data/proto_docs/google/cloud/retail/v2/completion_service.rb +14 -7
  47. data/proto_docs/google/cloud/retail/v2/import_config.rb +10 -4
  48. data/proto_docs/google/cloud/retail/v2/model.rb +40 -0
  49. data/proto_docs/google/cloud/retail/v2/product.rb +23 -22
  50. data/proto_docs/google/cloud/retail/v2/promotion.rb +2 -2
  51. data/proto_docs/google/cloud/retail/v2/purge_config.rb +93 -0
  52. data/proto_docs/google/cloud/retail/v2/search_service.rb +42 -42
  53. data/proto_docs/google/cloud/retail/v2/serving_config.rb +4 -0
  54. data/proto_docs/google/cloud/retail/v2/user_event.rb +3 -2
  55. metadata +6 -5
@@ -37,6 +37,12 @@ module Google
37
37
  # @return [::Array<::Google::Cloud::Retail::V2::Condition::TimeRange>]
38
38
  # Range of time(s) specifying when Condition is active.
39
39
  # Condition true if any time range matches.
40
+ # @!attribute [rw] page_categories
41
+ # @return [::Array<::String>]
42
+ # Used to support browse uses cases.
43
+ # A list (up to 10 entries) of categories or departments.
44
+ # The format should be the same as
45
+ # {::Google::Cloud::Retail::V2::UserEvent#page_categories UserEvent.page_categories};
40
46
  class Condition
41
47
  include ::Google::Protobuf::MessageExts
42
48
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -103,6 +109,12 @@ module Google
103
109
  # @!attribute [rw] twoway_synonyms_action
104
110
  # @return [::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction]
105
111
  # Treats a set of terms as synonyms of one another.
112
+ # @!attribute [rw] force_return_facet_action
113
+ # @return [::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction]
114
+ # Force returns an attribute as a facet in the request.
115
+ # @!attribute [rw] remove_facet_action
116
+ # @return [::Google::Cloud::Retail::V2::Rule::RemoveFacetAction]
117
+ # Remove an attribute as a facet in the request (if present).
106
118
  # @!attribute [rw] condition
107
119
  # @return [::Google::Cloud::Retail::V2::Condition]
108
120
  # Required. The condition that triggers the rule.
@@ -153,17 +165,19 @@ module Google
153
165
  end
154
166
 
155
167
  # * Rule Condition:
156
- # - No
157
- # {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}
158
- # provided is a global match.
159
- # - 1 or more
160
- # {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}
161
- # provided are combined with OR operator.
168
+ # - No
169
+ # {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}
170
+ # provided is a global match.
171
+ # - 1 or more
172
+ # {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}
173
+ # provided are combined with OR operator.
174
+ #
162
175
  # * Action Input: The request query and filter that are applied to the
163
176
  # retrieved products, in addition to any filters already provided with the
164
177
  # SearchRequest. The AND operator is used to combine the query's existing
165
178
  # filters with the filter rule(s). NOTE: May result in 0 results when
166
179
  # filters conflict.
180
+ #
167
181
  # * Action Result: Filters the returned objects to be ONLY those that passed
168
182
  # the filter.
169
183
  # @!attribute [rw] filter
@@ -172,10 +186,9 @@ module Google
172
186
  #
173
187
  # * {::Google::Cloud::Retail::V2::Rule::FilterAction#filter filter} must be set.
174
188
  # * Filter syntax is identical to
175
- # {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter}. See
189
+ # {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter}. For
176
190
  # more
177
- # details at the Retail Search
178
- # [user guide](/retail/search/docs/filter-and-order#filter).
191
+ # information, see [Filter](/retail/docs/filter-and-order#filter).
179
192
  # * To filter products with product ID "product_1" or "product_2", and
180
193
  # color
181
194
  # "Red" or "Blue":<br>
@@ -190,7 +203,7 @@ module Google
190
203
  # Redirects a shopper to a specific page.
191
204
  #
192
205
  # * Rule Condition:
193
- # - Must specify
206
+ # Must specify
194
207
  # {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}.
195
208
  # * Action Input: Request Query
196
209
  # * Action Result: Redirects shopper to provided uri.
@@ -289,6 +302,87 @@ module Google
289
302
  include ::Google::Protobuf::MessageExts
290
303
  extend ::Google::Protobuf::MessageExts::ClassMethods
291
304
  end
305
+
306
+ # Force returns an attribute/facet in the request around a certain position
307
+ # or above.
308
+ #
309
+ # * Rule Condition:
310
+ # Must specify non-empty
311
+ # {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}
312
+ # (for search only) or
313
+ # {::Google::Cloud::Retail::V2::Condition#page_categories Condition.page_categories}
314
+ # (for browse only), but can't specify both.
315
+ #
316
+ # * Action Inputs: attribute name, position
317
+ #
318
+ # * Action Result: Will force return a facet key around a certain position
319
+ # or above if the condition is satisfied.
320
+ #
321
+ # Example: Suppose the query is "shoes", the
322
+ # {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms} is
323
+ # "shoes", the
324
+ # {::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction::FacetPositionAdjustment#attribute_name ForceReturnFacetAction.FacetPositionAdjustment.attribute_name}
325
+ # is "size" and the
326
+ # {::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction::FacetPositionAdjustment#position ForceReturnFacetAction.FacetPositionAdjustment.position}
327
+ # is 8.
328
+ #
329
+ # Two cases: a) The facet key "size" is not already in the top 8 slots, then
330
+ # the facet "size" will appear at a position close to 8. b) The facet key
331
+ # "size" in among the top 8 positions in the request, then it will stay at
332
+ # its current rank.
333
+ # @!attribute [rw] facet_position_adjustments
334
+ # @return [::Array<::Google::Cloud::Retail::V2::Rule::ForceReturnFacetAction::FacetPositionAdjustment>]
335
+ # Each instance corresponds to a force return attribute for the given
336
+ # condition. There can't be more 3 instances here.
337
+ class ForceReturnFacetAction
338
+ include ::Google::Protobuf::MessageExts
339
+ extend ::Google::Protobuf::MessageExts::ClassMethods
340
+
341
+ # Each facet position adjustment consists of a single attribute name (i.e.
342
+ # facet key) along with a specified position.
343
+ # @!attribute [rw] attribute_name
344
+ # @return [::String]
345
+ # The attribute name to force return as a facet. Each attribute name
346
+ # should be a valid attribute name, be non-empty and contain at most 80
347
+ # characters long.
348
+ # @!attribute [rw] position
349
+ # @return [::Integer]
350
+ # This is the position in the request as explained above. It should be
351
+ # strictly positive be at most 100.
352
+ class FacetPositionAdjustment
353
+ include ::Google::Protobuf::MessageExts
354
+ extend ::Google::Protobuf::MessageExts::ClassMethods
355
+ end
356
+ end
357
+
358
+ # Removes an attribute/facet in the request if is present.
359
+ #
360
+ # * Rule Condition:
361
+ # Must specify non-empty
362
+ # {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}
363
+ # (for search only) or
364
+ # {::Google::Cloud::Retail::V2::Condition#page_categories Condition.page_categories}
365
+ # (for browse only), but can't specify both.
366
+ #
367
+ # * Action Input: attribute name
368
+ #
369
+ # * Action Result: Will remove the attribute (as a facet) from the request
370
+ # if it is present.
371
+ #
372
+ # Example: Suppose the query is "shoes", the
373
+ # {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms} is
374
+ # "shoes" and the attribute name "size", then facet key "size" will be
375
+ # removed from the request (if it is present).
376
+ # @!attribute [rw] attribute_names
377
+ # @return [::Array<::String>]
378
+ # The attribute names (i.e. facet keys) to remove from the dynamic facets
379
+ # (if present in the request). There can't be more 3 attribute names.
380
+ # Each attribute name should be a valid attribute name, be non-empty and
381
+ # contain at most 80 characters.
382
+ class RemoveFacetAction
383
+ include ::Google::Protobuf::MessageExts
384
+ extend ::Google::Protobuf::MessageExts::ClassMethods
385
+ end
292
386
  end
293
387
 
294
388
  # An intended audience of the {::Google::Cloud::Retail::V2::Product Product} for
@@ -94,12 +94,17 @@ module Google
94
94
  #
95
95
  # The maximum allowed max suggestions is 20. If it is set higher, it will be
96
96
  # capped by 20.
97
+ # @!attribute [rw] enable_attribute_suggestions
98
+ # @return [::Boolean]
99
+ # If true, attribute suggestions are enabled and provided in response.
100
+ #
101
+ # This field is only available for "cloud-retail" dataset.
97
102
  # @!attribute [rw] entity
98
103
  # @return [::String]
99
- # The entity for customers that may run multiple different entities, domains,
100
- # sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
104
+ # The entity for customers who run multiple entities, domains, sites, or
105
+ # regions, for example, `Google US`, `Google Ads`, `Waymo`,
101
106
  # `google.com`, `youtube.com`, etc.
102
- # If this is set, it should be exactly matched with
107
+ # If this is set, it must be an exact match with
103
108
  # {::Google::Cloud::Retail::V2::UserEvent#entity UserEvent.entity} to get
104
109
  # per-entity autocomplete results.
105
110
  class CompleteQueryRequest
@@ -119,10 +124,11 @@ module Google
119
124
  # for search events resulting from this completion, which enables accurate
120
125
  # attribution of complete model performance.
121
126
  # @!attribute [rw] recent_search_results
127
+ # @deprecated This field is deprecated and may be removed in the next major version update.
122
128
  # @return [::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::RecentSearchResult>]
123
- # Matched recent searches of this user. The maximum number of recent searches
124
- # is 10. This field is a restricted feature. Contact Retail Search support
125
- # team if you are interested in enabling it.
129
+ # Deprecated. Matched recent searches of this user. The maximum number of
130
+ # recent searches is 10. This field is a restricted feature. If you want to
131
+ # enable it, contact Retail Search support.
126
132
  #
127
133
  # This feature is only available when
128
134
  # {::Google::Cloud::Retail::V2::CompleteQueryRequest#visitor_id CompleteQueryRequest.visitor_id}
@@ -174,7 +180,8 @@ module Google
174
180
  end
175
181
  end
176
182
 
177
- # Recent search of this user.
183
+ # Deprecated: Recent search of this user.
184
+ # @deprecated This message is deprecated and may be removed in the next major version update.
178
185
  # @!attribute [rw] recent_search
179
186
  # @return [::String]
180
187
  # The recent search query.
@@ -176,7 +176,8 @@ module Google
176
176
  # @!attribute [rw] update_mask
177
177
  # @return [::Google::Protobuf::FieldMask]
178
178
  # Indicates which fields in the provided imported `products` to update. If
179
- # not set, all fields are updated.
179
+ # not set, all fields are updated. If provided, only the existing product
180
+ # fields are updated. Missing products will not be created.
180
181
  # @!attribute [rw] reconciliation_mode
181
182
  # @return [::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode]
182
183
  # The mode of reconciliation between existing products and the products to be
@@ -192,9 +193,14 @@ module Google
192
193
  # Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
193
194
  # to be within the same project as
194
195
  # {::Google::Cloud::Retail::V2::ImportProductsRequest#parent ImportProductsRequest.parent}.
195
- # Make sure that `service-<project
196
- # number>@gcp-sa-retail.iam.gserviceaccount.com` has the
197
- # `pubsub.topics.publish` IAM permission on the topic.
196
+ # Make sure that both
197
+ # `cloud-retail-customer-data-access@system.gserviceaccount.com` and
198
+ # `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
199
+ # have the `pubsub.topics.publish` IAM permission on the topic.
200
+ #
201
+ # Only supported when
202
+ # {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
203
+ # is set to `FULL`.
198
204
  class ImportProductsRequest
199
205
  include ::Google::Protobuf::MessageExts
200
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -139,6 +139,9 @@ module Google
139
139
  # @return [::Array<::Google::Cloud::Retail::V2::Model::ServingConfigList>]
140
140
  # Output only. The list of valid serving configs associated with the
141
141
  # PageOptimizationConfig.
142
+ # @!attribute [rw] model_features_config
143
+ # @return [::Google::Cloud::Retail::V2::Model::ModelFeaturesConfig]
144
+ # Optional. Additional model features config.
142
145
  class Model
143
146
  include ::Google::Protobuf::MessageExts
144
147
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -154,6 +157,27 @@ module Google
154
157
  extend ::Google::Protobuf::MessageExts::ClassMethods
155
158
  end
156
159
 
160
+ # Additional configs for the frequently-bought-together model type.
161
+ # @!attribute [rw] context_products_type
162
+ # @return [::Google::Cloud::Retail::V2::Model::ContextProductsType]
163
+ # Optional. Specifies the context of the model when it is used in predict
164
+ # requests. Can only be set for the `frequently-bought-together` type. If
165
+ # it isn't specified, it defaults to
166
+ # {::Google::Cloud::Retail::V2::Model::ContextProductsType::MULTIPLE_CONTEXT_PRODUCTS MULTIPLE_CONTEXT_PRODUCTS}.
167
+ class FrequentlyBoughtTogetherFeaturesConfig
168
+ include ::Google::Protobuf::MessageExts
169
+ extend ::Google::Protobuf::MessageExts::ClassMethods
170
+ end
171
+
172
+ # Additional model features config.
173
+ # @!attribute [rw] frequently_bought_together_config
174
+ # @return [::Google::Cloud::Retail::V2::Model::FrequentlyBoughtTogetherFeaturesConfig]
175
+ # Additional configs for frequently-bought-together models.
176
+ class ModelFeaturesConfig
177
+ include ::Google::Protobuf::MessageExts
178
+ extend ::Google::Protobuf::MessageExts::ClassMethods
179
+ end
180
+
157
181
  # The serving state of the model.
158
182
  module ServingState
159
183
  # Unspecified serving state.
@@ -221,6 +245,22 @@ module Google
221
245
  # messages can be queried via Stackdriver.
222
246
  DATA_ERROR = 2
223
247
  end
248
+
249
+ # Use single or multiple context products for recommendations.
250
+ module ContextProductsType
251
+ # Unspecified default value, should never be explicitly set.
252
+ # Defaults to
253
+ # {::Google::Cloud::Retail::V2::Model::ContextProductsType::MULTIPLE_CONTEXT_PRODUCTS MULTIPLE_CONTEXT_PRODUCTS}.
254
+ CONTEXT_PRODUCTS_TYPE_UNSPECIFIED = 0
255
+
256
+ # Use only a single product as context for the recommendation. Typically
257
+ # used on pages like add-to-cart or product details.
258
+ SINGLE_CONTEXT_PRODUCT = 1
259
+
260
+ # Use one or multiple products as context for the recommendation. Typically
261
+ # used on shopping cart pages.
262
+ MULTIPLE_CONTEXT_PRODUCTS = 2
263
+ end
224
264
  end
225
265
  end
226
266
  end
@@ -25,23 +25,22 @@ module Google
25
25
  # searched.
26
26
  # @!attribute [rw] expire_time
27
27
  # @return [::Google::Protobuf::Timestamp]
28
- # The timestamp when this product becomes unavailable for
29
- # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}. Note
30
- # that this is only applicable to
31
- # {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY} and
32
- # {::Google::Cloud::Retail::V2::Product::Type::COLLECTION Type.COLLECTION}, and
33
- # ignored for {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}.
34
- # In general, we suggest the users to delete the stale products explicitly,
35
- # instead of using this field to determine staleness.
28
+ # Note that this field is applied in the following ways:
36
29
  #
37
- # If it is set, the {::Google::Cloud::Retail::V2::Product Product} is not
38
- # available for
39
- # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search} after
40
- # {::Google::Cloud::Retail::V2::Product#expire_time expire_time}. However, the
41
- # product can still be retrieved by
42
- # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}
43
- # and
44
- # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts}.
30
+ # * If the {::Google::Cloud::Retail::V2::Product Product} is already expired
31
+ # when it is uploaded, this product
32
+ # is not indexed for search.
33
+ #
34
+ # * If the {::Google::Cloud::Retail::V2::Product Product} is not expired when it
35
+ # is uploaded, only the
36
+ # {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY}'s and
37
+ # {::Google::Cloud::Retail::V2::Product::Type::COLLECTION Type.COLLECTION}'s
38
+ # expireTime is respected, and
39
+ # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}'s
40
+ # expireTime is not used.
41
+ #
42
+ # In general, we suggest the users to delete the stale
43
+ # products explicitly, instead of using this field to determine staleness.
45
44
  #
46
45
  # {::Google::Cloud::Retail::V2::Product#expire_time expire_time} must be later
47
46
  # than {::Google::Cloud::Retail::V2::Product#available_time available_time} and
@@ -176,9 +175,10 @@ module Google
176
175
  # error is returned.
177
176
  #
178
177
  # At most 250 values are allowed per
179
- # {::Google::Cloud::Retail::V2::Product Product}. Empty values are not allowed.
180
- # Each value must be a UTF-8 encoded string with a length limit of 5,000
181
- # characters. Otherwise, an INVALID_ARGUMENT error is returned.
178
+ # {::Google::Cloud::Retail::V2::Product Product} unless overridden through the
179
+ # Google Cloud console. Empty values are not allowed. Each value must be a
180
+ # UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an
181
+ # INVALID_ARGUMENT error is returned.
182
182
  #
183
183
  # Corresponding properties: Google Merchant Center property
184
184
  # [google_product_category][mc_google_product_category]. Schema.org property
@@ -200,9 +200,10 @@ module Google
200
200
  # @return [::Array<::String>]
201
201
  # The brands of the product.
202
202
  #
203
- # A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded
204
- # string with a length limit of 1,000 characters. Otherwise, an
205
- # INVALID_ARGUMENT error is returned.
203
+ # A maximum of 30 brands are allowed unless overridden through the Google
204
+ # Cloud console. Each
205
+ # brand must be a UTF-8 encoded string with a length limit of 1,000
206
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
206
207
  #
207
208
  # Corresponding properties: Google Merchant Center property
208
209
  # [brand](https://support.google.com/merchants/answer/6324351). Schema.org
@@ -31,8 +31,8 @@ module Google
31
31
  # id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
32
32
  # returned.
33
33
  #
34
- # Google Merchant Center property
35
- # [promotion](https://support.google.com/merchants/answer/7050148).
34
+ # Corresponds to Google Merchant Center property
35
+ # [promotion_id](https://support.google.com/merchants/answer/7050148).
36
36
  class Promotion
37
37
  include ::Google::Protobuf::MessageExts
38
38
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -28,6 +28,99 @@ module Google
28
28
  extend ::Google::Protobuf::MessageExts::ClassMethods
29
29
  end
30
30
 
31
+ # Metadata related to the progress of the PurgeProducts operation.
32
+ # This will be returned by the google.longrunning.Operation.metadata field.
33
+ # @!attribute [rw] create_time
34
+ # @return [::Google::Protobuf::Timestamp]
35
+ # Operation create time.
36
+ # @!attribute [rw] update_time
37
+ # @return [::Google::Protobuf::Timestamp]
38
+ # Operation last update time. If the operation is done, this is also the
39
+ # finish time.
40
+ # @!attribute [rw] success_count
41
+ # @return [::Integer]
42
+ # Count of entries that were deleted successfully.
43
+ # @!attribute [rw] failure_count
44
+ # @return [::Integer]
45
+ # Count of entries that encountered errors while processing.
46
+ class PurgeProductsMetadata
47
+ include ::Google::Protobuf::MessageExts
48
+ extend ::Google::Protobuf::MessageExts::ClassMethods
49
+ end
50
+
51
+ # Request message for PurgeProducts method.
52
+ # @!attribute [rw] parent
53
+ # @return [::String]
54
+ # Required. The resource name of the branch under which the products are
55
+ # created. The format is
56
+ # `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
57
+ # @!attribute [rw] filter
58
+ # @return [::String]
59
+ # Required. The filter string to specify the products to be deleted with a
60
+ # length limit of 5,000 characters.
61
+ #
62
+ # Empty string filter is not allowed. "*" implies delete all items in a
63
+ # branch.
64
+ #
65
+ # The eligible fields for filtering are:
66
+ #
67
+ # * `availability`: Double quoted
68
+ # {::Google::Cloud::Retail::V2::Product#availability Product.availability} string.
69
+ # * `create_time` : in ISO 8601 "zulu" format.
70
+ #
71
+ # Supported syntax:
72
+ #
73
+ # * Comparators (">", "<", ">=", "<=", "=").
74
+ # Examples:
75
+ # * create_time <= "2015-02-13T17:05:46Z"
76
+ # * availability = "IN_STOCK"
77
+ #
78
+ # * Conjunctions ("AND")
79
+ # Examples:
80
+ # * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
81
+ #
82
+ # * Disjunctions ("OR")
83
+ # Examples:
84
+ # * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
85
+ #
86
+ # * Can support nested queries.
87
+ # Examples:
88
+ # * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
89
+ # OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
90
+ #
91
+ # * Filter Limits:
92
+ # * Filter should not contain more than 6 conditions.
93
+ # * Max nesting depth should not exceed 2 levels.
94
+ #
95
+ # Examples queries:
96
+ # * Delete back order products created before a timestamp.
97
+ # create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
98
+ # @!attribute [rw] force
99
+ # @return [::Boolean]
100
+ # Actually perform the purge.
101
+ # If `force` is set to false, the method will return the expected purge count
102
+ # without deleting any products.
103
+ class PurgeProductsRequest
104
+ include ::Google::Protobuf::MessageExts
105
+ extend ::Google::Protobuf::MessageExts::ClassMethods
106
+ end
107
+
108
+ # Response of the PurgeProductsRequest. If the long running operation is
109
+ # successfully done, then this message is returned by the
110
+ # google.longrunning.Operations.response field.
111
+ # @!attribute [rw] purge_count
112
+ # @return [::Integer]
113
+ # The total count of products purged as a result of the operation.
114
+ # @!attribute [rw] purge_sample
115
+ # @return [::Array<::String>]
116
+ # A sample of the product names that will be deleted.
117
+ # Only populated if `force` is set to false. A max of 100 names will be
118
+ # returned and the names are chosen at random.
119
+ class PurgeProductsResponse
120
+ include ::Google::Protobuf::MessageExts
121
+ extend ::Google::Protobuf::MessageExts::ClassMethods
122
+ end
123
+
31
124
  # Request message for PurgeUserEvents method.
32
125
  # @!attribute [rw] parent
33
126
  # @return [::String]