google-cloud-retail-v2 0.6.4 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -6
  3. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -4
  4. data/lib/google/cloud/retail/v2/catalog_service/client.rb +9 -9
  5. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +3 -1
  6. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +0 -8
  7. data/lib/google/cloud/retail/v2/common_pb.rb +8 -5
  8. data/lib/google/cloud/retail/v2/completion_service/client.rb +20 -21
  9. data/lib/google/cloud/retail/v2/completion_service/operations.rb +3 -0
  10. data/lib/google/cloud/retail/v2/completion_service.rb +1 -2
  11. data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -1
  12. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
  13. data/lib/google/cloud/retail/v2/import_config_pb.rb +2 -2
  14. data/lib/google/cloud/retail/v2/prediction_service/client.rb +17 -4
  15. data/lib/google/cloud/retail/v2/prediction_service_pb.rb +2 -1
  16. data/lib/google/cloud/retail/v2/product_pb.rb +3 -2
  17. data/lib/google/cloud/retail/v2/product_service/client.rb +337 -23
  18. data/lib/google/cloud/retail/v2/product_service/operations.rb +3 -0
  19. data/lib/google/cloud/retail/v2/product_service_pb.rb +29 -2
  20. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +47 -9
  21. data/lib/google/cloud/retail/v2/promotion_pb.rb +22 -0
  22. data/lib/google/cloud/retail/v2/purge_config_pb.rb +3 -2
  23. data/lib/google/cloud/retail/v2/search_service/client.rb +56 -19
  24. data/lib/google/cloud/retail/v2/search_service.rb +1 -2
  25. data/lib/google/cloud/retail/v2/search_service_pb.rb +28 -3
  26. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +2 -4
  27. data/lib/google/cloud/retail/v2/user_event_pb.rb +2 -2
  28. data/lib/google/cloud/retail/v2/user_event_service/client.rb +4 -3
  29. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +3 -0
  30. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +3 -1
  31. data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +4 -3
  32. data/lib/google/cloud/retail/v2/version.rb +1 -1
  33. data/lib/google/cloud/retail/v2.rb +2 -0
  34. data/proto_docs/google/cloud/retail/v2/catalog.rb +8 -8
  35. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +9 -0
  36. data/proto_docs/google/cloud/retail/v2/common.rb +100 -25
  37. data/proto_docs/google/cloud/retail/v2/completion_service.rb +28 -18
  38. data/proto_docs/google/cloud/retail/v2/import_config.rb +38 -23
  39. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +19 -6
  40. data/proto_docs/google/cloud/retail/v2/product.rb +50 -41
  41. data/proto_docs/google/cloud/retail/v2/product_service.rb +154 -6
  42. data/proto_docs/google/cloud/retail/v2/promotion.rb +43 -0
  43. data/proto_docs/google/cloud/retail/v2/search_service.rb +162 -28
  44. data/proto_docs/google/cloud/retail/v2/user_event.rb +30 -14
  45. data/proto_docs/google/protobuf/any.rb +3 -3
  46. data/proto_docs/google/protobuf/struct.rb +2 -2
  47. metadata +14 -12
@@ -1,10 +1,11 @@
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/api/annotations_pb'
5
- require 'google/api/field_behavior_pb'
6
4
  require 'google/protobuf'
7
5
 
6
+ require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
8
+
8
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
10
  add_file("google/cloud/retail/v2/purge_config.proto", :syntax => :proto3) do
10
11
  add_message "google.cloud.retail.v2.PurgeMetadata" do
@@ -30,8 +30,7 @@ module Google
30
30
  # Service for search.
31
31
  #
32
32
  # This feature is only available for users who have Retail Search enabled.
33
- # Please submit a form [here](https://cloud.google.com/contact) to contact
34
- # cloud sales if you are interested in using Retail Search.
33
+ # Please enable Retail Search on Cloud Console before using this feature.
35
34
  #
36
35
  class Client
37
36
  include Paths
@@ -157,8 +156,7 @@ module Google
157
156
  # Performs a search.
158
157
  #
159
158
  # This feature is only available for users who have Retail Search enabled.
