google-cloud-retail-v2 0.7.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -5
  3. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -1
  4. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +2 -1
  5. data/lib/google/cloud/retail/v2/common_pb.rb +2 -1
  6. data/lib/google/cloud/retail/v2/completion_service/client.rb +6 -3
  7. data/lib/google/cloud/retail/v2/completion_service/operations.rb +3 -0
  8. data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -1
  9. data/lib/google/cloud/retail/v2/import_config_pb.rb +2 -1
  10. data/lib/google/cloud/retail/v2/prediction_service/client.rb +39 -14
  11. data/lib/google/cloud/retail/v2/prediction_service_pb.rb +3 -1
  12. data/lib/google/cloud/retail/v2/product_pb.rb +2 -1
  13. data/lib/google/cloud/retail/v2/product_service/client.rb +63 -35
  14. data/lib/google/cloud/retail/v2/product_service/operations.rb +3 -0
  15. data/lib/google/cloud/retail/v2/product_service_pb.rb +2 -1
  16. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +34 -25
  17. data/lib/google/cloud/retail/v2/purge_config_pb.rb +2 -1
  18. data/lib/google/cloud/retail/v2/search_service/client.rb +37 -8
  19. data/lib/google/cloud/retail/v2/search_service_pb.rb +18 -1
  20. data/lib/google/cloud/retail/v2/user_event_pb.rb +2 -1
  21. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +3 -0
  22. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +2 -1
  23. data/lib/google/cloud/retail/v2/version.rb +1 -1
  24. data/proto_docs/google/cloud/retail/v2/catalog.rb +8 -8
  25. data/proto_docs/google/cloud/retail/v2/common.rb +22 -10
  26. data/proto_docs/google/cloud/retail/v2/completion_service.rb +16 -5
  27. data/proto_docs/google/cloud/retail/v2/import_config.rb +9 -2
  28. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +40 -15
  29. data/proto_docs/google/cloud/retail/v2/product.rb +2 -2
  30. data/proto_docs/google/cloud/retail/v2/product_service.rb +73 -29
  31. data/proto_docs/google/cloud/retail/v2/search_service.rb +141 -29
  32. data/proto_docs/google/cloud/retail/v2/user_event.rb +6 -3
  33. data/proto_docs/google/protobuf/any.rb +3 -3
  34. data/proto_docs/google/protobuf/empty.rb +0 -2
  35. data/proto_docs/google/protobuf/struct.rb +2 -2
  36. metadata +12 -12
@@ -46,7 +46,7 @@ module Google
46
46
  rpc :DeleteProduct, ::Google::Cloud::Retail::V2::DeleteProductRequest, ::Google::Protobuf::Empty
47
47
  # Bulk import of multiple [Product][google.cloud.retail.v2.Product]s.
48
48
  #
49
- # Request processing may be synchronous. No partial updating is supported.
49
+ # Request processing may be synchronous.
50
50
  # Non-existing items are created.
51
51
  #
52
52
  # Note that it is possible for a subset of the
@@ -62,18 +62,21 @@ module Google
62
62
  # enqueued and processed downstream. As a consequence, when a response is
63
63
  # returned, updates are not immediately manifested in the
64
64
  # [Product][google.cloud.retail.v2.Product] queried by
65
- # [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or
66
- # [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
65
+ # [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
66
+ # or
67
+ # [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
67
68
  #
68
69
  # When inventory is updated with
69
- # [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and
70
- # [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the
71
- # specified inventory field value(s) will overwrite any existing value(s)
70
+ # [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
71
+ # and
72
+ # [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct],
73
+ # the specified inventory field value(s) will overwrite any existing value(s)
72
74
  # while ignoring the last update time for this field. Furthermore, the last
73
75
  # update time for the specified inventory fields will be overwritten to the
74
76
  # time of the
75
- # [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or
76
- # [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
77
+ # [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
78
+ # or
79
+ # [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
77
80
  # request.
