google-cloud-retail-v2 0.4.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -2
  3. data/lib/google/cloud/retail/v2/catalog_service/client.rb +47 -46
  4. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +2 -2
  5. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +5 -5
  6. data/lib/google/cloud/retail/v2/common_pb.rb +2 -2
  7. data/lib/google/cloud/retail/v2/completion_service/client.rb +49 -50
  8. data/lib/google/cloud/retail/v2/completion_service/operations.rb +30 -21
  9. data/lib/google/cloud/retail/v2/completion_service.rb +2 -2
  10. data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -2
  11. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
  12. data/lib/google/cloud/retail/v2/import_config_pb.rb +2 -2
  13. data/lib/google/cloud/retail/v2/prediction_service/client.rb +34 -39
  14. data/lib/google/cloud/retail/v2/prediction_service_pb.rb +2 -2
  15. data/lib/google/cloud/retail/v2/prediction_service_services_pb.rb +1 -1
  16. data/lib/google/cloud/retail/v2/product_pb.rb +2 -2
  17. data/lib/google/cloud/retail/v2/product_service/client.rb +74 -58
  18. data/lib/google/cloud/retail/v2/product_service/operations.rb +30 -21
  19. data/lib/google/cloud/retail/v2/product_service_pb.rb +3 -2
  20. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +7 -7
  21. data/lib/google/cloud/retail/v2/purge_config_pb.rb +2 -2
  22. data/lib/google/cloud/retail/v2/search_service/client.rb +101 -79
  23. data/lib/google/cloud/retail/v2/search_service.rb +2 -2
  24. data/lib/google/cloud/retail/v2/search_service_pb.rb +11 -2
  25. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +5 -5
  26. data/lib/google/cloud/retail/v2/user_event_pb.rb +2 -2
  27. data/lib/google/cloud/retail/v2/user_event_service/client.rb +56 -43
  28. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +30 -21
  29. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +2 -2
  30. data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +1 -1
  31. data/lib/google/cloud/retail/v2/version.rb +1 -1
  32. data/proto_docs/google/api/httpbody.rb +7 -3
  33. data/proto_docs/google/cloud/retail/v2/common.rb +3 -3
  34. data/proto_docs/google/cloud/retail/v2/completion_service.rb +9 -7
  35. data/proto_docs/google/cloud/retail/v2/import_config.rb +4 -4
  36. data/proto_docs/google/cloud/retail/v2/product.rb +22 -16
  37. data/proto_docs/google/cloud/retail/v2/product_service.rb +6 -6
  38. data/proto_docs/google/cloud/retail/v2/search_service.rb +141 -74
  39. data/proto_docs/google/cloud/retail/v2/user_event.rb +19 -7
  40. metadata +4 -4
@@ -169,7 +169,9 @@ module Google
169
169
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
170
170
  metadata: metadata,
171
171
  retry_policy: @config.rpcs.list_operations.retry_policy
172
- options.apply_defaults metadata: @config.metadata,
172
+
173
+ options.apply_defaults timeout: @config.timeout,
174
+ metadata: @config.metadata,
173
175
  retry_policy: @config.retry_policy
174
176
 
175
177
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -239,7 +241,9 @@ module Google
239
241
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
240
242
  metadata: metadata,
241
243
  retry_policy: @config.rpcs.get_operation.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
244
+
245
+ options.apply_defaults timeout: @config.timeout,
246
+ metadata: @config.metadata,
243
247
  retry_policy: @config.retry_policy
244
248
 
245
249
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -309,7 +313,9 @@ module Google
309
313
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
310
314
  metadata: metadata,
311
315
  retry_policy: @config.rpcs.delete_operation.retry_policy
312
- options.apply_defaults metadata: @config.metadata,
316
+
317
+ options.apply_defaults timeout: @config.timeout,
318
+ metadata: @config.metadata,
313
319
  retry_policy: @config.retry_policy
314
320
 