160
- # Please submit a form [here](https://cloud.google.com/contact) to contact
161
- # cloud sales if you are interested in using Retail Search.
159
+ # Please enable Retail Search on Cloud Console before using this feature.
162
160
  #
163
161
  # @overload search(request, options = nil)
164
162
  # Pass arguments to `search` via a request object, either of type
@@ -170,7 +168,7 @@ module Google
170
168
  # @param options [::Gapic::CallOptions, ::Hash]
171
169
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
172
170
  #
173
- # @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)
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)
174
172
  # Pass arguments to `search` via keyword arguments. Note that at
175
173
  # least one keyword argument is required. To specify no parameters, or to keep all
176
174
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -188,12 +186,20 @@ module Google
188
186
  # products under the default branch.
189
187
  # @param query [::String]
190
188
  # Raw search query.
189
+ #
190
+ # If this field is empty, the request is considered a category browsing
191
+ # request and returned results are based on
192
+ # {::Google::Cloud::Retail::V2::SearchRequest#filter filter} and
193
+ # {::Google::Cloud::Retail::V2::SearchRequest#page_categories page_categories}.
191
194
  # @param visitor_id [::String]
192
195
  # Required. A unique identifier for tracking visitors. For example, this
193
196
  # could be implemented with an HTTP cookie, which should be able to uniquely
194
197
  # identify a visitor on a single device. This unique identifier should not
195
198
  # change if the visitor logs in or out of the website.
196
199
  #
200
+ # This should be the same identifier as
201
+ # {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id}.
202
+ #
197
203
  # The field must be a UTF-8 encoded string with a length limit of 128
198
204
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
199
205
  # @param user_info [::Google::Cloud::Retail::V2::UserInfo, ::Hash]
@@ -231,6 +237,9 @@ module Google
231
237
  #
232
238
  # If this field is unrecognizable, an INVALID_ARGUMENT is returned.
233
239
  # @param canonical_filter [::String]
240
+ # The default filter that is applied when a user performs a search without
241
+ # checking any filters on the search page.
242
+ #
234
243
  # The filter applied to every search request when quality improvement such as
235
244
  # query expansion is needed. For example, if a query does not have enough
236
245
  # results, an expanded query with
@@ -254,20 +263,20 @@ module Google
254
263
  # A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error
255
264
  # is returned.
256
265
  # @param dynamic_facet_spec [::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec, ::Hash]
266
+ # Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic
267
+ # to enable dynamic facets. Do not set this field.
268
+ #
257
269
  # The specification for dynamically generated facets. Notice that only
258
270
  # textual facets can be dynamically generated.
259
- #
260
- # This feature requires additional allowlisting. Contact Retail Search
261
- # support team if you are interested in using dynamic facet feature.
262
271
  # @param boost_spec [::Google::Cloud::Retail::V2::SearchRequest::BoostSpec, ::Hash]
263
272
  # Boost specification to boost certain products. See more details at this
264
273
  # [user guide](https://cloud.google.com/retail/docs/boosting).
265
274
  #
266
275
  # Notice that if both [ServingConfig.boost_control_ids][] and
267
- # [SearchRequest.boost_spec] are set, the boost conditions from both places
268
- # are evaluated. If a search request matches multiple boost conditions,
269
- # the final boost score is equal to the sum of the boost scores from all
270
- # matched boost conditions.
276
+ # {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}
277
+ # are set, the boost conditions from both places are evaluated. If a search
278
+ # request matches multiple boost conditions, the final boost score is equal
279
+ # to the sum of the boost scores from all matched boost conditions.
271
280
  # @param query_expansion_spec [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec, ::Hash]
272
281
  # The query expansion specification that specifies the conditions under which
273
282
  # query expansion will occur. See more details at this [user
@@ -275,12 +284,15 @@ module Google
275
284
  # @param variant_rollup_keys [::Array<::String>]
276
285
  # The keys to fetch and rollup the matching
277
286
  # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