78
81
  #
79
82
  # If no inventory fields are set in
@@ -85,10 +88,10 @@ module Google
85
88
  # then any existing inventory information will be preserved.
86
89
  #
87
90
  # Pre-existing inventory information can only be updated with
88
- # [SetInventory][google.cloud.retail.v2.ProductService.SetInventory],
89
- # [AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces],
91
+ # [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory],
92
+ # [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces],
90
93
  # and
91
- # [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
94
+ # [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
92
95
  #
93
96
  # This feature is only available for users who have Retail Search enabled.
94
97
  # Please enable Retail Search on Cloud Console before using this feature.
@@ -102,8 +105,9 @@ module Google
102
105
  # enqueued and processed downstream. As a consequence, when a response is
103
106
  # returned, the added place IDs are not immediately manifested in the
104
107
  # [Product][google.cloud.retail.v2.Product] queried by
105
- # [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or
106
- # [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
108
+ # [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
109
+ # or
110
+ # [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
107
111
  #
108
112
  # This feature is only available for users who have Retail Search enabled.
109
113
  # Please enable Retail Search on Cloud Console before using this feature.
@@ -117,8 +121,9 @@ module Google
117
121
  # enqueued and processed downstream. As a consequence, when a response is
118
122
  # returned, the removed place IDs are not immediately manifested in the
119
123
  # [Product][google.cloud.retail.v2.Product] queried by
120
- # [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or
121
- # [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
124
+ # [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
125
+ # or
126
+ # [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
122
127
  #
123
128
  # This feature is only available for users who have Retail Search enabled.
124
129
  # Please enable Retail Search on Cloud Console before using this feature.
@@ -133,13 +138,15 @@ module Google
133
138
  # and processed downstream. As a consequence, when a response is returned,
134
139
  # updates are not immediately manifested in the
135
140
  # [Product][google.cloud.retail.v2.Product] queried by
136
- # [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or
137
- # [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
141
+ # [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
142
+ # or
143
+ # [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
138
144
  #
139
145
  # Local inventory information can only be modified using this method.
140
- # [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and
141
- # [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no
142
- # effect on local inventories.
146
+ # [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
147
+ # and
148
+ # [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
149
+ # has no effect on local inventories.
143
150
  #
144
151
  # This feature is only available for users who have Retail Search enabled.
145
152
  # Please enable Retail Search on Cloud Console before using this feature.
@@ -152,13 +159,15 @@ module Google
152
159
  # enqueued and processed downstream. As a consequence, when a response is
153
160
  # returned, removals are not immediately manifested in the
154
161
  # [Product][google.cloud.retail.v2.Product] queried by
155
- # [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or
156
- # [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
162
+ # [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
163
+ # or
164
+ # [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
157
165
  #
158
166
  # Local inventory information can only be removed using this method.
159
- # [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and
160
- # [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no
161
- # effect on local inventories.
167
+ # [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
168
+ # and
169
+ # [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
170
+ # has no effect on local inventories.
162
171
  #
163
172
  # This feature is only available for users who have Retail Search enabled.
164
173
  # Please enable Retail Search on Cloud Console before using this feature.
@@ -1,9 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/retail/v2/purge_config.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/field_behavior_pb'
5
7
  require 'google/api/resource_pb'
6
- require 'google/protobuf'
7
8
 
8
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
10
  add_file("google/cloud/retail/v2/purge_config.proto", :syntax => :proto3) do
@@ -168,14 +168,16 @@ module Google
168
168
  # @param options [::Gapic::CallOptions, ::Hash]
169
169
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
170
170
  #
171
- # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil, search_mode: nil, personalization_spec: nil)
171
+ # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil, search_mode: nil, personalization_spec: nil, labels: nil, spell_correction_spec: nil)
172
172
  # Pass arguments to `search` via keyword arguments. Note that at
