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
@@ -35,8 +35,8 @@ module Google
|
|
35
35
|
# Auto-completion service for retail.
|
36
36
|
#
|
37
37
|
# This feature is only available for users who have Retail Search enabled.
|
38
|
-
#
|
39
|
-
# interested in using Retail Search.
|
38
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
39
|
+
# cloud sales if you are interested in using Retail Search.
|
40
40
|
#
|
41
41
|
# To load this service and instantiate a client:
|
42
42
|
#
|
@@ -27,8 +27,8 @@ module Google
|
|
27
27
|
# Auto-completion service for retail.
|
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,16 +40,16 @@ module Google
|
|
40
40
|
# Completes the specified prefix with keyword suggestions.
|
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 :CompleteQuery, ::Google::Cloud::Retail::V2::CompleteQueryRequest, ::Google::Cloud::Retail::V2::CompleteQueryResponse
|
46
46
|
# Bulk import of processed completion dataset.
|
47
47
|
#
|
48
48
|
# Request processing may be synchronous. Partial updating is not supported.
|
49
49
|
#
|
50
50
|
# This feature is only available for users who have Retail Search enabled.
|
51
|
-
#
|
52
|
-
# interested in using Retail Search.
|
51
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
52
|
+
# cloud sales if you are interested in using Retail Search.
|
53
53
|
rpc :ImportCompletionData, ::Google::Cloud::Retail::V2::ImportCompletionDataRequest, ::Google::Longrunning::Operation
|
54
54
|
end
|
55
55
|
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Retail::V2::PredictionService::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 PredictionService clients
|
47
|
+
# ::Google::Cloud::Retail::V2::PredictionService::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,9 @@ 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]
|
71
70
|
}
|
72
71
|
|
73
72
|
default_config
|
@@ -99,19 +98,15 @@ module Google
|
|
99
98
|
##
|
100
99
|
# Create a new PredictionService client object.
|
101
100
|
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
# To create a new PredictionService client with the default
|
105
|
-
# configuration:
|
101
|
+
# @example
|
106
102
|
#
|
107
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Retail::V2::PredictionService::Client.new
|
108
105
|
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
# config.timeout = 10.0
|
114
|
-
# end
|
106
|
+
# # Create a client using a custom configuration
|
107
|
+
# client = ::Google::Cloud::Retail::V2::PredictionService::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
115
110
|
#
|
116
111
|
# @yield [config] Configure the PredictionService client.
|
117
112
|
# @yieldparam config [Client::Configuration]
|
@@ -131,10 +126,9 @@ module Google
|
|
131
126
|
|
132
127
|
# Create credentials
|
133
128
|
credentials = @config.credentials
|
134
|
-
# Use self-signed JWT if the
|
129
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
135
130
|
# but only if the default endpoint does not have a region prefix.
|
136
|
-
enable_self_signed_jwt = @config.
|
137
|
-
@config.endpoint == Client.configure.endpoint &&
|
131
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
138
132
|
!@config.endpoint.split(".").first.include?("-")
|
139
133
|
credentials ||= Credentials.default scope: @config.scope,
|
140
134
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -306,7 +300,9 @@ module Google
|
|
306
300
|
options.apply_defaults timeout: @config.rpcs.predict.timeout,
|
307
301
|
metadata: metadata,
|
308
302
|
retry_policy: @config.rpcs.predict.retry_policy
|
309
|
-
|
303
|
+
|
304
|
+
options.apply_defaults timeout: @config.timeout,
|
305
|
+
metadata: @config.metadata,
|
310
306
|
retry_policy: @config.retry_policy
|
311
307
|
|
312
308
|
@prediction_service_stub.call_rpc :predict, request, options: options do |response, operation|
|
@@ -330,22 +326,21 @@ module Google
|
|
330
326
|
# Configuration can be applied globally to all clients, or to a single client
|
331
327
|
# on construction.
|
332
328
|
#
|
333
|
-
#
|
334
|
-
#
|
335
|
-
#
|
336
|
-
# to 20 seconds,
|
337
|
-
#
|
338
|
-
#
|
339
|
-
#
|
340
|
-
#
|
341
|
-
#
|
342
|
-
#
|
343
|
-
#
|
344
|
-
#
|
345
|
-
#
|
346
|
-
#
|
347
|
-
#
|
348
|
-
# end
|
329
|
+
# @example
|
330
|
+
#
|
331
|
+
# # Modify the global config, setting the timeout for
|
332
|
+
# # predict to 20 seconds,
|
333
|
+
# # and all remaining timeouts to 10 seconds.
|
334
|
+
# ::Google::Cloud::Retail::V2::PredictionService::Client.configure do |config|
|
335
|
+
# config.timeout = 10.0
|
336
|
+
# config.rpcs.predict.timeout = 20.0
|
337
|
+
# end
|
338
|
+
#
|
339
|
+
# # Apply the above configuration only to a new client.
|
340
|
+
# client = ::Google::Cloud::Retail::V2::PredictionService::Client.new do |config|
|
341
|
+
# config.timeout = 10.0
|
342
|
+
# config.rpcs.predict.timeout = 20.0
|
343
|
+
# end
|
349
344
|
#
|
350
345
|
# @!attribute [rw] endpoint
|
351
346
|
# The hostname or hostname:port of the service endpoint.
|
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::Retail::V2::ProductService::Client::Configuration}
|
43
43
|
# for a description of the configuration fields.
|
44
44
|
#
|
45
|
-
#
|
45
|
+
# @example
|
46
46
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
47
|
+
# # Modify the configuration for all ProductService clients
|
48
|
+
# ::Google::Cloud::Retail::V2::ProductService::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
52
51
|
#
|
53
52
|
# @yield [config] Configure the Client client.
|
54
53
|
# @yieldparam config [Client::Configuration]
|
@@ -66,9 +65,14 @@ module Google
|
|
66
65
|
end
|
67
66
|
default_config = Client::Configuration.new parent_config
|
68
67
|
|
69
|
-
default_config.timeout =
|
68
|
+
default_config.timeout = 30.0
|
70
69
|
default_config.retry_policy = {
|
71
|
-
initial_delay: 0.1, max_delay:
|
70
|
+
initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14, 4]
|
71
|
+
}
|
72
|
+
|
73
|
+
default_config.rpcs.import_products.timeout = 300.0
|
74
|
+
default_config.rpcs.import_products.retry_policy = {
|
75
|
+
initial_delay: 0.1, max_delay: 300.0, multiplier: 1.3, retry_codes: [14, 4]
|
72
76
|
}
|
73
77
|
|
74
78
|
default_config
|
@@ -100,19 +104,15 @@ module Google
|
|
100
104
|
##
|
101
105
|
# Create a new ProductService client object.
|
102
106
|
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
# To create a new ProductService client with the default
|
106
|
-
# configuration:
|
107
|
-
#
|
108
|
-
# client = ::Google::Cloud::Retail::V2::ProductService::Client.new
|
107
|
+
# @example
|
109
108
|
#
|
110
|
-
#
|
111
|
-
#
|
109
|
+
# # Create a client using the default configuration
|
110
|
+
# client = ::Google::Cloud::Retail::V2::ProductService::Client.new
|
112
111
|
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
112
|
+
# # Create a client using a custom configuration
|
113
|
+
# client = ::Google::Cloud::Retail::V2::ProductService::Client.new do |config|
|
114
|
+
# config.timeout = 10.0
|
115
|
+
# end
|
116
116
|
#
|
117
117
|
# @yield [config] Configure the ProductService client.
|
118
118
|
# @yieldparam config [Client::Configuration]
|
@@ -132,10 +132,9 @@ module Google
|
|
132
132
|
|
133
133
|
# Create credentials
|
134
134
|
credentials = @config.credentials
|
135
|
-
# Use self-signed JWT if the
|
135
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
136
136
|
# but only if the default endpoint does not have a region prefix.
|
137
|
-
enable_self_signed_jwt = @config.
|
138
|
-
@config.endpoint == Client.configure.endpoint &&
|
137
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
139
138
|
!@config.endpoint.split(".").first.include?("-")
|
140
139
|
credentials ||= Credentials.default scope: @config.scope,
|
141
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -242,7 +241,9 @@ module Google
|
|
242
241
|
options.apply_defaults timeout: @config.rpcs.create_product.timeout,
|
243
242
|
metadata: metadata,
|
244
243
|
retry_policy: @config.rpcs.create_product.retry_policy
|
245
|
-
|
244
|
+
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
246
|
+
metadata: @config.metadata,
|
246
247
|
retry_policy: @config.retry_policy
|
247
248
|
|
248
249
|
@product_service_stub.call_rpc :create_product, request, options: options do |response, operation|
|
@@ -317,7 +318,9 @@ module Google
|
|
317
318
|
options.apply_defaults timeout: @config.rpcs.get_product.timeout,
|
318
319
|
metadata: metadata,
|
319
320
|
retry_policy: @config.rpcs.get_product.retry_policy
|
320
|
-
|
321
|
+
|
322
|
+
options.apply_defaults timeout: @config.timeout,
|
323
|
+
metadata: @config.metadata,
|
321
324
|
retry_policy: @config.retry_policy
|
322
325
|
|
323
326
|
@product_service_stub.call_rpc :get_product, request, options: options do |response, operation|
|
@@ -454,7 +457,9 @@ module Google
|
|
454
457
|
options.apply_defaults timeout: @config.rpcs.list_products.timeout,
|
455
458
|
metadata: metadata,
|
456
459
|
retry_policy: @config.rpcs.list_products.retry_policy
|
457
|
-
|
460
|
+
|
461
|
+
options.apply_defaults timeout: @config.timeout,
|
462
|
+
metadata: @config.metadata,
|
458
463
|
retry_policy: @config.retry_policy
|
459
464
|
|
460
465
|
@product_service_stub.call_rpc :list_products, request, options: options do |response, operation|
|
@@ -542,7 +547,9 @@ module Google
|
|
542
547
|
options.apply_defaults timeout: @config.rpcs.update_product.timeout,
|
543
548
|
metadata: metadata,
|
544
549
|
retry_policy: @config.rpcs.update_product.retry_policy
|
545
|
-
|
550
|
+
|
551
|
+
options.apply_defaults timeout: @config.timeout,
|
552
|
+
metadata: @config.metadata,
|
546
553
|
retry_policy: @config.retry_policy
|
547
554
|
|
548
555
|
@product_service_stub.call_rpc :update_product, request, options: options do |response, operation|
|
@@ -628,7 +635,9 @@ module Google
|
|
628
635
|
options.apply_defaults timeout: @config.rpcs.delete_product.timeout,
|
629
636
|
metadata: metadata,
|
630
637
|
retry_policy: @config.rpcs.delete_product.retry_policy
|
631
|
-
|
638
|
+
|
639
|
+
options.apply_defaults timeout: @config.timeout,
|
640
|
+
metadata: @config.metadata,
|
632
641
|
retry_policy: @config.retry_policy
|
633
642
|
|
634
643
|
@product_service_stub.call_rpc :delete_product, request, options: options do |response, operation|
|
@@ -735,7 +744,9 @@ module Google
|
|
735
744
|
options.apply_defaults timeout: @config.rpcs.import_products.timeout,
|
736
745
|
metadata: metadata,
|
737
746
|
retry_policy: @config.rpcs.import_products.retry_policy
|
738
|
-
|
747
|
+
|
748
|
+
options.apply_defaults timeout: @config.timeout,
|
749
|
+
metadata: @config.metadata,
|
739
750
|
retry_policy: @config.retry_policy
|
740
751
|
|
741
752
|
@product_service_stub.call_rpc :import_products, request, options: options do |response, operation|
|
@@ -786,8 +797,8 @@ module Google
|
|
786
797
|
# {::Google::Cloud::Retail::V2::ProductService::Client#remove_fulfillment_places RemoveFulfillmentPlaces}.
|
787
798
|
#
|
788
799
|
# This feature is only available for users who have Retail Search enabled.
|
789
|
-
#
|
790
|
-
# interested in using Retail Search.
|
800
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
801
|
+
# cloud sales if you are interested in using Retail Search.
|
791
802
|
#
|
792
803
|
# @overload set_inventory(request, options = nil)
|
793
804
|
# Pass arguments to `set_inventory` via a request object, either of type
|
@@ -893,7 +904,9 @@ module Google
|
|
893
904
|
options.apply_defaults timeout: @config.rpcs.set_inventory.timeout,
|
894
905
|
metadata: metadata,
|
895
906
|
retry_policy: @config.rpcs.set_inventory.retry_policy
|
896
|
-
|
907
|
+
|
908
|
+
options.apply_defaults timeout: @config.timeout,
|
909
|
+
metadata: @config.metadata,
|
897
910
|
retry_policy: @config.retry_policy
|
898
911
|
|
899
912
|
@product_service_stub.call_rpc :set_inventory, request, options: options do |response, operation|
|
@@ -919,8 +932,8 @@ module Google
|
|
919
932
|
# {::Google::Cloud::Retail::V2::ProductService::Client#list_products ListProducts}.
|
920
933
|
#
|
921
934
|
# This feature is only available for users who have Retail Search enabled.
|
922
|
-
#
|
923
|
-
# interested in using Retail Search.
|
935
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
936
|
+
# cloud sales if you are interested in using Retail Search.
|
924
937
|
#
|
925
938
|
# @overload add_fulfillment_places(request, options = nil)
|
926
939
|
# Pass arguments to `add_fulfillment_places` via a request object, either of type
|
@@ -1027,7 +1040,9 @@ module Google
|
|
1027
1040
|
options.apply_defaults timeout: @config.rpcs.add_fulfillment_places.timeout,
|
1028
1041
|
metadata: metadata,
|
1029
1042
|
retry_policy: @config.rpcs.add_fulfillment_places.retry_policy
|
1030
|
-
|
1043
|
+
|
1044
|
+
options.apply_defaults timeout: @config.timeout,
|
1045
|
+
metadata: @config.metadata,
|
1031
1046
|
retry_policy: @config.retry_policy
|
1032
1047
|
|
1033
1048
|
@product_service_stub.call_rpc :add_fulfillment_places, request, options: options do |response, operation|
|
@@ -1053,8 +1068,8 @@ module Google
|
|
1053
1068
|
# {::Google::Cloud::Retail::V2::ProductService::Client#list_products ListProducts}.
|
1054
1069
|
#
|
1055
1070
|
# This feature is only available for users who have Retail Search enabled.
|
1056
|
-
#
|
1057
|
-
# interested in using Retail Search.
|
1071
|
+
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
1072
|
+
# cloud sales if you are interested in using Retail Search.
|
1058
1073
|
#
|
1059
1074
|
# @overload remove_fulfillment_places(request, options = nil)
|
1060
1075
|
# Pass arguments to `remove_fulfillment_places` via a request object, either of type
|
@@ -1156,7 +1171,9 @@ module Google
|
|
1156
1171
|
options.apply_defaults timeout: @config.rpcs.remove_fulfillment_places.timeout,
|
1157
1172
|
metadata: metadata,
|
1158
1173
|
retry_policy: @config.rpcs.remove_fulfillment_places.retry_policy
|
1159
|
-
|
1174
|
+
|
1175
|
+
options.apply_defaults timeout: @config.timeout,
|
1176
|
+
metadata: @config.metadata,
|
1160
1177
|
retry_policy: @config.retry_policy
|
1161
1178
|
|
1162
1179
|
@product_service_stub.call_rpc :remove_fulfillment_places, request, options: options do |response, operation|
|
@@ -1181,22 +1198,21 @@ module Google
|
|
1181
1198
|
# Configuration can be applied globally to all clients, or to a single client
|
1182
1199
|
# on construction.
|
1183
1200
|
#
|
1184
|
-
#
|
1185
|
-
#
|
1186
|
-
#
|
1187
|
-
# to 20 seconds,
|
1188
|
-
#
|
1189
|
-
#
|
1190
|
-
#
|
1191
|
-
#
|
1192
|
-
#
|
1193
|
-
#
|
1194
|
-
#
|
1195
|
-
#
|
1196
|
-
#
|
1197
|
-
#
|
1198
|
-
#
|
1199
|
-
# end
|
1201
|
+
# @example
|
1202
|
+
#
|
1203
|
+
# # Modify the global config, setting the timeout for
|
1204
|
+
# # create_product to 20 seconds,
|
1205
|
+
# # and all remaining timeouts to 10 seconds.
|
1206
|
+
# ::Google::Cloud::Retail::V2::ProductService::Client.configure do |config|
|
1207
|
+
# config.timeout = 10.0
|
1208
|
+
# config.rpcs.create_product.timeout = 20.0
|
1209
|
+
# end
|
1210
|
+
#
|
1211
|
+
# # Apply the above configuration only to a new client.
|
1212
|
+
# client = ::Google::Cloud::Retail::V2::ProductService::Client.new do |config|
|
1213
|
+
# config.timeout = 10.0
|
1214
|
+
# config.rpcs.create_product.timeout = 20.0
|
1215
|
+
# end
|
1200
1216
|
#
|
1201
1217
|
# @!attribute [rw] endpoint
|
1202
1218
|
# The hostname or hostname:port of the service endpoint.
|
@@ -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.
|