google-cloud-retail-v2 0.4.0 → 0.5.1
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_service/client.rb +47 -46
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +4 -4
- 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_services_pb.rb +6 -6
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +34 -39
- data/lib/google/cloud/retail/v2/product_service/client.rb +69 -53
- data/lib/google/cloud/retail/v2/product_service/operations.rb +30 -21
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +6 -6
- data/lib/google/cloud/retail/v2/search_service/client.rb +83 -77
- data/lib/google/cloud/retail/v2/search_service.rb +2 -2
- data/lib/google/cloud/retail/v2/search_service_pb.rb +2 -0
- data/lib/google/cloud/retail/v2/search_service_services_pb.rb +4 -4
- 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/version.rb +1 -1
- 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 +11 -8
- data/proto_docs/google/cloud/retail/v2/search_service.rb +103 -218
- data/proto_docs/google/cloud/retail/v2/user_event.rb +15 -3
- metadata +4 -4
@@ -90,8 +90,8 @@ module Google
|
|
90
90
|
# [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
|
91
91
|
#
|
92
92
|
# This feature is only available for users who have Retail Search enabled.
|
93
|
-
#
|
94
|
-
# interested in using Retail Search.
|
93
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
94
|
+
# cloud sales if you are interested in using Retail Search.
|
95
95
|
rpc :SetInventory, ::Google::Cloud::Retail::V2::SetInventoryRequest, ::Google::Longrunning::Operation
|
96
96
|
# Incrementally adds place IDs to
|
97
97
|
# [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].
|
@@ -106,8 +106,8 @@ module Google
|
|
106
106
|
# [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
|
107
107
|
#
|
108
108
|
# This feature is only available for users who have Retail Search enabled.
|
109
|
-
#
|
110
|
-
# interested in using Retail Search.
|
109
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
110
|
+
# cloud sales if you are interested in using Retail Search.
|
111
111
|
rpc :AddFulfillmentPlaces, ::Google::Cloud::Retail::V2::AddFulfillmentPlacesRequest, ::Google::Longrunning::Operation
|
112
112
|
# Incrementally removes place IDs from a
|
113
113
|
# [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].
|
@@ -122,8 +122,8 @@ module Google
|
|
122
122
|
# [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
|
123
123
|
#
|
124
124
|
# This feature is only available for users who have Retail Search enabled.
|
125
|
-
#
|
126
|
-
# interested in using Retail Search.
|
125
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
126
|
+
# cloud sales if you are interested in using Retail Search.
|
127
127
|
rpc :RemoveFulfillmentPlaces, ::Google::Cloud::Retail::V2::RemoveFulfillmentPlacesRequest, ::Google::Longrunning::Operation
|
128
128
|
end
|
129
129
|
|
@@ -30,8 +30,8 @@ module Google
|
|
30
30
|
# Service for search.
|
31
31
|
#
|
32
32
|
# This feature is only available for users who have Retail Search enabled.
|
33
|
-
#
|
34
|
-
# interested in using Retail Search.
|
33
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
34
|
+
# cloud sales if you are interested in using Retail Search.
|
35
35
|
#
|
36
36
|
class Client
|
37
37
|
include Paths
|
@@ -45,13 +45,12 @@ module Google
|
|
45
45
|
# See {::Google::Cloud::Retail::V2::SearchService::Client::Configuration}
|
46
46
|
# for a description of the configuration fields.
|
47
47
|
#
|
48
|
-
#
|
48
|
+
# @example
|
49
49
|
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
# end
|
50
|
+
# # Modify the configuration for all SearchService clients
|
51
|
+
# ::Google::Cloud::Retail::V2::SearchService::Client.configure do |config|
|
52
|
+
# config.timeout = 10.0
|
53
|
+
# end
|
55
54
|
#
|
56
55
|
# @yield [config] Configure the Client client.
|
57
56
|
# @yieldparam config [Client::Configuration]
|
@@ -69,9 +68,9 @@ module Google
|
|
69
68
|
end
|
70
69
|
default_config = Client::Configuration.new parent_config
|
71
70
|
|
72
|
-
default_config.timeout =
|
71
|
+
default_config.timeout = 5.0
|
73
72
|
default_config.retry_policy = {
|
74
|
-
initial_delay: 0.1, max_delay:
|
73
|
+
initial_delay: 0.1, max_delay: 5.0, multiplier: 1.3, retry_codes: [14, 4]
|
75
74
|
}
|
76
75
|
|
77
76
|
default_config
|
@@ -103,19 +102,15 @@ module Google
|
|
103
102
|
##
|
104
103
|
# Create a new SearchService client object.
|
105
104
|
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
# To create a new SearchService client with the default
|
109
|
-
# configuration:
|
105
|
+
# @example
|
110
106
|
#
|
111
|
-
#
|
107
|
+
# # Create a client using the default configuration
|
108
|
+
# client = ::Google::Cloud::Retail::V2::SearchService::Client.new
|
112
109
|
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
# config.timeout = 10.0
|
118
|
-
# end
|
110
|
+
# # Create a client using a custom configuration
|
111
|
+
# client = ::Google::Cloud::Retail::V2::SearchService::Client.new do |config|
|
112
|
+
# config.timeout = 10.0
|
113
|
+
# end
|
119
114
|
#
|
120
115
|
# @yield [config] Configure the SearchService client.
|
121
116
|
# @yieldparam config [Client::Configuration]
|
@@ -135,10 +130,9 @@ module Google
|
|
135
130
|
|
136
131
|
# Create credentials
|
137
132
|
credentials = @config.credentials
|
138
|
-
# Use self-signed JWT if the
|
133
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
139
134
|
# but only if the default endpoint does not have a region prefix.
|
140
|
-
enable_self_signed_jwt = @config.
|
141
|
-
@config.endpoint == Client.configure.endpoint &&
|
135
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
142
136
|
!@config.endpoint.split(".").first.include?("-")
|
143
137
|
credentials ||= Credentials.default scope: @config.scope,
|
144
138
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -163,8 +157,8 @@ module Google
|
|
163
157
|
# Performs a search.
|
164
158
|
#
|
165
159
|
# This feature is only available for users who have Retail Search enabled.
|
166
|
-
#
|
167
|
-
# interested in using Retail Search.
|
160
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
161
|
+
# cloud sales if you are interested in using Retail Search.
|
168
162
|
#
|
169
163
|
# @overload search(request, options = nil)
|
170
164
|
# Pass arguments to `search` via a request object, either of type
|
@@ -236,8 +230,7 @@ module Google
|
|
236
230
|
# @param filter [::String]
|
237
231
|
# The filter syntax consists of an expression language for constructing a
|
238
232
|
# predicate from one or more fields of the products being filtered. Filter
|
239
|
-
# expression is case-sensitive.
|
240
|
-
# guide](/retail/private/docs/filter-and-order#filter).
|
233
|
+
# expression is case-sensitive.
|
241
234
|
#
|
242
235
|
# If this field is unrecognizable, an INVALID_ARGUMENT is returned.
|
243
236
|
# @param canonical_filter [::String]
|
@@ -253,9 +246,7 @@ module Google
|
|
253
246
|
# @param order_by [::String]
|
254
247
|
# The order in which products are returned. Products can be ordered by
|
255
248
|
# a field in an {::Google::Cloud::Retail::V2::Product Product} object. Leave it
|
256
|
-
# unset if ordered by relevance. OrderBy expression is case-sensitive.
|
257
|
-
# more details at this [user
|
258
|
-
# guide](/retail/private/docs/filter-and-order#order).
|
249
|
+
# unset if ordered by relevance. OrderBy expression is case-sensitive.
|
259
250
|
#
|
260
251
|
# If this field is unrecognizable, an INVALID_ARGUMENT is returned.
|
261
252
|
# @param facet_specs [::Array<::Google::Cloud::Retail::V2::SearchRequest::FacetSpec, ::Hash>]
|
@@ -267,16 +258,13 @@ module Google
|
|
267
258
|
# The specification for dynamically generated facets. Notice that only
|
268
259
|
# textual facets can be dynamically generated.
|
269
260
|
#
|
270
|
-
# This feature requires additional allowlisting. Contact Retail
|
271
|
-
#
|
272
|
-
# facet feature.
|
261
|
+
# This feature requires additional allowlisting. Contact Retail Search
|
262
|
+
# support team if you are interested in using dynamic facet feature.
|
273
263
|
# @param boost_spec [::Google::Cloud::Retail::V2::SearchRequest::BoostSpec, ::Hash]
|
274
|
-
# Boost specification to boost certain products.
|
275
|
-
# [user guide](/retail/private/docs/boosting).
|
264
|
+
# Boost specification to boost certain products.
|
276
265
|
# @param query_expansion_spec [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec, ::Hash]
|
277
266
|
# The query expansion specification that specifies the conditions under which
|
278
|
-
# query expansion will occur.
|
279
|
-
# guide](/retail/private/docs/result-size#query_expansion).
|
267
|
+
# query expansion will occur.
|
280
268
|
# @param variant_rollup_keys [::Array<::String>]
|
281
269
|
# The keys to fetch and rollup the matching
|
282
270
|
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
|
@@ -287,10 +275,9 @@ module Google
|
|
287
275
|
# {::Google::Cloud::Retail::V2::Product Product}s attributes will lead to extra
|
288
276
|
# query latency. Maximum number of keys is 10.
|
289
277
|
#
|
290
|
-
# For
|
291
|
-
#
|
292
|
-
#
|
293
|
-
# "fulfillmentType.filfillmentId". E.g., in "pickupInStore.store123",
|
278
|
+
# For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, a
|
279
|
+
# fulfillment type and a fulfillment ID must be provided in the format of
|
280
|
+
# "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
|
294
281
|
# "pickupInStore" is fulfillment type and "store123" is the store ID.
|
295
282
|
#
|
296
283
|
# Supported keys are:
|
@@ -301,24 +288,42 @@ module Google
|
|
301
288
|
# * discount
|
302
289
|
# * attributes.key, where key is any key in the
|
303
290
|
# {::Google::Cloud::Retail::V2::Product#attributes Product.attributes} map.
|
304
|
-
# * pickupInStore.id, where id is any
|
305
|
-
#
|
306
|
-
#
|
307
|
-
#
|
308
|
-
# *
|
309
|
-
#
|
310
|
-
#
|
311
|
-
#
|
312
|
-
# *
|
313
|
-
#
|
314
|
-
#
|
315
|
-
#
|
316
|
-
# *
|
317
|
-
#
|
318
|
-
#
|
319
|
-
#
|
320
|
-
# *
|
321
|
-
#
|
291
|
+
# * pickupInStore.id, where id is any
|
292
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
|
293
|
+
# for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
|
294
|
+
# "pickup-in-store".
|
295
|
+
# * shipToStore.id, where id is any
|
296
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
|
297
|
+
# for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
|
298
|
+
# "ship-to-store".
|
299
|
+
# * sameDayDelivery.id, where id is any
|
300
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
|
301
|
+
# for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
|
302
|
+
# "same-day-delivery".
|
303
|
+
# * nextDayDelivery.id, where id is any
|
304
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
|
305
|
+
# for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
|
306
|
+
# "next-day-delivery".
|
307
|
+
# * customFulfillment1.id, where id is any
|
308
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
|
309
|
+
# for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
|
310
|
+
# "custom-type-1".
|
311
|
+
# * customFulfillment2.id, where id is any
|
312
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
|
313
|
+
# for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
|
314
|
+
# "custom-type-2".
|
315
|
+
# * customFulfillment3.id, where id is any
|
316
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
|
317
|
+
# for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
|
318
|
+
# "custom-type-3".
|
319
|
+
# * customFulfillment4.id, where id is any
|
320
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
|
321
|
+
# for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
|
322
|
+
# "custom-type-4".
|
323
|
+
# * customFulfillment5.id, where id is any
|
324
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
|
325
|
+
# for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
|
326
|
+
# "custom-type-5".
|
322
327
|
#
|
323
328
|
# If this field is set to an invalid value other than these, an
|
324
329
|
# INVALID_ARGUMENT error is returned.
|
@@ -370,7 +375,9 @@ module Google
|
|
370
375
|
options.apply_defaults timeout: @config.rpcs.search.timeout,
|
371
376
|
metadata: metadata,
|
372
377
|
retry_policy: @config.rpcs.search.retry_policy
|
373
|
-
|
378
|
+
|
379
|
+
options.apply_defaults timeout: @config.timeout,
|
380
|
+
metadata: @config.metadata,
|
374
381
|
retry_policy: @config.retry_policy
|
375
382
|
|
376
383
|
@search_service_stub.call_rpc :search, request, options: options do |response, operation|
|
@@ -395,22 +402,21 @@ module Google
|
|
395
402
|
# Configuration can be applied globally to all clients, or to a single client
|
396
403
|
# on construction.
|
397
404
|
#
|
398
|
-
#
|
399
|
-
#
|
400
|
-
#
|
401
|
-
# to 20 seconds,
|
402
|
-
#
|
403
|
-
#
|
404
|
-
#
|
405
|
-
#
|
406
|
-
#
|
407
|
-
#
|
408
|
-
#
|
409
|
-
#
|
410
|
-
#
|
411
|
-
#
|
412
|
-
#
|
413
|
-
# end
|
405
|
+
# @example
|
406
|
+
#
|
407
|
+
# # Modify the global config, setting the timeout for
|
408
|
+
# # search to 20 seconds,
|
409
|
+
# # and all remaining timeouts to 10 seconds.
|
410
|
+
# ::Google::Cloud::Retail::V2::SearchService::Client.configure do |config|
|
411
|
+
# config.timeout = 10.0
|
412
|
+
# config.rpcs.search.timeout = 20.0
|
413
|
+
# end
|
414
|
+
#
|
415
|
+
# # Apply the above configuration only to a new client.
|
416
|
+
# client = ::Google::Cloud::Retail::V2::SearchService::Client.new do |config|
|
417
|
+
# config.timeout = 10.0
|
418
|
+
# config.rpcs.search.timeout = 20.0
|
419
|
+
# end
|
414
420
|
#
|
415
421
|
# @!attribute [rw] endpoint
|
416
422
|
# The hostname or hostname:port of the service endpoint.
|
@@ -34,8 +34,8 @@ module Google
|
|
34
34
|
# Service for search.
|
35
35
|
#
|
36
36
|
# This feature is only available for users who have Retail Search enabled.
|
37
|
-
#
|
38
|
-
# interested in using Retail Search.
|
37
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
38
|
+
# cloud sales if you are interested in using Retail Search.
|
39
39
|
#
|
40
40
|
# To load this service and instantiate a client:
|
41
41
|
#
|
@@ -66,6 +66,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
66
66
|
end
|
67
67
|
add_message "google.cloud.retail.v2.SearchRequest.QueryExpansionSpec" do
|
68
68
|
optional :condition, :enum, 1, "google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition"
|
69
|
+
optional :pin_unexpanded_results, :bool, 2
|
69
70
|
end
|
70
71
|
add_enum "google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition" do
|
71
72
|
value :CONDITION_UNSPECIFIED, 0
|
@@ -103,6 +104,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
103
104
|
end
|
104
105
|
add_message "google.cloud.retail.v2.SearchResponse.QueryExpansionInfo" do
|
105
106
|
optional :expanded_query, :bool, 1
|
107
|
+
optional :pinned_result_count, :int64, 2
|
106
108
|
end
|
107
109
|
end
|
108
110
|
end
|
@@ -27,8 +27,8 @@ module Google
|
|
27
27
|
# Service for search.
|
28
28
|
#
|
29
29
|
# This feature is only available for users who have Retail Search enabled.
|
30
|
-
#
|
31
|
-
# interested in using Retail Search.
|
30
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
31
|
+
# cloud sales if you are interested in using Retail Search.
|
32
32
|
class Service
|
33
33
|
|
34
34
|
include GRPC::GenericService
|
@@ -40,8 +40,8 @@ module Google
|
|
40
40
|
# Performs a search.
|
41
41
|
#
|
42
42
|
# This feature is only available for users who have Retail Search enabled.
|
43
|
-
#
|
44
|
-
# interested in using Retail Search.
|
43
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
44
|
+
# cloud sales if you are interested in using Retail Search.
|
45
45
|
rpc :Search, ::Google::Cloud::Retail::V2::SearchRequest, ::Google::Cloud::Retail::V2::SearchResponse
|
46
46
|
end
|
47
47
|
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Retail::V2::UserEventService::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all UserEventService clients
|
47
|
+
# ::Google::Cloud::Retail::V2::UserEventService::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -65,9 +64,19 @@ module Google
|
|
65
64
|
end
|
66
65
|
default_config = Client::Configuration.new parent_config
|
67
66
|
|
68
|
-
default_config.timeout =
|
67
|
+
default_config.timeout = 5.0
|
69
68
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1, max_delay:
|
69
|
+
initial_delay: 0.1, max_delay: 5.0, multiplier: 1.3, retry_codes: [14, 4]
|
70
|
+
}
|
71
|
+
|
72
|
+
default_config.rpcs.purge_user_events.timeout = 30.0
|
73
|
+
default_config.rpcs.purge_user_events.retry_policy = {
|
74
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14, 4]
|
75
|
+
}
|
76
|
+
|
77
|
+
default_config.rpcs.import_user_events.timeout = 300.0
|
78
|
+
default_config.rpcs.import_user_events.retry_policy = {
|
79
|
+
initial_delay: 0.1, max_delay: 300.0, multiplier: 1.3, retry_codes: [14, 4]
|
71
80
|
}
|
72
81
|
|
73
82
|
default_config
|
@@ -99,19 +108,15 @@ module Google
|
|
99
108
|
##
|
100
109
|
# Create a new UserEventService client object.
|
101
110
|
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
# To create a new UserEventService client with the default
|
105
|
-
# configuration:
|
111
|
+
# @example
|
106
112
|
#
|
107
|
-
#
|
113
|
+
# # Create a client using the default configuration
|
114
|
+
# client = ::Google::Cloud::Retail::V2::UserEventService::Client.new
|
108
115
|
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
# config.timeout = 10.0
|
114
|
-
# end
|
116
|
+
# # Create a client using a custom configuration
|
117
|
+
# client = ::Google::Cloud::Retail::V2::UserEventService::Client.new do |config|
|
118
|
+
# config.timeout = 10.0
|
119
|
+
# end
|
115
120
|
#
|
116
121
|
# @yield [config] Configure the UserEventService client.
|
117
122
|
# @yieldparam config [Client::Configuration]
|
@@ -131,10 +136,9 @@ module Google
|
|
131
136
|
|
132
137
|
# Create credentials
|
133
138
|
credentials = @config.credentials
|
134
|
-
# Use self-signed JWT if the
|
139
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
135
140
|
# but only if the default endpoint does not have a region prefix.
|
136
|
-
enable_self_signed_jwt = @config.
|
137
|
-
@config.endpoint == Client.configure.endpoint &&
|
141
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
138
142
|
!@config.endpoint.split(".").first.include?("-")
|
139
143
|
credentials ||= Credentials.default scope: @config.scope,
|
140
144
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -225,7 +229,9 @@ module Google
|
|
225
229
|
options.apply_defaults timeout: @config.rpcs.write_user_event.timeout,
|
226
230
|
metadata: metadata,
|
227
231
|
retry_policy: @config.rpcs.write_user_event.retry_policy
|
228
|
-
|
232
|
+
|
233
|
+
options.apply_defaults timeout: @config.timeout,
|
234
|
+
metadata: @config.metadata,
|
229
235
|
retry_policy: @config.retry_policy
|
230
236
|
|
231
237
|
@user_event_service_stub.call_rpc :write_user_event, request, options: options do |response, operation|
|
@@ -308,7 +314,9 @@ module Google
|
|
308
314
|
options.apply_defaults timeout: @config.rpcs.collect_user_event.timeout,
|
309
315
|
metadata: metadata,
|
310
316
|
retry_policy: @config.rpcs.collect_user_event.retry_policy
|
311
|
-
|
317
|
+
|
318
|
+
options.apply_defaults timeout: @config.timeout,
|
319
|
+
metadata: @config.metadata,
|
312
320
|
retry_policy: @config.retry_policy
|
313
321
|
|
314
322
|
@user_event_service_stub.call_rpc :collect_user_event, request, options: options do |response, operation|
|
@@ -407,7 +415,9 @@ module Google
|
|
407
415
|
options.apply_defaults timeout: @config.rpcs.purge_user_events.timeout,
|
408
416
|
metadata: metadata,
|
409
417
|
retry_policy: @config.rpcs.purge_user_events.retry_policy
|
410
|
-
|
418
|
+
|
419
|
+
options.apply_defaults timeout: @config.timeout,
|
420
|
+
metadata: @config.metadata,
|
411
421
|
retry_policy: @config.retry_policy
|
412
422
|
|
413
423
|
@user_event_service_stub.call_rpc :purge_user_events, request, options: options do |response, operation|
|
@@ -485,7 +495,9 @@ module Google
|
|
485
495
|
options.apply_defaults timeout: @config.rpcs.import_user_events.timeout,
|
486
496
|
metadata: metadata,
|
487
497
|
retry_policy: @config.rpcs.import_user_events.retry_policy
|
488
|
-
|
498
|
+
|
499
|
+
options.apply_defaults timeout: @config.timeout,
|
500
|
+
metadata: @config.metadata,
|
489
501
|
retry_policy: @config.retry_policy
|
490
502
|
|
491
503
|
@user_event_service_stub.call_rpc :import_user_events, request, options: options do |response, operation|
|
@@ -564,7 +576,9 @@ module Google
|
|
564
576
|
options.apply_defaults timeout: @config.rpcs.rejoin_user_events.timeout,
|
565
577
|
metadata: metadata,
|
566
578
|
retry_policy: @config.rpcs.rejoin_user_events.retry_policy
|
567
|
-
|
579
|
+
|
580
|
+
options.apply_defaults timeout: @config.timeout,
|
581
|
+
metadata: @config.metadata,
|
568
582
|
retry_policy: @config.retry_policy
|
569
583
|
|
570
584
|
@user_event_service_stub.call_rpc :rejoin_user_events, request, options: options do |response, operation|
|
@@ -589,22 +603,21 @@ module Google
|
|
589
603
|
# Configuration can be applied globally to all clients, or to a single client
|
590
604
|
# on construction.
|
591
605
|
#
|
592
|
-
#
|
593
|
-
#
|
594
|
-
#
|
595
|
-
# to 20 seconds,
|
596
|
-
#
|
597
|
-
#
|
598
|
-
#
|
599
|
-
#
|
600
|
-
#
|
601
|
-
#
|
602
|
-
#
|
603
|
-
#
|
604
|
-
#
|
605
|
-
#
|
606
|
-
#
|
607
|
-
# end
|
606
|
+
# @example
|
607
|
+
#
|
608
|
+
# # Modify the global config, setting the timeout for
|
609
|
+
# # write_user_event to 20 seconds,
|
610
|
+
# # and all remaining timeouts to 10 seconds.
|
611
|
+
# ::Google::Cloud::Retail::V2::UserEventService::Client.configure do |config|
|
612
|
+
# config.timeout = 10.0
|
613
|
+
# config.rpcs.write_user_event.timeout = 20.0
|
614
|
+
# end
|
615
|
+
#
|
616
|
+
# # Apply the above configuration only to a new client.
|
617
|
+
# client = ::Google::Cloud::Retail::V2::UserEventService::Client.new do |config|
|
618
|
+
# config.timeout = 10.0
|
619
|
+
# config.rpcs.write_user_event.timeout = 20.0
|
620
|
+
# end
|
608
621
|
#
|
609
622
|
# @!attribute [rw] endpoint
|
610
623
|
# The hostname or hostname:port of the service endpoint.
|