173
173
  # least one keyword argument is required. To specify no parameters, or to keep all
174
174
  # the default parameter values, pass an empty Hash as a request object (see above).
175
175
  #
176
176
  # @param placement [::String]
177
- # Required. The resource name of the search engine placement, such as
178
- # `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
177
+ # Required. The resource name of the Retail Search serving config, such as
178
+ # `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
179
+ # or the name of the legacy placement resource, such as
180
+ # `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
179
181
  # This field is used to identify the serving configuration name and the set
180
182
  # of models that will be used to make the search.
181
183
  # @param branch [::String]
@@ -186,6 +188,11 @@ module Google
186
188
  # products under the default branch.
187
189
  # @param query [::String]
188
190
  # Raw search query.
191
+ #
192
+ # If this field is empty, the request is considered a category browsing
193
+ # request and returned results are based on
194
+ # {::Google::Cloud::Retail::V2::SearchRequest#filter filter} and
195
+ # {::Google::Cloud::Retail::V2::SearchRequest#page_categories page_categories}.
189
196
  # @param visitor_id [::String]
190
197
  # Required. A unique identifier for tracking visitors. For example, this
191
198
  # could be implemented with an HTTP cookie, which should be able to uniquely
@@ -268,10 +275,10 @@ module Google
268
275
  # [user guide](https://cloud.google.com/retail/docs/boosting).
269
276
  #
270
277
  # Notice that if both [ServingConfig.boost_control_ids][] and
271
- # [SearchRequest.boost_spec] are set, the boost conditions from both places
272
- # are evaluated. If a search request matches multiple boost conditions,
273
- # the final boost score is equal to the sum of the boost scores from all
274
- # matched boost conditions.
278
+ # {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}
279
+ # are set, the boost conditions from both places are evaluated. If a search
280
+ # request matches multiple boost conditions, the final boost score is equal
281
+ # to the sum of the boost scores from all matched boost conditions.
275
282
  # @param query_expansion_spec [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec, ::Hash]
276
283
  # The query expansion specification that specifies the conditions under which
277
284
  # query expansion will occur. See more details at this [user
@@ -304,7 +311,8 @@ module Google
304
311
  # * inventory(place_id,price)
305
312
  # * inventory(place_id,original_price)
306
313
  # * inventory(place_id,attributes.key), where key is any key in the
307
- # [Product.inventories.attributes][] map.
314
+ # {::Google::Cloud::Retail::V2::LocalInventory#attributes Product.local_inventories.attributes}
315
+ # map.
308
316
  # * attributes.key, where key is any key in the
309
317
  # {::Google::Cloud::Retail::V2::Product#attributes Product.attributes} map.
310
318
  # * pickupInStore.id, where id is any
@@ -364,6 +372,27 @@ module Google
364
372
  # request triggers both product search and faceted search.
365
373
  # @param personalization_spec [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec, ::Hash]
366
374
  # The specification for personalization.
375
+ # @param labels [::Hash{::String => ::String}]
376
+ # The labels applied to a resource must meet the following requirements:
377
+ #
378
+ # * Each resource can have multiple labels, up to a maximum of 64.
379
+ # * Each label must be a key-value pair.
380
+ # * Keys have a minimum length of 1 character and a maximum length of 63
381
+ # characters and cannot be empty. Values can be empty and have a maximum
382
+ # length of 63 characters.
383
+ # * Keys and values can contain only lowercase letters, numeric characters,
384
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
385
+ # international characters are allowed.
386
+ # * The key portion of a label must be unique. However, you can use the same
387
+ # key with multiple resources.
388
+ # * Keys must start with a lowercase letter or international character.
389
+ #
390
+ # See [Google Cloud
391
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
392
+ # for more details.
393
+ # @param spell_correction_spec [::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec, ::Hash]
394
+ # The spell correction specification that specifies the mode under
395
+ # which spell correction will take effect.
367
396
  #