278
- # {::Google::Cloud::Retail::V2::Product Product}s attributes. The attributes from
279
- # all the matching {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
280
- # {::Google::Cloud::Retail::V2::Product Product}s are merged and de-duplicated.
281
- # Notice that rollup {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
282
- # {::Google::Cloud::Retail::V2::Product Product}s attributes will lead to extra
283
- # query latency. Maximum number of keys is 10.
287
+ # {::Google::Cloud::Retail::V2::Product Product}s attributes,
288
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo} or
289
+ # {::Google::Cloud::Retail::V2::LocalInventory LocalInventory}s attributes. The
290
+ # attributes from all the matching
291
+ # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
292
+ # {::Google::Cloud::Retail::V2::Product Product}s or
293
+ # {::Google::Cloud::Retail::V2::LocalInventory LocalInventory}s are merged and
294
+ # de-duplicated. Notice that rollup attributes will lead to extra query
295
+ # latency. Maximum number of keys is 30.
284
296
  #
285
297
  # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, a
286
298
  # fulfillment type and a fulfillment ID must be provided in the format of
@@ -295,8 +307,10 @@ module Google
295
307
  # * discount
296
308
  # * variantId
297
309
  # * inventory(place_id,price)
310
+ # * inventory(place_id,original_price)
298
311
  # * inventory(place_id,attributes.key), where key is any key in the
299
- # [Product.inventories.attributes][] map.
312
+ # {::Google::Cloud::Retail::V2::LocalInventory#attributes Product.local_inventories.attributes}
313
+ # map.
300
314
  # * attributes.key, where key is any key in the
301
315
  # {::Google::Cloud::Retail::V2::Product#attributes Product.attributes} map.
302
316
  # * pickupInStore.id, where id is any
@@ -354,6 +368,29 @@ module Google
354
368
  # @param search_mode [::Google::Cloud::Retail::V2::SearchRequest::SearchMode]
355
369
  # The search mode of the search request. If not specified, a single search
356
370
  # request triggers both product search and faceted search.
371
+ # @param personalization_spec [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec, ::Hash]
372
+ # The specification for personalization.
373
+ # @param labels [::Hash{::String => ::String}]
374
+ # The labels applied to a resource must meet the following requirements:
375
+ #
376
+ # * Each resource can have multiple labels, up to a maximum of 64.
377
+ # * Each label must be a key-value pair.
378
+ # * Keys have a minimum length of 1 character and a maximum length of 63
379
+ # characters and cannot be empty. Values can be empty and have a maximum
380
+ # length of 63 characters.
381
+ # * Keys and values can contain only lowercase letters, numeric characters,
382
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
383
+ # international characters are allowed.
384
+ # * The key portion of a label must be unique. However, you can use the same
385
+ # key with multiple resources.
386
+ # * Keys must start with a lowercase letter or international character.
387
+ #
388
+ # See [Google Cloud
389
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
390
+ # for more details.
391
+ # @param spell_correction_spec [::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec, ::Hash]
392
+ # The spell correction specification that specifies the mode under
393
+ # which spell correction will take effect.
357
394
  #
358
395
  # @yield [response, operation] Access the result along with the RPC operation
359
396
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>]
@@ -34,8 +34,7 @@ module Google
34
34
  # Service for search.
35
35
  #
36
36
  # This feature is only available for users who have Retail Search enabled.
37
- # Please submit a form [here](https://cloud.google.com/contact) to contact
38
- # cloud sales if you are interested in using Retail Search.
37
+ # Please enable Retail Search on Cloud Console before using this feature.
39
38
  #
40
39
  # To load this service and instantiate a client:
41
40
  #
@@ -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,9 +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/timestamp_pb'
13
- require 'google/protobuf/wrappers_pb'
14
- require 'google/protobuf'
15
14
 
16
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
16
  add_file("google/cloud/retail/v2/search_service.proto", :syntax => :proto3) do
@@ -34,6 +33,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
34
33
  repeated :variant_rollup_keys, :string, 17
35
34
  repeated :page_categories, :string, 23
36
35
  optional :search_mode, :enum, 31, "google.cloud.retail.v2.SearchRequest.SearchMode"
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"
37
39
  end
38
40
  add_message "google.cloud.retail.v2.SearchRequest.FacetSpec" do
39
41
  optional :facet_key, :message, 1, "google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey"
@@ -60,6 +62,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
60
62
  end
61
63
  add_message "google.cloud.retail.v2.SearchRequest.BoostSpec" do
62
64
  repeated :condition_boost_specs, :message, 1, "google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec"
