google-cloud-retail-v2 0.20.0 → 1.0.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
@@ -44,6 +44,24 @@ module Google
44
44
  rpc :UpdateProduct, ::Google::Cloud::Retail::V2::UpdateProductRequest, ::Google::Cloud::Retail::V2::Product
45
45
  # Deletes a [Product][google.cloud.retail.v2.Product].
46
46
  rpc :DeleteProduct, ::Google::Cloud::Retail::V2::DeleteProductRequest, ::Google::Protobuf::Empty
47
+ # Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s
48
+ # under a branch.
49
+ #
50
+ # This process is asynchronous. If the request is valid, the removal will be
51
+ # enqueued and processed offline. Depending on the number of
52
+ # [Product][google.cloud.retail.v2.Product]s, this operation could take hours
53
+ # to complete. Before the operation completes, some
54
+ # [Product][google.cloud.retail.v2.Product]s may still be returned by
55
+ # [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
56
+ # or
57
+ # [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
58
+ #
59
+ # Depending on the number of [Product][google.cloud.retail.v2.Product]s, this
60
+ # operation could take hours to complete. To get a sample of
61
+ # [Product][google.cloud.retail.v2.Product]s that would be deleted, set
62
+ # [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force]
63
+ # to false.
64
+ rpc :PurgeProducts, ::Google::Cloud::Retail::V2::PurgeProductsRequest, ::Google::Longrunning::Operation
47
65
  # Bulk import of multiple [Product][google.cloud.retail.v2.Product]s.
48
66
  #
49
67
  # Request processing may be synchronous.
@@ -102,10 +120,11 @@ module Google
102
120
  # updates are not marked as [done][google.longrunning.Operation.done] until
103
121
  # they are obsolete.
104
122
  rpc :SetInventory, ::Google::Cloud::Retail::V2::SetInventoryRequest, ::Google::Longrunning::Operation
105
- # It is recommended to use the
123
+ # We recommend that you use the
106
124
  # [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
107
- # method instead of
108
- # [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces].
125
+ # method instead of the
126
+ # [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]
127
+ # method.
109
128
  # [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]
110
129
  # achieves the same results but provides more fine-grained control over
111
130
  # ingesting local inventory data.
@@ -132,10 +151,11 @@ module Google
132
151
  # updates will not be marked as [done][google.longrunning.Operation.done]
133
152
  # until being obsolete.
134
153
  rpc :AddFulfillmentPlaces, ::Google::Cloud::Retail::V2::AddFulfillmentPlacesRequest, ::Google::Longrunning::Operation
135
- # It is recommended to use the
154
+ # We recommend that you use the
136
155
  # [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
137
- # method instead of
138
- # [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
156
+ # method instead of the
157
+ # [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]
158
+ # method.
139
159
  # [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]
140
160
  # achieves the same results but provides more fine-grained control over
141
161
  # ingesting local inventory data.
@@ -6,9 +6,10 @@ require 'google/protobuf'
6
6
 
7
7
  require 'google/api/field_behavior_pb'
8
8
  require 'google/api/resource_pb'
9
+ require 'google/protobuf/timestamp_pb'
9
10
 
10
11
 