315
321
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -384,7 +390,9 @@ module Google
384
390
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
385
391
  metadata: metadata,
386
392
  retry_policy: @config.rpcs.cancel_operation.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
393
+
394
+ options.apply_defaults timeout: @config.timeout,
395
+ metadata: @config.metadata,
388
396
  retry_policy: @config.retry_policy
389
397
 
390
398
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -456,7 +464,9 @@ module Google
456
464
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
465
  metadata: metadata,
458
466
  retry_policy: @config.rpcs.wait_operation.retry_policy
459
- options.apply_defaults metadata: @config.metadata,
467
+
468
+ options.apply_defaults timeout: @config.timeout,
469
+ metadata: @config.metadata,
460
470
  retry_policy: @config.retry_policy
461
471
 
462
472
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -481,22 +491,21 @@ module Google
481
491
  # Configuration can be applied globally to all clients, or to a single client
482
492
  # on construction.
483
493
  #
484
- # # Examples
485
- #
486
- # To modify the global config, setting the timeout for list_operations
487
- # to 20 seconds, and all remaining timeouts to 10 seconds:
488
- #
489
- # ::Google::Longrunning::Operations::Client.configure do |config|
490
- # config.timeout = 10.0
491
- # config.rpcs.list_operations.timeout = 20.0
492
- # end
493
- #
494
- # To apply the above configuration only to a new client:
495
- #
496
- # client = ::Google::Longrunning::Operations::Client.new do |config|
497
- # config.timeout = 10.0
498
- # config.rpcs.list_operations.timeout = 20.0
499
- # end
494
+ # @example
495
+ #
496
+ # # Modify the global config, setting the timeout for
497
+ # # list_operations to 20 seconds,
498
+ # # and all remaining timeouts to 10 seconds.
499
+ # ::Google::Longrunning::Operations::Client.configure do |config|
500
+ # config.timeout = 10.0
501
+ # config.rpcs.list_operations.timeout = 20.0
502
+ # end
503
+ #
504
+ # # Apply the above configuration only to a new client.
505
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
506
+ # config.timeout = 10.0
507
+ # config.rpcs.list_operations.timeout = 20.0
508
+ # end
500
509
  #
501
510
  # @!attribute [rw] endpoint
502
511
  # The hostname or hostname:port of the service endpoint.
@@ -1,8 +1,6 @@
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
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -11,6 +9,8 @@ require 'google/cloud/retail/v2/import_config_pb'
11
9
  require 'google/cloud/retail/v2/purge_config_pb'
12
10
  require 'google/cloud/retail/v2/user_event_pb'
13
11
  require 'google/longrunning/operations_pb'
12
+ require 'google/protobuf'
13
+
14
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
15
  add_file("google/cloud/retail/v2/user_event_service.proto", :syntax => :proto3) do
16
16
  add_message "google.cloud.retail.v2.WriteUserEventRequest" do
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for ingesting end user actions on the customer website.
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
- VERSION = "0.4.1"
24
+ VERSION = "0.6.0"
25
25
  end
26
26
  end
27
27
  end
@@ -39,12 +39,15 @@ module Google
39
39
  #
40
40
  # // The raw HTTP body is bound to this field.
41
41
  # google.api.HttpBody http_body = 2;
42
+ #
42
43
  # }
43
44
  #
44
45
  # service ResourceService {
45
- # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
46
- # rpc UpdateResource(google.api.HttpBody) returns
47
- # (google.protobuf.Empty);
46
+ # rpc GetResource(GetResourceRequest)
47
+ # returns (google.api.HttpBody);
48
+ # rpc UpdateResource(google.api.HttpBody)
49
+ # returns (google.protobuf.Empty);
50
+ #
48
51
  # }
49
52
  #
50
53
  # Example with streaming methods:
@@ -54,6 +57,7 @@ module Google
54
57
  # returns (stream google.api.HttpBody);