65
+ proto3_optional :skip_boost_spec_validation, :bool, 2
63
66
  end
64
67
  add_message "google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec" do
65
68
  optional :condition, :string, 1
@@ -74,6 +77,22 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
74
77
  value :DISABLED, 1
75
78
  value :AUTO, 3
76
79
  end
80
+ add_message "google.cloud.retail.v2.SearchRequest.PersonalizationSpec" do
81
+ optional :mode, :enum, 1, "google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode"
82
+ end
83
+ add_enum "google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode" do
84
+ value :MODE_UNSPECIFIED, 0
85
+ value :AUTO, 1
86
+ value :DISABLED, 2
87
+ end
88
+ add_message "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec" do
89
+ optional :mode, :enum, 1, "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode"
90
+ end
91
+ add_enum "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode" do
92
+ value :MODE_UNSPECIFIED, 0
93
+ value :SUGGESTION_ONLY, 1
94
+ value :AUTO, 2
95
+ end
77
96
  add_enum "google.cloud.retail.v2.SearchRequest.SearchMode" do
78
97
  value :SEARCH_MODE_UNSPECIFIED, 0
79
98
  value :PRODUCT_SEARCH_ONLY, 1
@@ -88,6 +107,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
88
107
  optional :next_page_token, :string, 6
89
108
  optional :query_expansion_info, :message, 7, "google.cloud.retail.v2.SearchResponse.QueryExpansionInfo"
90
109
  optional :redirect_uri, :string, 10
110
+ repeated :applied_controls, :string, 12
111
+ repeated :invalid_condition_boost_specs, :message, 14, "google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec"
91
112
  end
92
113
  add_message "google.cloud.retail.v2.SearchResponse.SearchResult" do
93
114
  optional :id, :string, 1
@@ -128,6 +149,10 @@ module Google
128
149
  SearchRequest::BoostSpec::ConditionBoostSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec").msgclass
129
150
  SearchRequest::QueryExpansionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.QueryExpansionSpec").msgclass
130
151
  SearchRequest::QueryExpansionSpec::Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition").enummodule
152
+ SearchRequest::PersonalizationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.PersonalizationSpec").msgclass
153
+ SearchRequest::PersonalizationSpec::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode").enummodule
154
+ SearchRequest::SpellCorrectionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec").msgclass
155
+ SearchRequest::SpellCorrectionSpec::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode").enummodule
131
156
  SearchRequest::SearchMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.SearchMode").enummodule
132
157
  SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse").msgclass
133
158
  SearchResponse::SearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse.SearchResult").msgclass
@@ -27,8 +27,7 @@ module Google
27
27
  # Service for search.
28
28
  #
29
29
  # This feature is only available for users who have Retail Search enabled.
30
- # Please submit a form [here](https://cloud.google.com/contact) to contact
31
- # cloud sales if you are interested in using Retail Search.
30
+ # Please enable Retail Search on Cloud Console before using this feature.
32
31
  class Service
33
32
 
34
33
  include ::GRPC::GenericService
@@ -40,8 +39,7 @@ module Google
40
39
  # Performs a search.
41
40
  #
42
41
  # This feature is only available for users who have Retail Search enabled.
43
- # Please submit a form [here](https://cloud.google.com/contact) to contact
44
- # cloud sales if you are interested in using Retail Search.
42
+ # Please enable Retail Search on Cloud Console before using this feature.
45
43
  rpc :Search, ::Google::Cloud::Retail::V2::SearchRequest, ::Google::Cloud::Retail::V2::SearchResponse
46
44
  end
47
45
 
@@ -1,13 +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/api/annotations_pb'
4
+ require 'google/protobuf'
5
+
5
6
  require 'google/api/field_behavior_pb'
6
7
  require 'google/cloud/retail/v2/common_pb'
7
8
  require 'google/cloud/retail/v2/product_pb'
8
9
  require 'google/protobuf/timestamp_pb'
9
10
  require 'google/protobuf/wrappers_pb'
10
- require 'google/protobuf'
11
11
 
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/cloud/retail/v2/user_event.proto", :syntax => :proto3) do
@@ -593,13 +593,14 @@ module Google
593
593
  end