11
- descriptor_data = "\n)google/cloud/retail/v2/purge_config.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x0f\n\rPurgeMetadata\"s\n\x16PurgeUserEventsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"6\n\x17PurgeUserEventsResponse\x12\x1b\n\x13purged_events_count\x18\x01 \x01(\x03\x42\xbb\x01\n\x1a\x63om.google.cloud.retail.v2B\x10PurgeConfigProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2b\x06proto3"
12
+ descriptor_data = "\n)google/cloud/retail/v2/purge_config.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x0f\n\rPurgeMetadata\"\xa7\x01\n\x15PurgeProductsMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rsuccess_count\x18\x03 \x01(\x03\x12\x15\n\rfailure_count\x18\x04 \x01(\x03\"p\n\x14PurgeProductsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"f\n\x15PurgeProductsResponse\x12\x13\n\x0bpurge_count\x18\x01 \x01(\x03\x12\x38\n\x0cpurge_sample\x18\x02 \x03(\tB\"\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\"s\n\x16PurgeUserEventsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"6\n\x17PurgeUserEventsResponse\x12\x1b\n\x13purged_events_count\x18\x01 \x01(\x03\x42\xbb\x01\n\x1a\x63om.google.cloud.retail.v2B\x10PurgeConfigProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2b\x06proto3"
12
13
 
13
14
  pool = Google::Protobuf::DescriptorPool.generated_pool
14
15
 
@@ -23,6 +24,7 @@ rescue TypeError
23
24
  file = pool.add_serialized_file(serialized)
24
25
  warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
26
  imports = [
27
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
26
28
  ]
27
29
  imports.each do |type_name, expected_filename|
28
30
  import_file = pool.lookup(type_name).file_descriptor
@@ -39,6 +41,9 @@ module Google
39
41
  module Retail
40
42
  module V2
41
43
  PurgeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PurgeMetadata").msgclass
44
+ PurgeProductsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PurgeProductsMetadata").msgclass
45
+ PurgeProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PurgeProductsRequest").msgclass
46
+ PurgeProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PurgeProductsResponse").msgclass
42
47
  PurgeUserEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PurgeUserEventsRequest").msgclass
43
48
  PurgeUserEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PurgeUserEventsResponse").msgclass
44
49
  end
@@ -34,6 +34,9 @@ module Google
34
34
  # Enable Retail Search on Cloud Console before using this feature.
35
35
  #
36
36
  class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
37
40
  # @private
38
41
  DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
39
42
 
@@ -210,7 +213,7 @@ module Google
210
213
  # or the name of the legacy placement resource, such as
211
214
  # `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
212
215
  # This field is used to identify the serving config name and the set
213
- # of models that will be used to make the search.
216
+ # of models that are used to make the search.
214
217
  # @param branch [::String]
215
218
  # The branch resource name, such as
216
219
  # `projects/*/locations/global/catalogs/default_catalog/branches/0`.
@@ -265,8 +268,8 @@ module Google
265
268
  # @param filter [::String]
266
269
  # The filter syntax consists of an expression language for constructing a
267
270
  # predicate from one or more fields of the products being filtered. Filter
268
- # expression is case-sensitive. See more details at this [user
269
- # guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
271
+ # expression is case-sensitive. For more information, see
272
+ # [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
270
273
  #
271
274
  # If this field is unrecognizable, an INVALID_ARGUMENT is returned.
272
275
  # @param canonical_filter [::String]
@@ -274,20 +277,20 @@ module Google
274
277
  # checking any filters on the search page.
275
278
  #
276
279
  # The filter applied to every search request when quality improvement such as
277
- # query expansion is needed. For example, if a query does not have enough
278
- # results, an expanded query with
279
- # {::Google::Cloud::Retail::V2::SearchRequest#canonical_filter SearchRequest.canonical_filter}
280
- # will be returned as a supplement of the original query. This field is
281
- # strongly recommended to achieve high search quality.
282
- #
283
- # See {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter} for
284
- # more details about filter syntax.
280
+ # query expansion is needed. In the case a query does not have a sufficient
281
+ # amount of results this filter will be used to determine whether or not to
282
+ # enable the query expansion flow. The original filter will still be used for
283
+ # the query expanded search.
284
+ # This field is strongly recommended to achieve high search quality.
285
+ #
286
+ # For more information about filter syntax, see
287
+ # {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter}.
285
288
  # @param order_by [::String]
286
289
  # The order in which products are returned. Products can be ordered by
287
290
  # a field in an {::Google::Cloud::Retail::V2::Product Product} object. Leave it
288
- # unset if ordered by relevance. OrderBy expression is case-sensitive. See
289
- # more details at this [user
290
- # guide](https://cloud.google.com/retail/docs/filter-and-order#order).
291
+ # unset if ordered by relevance. OrderBy expression is case-sensitive. For
292
+ # more information, see
293
+ # [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
291
294
  #
292
295
  # If this field is unrecognizable, an INVALID_ARGUMENT is returned.
293
296
  # @param facet_specs [::Array<::Google::Cloud::Retail::V2::SearchRequest::FacetSpec, ::Hash>]
@@ -302,8 +305,8 @@ module Google
302
305
  # The specification for dynamically generated facets. Notice that only
303
306
  # textual facets can be dynamically generated.
304
307
  # @param boost_spec [::Google::Cloud::Retail::V2::SearchRequest::BoostSpec, ::Hash]
305
- # Boost specification to boost certain products. See more details at this
306
- # [user guide](https://cloud.google.com/retail/docs/boosting).
308
+ # Boost specification to boost certain products. For more information, see
309
+ # [Boost results](https://cloud.google.com/retail/docs/boosting).
307
310
  #
308
311
  # Notice that if both
309
312
  # {::Google::Cloud::Retail::V2::ServingConfig#boost_control_ids ServingConfig.boost_control_ids}
@@ -314,8 +317,8 @@ module Google
314
317
  # to the sum of the boost scores from all matched boost conditions.
315
318
  # @param query_expansion_spec [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec, ::Hash]
316
319
  # The query expansion specification that specifies the conditions under which
317
- # query expansion will occur. See more details at this [user
318
- # guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
320
+ # query expansion occurs. For more information, see [Query
321
+ # expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
319
322
  # @param variant_rollup_keys [::Array<::String>]
320
323
  # The keys to fetch and rollup the matching
321
324
  # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
@@ -388,7 +391,7 @@ module Google
388
391
  # If this field is set to an invalid value other than these, an
389
392
  # INVALID_ARGUMENT error is returned.
390
393
  # @param page_categories [::Array<::String>]
391
- # The categories associated with a category page. Required for category
394
+ # The categories associated with a category page. Must be set for category
392
395
  # navigation queries to achieve good search quality. The format should be
393
396
  # the same as
394
397
  # {::Google::Cloud::Retail::V2::UserEvent#page_categories UserEvent.page_categories};
@@ -429,9 +432,9 @@ module Google
429
432
  # key with multiple resources.
430
433
  # * Keys must start with a lowercase letter or international character.
431
434
  #
432
- # See [Google Cloud
433
- # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
434
- # for more details.
435
+ # For more information, see [Requirements for
436
+ # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
437
+ # in the Resource Manager documentation.
435
438
  # @param spell_correction_spec [::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec, ::Hash]
436
439
  # The spell correction specification that specifies the mode under
437
440
  # which spell correction will take effect.
@@ -481,10 +484,11 @@ module Google
481
484
  # Customize the options with defaults
482
485
  metadata = @config.rpcs.search.metadata.to_h
483
486
 
484
- # Set x-goog-api-client and x-goog-user-project headers
487
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
485
488
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
486
489
  lib_name: @config.lib_name, lib_version: @config.lib_version,
487
490
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
491
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
488
492
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
489
493
 
490
494
  header_params = {}
@@ -36,6 +36,9 @@ module Google
36
36
  # Enable Retail Search on Cloud Console before using this feature.
37
37
  #
38
38
  class Client
39
+ # @private
40
+ API_VERSION = ""
41
+
39
42
  # @private
40
43
  DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
41
44
 
@@ -203,7 +206,7 @@ module Google
203
206
  # or the name of the legacy placement resource, such as
204
207
  # `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
205
208
  # This field is used to identify the serving config name and the set
206
- # of models that will be used to make the search.
209
+ # of models that are used to make the search.
207
210
  # @param branch [::String]
208
211
  # The branch resource name, such as
209
212
  # `projects/*/locations/global/catalogs/default_catalog/branches/0`.
@@ -258,8 +261,8 @@ module Google
258
261
  # @param filter [::String]
259
262
  # The filter syntax consists of an expression language for constructing a
260
263
  # predicate from one or more fields of the products being filtered. Filter
261
- # expression is case-sensitive. See more details at this [user
262
- # guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
264
+ # expression is case-sensitive. For more information, see
265
+ # [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter).
263
266
  #
264
267
  # If this field is unrecognizable, an INVALID_ARGUMENT is returned.
265
268
  # @param canonical_filter [::String]
@@ -267,20 +270,20 @@ module Google
267
270
  # checking any filters on the search page.
268
271
  #
269
272
  # The filter applied to every search request when quality improvement such as
270
- # query expansion is needed. For example, if a query does not have enough
271
- # results, an expanded query with
272
- # {::Google::Cloud::Retail::V2::SearchRequest#canonical_filter SearchRequest.canonical_filter}
273
- # will be returned as a supplement of the original query. This field is
274
- # strongly recommended to achieve high search quality.
275
- #
276
- # See {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter} for
277
- # more details about filter syntax.
273
+ # query expansion is needed. In the case a query does not have a sufficient
274
+ # amount of results this filter will be used to determine whether or not to
275
+ # enable the query expansion flow. The original filter will still be used for
276
+ # the query expanded search.
277
+ # This field is strongly recommended to achieve high search quality.
278
+ #
279
+ # For more information about filter syntax, see
280
+ # {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter}.
278
281
  # @param order_by [::String]
279
282
  # The order in which products are returned. Products can be ordered by
280
283
  # a field in an {::Google::Cloud::Retail::V2::Product Product} object. Leave it
281
- # unset if ordered by relevance. OrderBy expression is case-sensitive. See
282
- # more details at this [user
283
- # guide](https://cloud.google.com/retail/docs/filter-and-order#order).
284
+ # unset if ordered by relevance. OrderBy expression is case-sensitive. For
285
+ # more information, see
286
+ # [Order](https://cloud.google.com/retail/docs/filter-and-order#order).
284
287
  #
285
288
  # If this field is unrecognizable, an INVALID_ARGUMENT is returned.
286
289
  # @param facet_specs [::Array<::Google::Cloud::Retail::V2::SearchRequest::FacetSpec, ::Hash>]
@@ -295,8 +298,8 @@ module Google
295
298
  # The specification for dynamically generated facets. Notice that only
296
299
  # textual facets can be dynamically generated.
297
300
  # @param boost_spec [::Google::Cloud::Retail::V2::SearchRequest::BoostSpec, ::Hash]
298
- # Boost specification to boost certain products. See more details at this
299
- # [user guide](https://cloud.google.com/retail/docs/boosting).
301
+ # Boost specification to boost certain products. For more information, see
302
+ # [Boost results](https://cloud.google.com/retail/docs/boosting).
300
303
  #
301
304
  # Notice that if both
302
305
  # {::Google::Cloud::Retail::V2::ServingConfig#boost_control_ids ServingConfig.boost_control_ids}
@@ -307,8 +310,8 @@ module Google
307
310
  # to the sum of the boost scores from all matched boost conditions.
308
311
  # @param query_expansion_spec [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec, ::Hash]
309
312
  # The query expansion specification that specifies the conditions under which
310
- # query expansion will occur. See more details at this [user
311
- # guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
313
+ # query expansion occurs. For more information, see [Query
314
+ # expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
312
315
  # @param variant_rollup_keys [::Array<::String>]
313
316
  # The keys to fetch and rollup the matching
314
317
  # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
@@ -381,7 +384,7 @@ module Google
381
384
  # If this field is set to an invalid value other than these, an
382
385
  # INVALID_ARGUMENT error is returned.
383
386
  # @param page_categories [::Array<::String>]
384
- # The categories associated with a category page. Required for category
387
+ # The categories associated with a category page. Must be set for category
385
388
  # navigation queries to achieve good search quality. The format should be
386
389
  # the same as
387
390
  # {::Google::Cloud::Retail::V2::UserEvent#page_categories UserEvent.page_categories};
@@ -422,9 +425,9 @@ module Google
422
425
  # key with multiple resources.
423
426
  # * Keys must start with a lowercase letter or international character.
424
427
  #
425
- # See [Google Cloud
426
- # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
427
- # for more details.
428
+ # For more information, see [Requirements for
429
+ # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
430
+ # in the Resource Manager documentation.
428
431
  # @param spell_correction_spec [::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec, ::Hash]
429
432
  # The spell correction specification that specifies the mode under
430
433
  # which spell correction will take effect.
@@ -473,12 +476,13 @@ module Google
473
476
  # Customize the options with defaults
474
477
  call_metadata = @config.rpcs.search.metadata.to_h
475
478
 
476
- # Set x-goog-api-client and x-goog-user-project headers
479
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
477
480
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
478
481
  lib_name: @config.lib_name, lib_version: @config.lib_version,
479
482
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
480
483
  transports_version_send: [:rest]
481
484
 
485
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
482
486
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
483
487
 
484
488
  options.apply_defaults timeout: @config.rpcs.search.timeout,
@@ -10,7 +10,7 @@ require 'google/cloud/retail/v2/common_pb'
10
10
  require 'google/cloud/retail/v2/search_service_pb'
11
11
 
12
12
 
13
- descriptor_data = "\n+google/cloud/retail/v2/serving_config.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/retail/v2/common.proto\x1a+google/cloud/retail/v2/search_service.proto\"\xf8\x07\n\rServingConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x08model_id\x18\x03 \x01(\t\x12\x1d\n\x15price_reranking_level\x18\x04 \x01(\t\x12\x19\n\x11\x66\x61\x63\x65t_control_ids\x18\x05 \x03(\t\x12R\n\x12\x64ynamic_facet_spec\x18\x06 \x01(\x0b\x32\x36.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec\x12\x19\n\x11\x62oost_control_ids\x18\x07 \x03(\t\x12\x1a\n\x12\x66ilter_control_ids\x18\t \x03(\t\x12\x1c\n\x14redirect_control_ids\x18\n \x03(\t\x12#\n\x1btwoway_synonyms_control_ids\x18\x12 \x03(\t\x12#\n\x1boneway_synonyms_control_ids\x18\x0c \x03(\t\x12$\n\x1c\x64o_not_associate_control_ids\x18\r \x03(\t\x12\x1f\n\x17replacement_control_ids\x18\x0e \x03(\t\x12\x1a\n\x12ignore_control_ids\x18\x0f \x03(\t\x12\x17\n\x0f\x64iversity_level\x18\x08 \x01(\t\x12K\n\x0e\x64iversity_type\x18\x14 \x01(\x0e\x32\x33.google.cloud.retail.v2.ServingConfig.DiversityType\x12$\n\x1c\x65nable_category_filter_level\x18\x10 \x01(\t\x12W\n\x14personalization_spec\x18\x15 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.PersonalizationSpec\x12\x44\n\x0esolution_types\x18\x13 \x03(\x0e\x32$.google.cloud.retail.v2.SolutionTypeB\x06\xe0\x41\x02\xe0\x41\x05\"d\n\rDiversityType\x12\x1e\n\x1a\x44IVERSITY_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14RULE_BASED_DIVERSITY\x10\x02\x12\x19\n\x15\x44\x41TA_DRIVEN_DIVERSITY\x10\x03:\x85\x01\xea\x41\x81\x01\n#retail.googleapis.com/ServingConfig\x12Zprojects/{project}/locations/{location}/catalogs/{catalog}/servingConfigs/{serving_config}B\xbd\x01\n\x1a\x63om.google.cloud.retail.v2B\x12ServingConfigProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2b\x06proto3"
13
+ descriptor_data = "\n+google/cloud/retail/v2/serving_config.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/retail/v2/common.proto\x1a+google/cloud/retail/v2/search_service.proto\"\x96\x08\n\rServingConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x08model_id\x18\x03 \x01(\t\x12\x1d\n\x15price_reranking_level\x18\x04 \x01(\t\x12\x19\n\x11\x66\x61\x63\x65t_control_ids\x18\x05 \x03(\t\x12R\n\x12\x64ynamic_facet_spec\x18\x06 \x01(\x0b\x32\x36.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec\x12\x19\n\x11\x62oost_control_ids\x18\x07 \x03(\t\x12\x1a\n\x12\x66ilter_control_ids\x18\t \x03(\t\x12\x1c\n\x14redirect_control_ids\x18\n \x03(\t\x12#\n\x1btwoway_synonyms_control_ids\x18\x12 \x03(\t\x12#\n\x1boneway_synonyms_control_ids\x18\x0c \x03(\t\x12$\n\x1c\x64o_not_associate_control_ids\x18\r \x03(\t\x12\x1f\n\x17replacement_control_ids\x18\x0e \x03(\t\x12\x1a\n\x12ignore_control_ids\x18\x0f \x03(\t\x12\x17\n\x0f\x64iversity_level\x18\x08 \x01(\t\x12K\n\x0e\x64iversity_type\x18\x14 \x01(\x0e\x32\x33.google.cloud.retail.v2.ServingConfig.DiversityType\x12$\n\x1c\x65nable_category_filter_level\x18\x10 \x01(\t\x12\x1c\n\x14ignore_recs_denylist\x18\x18 \x01(\x08\x12W\n\x14personalization_spec\x18\x15 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.PersonalizationSpec\x12\x44\n\x0esolution_types\x18\x13 \x03(\x0e\x32$.google.cloud.retail.v2.SolutionTypeB\x06\xe0\x41\x02\xe0\x41\x05\"d\n\rDiversityType\x12\x1e\n\x1a\x44IVERSITY_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14RULE_BASED_DIVERSITY\x10\x02\x12\x19\n\x15\x44\x41TA_DRIVEN_DIVERSITY\x10\x03:\x85\x01\xea\x41\x81\x01\n#retail.googleapis.com/ServingConfig\x12Zprojects/{project}/locations/{location}/catalogs/{catalog}/servingConfigs/{serving_config}B\xbd\x01\n\x1a\x63om.google.cloud.retail.v2B\x12ServingConfigProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2b\x06proto3"
14
14
 
15
15
  pool = Google::Protobuf::DescriptorPool.generated_pool
16
16
 
@@ -31,6 +31,9 @@ module Google
31
31
  # Service for modifying ServingConfig.
32
32
  #
33
33
  class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
34
37
  # @private
35
38
  DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
36
39
 
@@ -243,10 +246,11 @@ module Google
243
246
  # Customize the options with defaults
244
247
  metadata = @config.rpcs.create_serving_config.metadata.to_h
245
248
 
246
- # Set x-goog-api-client and x-goog-user-project headers
249
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
247
250
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
248
251
  lib_name: @config.lib_name, lib_version: @config.lib_version,
249
252
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
253
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
250
254
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
251
255
 
252
256
  header_params = {}
@@ -331,10 +335,11 @@ module Google
331
335
  # Customize the options with defaults
332
336
  metadata = @config.rpcs.delete_serving_config.metadata.to_h
333
337
 
334
- # Set x-goog-api-client and x-goog-user-project headers
338
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
335
339
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
336
340
  lib_name: @config.lib_name, lib_version: @config.lib_version,
337
341
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
342
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
338
343
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
339
344
 
340
345
  header_params = {}
@@ -424,10 +429,11 @@ module Google
424
429
  # Customize the options with defaults
425
430
  metadata = @config.rpcs.update_serving_config.metadata.to_h
426
431
 
427
- # Set x-goog-api-client and x-goog-user-project headers
432
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
428
433
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
429
434
  lib_name: @config.lib_name, lib_version: @config.lib_version,
430
435
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
436
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
431
437
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
432
438
 
433
439
  header_params = {}
@@ -512,10 +518,11 @@ module Google
512
518
  # Customize the options with defaults
513
519
  metadata = @config.rpcs.get_serving_config.metadata.to_h
514
520
 
515
- # Set x-goog-api-client and x-goog-user-project headers
521
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
516
522
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
517
523
  lib_name: @config.lib_name, lib_version: @config.lib_version,
518
524
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
525
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
519
526
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
520
527
 
521
528
  header_params = {}
@@ -609,10 +616,11 @@ module Google
609
616
  # Customize the options with defaults
610
617
  metadata = @config.rpcs.list_serving_configs.metadata.to_h
611
618
 
612
- # Set x-goog-api-client and x-goog-user-project headers
619
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
613
620
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
614
621
  lib_name: @config.lib_name, lib_version: @config.lib_version,
615
622
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
623
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
616
624
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
617
625
 
618
626
  header_params = {}
@@ -705,10 +713,11 @@ module Google
705
713
  # Customize the options with defaults
706
714
  metadata = @config.rpcs.add_control.metadata.to_h
707
715
 
708
- # Set x-goog-api-client and x-goog-user-project headers
716
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
709
717
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
710
718
  lib_name: @config.lib_name, lib_version: @config.lib_version,
711
719
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
720
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
712
721
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
713
722
 
714
723
  header_params = {}
@@ -797,10 +806,11 @@ module Google
797
806
  # Customize the options with defaults
798
807
  metadata = @config.rpcs.remove_control.metadata.to_h
799
808
 
800
- # Set x-goog-api-client and x-goog-user-project headers
809
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
801
810
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
802
811
  lib_name: @config.lib_name, lib_version: @config.lib_version,
803
812
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
813
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
804
814
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
805
815
 
806
816
  header_params = {}
@@ -33,6 +33,9 @@ module Google
33
33
  # Service for modifying ServingConfig.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
36
39
  # @private
37
40
  DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
38
41
 
@@ -235,12 +238,13 @@ module Google
235
238
  # Customize the options with defaults
236
239
  call_metadata = @config.rpcs.create_serving_config.metadata.to_h
237
240
 
238
- # Set x-goog-api-client and x-goog-user-project headers
241
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
239
242
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
240
243
  lib_name: @config.lib_name, lib_version: @config.lib_version,
241
244
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
242
245
  transports_version_send: [:rest]
243
246
 
247
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
244
248
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
245
249
 
246
250
  options.apply_defaults timeout: @config.rpcs.create_serving_config.timeout,
@@ -316,12 +320,13 @@ module Google
316
320
  # Customize the options with defaults
317
321
  call_metadata = @config.rpcs.delete_serving_config.metadata.to_h
318
322
 
319
- # Set x-goog-api-client and x-goog-user-project headers
323
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
320
324
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
321
325
  lib_name: @config.lib_name, lib_version: @config.lib_version,
322
326
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
323
327
  transports_version_send: [:rest]
324
328
 
329
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
325
330
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
326
331
 
327
332
  options.apply_defaults timeout: @config.rpcs.delete_serving_config.timeout,
@@ -402,12 +407,13 @@ module Google
402
407
  # Customize the options with defaults
403
408
  call_metadata = @config.rpcs.update_serving_config.metadata.to_h
404
409
 
405
- # Set x-goog-api-client and x-goog-user-project headers
410
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
406
411
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
407
412
  lib_name: @config.lib_name, lib_version: @config.lib_version,
408
413
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
409
414
  transports_version_send: [:rest]
410
415
 
416
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
411
417
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
412
418
 
413
419
  options.apply_defaults timeout: @config.rpcs.update_serving_config.timeout,
@@ -483,12 +489,13 @@ module Google
483
489
  # Customize the options with defaults
484
490
  call_metadata = @config.rpcs.get_serving_config.metadata.to_h
485
491
 
486
- # Set x-goog-api-client and x-goog-user-project headers
492
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
487
493
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
488
494
  lib_name: @config.lib_name, lib_version: @config.lib_version,
489
495
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
490
496
  transports_version_send: [:rest]
491
497
 
498
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
492
499
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
493
500
 
494
501
  options.apply_defaults timeout: @config.rpcs.get_serving_config.timeout,
@@ -573,12 +580,13 @@ module Google
573
580
  # Customize the options with defaults
574
581
  call_metadata = @config.rpcs.list_serving_configs.metadata.to_h
575
582
 
576
- # Set x-goog-api-client and x-goog-user-project headers
583
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
577
584
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
578
585
  lib_name: @config.lib_name, lib_version: @config.lib_version,
579
586
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
580
587
  transports_version_send: [:rest]
581
588
 
589
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
582
590
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
583
591
 
584
592
  options.apply_defaults timeout: @config.rpcs.list_serving_configs.timeout,
@@ -662,12 +670,13 @@ module Google
662
670
  # Customize the options with defaults
663
671
  call_metadata = @config.rpcs.add_control.metadata.to_h
664
672
 
665
- # Set x-goog-api-client and x-goog-user-project headers
673
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
666
674
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
667
675
  lib_name: @config.lib_name, lib_version: @config.lib_version,
668
676
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
669
677
  transports_version_send: [:rest]
670
678
 
679
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
671
680
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
672
681
 
673
682
  options.apply_defaults timeout: @config.rpcs.add_control.timeout,
@@ -747,12 +756,13 @@ module Google
747
756
  # Customize the options with defaults
748
757
  call_metadata = @config.rpcs.remove_control.metadata.to_h
749
758
 
750
- # Set x-goog-api-client and x-goog-user-project headers
759
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
751
760
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
752
761
  lib_name: @config.lib_name, lib_version: @config.lib_version,
753
762
  gapic_version: ::Google::Cloud::Retail::V2::VERSION,
754
763
  transports_version_send: [:rest]
755
764
 
765
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
756
766
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
757
767
 
758
768
  options.apply_defaults timeout: @config.rpcs.remove_control.timeout,