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.
- checksums.yaml +4 -4
- data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +47 -46
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +5 -5
- data/lib/google/cloud/retail/v2/common_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/completion_service/client.rb +49 -50
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +30 -21
- data/lib/google/cloud/retail/v2/completion_service.rb +2 -2
- data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
- data/lib/google/cloud/retail/v2/import_config_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +34 -39
- data/lib/google/cloud/retail/v2/prediction_service_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/prediction_service_services_pb.rb +1 -1
- data/lib/google/cloud/retail/v2/product_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/product_service/client.rb +74 -58
- data/lib/google/cloud/retail/v2/product_service/operations.rb +30 -21
- data/lib/google/cloud/retail/v2/product_service_pb.rb +3 -2
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +7 -7
- data/lib/google/cloud/retail/v2/purge_config_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/search_service/client.rb +101 -79
- data/lib/google/cloud/retail/v2/search_service.rb +2 -2
- data/lib/google/cloud/retail/v2/search_service_pb.rb +11 -2
- data/lib/google/cloud/retail/v2/search_service_services_pb.rb +5 -5
- data/lib/google/cloud/retail/v2/user_event_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +56 -43
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +30 -21
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +1 -1
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/proto_docs/google/api/httpbody.rb +7 -3
- data/proto_docs/google/cloud/retail/v2/common.rb +3 -3
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +9 -7
- data/proto_docs/google/cloud/retail/v2/import_config.rb +4 -4
- data/proto_docs/google/cloud/retail/v2/product.rb +22 -16
- data/proto_docs/google/cloud/retail/v2/product_service.rb +6 -6
- data/proto_docs/google/cloud/retail/v2/search_service.rb +141 -74
- data/proto_docs/google/cloud/retail/v2/user_event.rb +19 -7
- 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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
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
|
@@ -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)
|
46
|
-
#
|
47
|
-
# (google.
|
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
|
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
|
178
|
-
# length limit of
|
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
|
84
|
-
# contact
|
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.
|
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.
|
109
|
-
#
|
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
|
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
|
-
#
|
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
|
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,
|
47
|
-
# is set as
|
48
|
-
# {::Google::Cloud::Retail::V2::Product#ttl ttl}. The
|
49
|
-
# {::Google::Cloud::Retail::V2::Product#expire_time expire_time} is
|
50
|
-
# the output and {::Google::Cloud::Retail::V2::Product#ttl ttl} is
|
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
|
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
|
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
|
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
|
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,
|
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,
|
375
|
-
#
|
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
|
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,
|
452
|
-
#
|
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
|