368
397
  # @yield [response, operation] Access the result along with the RPC operation
369
398
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>]
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/retail/v2/search_service.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -9,7 +11,6 @@ require 'google/cloud/retail/v2/common_pb'
9
11
  require 'google/cloud/retail/v2/product_pb'
10
12
  require 'google/protobuf/field_mask_pb'
11
13
  require 'google/protobuf/struct_pb'
12
- require 'google/protobuf'
13
14
 
14
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
16
  add_file("google/cloud/retail/v2/search_service.proto", :syntax => :proto3) do
@@ -33,6 +34,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
33
34
  repeated :page_categories, :string, 23
34
35
  optional :search_mode, :enum, 31, "google.cloud.retail.v2.SearchRequest.SearchMode"
35
36
  optional :personalization_spec, :message, 32, "google.cloud.retail.v2.SearchRequest.PersonalizationSpec"
37
+ map :labels, :string, :string, 34
38
+ proto3_optional :spell_correction_spec, :message, 35, "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec"
36
39
  end
37
40
  add_message "google.cloud.retail.v2.SearchRequest.FacetSpec" do
38
41
  optional :facet_key, :message, 1, "google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey"
@@ -46,8 +49,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
46
49
  repeated :restricted_values, :string, 3
47
50
  repeated :prefixes, :string, 8
48
51
  repeated :contains, :string, 9
52
+ optional :case_insensitive, :bool, 10
49
53
  optional :order_by, :string, 4
50
54
  optional :query, :string, 5
55
+ optional :return_min_max, :bool, 11
51
56
  end
52
57
  add_message "google.cloud.retail.v2.SearchRequest.DynamicFacetSpec" do
53
58
  optional :mode, :enum, 1, "google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode"
@@ -82,6 +87,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
82
87
  value :AUTO, 1
83
88
  value :DISABLED, 2
84
89
  end
90
+ add_message "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec" do
91
+ optional :mode, :enum, 1, "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode"
92
+ end
93
+ add_enum "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode" do
94
+ value :MODE_UNSPECIFIED, 0
95
+ value :SUGGESTION_ONLY, 1
96
+ value :AUTO, 2
97
+ end
85
98
  add_enum "google.cloud.retail.v2.SearchRequest.SearchMode" do
86
99
  value :SEARCH_MODE_UNSPECIFIED, 0
87
100
  value :PRODUCT_SEARCH_ONLY, 1
@@ -113,6 +126,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
113
126
  end
114
127
  add_message "google.cloud.retail.v2.SearchResponse.Facet.FacetValue" do
115
128
  optional :count, :int64, 3
129
+ optional :min_value, :double, 5
130
+ optional :max_value, :double, 6
116
131
  oneof :facet_value do
117
132
  optional :value, :string, 1
118
133
  optional :interval, :message, 2, "google.cloud.retail.v2.Interval"
@@ -140,6 +155,8 @@ module Google
140
155
  SearchRequest::QueryExpansionSpec::Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition").enummodule
141
156
  SearchRequest::PersonalizationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.PersonalizationSpec").msgclass
142
157
  SearchRequest::PersonalizationSpec::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode").enummodule
158
+ SearchRequest::SpellCorrectionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec").msgclass
159
+ SearchRequest::SpellCorrectionSpec::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode").enummodule
143
160
  SearchRequest::SearchMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.SearchMode").enummodule
144
161
  SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse").msgclass
145
162
  SearchResponse::SearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse.SearchResult").msgclass
@@ -1,12 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/retail/v2/user_event.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/field_behavior_pb'
5
7
  require 'google/cloud/retail/v2/common_pb'
6
8
  require 'google/cloud/retail/v2/product_pb'
7
9
  require 'google/protobuf/timestamp_pb'
8
10
  require 'google/protobuf/wrappers_pb'
9
- require 'google/protobuf'
10
11
 