55
58
  # rpc UpdateCalendar(stream google.api.HttpBody)
56
59
  # returns (stream google.api.HttpBody);
60
+ #
57
61
  # }
58
62
  #
59
63
  # Use of this type only changes how the request and response bodies are
@@ -80,7 +80,7 @@ module Google
80
80
  # it is expected to have only 1 color. May consider using single "Mixed"
81
81
  # instead of multiple values.
82
82
  #
83
- # A maximum of 5 colors are allowed. Each value must be a UTF-8 encoded
83
+ # A maximum of 25 colors are allowed. Each value must be a UTF-8 encoded
84
84
  # string with a length limit of 128 characters. Otherwise, an
85
85
  # INVALID_ARGUMENT error is returned.
86
86
  #
@@ -174,8 +174,8 @@ module Google
174
174
  # or the region IDs for
175
175
  # {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type.same-day-delivery}.
176
176
  #
177
- # A maximum of 2000 values are allowed. Each value must be a string with a
178
- # length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as
177
+ # A maximum of 3000 values are allowed. Each value must be a string with a
178
+ # length limit of 30 characters, matching the pattern [a-zA-Z0-9_-]+, such as
179
179
  # "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned.
180
180
  class FulfillmentInfo
181
181
  include ::Google::Protobuf::MessageExts
@@ -80,13 +80,15 @@ module Google
80
80
  # * user-data
81
81
  #
82
82
  # * cloud-retail
83
- # This option is not automatically enabled. Before using cloud-retail,
84
- # contact retail-search-support@google.com first.
83
+ # This option requires additional allowlisting. Before using cloud-retail,
84
+ # contact Cloud Retail support team first.
85
85
  # @!attribute [rw] max_suggestions
86
86
  # @return [::Integer]
87
- # Completion max suggestions.
87
+ # Completion max suggestions. If left unset or set to 0, then will fallback
88
+ # to the configured value [CompletionConfig.max_suggestions][].
88
89
  #
89
- # The maximum allowed max suggestions is 20. The default value is 20.
90
+ # The maximum allowed max suggestions is 20. If it is set higher, it will be
91
+ # capped by 20.
90
92
  class CompleteQueryRequest
91
93
  include ::Google::Protobuf::MessageExts
92
94
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -105,9 +107,9 @@ module Google
105
107
  # performance.
106
108
  # @!attribute [rw] recent_search_results
107
109
  # @return [::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::RecentSearchResult>]
108
- # Matched recent searches of this user. This field is a restricted feature.
109
- # Contact Retail Support (retail-search-support@google.com) if you are
110
- # interested in enabling it.
110
+ # Matched recent searches of this user. The maximum number of recent searches
111
+ # is 10. This field is a restricted feature. Contact Retail Search support
112
+ # team if you are interested in enabling it.
111
113
  #
112
114
  # This feature is only available when
113
115
  # {::Google::Cloud::Retail::V2::CompleteQueryRequest#visitor_id CompleteQueryRequest.visitor_id}
@@ -201,13 +201,13 @@ module Google
201
201
  # Can only be while using
202
202
  # {::Google::Cloud::Retail::V2::BigQuerySource BigQuerySource}.
203
203
  #
204
- # Add the IAM permission BigQuery Data Viewer for
204
+ # Add the IAM permission "BigQuery Data Viewer" for
205
205
  # cloud-retail-customer-data-access@system.gserviceaccount.com before
206
206
  # using this feature otherwise an error is thrown.
207
207
  #
208
208
  # This feature is only available for users who have Retail Search enabled.
209
- # Contact Retail Support (retail-search-support@google.com) if you are
210
- # interested in using Retail Search.
209
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
210
+ # cloud sales if you are interested in using Retail Search.
211
211
  FULL = 2
212
212
  end
213
213
  end
@@ -284,7 +284,7 @@ module Google
284
284
  # @return [::Google::Cloud::Retail::V2::BigQuerySource]