594
594
 
595
595
  ##
596
- # Triggers a user event rejoin operation with latest product catalog. Events
596
+ # Starts a user event rejoin operation with latest product catalog. Events
597
597
  # will not be annotated with detailed product information if product is
598
598
  # missing from the catalog at the time the user event is ingested, and these
599
599
  # events are stored as unjoined events with a limited usage on training and
600
- # serving. This API can be used to trigger a 'join' operation on specified
600
+ # serving. This method can be used to start a join operation on specified
601
601
  # events with latest version of product catalog. It can also be used to
602
- # correct events joined with wrong product catalog.
602
+ # correct events joined with the wrong product catalog. A rejoin operation
603
+ # can take hours or days to complete.
603
604
  #
604
605
  # @overload rejoin_user_events(request, options = nil)
605
606
  # Pass arguments to `rejoin_user_events` via a request object, either of type
@@ -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,15 +1,17 @@
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'
7
9
  require 'google/api/httpbody_pb'
10
+ require 'google/api/resource_pb'
8
11
  require 'google/cloud/retail/v2/import_config_pb'
9
12
  require 'google/cloud/retail/v2/purge_config_pb'
10
13
  require 'google/cloud/retail/v2/user_event_pb'
11
14
  require 'google/longrunning/operations_pb'
12
- require 'google/protobuf'
13
15
 
14
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
17
  add_file("google/cloud/retail/v2/user_event_service.proto", :syntax => :proto3) do
@@ -54,13 +54,14 @@ module Google
54
54
  # possible for a subset of the items to be successfully inserted.
55
55
  # Operation.metadata is of type ImportMetadata.
56
56
  rpc :ImportUserEvents, ::Google::Cloud::Retail::V2::ImportUserEventsRequest, ::Google::Longrunning::Operation
57
- # Triggers a user event rejoin operation with latest product catalog. Events
57
+ # Starts a user event rejoin operation with latest product catalog. Events
58
58
  # will not be annotated with detailed product information if product is
59
59
  # missing from the catalog at the time the user event is ingested, and these
60
60
  # events are stored as unjoined events with a limited usage on training and
61
- # serving. This API can be used to trigger a 'join' operation on specified
61
+ # serving. This method can be used to start a join operation on specified
62
62
  # events with latest version of product catalog. It can also be used to
63
- # correct events joined with wrong product catalog.
63
+ # correct events joined with the wrong product catalog. A rejoin operation
64
+ # can take hours or days to complete.
64
65
  rpc :RejoinUserEvents, ::Google::Cloud::Retail::V2::RejoinUserEventsRequest, ::Google::Longrunning::Operation
65
66
  end
66
67
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
- VERSION = "0.6.4"
24
+ VERSION = "0.9.0"
25
25
  end
26
26
  end
27
27
  end
@@ -30,6 +30,8 @@ module Google
30
30
  ##
31
31
  # To load this package, including all its services, and instantiate a client:
32
32
  #
33
+ # @example
34
+ #
33
35
  # require "google/cloud/retail/v2"
34
36
  # client = ::Google::Cloud::Retail::V2::CatalogService::Client.new
35
37
  #
@@ -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
@@ -109,6 +109,10 @@ module Google
109
109
  #
110
110
  # This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT
111
111
  # error is returned.
112
+ #
113
+ # If there are no sufficient active products in the targeted branch and
114
+ # {::Google::Cloud::Retail::V2::SetDefaultBranchRequest#force force} is not set, a
115
+ # FAILED_PRECONDITION error is returned.
112
116
  # @!attribute [rw] note
113
117
  # @return [::String]
114
118
  # Some note on this request, this can be retrieved by
@@ -117,6 +121,11 @@ module Google
117
121
  #
118
122
  # This field must be a UTF-8 encoded string with a length limit of 1,000
119
123
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
124
+ # @!attribute [rw] force
125
+ # @return [::Boolean]
126
+ # If set to true, it permits switching to a branch with
127
+ # {::Google::Cloud::Retail::V2::SetDefaultBranchRequest#branch_id branch_id} even
128
+ # if it has no sufficient active products.
120
129
  class SetDefaultBranchRequest