11
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
13
  add_file("google/cloud/retail/v2/user_event.proto", :syntax => :proto3) do
@@ -95,6 +95,9 @@ module Google
95
95
  channel_args: @config.channel_args,
96
96
  interceptors: @config.interceptors
97
97
  )
98
+
99
+ # Used by an LRO wrapper for some methods of this service
100
+ @operations_client = self
98
101
  end
99
102
 
100
103
  # Service calls
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/retail/v2/user_event_service.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -10,7 +12,6 @@ require 'google/cloud/retail/v2/import_config_pb'
10
12
  require 'google/cloud/retail/v2/purge_config_pb'
11
13
  require 'google/cloud/retail/v2/user_event_pb'
12
14
  require 'google/longrunning/operations_pb'
13
- require 'google/protobuf'
14
15
 
15
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
17
  add_file("google/cloud/retail/v2/user_event_service.proto", :syntax => :proto3) do
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
- VERSION = "0.7.0"
24
+ VERSION = "0.10.0"
25
25
  end
26
26
  end
27
27
  end
@@ -34,10 +34,10 @@ module Google
34
34
  # default to
35
35
  # {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Product.Type.PRIMARY} if
36
36
  # unset.
37
- # * `variant`: You can only ingest
38
- # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Product.Type.VARIANT}
39
- # {::Google::Cloud::Retail::V2::Product Product}s.
40
- # This means
37
+ # * `variant` (incompatible with Retail Search): You can only
38
+ # ingest
39
+ # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Product.Type.VARIANT}
40
+ # {::Google::Cloud::Retail::V2::Product Product}s. This means
41
41
  # {::Google::Cloud::Retail::V2::Product#primary_product_id Product.primary_product_id}
42
42
  # cannot be empty.
43
43
  #
@@ -48,8 +48,8 @@ module Google
48
48
  # {::Google::Cloud::Retail::V2::ProductLevelConfig#merchant_center_product_id_field merchant_center_product_id_field}
49
49
  # is `itemGroupId`, an INVALID_ARGUMENT error is returned.
50
50
  #
51
- # See [Using product
52
- # levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels)
51
+ # See [Product
52
+ # levels](https://cloud.google.com/retail/docs/catalog#product-levels)
53
53
  # for more details.
54
54
  # @!attribute [rw] merchant_center_product_id_field
55
55
  # @return [::String]
@@ -70,8 +70,8 @@ module Google
70
70
  # {::Google::Cloud::Retail::V2::ProductLevelConfig#ingestion_product_type ingestion_product_type}
71
71
  # is `variant`, an INVALID_ARGUMENT error is returned.
72
72
  #
73
- # See [Using product
74
- # levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels)
73
+ # See [Product
74
+ # levels](https://cloud.google.com/retail/docs/catalog#product-levels)
75
75
  # for more details.
76
76
  class ProductLevelConfig
77
77
  include ::Google::Protobuf::MessageExts
@@ -115,11 +115,13 @@ module Google
115
115
  # Otherwise, an INVALID_ARGUMENT error is returned.
116
116
  # @!attribute [rw] searchable
117
117
  # @return [::Boolean]
118
- # This field will only be used when
118
+ # This field is normally ignored unless
119
119
  # [AttributesConfig.attribute_config_level][] of the
120
- # {::Google::Cloud::Retail::V2::Catalog Catalog} is
121
- # 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
122
- # searchable by text queries in
120
+ # {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
121
+ # 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level
122
+ # attribute configuration, see [Configuration
123
+ # modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
124
+ # If true, custom attribute values are searchable by text queries in
123
125
  # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
124
126
  #
125
127
  # This field is ignored in a {::Google::Cloud::Retail::V2::UserEvent UserEvent}.
@@ -128,11 +130,14 @@ module Google
128
130
  # set. Otherwise, a INVALID_ARGUMENT error is returned.
