google-cloud-retail-v2 0.6.3 → 0.8.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/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/README.md +6 -1
  5. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -4
  6. data/lib/google/cloud/retail/v2/catalog_service/client.rb +9 -9
  7. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +3 -1
  8. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +0 -8
  9. data/lib/google/cloud/retail/v2/common_pb.rb +8 -5
  10. data/lib/google/cloud/retail/v2/completion_service/client.rb +21 -21
  11. data/lib/google/cloud/retail/v2/completion_service.rb +1 -2
  12. data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -1
  13. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
  14. data/lib/google/cloud/retail/v2/import_config_pb.rb +2 -2
  15. data/lib/google/cloud/retail/v2/prediction_service/client.rb +17 -4
  16. data/lib/google/cloud/retail/v2/prediction_service_pb.rb +2 -1
  17. data/lib/google/cloud/retail/v2/product_pb.rb +3 -2
  18. data/lib/google/cloud/retail/v2/product_service/client.rb +338 -23
  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 +5 -3
  29. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +3 -1
  30. data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +4 -3
  31. data/lib/google/cloud/retail/v2/version.rb +1 -1
  32. data/lib/google/cloud/retail/v2.rb +2 -0
  33. data/proto_docs/google/api/resource.rb +10 -71
  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 +5 -3
@@ -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
@@ -150,6 +150,7 @@ module Google
150
150
 
151
151
  @operations_client = Operations.new do |config|
152
152
  config.credentials = credentials
153
+ config.quota_project = @quota_project_id
153
154
  config.endpoint = @config.endpoint
154
155
  end
155
156
 
@@ -592,13 +593,14 @@ module Google
592
593
  end
593
594
 
594
595
  ##
595
- # Triggers a user event rejoin operation with latest product catalog. Events
596
+ # Starts a user event rejoin operation with latest product catalog. Events
596
597
  # will not be annotated with detailed product information if product is
597
598
  # missing from the catalog at the time the user event is ingested, and these
598
599
  # events are stored as unjoined events with a limited usage on training and
599
- # 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
600
601
  # events with latest version of product catalog. It can also be used to
601
- # 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.
602
604
  #
603
605
  # @overload rejoin_user_events(request, options = nil)
604
606
  # Pass arguments to `rejoin_user_events` via a request object, either of type
@@ -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.3"
24
+ VERSION = "0.8.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
  #
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -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