121
130
  include ::Google::Protobuf::MessageExts
122
131
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -99,9 +99,8 @@ module Google
99
99
  # The textual values of this custom attribute. For example, `["yellow",
100
100
  # "green"]` when the key is "color".
101
101
  #
102
- # At most 400 values are allowed. Empty values are not allowed. Each value
103
- # must be a UTF-8 encoded string with a length limit of 256 characters.
104
- # Otherwise, an INVALID_ARGUMENT error is returned.
102
+ # Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is
103
+ # returned.
105
104
  #
106
105
  # Exactly one of {::Google::Cloud::Retail::V2::CustomAttribute#text text} or
107
106
  # {::Google::Cloud::Retail::V2::CustomAttribute#numbers numbers} should be set.
@@ -111,14 +110,17 @@ module Google
111
110
  # The numerical values of this custom attribute. For example, `[2.3, 15.4]`
112
111
  # when the key is "lengths_cm".
113
112
  #
114
- # At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is
115
- # returned.
116
- #
117
113
  # Exactly one of {::Google::Cloud::Retail::V2::CustomAttribute#text text} or
118
114
  # {::Google::Cloud::Retail::V2::CustomAttribute#numbers numbers} should be set.
119
115
  # Otherwise, an INVALID_ARGUMENT error is returned.
120
116
  # @!attribute [rw] searchable
121
117
  # @return [::Boolean]
118
+ # This field is normally ignored unless
119
+ # [AttributesConfig.attribute_config_level][] of the
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).
122
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
  #
@@ -128,7 +130,13 @@ module Google
128
130
  # set. Otherwise, a INVALID_ARGUMENT error is returned.
129
131
  # @!attribute [rw] indexable
130
132
  # @return [::Boolean]
131
- # If true, custom attribute values are indexed, so that it can be filtered,
133
+ # This field is normally ignored unless
134
+ # [AttributesConfig.attribute_config_level][] of the
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,
132
140
  # faceted or boosted in
133
141
  # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
134
142
  #
@@ -183,7 +191,10 @@ module Google
183
191
  extend ::Google::Protobuf::MessageExts::ClassMethods
184
192
  end
185
193
 
186
- # {::Google::Cloud::Retail::V2::Product Product} thumbnail/detail image.
194
+ # {::Google::Cloud::Retail::V2::Product Product} image. Recommendations AI and
195
+ # Retail Search do not use product images to improve prediction and search
196
+ # results. However, product images can be returned in results, and are shown in
197
+ # prediction or search previews in the console.
187
198
  # @!attribute [rw] uri
188
199
  # @return [::String]
189
200
  # Required. URI of the image.
@@ -250,11 +261,14 @@ module Google
250
261
  #
251
262
  # Google Merchant Center property
252
263
  # [price](https://support.google.com/merchants/answer/6324371). Schema.org
253
- # property [Offer.priceSpecification](https://schema.org/priceSpecification).
264
+ # property [Offer.price](https://schema.org/price).
254
265
  # @!attribute [rw] original_price
255
266
  # @return [::Float]
256
267
  # Price of the product without any discount. If zero, by default set to be
257
- # 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.
258
272
  # @!attribute [rw] cost
259
273
  # @return [::Float]
260
274
  # The costs associated with the sale of a particular product. Used for gross
@@ -367,21 +381,30 @@ module Google
367
381
  # @!attribute [rw] user_id
368
382
  # @return [::String]
369
383
  # Highly recommended for logged-in users. Unique identifier for logged-in
370
- # user, such as a user name.
384
+ # user, such as a user name. Don't set for anonymous users.
385
+ #
386
+ # Always use a hashed value for this ID.
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.
371
391
  #
372
392
  # The field must be a UTF-8 encoded string with a length limit of 128
373
393
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
374
394
  # @!attribute [rw] ip_address
375
395
  # @return [::String]
376
- # The end user's IP address. Required for getting
377
- # [SearchResponse.sponsored_results][google.cloud.retail.v2.SearchResponse.sponsored_results].
378
- # This field is used to extract location information for personalization.
396
+ # The end user's IP address. This field is used to extract location
397
+ # information for personalization.
379
398
  #