129
131
  # @!attribute [rw] indexable
130
132
  # @return [::Boolean]
131
- # This field will only be used when
133
+ # This field is normally ignored unless
132
134
  # [AttributesConfig.attribute_config_level][] of the
133
- # {::Google::Cloud::Retail::V2::Catalog Catalog} is
134
- # 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
135
- # indexed, so that it can be filtered, faceted or boosted in
135
+ # {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
136
+ # 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level
137
+ # attribute configuration, see [Configuration
138
+ # modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
139
+ # If true, custom attribute values are indexed, so that they can be filtered,
140
+ # faceted or boosted in
136
141
  # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
137
142
  #
138
143
  # This field is ignored in a {::Google::Cloud::Retail::V2::UserEvent UserEvent}.
@@ -260,7 +265,10 @@ module Google
260
265
  # @!attribute [rw] original_price
261
266
  # @return [::Float]
262
267
  # Price of the product without any discount. If zero, by default set to be
263
- # the {::Google::Cloud::Retail::V2::PriceInfo#price price}.
268
+ # the {::Google::Cloud::Retail::V2::PriceInfo#price price}. If set,
269
+ # {::Google::Cloud::Retail::V2::PriceInfo#original_price original_price} should be
270
+ # greater than or equal to {::Google::Cloud::Retail::V2::PriceInfo#price price},
271
+ # otherwise an INVALID_ARGUMENT error is thrown.
264
272
  # @!attribute [rw] cost
265
273
  # @return [::Float]
266
274
  # The costs associated with the sale of a particular product. Used for gross
@@ -373,10 +381,14 @@ module Google
373
381
  # @!attribute [rw] user_id
374
382
  # @return [::String]
375
383
  # Highly recommended for logged-in users. Unique identifier for logged-in
376
- # user, such as a user name.
384
+ # user, such as a user name. Don't set for anonymous users.
377
385
  #
378
386
  # Always use a hashed value for this ID.
379
387
  #
388
+ # Don't set the field to the same fixed ID for different users. This mixes
389
+ # the event history of those users together, which results in degraded
390
+ # model quality.
391
+ #
380
392
  # The field must be a UTF-8 encoded string with a length limit of 128
381
393
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
382
394
  # @!attribute [rw] ip_address
@@ -44,6 +44,9 @@ module Google
44
44
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
45
45
  # @!attribute [rw] language_codes
46
46
  # @return [::Array<::String>]
47
+ # Note that this field applies for `user-data` dataset only. For requests
48
+ # with `cloud-retail` dataset, setting this field has no effect.
49
+ #
47
50
  # The language filters applied to the output suggestions. If set, it should
48
51
  # contain the language of the query. If not set, suggestions are returned
49
52
  # without considering language restrictions. This is the BCP-47 language
@@ -78,9 +81,9 @@ module Google
78
81
  #
79
82
  # * user-data
80
83
  #
81
- # * cloud-retail
82
- # This option requires additional allowlisting. Before using cloud-retail,
83
- # contact Cloud Retail support team first.
84
+ # * cloud-retail:
85
+ # This option requires enabling auto-learning function first. See
86
+ # [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
84
87
  # @!attribute [rw] max_suggestions
85
88
  # @return [::Integer]
86
89
  # Completion max suggestions. If left unset or set to 0, then will fallback
@@ -114,11 +117,15 @@ module Google
114
117
  # {::Google::Cloud::Retail::V2::CompleteQueryRequest#visitor_id CompleteQueryRequest.visitor_id}
115
118
  # field is set and {::Google::Cloud::Retail::V2::UserEvent UserEvent} is imported.
116
119
  # The recent searches satisfy the follow rules:
120
+ #
117
121
  # * They are ordered from latest to oldest.
122
+ #
118
123
  # * They are matched with
119
124
  # {::Google::Cloud::Retail::V2::CompleteQueryRequest#query CompleteQueryRequest.query}
