google-cloud-automl-v1beta1 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +11 -6
- data/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/automl/client.rb +579 -76
- data/lib/google/cloud/automl/v1beta1/automl/operations.rb +118 -12
- data/lib/google/cloud/automl/v1beta1/classification_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/column_spec_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/data_items_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/data_stats_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/data_types_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/dataset_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/detection_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/geometry_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/image_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/io_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/model_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/operations_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service/client.rb +48 -6
- data/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb +118 -12
- data/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb +1 -1
- data/lib/google/cloud/automl/v1beta1/ranges_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/regression_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/service_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/service_services_pb.rb +1 -1
- data/lib/google/cloud/automl/v1beta1/table_spec_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/tables_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/temporal_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/text_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/text_segment_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/translation_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1/version.rb +1 -1
- data/lib/google/cloud/automl/v1beta1/video_pb.rb +1 -0
- data/lib/google/cloud/automl/v1beta1.rb +2 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/automl/v1beta1/service.rb +5 -4
- data/proto_docs/google/protobuf/any.rb +3 -3
- data/proto_docs/google/protobuf/struct.rb +2 -2
- metadata +12 -12
@@ -95,6 +95,9 @@ module Google
|
|
95
95
|
channel_args: @config.channel_args,
|
96
96
|
interceptors: @config.interceptors
|
97
97
|
)
|
98
|
+
|
99
|
+
# Used by an LRO wrapper for some methods of this service
|
100
|
+
@operations_client = self
|
98
101
|
end
|
99
102
|
|
100
103
|
# Service calls
|
@@ -143,6 +146,27 @@ module Google
|
|
143
146
|
#
|
144
147
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
145
148
|
#
|
149
|
+
# @example Basic example
|
150
|
+
# require "google/longrunning"
|
151
|
+
#
|
152
|
+
# # Create a client object. The client can be reused for multiple calls.
|
153
|
+
# client = Google::Longrunning::Operations::Client.new
|
154
|
+
#
|
155
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
156
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
157
|
+
#
|
158
|
+
# # Call the list_operations method.
|
159
|
+
# result = client.list_operations request
|
160
|
+
#
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
+
# # iterate over all elements by calling #each, and the enumerable
|
163
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
164
|
+
# # methods are also available for managing paging directly.
|
165
|
+
# result.each do |response|
|
166
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
+
# p response
|
168
|
+
# end
|
169
|
+
#
|
146
170
|
def list_operations request, options = nil
|
147
171
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
148
172
|
|
@@ -160,9 +184,11 @@ module Google
|
|
160
184
|
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
|
161
185
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
162
186
|
|
163
|
-
header_params = {
|
164
|
-
|
165
|
-
|
187
|
+
header_params = {}
|
188
|
+
if request.name
|
189
|
+
header_params["name"] = request.name
|
190
|
+
end
|
191
|
+
|
166
192
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
167
193
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
168
194
|
|
@@ -215,6 +241,28 @@ module Google
|
|
215
241
|
#
|
216
242
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
217
243
|
#
|
244
|
+
# @example Basic example
|
245
|
+
# require "google/longrunning"
|
246
|
+
#
|
247
|
+
# # Create a client object. The client can be reused for multiple calls.
|
248
|
+
# client = Google::Longrunning::Operations::Client.new
|
249
|
+
#
|
250
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
251
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
252
|
+
#
|
253
|
+
# # Call the get_operation method.
|
254
|
+
# result = client.get_operation request
|
255
|
+
#
|
256
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
257
|
+
# # object to check the status of an operation, cancel it, or wait
|
258
|
+
# # for results. Here is how to block until completion:
|
259
|
+
# result.wait_until_done! timeout: 60
|
260
|
+
# if result.response?
|
261
|
+
# p result.response
|
262
|
+
# else
|
263
|
+
# puts "Error!"
|
264
|
+
# end
|
265
|
+
#
|
218
266
|
def get_operation request, options = nil
|
219
267
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
220
268
|
|
@@ -232,9 +280,11 @@ module Google
|
|
232
280
|
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
|
233
281
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
234
282
|
|
235
|
-
header_params = {
|
236
|
-
|
237
|
-
|
283
|
+
header_params = {}
|
284
|
+
if request.name
|
285
|
+
header_params["name"] = request.name
|
286
|
+
end
|
287
|
+
|
238
288
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
239
289
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
240
290
|
|
@@ -287,6 +337,21 @@ module Google
|
|
287
337
|
#
|
288
338
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
289
339
|
#
|
340
|
+
# @example Basic example
|
341
|
+
# require "google/longrunning"
|
342
|
+
#
|
343
|
+
# # Create a client object. The client can be reused for multiple calls.
|
344
|
+
# client = Google::Longrunning::Operations::Client.new
|
345
|
+
#
|
346
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
347
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
348
|
+
#
|
349
|
+
# # Call the delete_operation method.
|
350
|
+
# result = client.delete_operation request
|
351
|
+
#
|
352
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
353
|
+
# p result
|
354
|
+
#
|
290
355
|
def delete_operation request, options = nil
|
291
356
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
292
357
|
|
@@ -304,9 +369,11 @@ module Google
|
|
304
369
|
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
|
305
370
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
306
371
|
|
307
|
-
header_params = {
|
308
|
-
|
309
|
-
|
372
|
+
header_params = {}
|
373
|
+
if request.name
|
374
|
+
header_params["name"] = request.name
|
375
|
+
end
|
376
|
+
|
310
377
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
311
378
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
312
379
|
|
@@ -364,6 +431,21 @@ module Google
|
|
364
431
|
#
|
365
432
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
366
433
|
#
|
434
|
+
# @example Basic example
|
435
|
+
# require "google/longrunning"
|
436
|
+
#
|
437
|
+
# # Create a client object. The client can be reused for multiple calls.
|
438
|
+
# client = Google::Longrunning::Operations::Client.new
|
439
|
+
#
|
440
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
441
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
442
|
+
#
|
443
|
+
# # Call the cancel_operation method.
|
444
|
+
# result = client.cancel_operation request
|
445
|
+
#
|
446
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
447
|
+
# p result
|
448
|
+
#
|
367
449
|
def cancel_operation request, options = nil
|
368
450
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
369
451
|
|
@@ -381,9 +463,11 @@ module Google
|
|
381
463
|
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
|
382
464
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
383
465
|
|
384
|
-
header_params = {
|
385
|
-
|
386
|
-
|
466
|
+
header_params = {}
|
467
|
+
if request.name
|
468
|
+
header_params["name"] = request.name
|
469
|
+
end
|
470
|
+
|
387
471
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
388
472
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
389
473
|
|
@@ -444,6 +528,28 @@ module Google
|
|
444
528
|
#
|
445
529
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
446
530
|
#
|
531
|
+
# @example Basic example
|
532
|
+
# require "google/longrunning"
|
533
|
+
#
|
534
|
+
# # Create a client object. The client can be reused for multiple calls.
|
535
|
+
# client = Google::Longrunning::Operations::Client.new
|
536
|
+
#
|
537
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
538
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
539
|
+
#
|
540
|
+
# # Call the wait_operation method.
|
541
|
+
# result = client.wait_operation request
|
542
|
+
#
|
543
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
544
|
+
# # object to check the status of an operation, cancel it, or wait
|
545
|
+
# # for results. Here is how to block until completion:
|
546
|
+
# result.wait_until_done! timeout: 60
|
547
|
+
# if result.response?
|
548
|
+
# p result.response
|
549
|
+
# else
|
550
|
+
# puts "Error!"
|
551
|
+
# end
|
552
|
+
#
|
447
553
|
def wait_operation request, options = nil
|
448
554
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
449
555
|
|
@@ -5,6 +5,7 @@ require 'google/protobuf'
|
|
5
5
|
|
6
6
|
require 'google/cloud/automl/v1beta1/temporal_pb'
|
7
7
|
require 'google/api/annotations_pb'
|
8
|
+
|
8
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
10
|
add_file("google/cloud/automl/v1beta1/classification.proto", :syntax => :proto3) do
|
10
11
|
add_message "google.cloud.automl.v1beta1.ClassificationAnnotation" do
|
@@ -7,6 +7,7 @@ require 'google/api/resource_pb'
|
|
7
7
|
require 'google/cloud/automl/v1beta1/data_stats_pb'
|
8
8
|
require 'google/cloud/automl/v1beta1/data_types_pb'
|
9
9
|
require 'google/api/annotations_pb'
|
10
|
+
|
10
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
12
|
add_file("google/cloud/automl/v1beta1/column_spec.proto", :syntax => :proto3) do
|
12
13
|
add_message "google.cloud.automl.v1beta1.ColumnSpec" do
|
@@ -11,6 +11,7 @@ require 'google/protobuf/any_pb'
|
|
11
11
|
require 'google/protobuf/duration_pb'
|
12
12
|
require 'google/protobuf/struct_pb'
|
13
13
|
require 'google/api/annotations_pb'
|
14
|
+
|
14
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
15
16
|
add_file("google/cloud/automl/v1beta1/data_items.proto", :syntax => :proto3) do
|
16
17
|
add_message "google.cloud.automl.v1beta1.Image" do
|
@@ -11,6 +11,7 @@ require 'google/cloud/automl/v1beta1/translation_pb'
|
|
11
11
|
require 'google/cloud/automl/v1beta1/video_pb'
|
12
12
|
require 'google/protobuf/timestamp_pb'
|
13
13
|
require 'google/api/annotations_pb'
|
14
|
+
|
14
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
15
16
|
add_file("google/cloud/automl/v1beta1/dataset.proto", :syntax => :proto3) do
|
16
17
|
add_message "google.cloud.automl.v1beta1.Dataset" do
|
@@ -6,6 +6,7 @@ require 'google/protobuf'
|
|
6
6
|
require 'google/cloud/automl/v1beta1/geometry_pb'
|
7
7
|
require 'google/protobuf/duration_pb'
|
8
8
|
require 'google/api/annotations_pb'
|
9
|
+
|
9
10
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
11
|
add_file("google/cloud/automl/v1beta1/detection.proto", :syntax => :proto3) do
|
11
12
|
add_message "google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation" do
|
@@ -4,6 +4,7 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'google/api/annotations_pb'
|
7
|
+
|
7
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
9
|
add_file("google/cloud/automl/v1beta1/geometry.proto", :syntax => :proto3) do
|
9
10
|
add_message "google.cloud.automl.v1beta1.NormalizedVertex" do
|
@@ -8,6 +8,7 @@ require 'google/cloud/automl/v1beta1/annotation_spec_pb'
|
|
8
8
|
require 'google/cloud/automl/v1beta1/classification_pb'
|
9
9
|
require 'google/protobuf/timestamp_pb'
|
10
10
|
require 'google/api/annotations_pb'
|
11
|
+
|
11
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
13
|
add_file("google/cloud/automl/v1beta1/image.proto", :syntax => :proto3) do
|
13
14
|
add_message "google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata" do
|
@@ -13,6 +13,7 @@ require 'google/cloud/automl/v1beta1/text_sentiment_pb'
|
|
13
13
|
require 'google/cloud/automl/v1beta1/translation_pb'
|
14
14
|
require 'google/protobuf/timestamp_pb'
|
15
15
|
require 'google/api/annotations_pb'
|
16
|
+
|
16
17
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
18
|
add_file("google/cloud/automl/v1beta1/model_evaluation.proto", :syntax => :proto3) do
|
18
19
|
add_message "google.cloud.automl.v1beta1.ModelEvaluation" do
|
@@ -11,6 +11,7 @@ require 'google/cloud/automl/v1beta1/translation_pb'
|
|
11
11
|
require 'google/cloud/automl/v1beta1/video_pb'
|
12
12
|
require 'google/protobuf/timestamp_pb'
|
13
13
|
require 'google/api/annotations_pb'
|
14
|
+
|
14
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
15
16
|
add_file("google/cloud/automl/v1beta1/model.proto", :syntax => :proto3) do
|
16
17
|
add_message "google.cloud.automl.v1beta1.Model" do
|
@@ -10,6 +10,7 @@ require 'google/protobuf/empty_pb'
|
|
10
10
|
require 'google/protobuf/timestamp_pb'
|
11
11
|
require 'google/rpc/status_pb'
|
12
12
|
require 'google/api/annotations_pb'
|
13
|
+
|
13
14
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
15
|
add_file("google/cloud/automl/v1beta1/operations.proto", :syntax => :proto3) do
|
15
16
|
add_message "google.cloud.automl.v1beta1.OperationMetadata" do
|
@@ -142,6 +142,7 @@ module Google
|
|
142
142
|
|
143
143
|
@operations_client = Operations.new do |config|
|
144
144
|
config.credentials = credentials
|
145
|
+
config.quota_project = @quota_project_id
|
145
146
|
config.endpoint = @config.endpoint
|
146
147
|
end
|
147
148
|
|
@@ -234,6 +235,21 @@ module Google
|
|
234
235
|
#
|
235
236
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
236
237
|
#
|
238
|
+
# @example Basic example
|
239
|
+
# require "google/cloud/automl/v1beta1"
|
240
|
+
#
|
241
|
+
# # Create a client object. The client can be reused for multiple calls.
|
242
|
+
# client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new
|
243
|
+
#
|
244
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
245
|
+
# request = Google::Cloud::AutoML::V1beta1::PredictRequest.new
|
246
|
+
#
|
247
|
+
# # Call the predict method.
|
248
|
+
# result = client.predict request
|
249
|
+
#
|
250
|
+
# # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse.
|
251
|
+
# p result
|
252
|
+
#
|
237
253
|
def predict request, options = nil
|
238
254
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
239
255
|
|
@@ -251,9 +267,11 @@ module Google
|
|
251
267
|
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
|
252
268
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
253
269
|
|
254
|
-
header_params = {
|
255
|
-
|
256
|
-
|
270
|
+
header_params = {}
|
271
|
+
if request.name
|
272
|
+
header_params["name"] = request.name
|
273
|
+
end
|
274
|
+
|
257
275
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
258
276
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
259
277
|
|
@@ -389,6 +407,28 @@ module Google
|
|
389
407
|
#
|
390
408
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
391
409
|
#
|
410
|
+
# @example Basic example
|
411
|
+
# require "google/cloud/automl/v1beta1"
|
412
|
+
#
|
413
|
+
# # Create a client object. The client can be reused for multiple calls.
|
414
|
+
# client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new
|
415
|
+
#
|
416
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
417
|
+
# request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new
|
418
|
+
#
|
419
|
+
# # Call the batch_predict method.
|
420
|
+
# result = client.batch_predict request
|
421
|
+
#
|
422
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
423
|
+
# # object to check the status of an operation, cancel it, or wait
|
424
|
+
# # for results. Here is how to block until completion:
|
425
|
+
# result.wait_until_done! timeout: 60
|
426
|
+
# if result.response?
|
427
|
+
# p result.response
|
428
|
+
# else
|
429
|
+
# puts "Error!"
|
430
|
+
# end
|
431
|
+
#
|
392
432
|
def batch_predict request, options = nil
|
393
433
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
394
434
|
|
@@ -406,9 +446,11 @@ module Google
|
|
406
446
|
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
|
407
447
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
408
448
|
|
409
|
-
header_params = {
|
410
|
-
|
411
|
-
|
449
|
+
header_params = {}
|
450
|
+
if request.name
|
451
|
+
header_params["name"] = request.name
|
452
|
+
end
|
453
|
+
|
412
454
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
413
455
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
414
456
|
|
@@ -95,6 +95,9 @@ module Google
|
|
95
95
|
channel_args: @config.channel_args,
|
96
96
|
interceptors: @config.interceptors
|
97
97
|
)
|
98
|
+
|
99
|
+
# Used by an LRO wrapper for some methods of this service
|
100
|
+
@operations_client = self
|
98
101
|
end
|
99
102
|
|
100
103
|
# Service calls
|
@@ -143,6 +146,27 @@ module Google
|
|
143
146
|
#
|
144
147
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
145
148
|
#
|
149
|
+
# @example Basic example
|
150
|
+
# require "google/longrunning"
|
151
|
+
#
|
152
|
+
# # Create a client object. The client can be reused for multiple calls.
|
153
|
+
# client = Google::Longrunning::Operations::Client.new
|
154
|
+
#
|
155
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
156
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
157
|
+
#
|
158
|
+
# # Call the list_operations method.
|
159
|
+
# result = client.list_operations request
|
160
|
+
#
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
+
# # iterate over all elements by calling #each, and the enumerable
|
163
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
164
|
+
# # methods are also available for managing paging directly.
|
165
|
+
# result.each do |response|
|
166
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
+
# p response
|
168
|
+
# end
|
169
|
+
#
|
146
170
|
def list_operations request, options = nil
|
147
171
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
148
172
|
|
@@ -160,9 +184,11 @@ module Google
|
|
160
184
|
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
|
161
185
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
162
186
|
|
163
|
-
header_params = {
|
164
|
-
|
165
|
-
|
187
|
+
header_params = {}
|
188
|
+
if request.name
|
189
|
+
header_params["name"] = request.name
|
190
|
+
end
|
191
|
+
|
166
192
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
167
193
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
168
194
|
|
@@ -215,6 +241,28 @@ module Google
|
|
215
241
|
#
|
216
242
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
217
243
|
#
|
244
|
+
# @example Basic example
|
245
|
+
# require "google/longrunning"
|
246
|
+
#
|
247
|
+
# # Create a client object. The client can be reused for multiple calls.
|
248
|
+
# client = Google::Longrunning::Operations::Client.new
|
249
|
+
#
|
250
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
251
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
252
|
+
#
|
253
|
+
# # Call the get_operation method.
|
254
|
+
# result = client.get_operation request
|
255
|
+
#
|
256
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
257
|
+
# # object to check the status of an operation, cancel it, or wait
|
258
|
+
# # for results. Here is how to block until completion:
|
259
|
+
# result.wait_until_done! timeout: 60
|
260
|
+
# if result.response?
|
261
|
+
# p result.response
|
262
|
+
# else
|
263
|
+
# puts "Error!"
|
264
|
+
# end
|
265
|
+
#
|
218
266
|
def get_operation request, options = nil
|
219
267
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
220
268
|
|
@@ -232,9 +280,11 @@ module Google
|
|
232
280
|
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
|
233
281
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
234
282
|
|
235
|
-
header_params = {
|
236
|
-
|
237
|
-
|
283
|
+
header_params = {}
|
284
|
+
if request.name
|
285
|
+
header_params["name"] = request.name
|
286
|
+
end
|
287
|
+
|
238
288
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
239
289
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
240
290
|
|
@@ -287,6 +337,21 @@ module Google
|
|
287
337
|
#
|
288
338
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
289
339
|
#
|
340
|
+
# @example Basic example
|
341
|
+
# require "google/longrunning"
|
342
|
+
#
|
343
|
+
# # Create a client object. The client can be reused for multiple calls.
|
344
|
+
# client = Google::Longrunning::Operations::Client.new
|
345
|
+
#
|
346
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
347
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
348
|
+
#
|
349
|
+
# # Call the delete_operation method.
|
350
|
+
# result = client.delete_operation request
|
351
|
+
#
|
352
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
353
|
+
# p result
|
354
|
+
#
|
290
355
|
def delete_operation request, options = nil
|
291
356
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
292
357
|
|
@@ -304,9 +369,11 @@ module Google
|
|
304
369
|
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
|
305
370
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
306
371
|
|
307
|
-
header_params = {
|
308
|
-
|
309
|
-
|
372
|
+
header_params = {}
|
373
|
+
if request.name
|
374
|
+
header_params["name"] = request.name
|
375
|
+
end
|
376
|
+
|
310
377
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
311
378
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
312
379
|
|
@@ -364,6 +431,21 @@ module Google
|
|
364
431
|
#
|
365
432
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
366
433
|
#
|
434
|
+
# @example Basic example
|
435
|
+
# require "google/longrunning"
|
436
|
+
#
|
437
|
+
# # Create a client object. The client can be reused for multiple calls.
|
438
|
+
# client = Google::Longrunning::Operations::Client.new
|
439
|
+
#
|
440
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
441
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
442
|
+
#
|
443
|
+
# # Call the cancel_operation method.
|
444
|
+
# result = client.cancel_operation request
|
445
|
+
#
|
446
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
447
|
+
# p result
|
448
|
+
#
|
367
449
|
def cancel_operation request, options = nil
|
368
450
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
369
451
|
|
@@ -381,9 +463,11 @@ module Google
|
|
381
463
|
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
|
382
464
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
383
465
|
|
384
|
-
header_params = {
|
385
|
-
|
386
|
-
|
466
|
+
header_params = {}
|
467
|
+
if request.name
|
468
|
+
header_params["name"] = request.name
|
469
|
+
end
|
470
|
+
|
387
471
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
388
472
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
389
473
|
|
@@ -444,6 +528,28 @@ module Google
|
|
444
528
|
#
|
445
529
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
446
530
|
#
|
531
|
+
# @example Basic example
|
532
|
+
# require "google/longrunning"
|
533
|
+
#
|
534
|
+
# # Create a client object. The client can be reused for multiple calls.
|
535
|
+
# client = Google::Longrunning::Operations::Client.new
|
536
|
+
#
|
537
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
538
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
539
|
+
#
|
540
|
+
# # Call the wait_operation method.
|
541
|
+
# result = client.wait_operation request
|
542
|
+
#
|
543
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
544
|
+
# # object to check the status of an operation, cancel it, or wait
|
545
|
+
# # for results. Here is how to block until completion:
|
546
|
+
# result.wait_until_done! timeout: 60
|
547
|
+
# if result.response?
|
548
|
+
# p result.response
|
549
|
+
# else
|
550
|
+
# puts "Error!"
|
551
|
+
# end
|
552
|
+
#
|
447
553
|
def wait_operation request, options = nil
|
448
554
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
449
555
|
|
@@ -12,6 +12,7 @@ require 'google/cloud/automl/v1beta1/data_items_pb'
|
|
12
12
|
require 'google/cloud/automl/v1beta1/io_pb'
|
13
13
|
require 'google/cloud/automl/v1beta1/operations_pb'
|
14
14
|
require 'google/longrunning/operations_pb'
|
15
|
+
|
15
16
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
16
17
|
add_file("google/cloud/automl/v1beta1/prediction_service.proto", :syntax => :proto3) do
|
17
18
|
add_message "google.cloud.automl.v1beta1.PredictRequest" do
|
@@ -4,6 +4,7 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'google/api/annotations_pb'
|
7
|
+
|
7
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
9
|
add_file("google/cloud/automl/v1beta1/regression.proto", :syntax => :proto3) do
|
9
10
|
add_message "google.cloud.automl.v1beta1.RegressionEvaluationMetrics" do
|
@@ -19,6 +19,7 @@ require 'google/cloud/automl/v1beta1/operations_pb'
|
|
19
19
|
require 'google/cloud/automl/v1beta1/table_spec_pb'
|
20
20
|
require 'google/longrunning/operations_pb'
|
21
21
|
require 'google/protobuf/field_mask_pb'
|
22
|
+
|
22
23
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
23
24
|
add_file("google/cloud/automl/v1beta1/service.proto", :syntax => :proto3) do
|
24
25
|
add_message "google.cloud.automl.v1beta1.CreateDatasetRequest" do
|