380
399
  # This field must be either an IPv4 address (e.g. "104.133.9.80") or an IPv6
381
400
  # address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334"). Otherwise, an
382
401
  # INVALID_ARGUMENT error is returned.
383
402
  #
384
- # This should not be set when using the JavaScript tag in
403
+ # This should not be set when:
404
+ #
405
+ # * setting
406
+ # {::Google::Cloud::Retail::V2::SearchRequest#user_info SearchRequest.user_info}.
407
+ # * using the JavaScript tag in
385
408
  # {::Google::Cloud::Retail::V2::UserEventService::Client#collect_user_event UserEventService.CollectUserEvent}
386
409
  # or if
387
410
  # {::Google::Cloud::Retail::V2::UserInfo#direct_user_request direct_user_request}
@@ -416,21 +439,73 @@ module Google
416
439
  extend ::Google::Protobuf::MessageExts::ClassMethods
417
440
  end
418
441
 
419
- # Promotion information.
420
- # @!attribute [rw] promotion_id
442
+ # The inventory information at a place (e.g. a store) identified
443
+ # by a place ID.
444
+ # @!attribute [rw] place_id
421
445
  # @return [::String]
422
- # ID of the promotion. For example, "free gift".
423
- #
424
- # The value value must be a UTF-8 encoded string with a length limit of 128
425
- # characters, and match the pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example,
426
- # id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
427
- # returned.
446
+ # The place ID for the current set of inventory information.
447
+ # @!attribute [rw] price_info
448
+ # @return [::Google::Cloud::Retail::V2::PriceInfo]
449
+ # Product price and cost information.
428
450
  #
429
451
  # Google Merchant Center property
430
- # [promotion](https://support.google.com/merchants/answer/7050148).
431
- class Promotion
452
+ # [price](https://support.google.com/merchants/answer/6324371).
453
+ # @!attribute [rw] attributes
454
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
455
+ # Additional local inventory attributes, for example, store name, promotion
456
+ # tags, etc.
457
+ #
458
+ # This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
459
+ # error is returned:
460
+ #
461
+ # * At most 30 attributes are allowed.
462
+ # * The key must be a UTF-8 encoded string with a length limit of 32
463
+ # characters.
464
+ # * The key must match the pattern: `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example,
465
+ # key0LikeThis or KEY_1_LIKE_THIS.
466
+ # * The attribute values must be of the same type (text or number).
467
+ # * Only 1 value is allowed for each attribute.
468
+ # * For text values, the length limit is 256 UTF-8 characters.
469
+ # * The attribute does not support search. The `searchable` field should be
470
+ # unset or set to false.
471
+ # * The max summed total bytes of custom attribute keys and values per
472
+ # product is 5MiB.
473
+ # @!attribute [rw] fulfillment_types
474
+ # @return [::Array<::String>]
475
+ # Input only. Supported fulfillment types. Valid fulfillment type values
476
+ # include commonly used types (such as pickup in store and same day
477
+ # delivery), and custom types. Customers have to map custom types to their
478
+ # display names before rendering UI.
479
+ #
480
+ # Supported values:
481
+ #
482
+ # * "pickup-in-store"
483
+ # * "ship-to-store"
484
+ # * "same-day-delivery"
485
+ # * "next-day-delivery"
486
+ # * "custom-type-1"
487
+ # * "custom-type-2"
488
+ # * "custom-type-3"
489
+ # * "custom-type-4"
490
+ # * "custom-type-5"
491
+ #
492
+ # If this field is set to an invalid value other than these, an
493
+ # INVALID_ARGUMENT error is returned.
494
+ #
495
+ # All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is
496
+ # returned.
497
+ class LocalInventory
432
498
  include ::Google::Protobuf::MessageExts
433
499
  extend ::Google::Protobuf::MessageExts::ClassMethods
500
+
501
+ # @!attribute [rw] key
502
+ # @return [::String]
503
+ # @!attribute [rw] value
504
+ # @return [::Google::Cloud::Retail::V2::CustomAttribute]
505
+ class AttributesEntry
506
+ include ::Google::Protobuf::MessageExts
507
+ extend ::Google::Protobuf::MessageExts::ClassMethods
508
+ end
434
509
  end
435
510
  end
436
511
  end