google-cloud-automl-v1 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/automl/v1/automl/client.rb +39 -19
- data/lib/google/cloud/automl/v1/automl/operations.rb +12 -15
- data/lib/google/cloud/automl/v1/automl/rest/client.rb +39 -19
- data/lib/google/cloud/automl/v1/automl/rest/operations.rb +52 -45
- data/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +158 -110
- data/lib/google/cloud/automl/v1/prediction_service/client.rb +28 -3
- data/lib/google/cloud/automl/v1/prediction_service/operations.rb +12 -15
- data/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +28 -3
- data/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +52 -45
- data/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb +30 -14
- data/lib/google/cloud/automl/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/automl/v1/io.rb +37 -49
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -115,14 +115,6 @@ module Google
|
|
115
115
|
# Lists operations that match the specified filter in the request. If the
|
116
116
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
117
117
|
#
|
118
|
-
# NOTE: the `name` binding allows API services to override the binding
|
119
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
120
|
-
# override the binding, API services can add a binding such as
|
121
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
122
|
-
# For backwards compatibility, the default name includes the operations
|
123
|
-
# collection id, however overriding users must ensure the name binding
|
124
|
-
# is the parent resource, without the operations collection id.
|
125
|
-
#
|
126
118
|
# @overload list_operations(request, options = nil)
|
127
119
|
# Pass arguments to `list_operations` via a request object, either of type
|
128
120
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -204,7 +196,7 @@ module Google
|
|
204
196
|
@operations_stub.list_operations request, options do |result, operation|
|
205
197
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
206
198
|
yield result, operation if block_given?
|
207
|
-
|
199
|
+
throw :response, result
|
208
200
|
end
|
209
201
|
rescue ::Gapic::Rest::Error => e
|
210
202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -293,7 +285,7 @@ module Google
|
|
293
285
|
@operations_stub.get_operation request, options do |result, operation|
|
294
286
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
295
287
|
yield result, operation if block_given?
|
296
|
-
|
288
|
+
throw :response, result
|
297
289
|
end
|
298
290
|
rescue ::Gapic::Rest::Error => e
|
299
291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -375,7 +367,6 @@ module Google
|
|
375
367
|
|
376
368
|
@operations_stub.delete_operation request, options do |result, operation|
|
377
369
|
yield result, operation if block_given?
|
378
|
-
return result
|
379
370
|
end
|
380
371
|
rescue ::Gapic::Rest::Error => e
|
381
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -390,8 +381,9 @@ module Google
|
|
390
381
|
# other methods to check whether the cancellation succeeded or whether the
|
391
382
|
# operation completed despite cancellation. On successful cancellation,
|
392
383
|
# the operation is not deleted; instead, it becomes an operation with
|
393
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
394
|
-
# corresponding to
|
384
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
385
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
386
|
+
# `Code.CANCELLED`.
|
395
387
|
#
|
396
388
|
# @overload cancel_operation(request, options = nil)
|
397
389
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -463,7 +455,6 @@ module Google
|
|
463
455
|
|
464
456
|
@operations_stub.cancel_operation request, options do |result, operation|
|
465
457
|
yield result, operation if block_given?
|
466
|
-
return result
|
467
458
|
end
|
468
459
|
rescue ::Gapic::Rest::Error => e
|
469
460
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -562,7 +553,7 @@ module Google
|
|
562
553
|
@operations_stub.wait_operation request, options do |result, operation|
|
563
554
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
564
555
|
yield result, operation if block_given?
|
565
|
-
|
556
|
+
throw :response, result
|
566
557
|
end
|
567
558
|
rescue ::Gapic::Rest::Error => e
|
568
559
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -642,6 +633,11 @@ module Google
|
|
642
633
|
# default endpoint URL. The default value of nil uses the environment
|
643
634
|
# universe (usually the default "googleapis.com" universe).
|
644
635
|
# @return [::String,nil]
|
636
|
+
# @!attribute [rw] logger
|
637
|
+
# A custom logger to use for request/response debug logging, or the value
|
638
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
639
|
+
# explicitly disable logging.
|
640
|
+
# @return [::Logger,:default,nil]
|
645
641
|
#
|
646
642
|
class Configuration
|
647
643
|
extend ::Gapic::Config
|
@@ -663,6 +659,7 @@ module Google
|
|
663
659
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
664
660
|
config_attr :quota_project, nil, ::String, nil
|
665
661
|
config_attr :universe_domain, nil, ::String, nil
|
662
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
666
663
|
|
667
664
|
# @private
|
668
665
|
def initialize parent_config = nil
|
@@ -789,16 +786,18 @@ module Google
|
|
789
786
|
|
790
787
|
response = @client_stub.make_http_request(
|
791
788
|
verb,
|
792
|
-
uri:
|
793
|
-
body:
|
794
|
-
params:
|
789
|
+
uri: uri,
|
790
|
+
body: body || "",
|
791
|
+
params: query_string_params,
|
792
|
+
method_name: "list_operations",
|
795
793
|
options: options
|
796
794
|
)
|
797
795
|
operation = ::Gapic::Rest::TransportOperation.new response
|
798
796
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
799
|
-
|
800
|
-
|
801
|
-
|
797
|
+
catch :response do
|
798
|
+
yield result, operation if block_given?
|
799
|
+
result
|
800
|
+
end
|
802
801
|
end
|
803
802
|
|
804
803
|
##
|
@@ -827,16 +826,18 @@ module Google
|
|
827
826
|
|
828
827
|
response = @client_stub.make_http_request(
|
829
828
|
verb,
|
830
|
-
uri:
|
831
|
-
body:
|
832
|
-
params:
|
829
|
+
uri: uri,
|
830
|
+
body: body || "",
|
831
|
+
params: query_string_params,
|
832
|
+
method_name: "get_operation",
|
833
833
|
options: options
|
834
834
|
)
|
835
835
|
operation = ::Gapic::Rest::TransportOperation.new response
|
836
836
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
837
|
-
|
838
|
-
|
839
|
-
|
837
|
+
catch :response do
|
838
|
+
yield result, operation if block_given?
|
839
|
+
result
|
840
|
+
end
|
840
841
|
end
|
841
842
|
|
842
843
|
##
|
@@ -865,16 +866,18 @@ module Google
|
|
865
866
|
|
866
867
|
response = @client_stub.make_http_request(
|
867
868
|
verb,
|
868
|
-
uri:
|
869
|
-
body:
|
870
|
-
params:
|
869
|
+
uri: uri,
|
870
|
+
body: body || "",
|
871
|
+
params: query_string_params,
|
872
|
+
method_name: "delete_operation",
|
871
873
|
options: options
|
872
874
|
)
|
873
875
|
operation = ::Gapic::Rest::TransportOperation.new response
|
874
876
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
875
|
-
|
876
|
-
|
877
|
-
|
877
|
+
catch :response do
|
878
|
+
yield result, operation if block_given?
|
879
|
+
result
|
880
|
+
end
|
878
881
|
end
|
879
882
|
|
880
883
|
##
|
@@ -903,16 +906,18 @@ module Google
|
|
903
906
|
|
904
907
|
response = @client_stub.make_http_request(
|
905
908
|
verb,
|
906
|
-
uri:
|
907
|
-
body:
|
908
|
-
params:
|
909
|
+
uri: uri,
|
910
|
+
body: body || "",
|
911
|
+
params: query_string_params,
|
912
|
+
method_name: "cancel_operation",
|
909
913
|
options: options
|
910
914
|
)
|
911
915
|
operation = ::Gapic::Rest::TransportOperation.new response
|
912
916
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
913
|
-
|
914
|
-
|
915
|
-
|
917
|
+
catch :response do
|
918
|
+
yield result, operation if block_given?
|
919
|
+
result
|
920
|
+
end
|
916
921
|
end
|
917
922
|
|
918
923
|
##
|
@@ -941,16 +946,18 @@ module Google
|
|
941
946
|
|
942
947
|
response = @client_stub.make_http_request(
|
943
948
|
verb,
|
944
|
-
uri:
|
945
|
-
body:
|
946
|
-
params:
|
949
|
+
uri: uri,
|
950
|
+
body: body || "",
|
951
|
+
params: query_string_params,
|
952
|
+
method_name: "wait_operation",
|
947
953
|
options: options
|
948
954
|
)
|
949
955
|
operation = ::Gapic::Rest::TransportOperation.new response
|
950
956
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
951
|
-
|
952
|
-
|
953
|
-
|
957
|
+
catch :response do
|
958
|
+
yield result, operation if block_given?
|
959
|
+
result
|
960
|
+
end
|
954
961
|
end
|
955
962
|
|
956
963
|
##
|