285
285
  # Required. BigQuery input source.
286
286
  #
287
- # Add the IAM permission BigQuery Data Viewer for
287
+ # Add the IAM permission "BigQuery Data Viewer" for
288
288
  # cloud-retail-customer-data-access@system.gserviceaccount.com before
289
289
  # using this feature otherwise an error is thrown.
290
290
  class CompletionDataInputConfig
@@ -37,18 +37,23 @@ module Google
37
37
  # and
38
38
  # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts}.
39
39
  #
40
+ # {::Google::Cloud::Retail::V2::Product#expire_time expire_time} must be later
41
+ # than {::Google::Cloud::Retail::V2::Product#available_time available_time} and
42
+ # {::Google::Cloud::Retail::V2::Product#publish_time publish_time}, otherwise an
43
+ # INVALID_ARGUMENT error is thrown.
44
+ #
40
45
  # Google Merchant Center property
41
46
  # [expiration_date](https://support.google.com/merchants/answer/6324499).
42
47
  # @!attribute [rw] ttl
43
48
  # @return [::Google::Protobuf::Duration]
44
49
  # Input only. The TTL (time to live) of the product.
45
50
  #
46
- # If it is set, {::Google::Cloud::Retail::V2::Product#expire_time expire_time}
47
- # is set as current timestamp plus
48
- # {::Google::Cloud::Retail::V2::Product#ttl ttl}. The derived
49
- # {::Google::Cloud::Retail::V2::Product#expire_time expire_time} is returned in
50
- # the output and {::Google::Cloud::Retail::V2::Product#ttl ttl} is left blank
51
- # when retrieving the {::Google::Cloud::Retail::V2::Product Product}.
51
+ # If it is set, it must be a non-negative value, and
52
+ # {::Google::Cloud::Retail::V2::Product#expire_time expire_time} is set as
53
+ # current timestamp plus {::Google::Cloud::Retail::V2::Product#ttl ttl}. The
54
+ # derived {::Google::Cloud::Retail::V2::Product#expire_time expire_time} is
55
+ # returned in the output and {::Google::Cloud::Retail::V2::Product#ttl ttl} is
56
+ # left blank when retrieving the {::Google::Cloud::Retail::V2::Product Product}.
52
57
  #
53
58
  # If it is set, the product is not available for
54
59
  # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search} after
@@ -61,8 +66,6 @@ module Google
61
66
  # @return [::String]
62
67
  # Immutable. Full resource name of the product, such as
63
68
  # `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
64
- #
65
- # The branch ID must be "default_branch".
66
69
  # @!attribute [rw] id
67
70
  # @return [::String]
68
71
  # Immutable. {::Google::Cloud::Retail::V2::Product Product} identifier, which is
@@ -120,6 +123,9 @@ module Google
120
123
  # This field must be a UTF-8 encoded string with a length limit of 128
121
124
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
122
125
  #
126
+ # This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is
127
+ # returned.
128
+ #
123
129
  # Google Merchant Center property
124
130
  # [gtin](https://support.google.com/merchants/answer/6324461).
125
131
  # Schema.org property
@@ -230,13 +236,9 @@ module Google
230
236
  # This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
231
237
  # error is returned:
232
238
  #
233
- # * Max entries count: 200 by default; 100 for
234
- # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}.
239
+ # * Max entries count: 200.
235
240
  # * The key must be a UTF-8 encoded string with a length limit of 128
236
241
  # characters.
237
- # * Max indexable entries count: 200 by default; 40 for
238
- # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}.
239
- # * Max searchable entries count: 30.
240
242
  # * For indexable attribute, the key must match the pattern:
241
243
  # [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS.
242
244
  # @!attribute [rw] tags
@@ -346,7 +348,7 @@ module Google
346
348
  # @return [::Array<::String>]
347
349
  # The material of the product. For example, "leather", "wooden".
348
350
  #