120
125
  # case insensitively.
121
- # * They are transformed to lower cases.
126
+ #
127
+ # * They are transformed to lower case.
128
+ #
122
129
  # * They are UTF-8 safe.
123
130
  #
124
131
  # Recent searches are deduplicated. More recent searches will be reserved
@@ -134,10 +141,14 @@ module Google
134
141
  # @!attribute [rw] attributes
135
142
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
136
143
  # Custom attributes for the suggestion term.
144
+ #
137
145
  # * For "user-data", the attributes are additional custom attributes
138
146
  # ingested through BigQuery.
147
+ #
139
148
  # * For "cloud-retail", the attributes are product attributes generated
140
- # by Cloud Retail.
149
+ # by Cloud Retail. It requires
150
+ # {::Google::Cloud::Retail::V2::UserEvent#product_details UserEvent.product_details}
151
+ # is imported properly.
141
152
  class CompletionResult
142
153
  include ::Google::Protobuf::MessageExts
143
154
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -184,11 +184,18 @@ module Google
184
184
  # {::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
185
185
  # @!attribute [rw] notification_pubsub_topic
186
186
  # @return [::String]
187
- # Pub/Sub topic for receiving notification. If this field is set,
187
+ # Full Pub/Sub topic name for receiving notification. If this field is set,
188
188
  # when the import is finished, a notification will be sent to
189
189
  # specified Pub/Sub topic. The message data will be JSON string of a
190
190
  # {::Google::Longrunning::Operation Operation}.
191
- # Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
191
+ #
192
+ # Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
193
+ # to be within the same project as
194
+ # {::Google::Cloud::Retail::V2::ImportProductsRequest#parent ImportProductsRequest.parent}.
195
+ # Make sure that both
196
+ # `cloud-retail-customer-data-access@system.gserviceaccount.com` and
197
+ # `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
198
+ # have the `pubsub.topics.publish` IAM permission on the topic.
192
199
  #
193
200
  # Only supported when
194
201
  # {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
@@ -25,29 +25,44 @@ module Google
25
25
  # @!attribute [rw] placement
26
26
  # @return [::String]
27
27
  # Required. Full resource name of the format:
28
- # \\{name=projects/*/locations/global/catalogs/default_catalog/placements/*}
29
- # The ID of the Recommendations AI placement. Before you can request
30
- # predictions from your model, you must create at least one placement for it.
31
- # For more information, see [Managing
32
- # placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
28
+ # `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
29
+ # or
30
+ # `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
31
+ # We recommend using the `servingConfigs` resource. `placements` is a legacy
32
+ # resource.
33
+ # The ID of the Recommendations AI serving config or placement.
34
+ # Before you can request predictions from your model, you must create at
35
+ # least one serving config or placement for it. For more information, see
36
+ # [Managing serving configurations]
37
+ # (https://cloud.google.com/retail/docs/manage-configs).
33
38
  #
34
- # The full list of available placements can be seen at
35
- # https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
39
+ # The full list of available serving configs can be seen at
40
+ # https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
36
41
  # @!attribute [rw] user_event
37
42
  # @return [::Google::Cloud::Retail::V2::UserEvent]
38
43
  # Required. Context about the user, what they are looking at and what action
39
44
  # they took to trigger the predict request. Note that this user event detail
40
45
  # won't be ingested to userEvent logs. Thus, a separate userEvent write
41
46
  # request is required for event logging.
47
+ #
48
+ # Don't set
49
+ # {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id} or
50
+ # {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id} to the same
51
+ # fixed ID for different users. If you are trying to receive non-personalized
52
+ # recommendations (not recommended; this can negatively impact model
53
+ # performance), instead set
54
+ # {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id} to a
55
+ # random unique ID and leave
56
+ # {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id} unset.
42
57
  # @!attribute [rw] page_size
43
58
  # @return [::Integer]
44
- # Maximum number of results to return per page. Set this property
45
- # to the number of prediction results needed. If zero, the service will
46
- # choose a reasonable default. The maximum allowed value is 100. Values
47
- # above 100 will be coerced to 100.
59
+ # Maximum number of results to return. Set this property to the number of
60
+ # prediction results needed. If zero, the service will choose a reasonable
61
+ # default. The maximum allowed value is 100. Values above 100 will be coerced
62
+ # to 100.
48
63
  # @!attribute [rw] page_token
49
64
  # @return [::String]
50
- # The previous PredictResponse.next_page_token.
65
+ # This field is not used; leave it unset.
51
66
  # @!attribute [rw] filter
52
67
  # @return [::String]
53
68
  # Filter for restricting prediction results with a length limit of 5,000
@@ -79,6 +94,14 @@ module Google
79
94
  # receive empty results instead.
80
95
  # Note that the API will never return items with storageStatus of "EXPIRED"
81
96
  # or "DELETED" regardless of filter choices.
97
+ #
98
+ # If `filterSyntaxV2` is set to true under the `params` field, then
99
+ # attribute-based expressions are expected instead of the above described
100
+ # tag-based syntax. Examples:
101
+ #
102
+ # * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones"))
103
+ # * (availability: ANY("IN_STOCK")) AND
104
+ # (colors: ANY("Red") OR categories: ANY("Phones"))
82
105
  # @!attribute [rw] validate_only
83
106
  # @return [::Boolean]
84
107
  # Use validate only mode for this prediction query. If set to true, a
@@ -112,6 +135,8 @@ module Google
112
135
  # 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives
113
136
  # request-level control and adjusts prediction results based on product
114
137
  # category.
138
+ # * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter`
139
+ # field is interpreteted according to the new, attribute-based syntax.
115
140
  # @!attribute [rw] labels
116
141
  # @return [::Google::Protobuf::Map{::String => ::String}]
117
142
  # The labels applied to a resource must meet the following requirements:
@@ -119,7 +144,7 @@ module Google
119
144
  # * Each resource can have multiple labels, up to a maximum of 64.
120
145
  # * Each label must be a key-value pair.
121
146
  # * Keys have a minimum length of 1 character and a maximum length of 63
122
- # characters, and cannot be empty. Values can be empty, and have a maximum
147
+ # characters and cannot be empty. Values can be empty and have a maximum
123
148
  # length of 63 characters.
124
149
  # * Keys and values can contain only lowercase letters, numeric characters,
125
150
  # underscores, and dashes. All characters must use UTF-8 encoding, and
@@ -185,9 +210,9 @@ module Google
185
210
  #
186
211
  # Possible values:
187
212
  #
188
- # * `product`: JSON representation of the product. Will be set if
213
+ # * `product`: JSON representation of the product. Is set if
189
214
  # `returnProduct` is set to true in `PredictRequest.params`.
190
- # * `score`: Prediction score in double value. Will be set if
215
+ # * `score`: Prediction score in double value. Is set if
191
216
  # `returnScore` is set to true in `PredictRequest.params`.
192
217
  class PredictionResult
193
218
  include ::Google::Protobuf::MessageExts
@@ -456,11 +456,11 @@ module Google
456
456
  # * {::Google::Cloud::Retail::V2::Product#name name}
457
457
  # * {::Google::Cloud::Retail::V2::Product#color_info color_info}
458
458
  #
459
- # Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
459
+ # The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
460
460
  # returned.
461
461
  #
462
462
  # Note: Returning more fields in
463
- # {::Google::Cloud::Retail::V2::SearchResponse SearchResponse} may increase
463
+ # {::Google::Cloud::Retail::V2::SearchResponse SearchResponse} can increase
464
464
  # response payload size and serving latency.
465
465
  # @!attribute [r] variants
466
466
  # @return [::Array<::Google::Cloud::Retail::V2::Product>]