349
- # A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
351
+ # A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
350
352
  # string with a length limit of 128 characters. Otherwise, an
351
353
  # INVALID_ARGUMENT error is returned.
352
354
  #
@@ -358,7 +360,7 @@ module Google
358
360
  # The pattern or graphic print of the product. For example, "striped", "polka
359
361
  # dot", "paisley".
360
362
  #
361
- # A maximum of 5 values are allowed per
363
+ # A maximum of 20 values are allowed per
362
364
  # {::Google::Cloud::Retail::V2::Product Product}. Each value must be a UTF-8
363
365
  # encoded string with a length limit of 128 characters. Otherwise, an
364
366
  # INVALID_ARGUMENT error is returned.
@@ -445,8 +447,12 @@ module Google
445
447
  # * {::Google::Cloud::Retail::V2::Product#name name}
446
448
  # * {::Google::Cloud::Retail::V2::Product#color_info color_info}
447
449
  #
448
- # Maximum number of paths is 20. Otherwise, an INVALID_ARGUMENT error is
450
+ # Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
449
451
  # returned.
452
+ #
453
+ # Note: Returning more fields in
454
+ # {::Google::Cloud::Retail::V2::SearchResponse SearchResponse} may increase
455
+ # response payload size and serving latency.
450
456
  # @!attribute [r] variants
451
457
  # @return [::Array<::Google::Cloud::Retail::V2::Product>]
452
458
  # Output only. Product variants grouped together on primary product which
@@ -290,7 +290,7 @@ module Google
290
290
  # {::Google::Cloud::Retail::V2::Product#name Product.name} is not found, the
291
291
  # inventory update will still be processed and retained for at most 1 day
292
292
  # until the {::Google::Cloud::Retail::V2::Product Product} is created. If set to
293
- # false, an INVALID_ARGUMENT error is returned if the
293
+ # false, a NOT_FOUND error is returned if the
294
294
  # {::Google::Cloud::Retail::V2::Product Product} is not found.
295
295
  class SetInventoryRequest
296
296
  include ::Google::Protobuf::MessageExts
@@ -371,8 +371,8 @@ module Google
371
371
  # If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
372
372
  # found, the fulfillment information will still be processed and retained for
373
373
  # at most 1 day and processed once the
374
- # {::Google::Cloud::Retail::V2::Product Product} is created. If set to false, an
375
- # INVALID_ARGUMENT error is returned if the
374
+ # {::Google::Cloud::Retail::V2::Product Product} is created. If set to false, a
375
+ # NOT_FOUND error is returned if the
376
376
  # {::Google::Cloud::Retail::V2::Product Product} is not found.
377
377
  class AddFulfillmentPlacesRequest
378
378
  include ::Google::Protobuf::MessageExts
@@ -387,7 +387,7 @@ module Google
387
387
  extend ::Google::Protobuf::MessageExts::ClassMethods
388
388
  end
389
389
 
390
- # Response of the RemoveFulfillmentPlacesRequest. Currently empty because
390
+ # Response of the AddFulfillmentPlacesRequest. Currently empty because
391
391
  # there is no meaningful response populated from the [AddFulfillmentPlaces][]
392
392
  # method.
393
393
  class AddFulfillmentPlacesResponse
@@ -448,8 +448,8 @@ module Google
448
448
  # If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
449
449
  # found, the fulfillment information will still be processed and retained for
450
450
  # at most 1 day and processed once the
451
- # {::Google::Cloud::Retail::V2::Product Product} is created. If set to false, an
452
- # INVALID_ARGUMENT error is returned if the
451
+ # {::Google::Cloud::Retail::V2::Product Product} is created. If set to false, a
452
+ # NOT_FOUND error is returned if the
453
453
  # {::Google::Cloud::Retail::V2::Product Product} is not found.
454
454
  class RemoveFulfillmentPlacesRequest
455
455
  include ::Google::Protobuf::MessageExts