google-cloud-automl-v1 1.0.1 → 1.2.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 +31 -21
- data/lib/google/cloud/automl/v1/automl/client.rb +50 -19
- data/lib/google/cloud/automl/v1/automl/operations.rb +19 -15
- data/lib/google/cloud/automl/v1/automl/rest/client.rb +50 -19
- data/lib/google/cloud/automl/v1/automl/rest/operations.rb +59 -45
- data/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +158 -110
- data/lib/google/cloud/automl/v1/prediction_service/client.rb +35 -3
- data/lib/google/cloud/automl/v1/prediction_service/operations.rb +19 -15
- data/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +35 -3
- data/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +59 -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/annotation_payload.rb +10 -0
- data/proto_docs/google/cloud/automl/v1/data_items.rb +6 -0
- data/proto_docs/google/cloud/automl/v1/dataset.rb +12 -0
- data/proto_docs/google/cloud/automl/v1/io.rb +37 -49
- data/proto_docs/google/cloud/automl/v1/model.rb +12 -0
- data/proto_docs/google/cloud/automl/v1/model_evaluation.rb +10 -0
- data/proto_docs/google/cloud/automl/v1/operations.rb +18 -0
- data/proto_docs/google/cloud/automl/v1/service.rb +4 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- metadata +6 -9
@@ -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)
|
@@ -610,6 +601,13 @@ module Google
|
|
610
601
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
611
602
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
612
603
|
# * (`nil`) indicating no credentials
|
604
|
+
#
|
605
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
606
|
+
# external source for authentication to Google Cloud, you must validate it before
|
607
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
608
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
609
|
+
# For more information, refer to [Validate credential configurations from external
|
610
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
613
611
|
# @return [::Object]
|
614
612
|
# @!attribute [rw] scope
|
615
613
|
# The OAuth scopes
|
@@ -642,6 +640,11 @@ module Google
|
|
642
640
|
# default endpoint URL. The default value of nil uses the environment
|
643
641
|
# universe (usually the default "googleapis.com" universe).
|
644
642
|
# @return [::String,nil]
|
643
|
+
# @!attribute [rw] logger
|
644
|
+
# A custom logger to use for request/response debug logging, or the value
|
645
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
646
|
+
# explicitly disable logging.
|
647
|
+
# @return [::Logger,:default,nil]
|
645
648
|
#
|
646
649
|
class Configuration
|
647
650
|
extend ::Gapic::Config
|
@@ -663,6 +666,7 @@ module Google
|
|
663
666
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
664
667
|
config_attr :quota_project, nil, ::String, nil
|
665
668
|
config_attr :universe_domain, nil, ::String, nil
|
669
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
666
670
|
|
667
671
|
# @private
|
668
672
|
def initialize parent_config = nil
|
@@ -789,16 +793,18 @@ module Google
|
|
789
793
|
|
790
794
|
response = @client_stub.make_http_request(
|
791
795
|
verb,
|
792
|
-
uri:
|
793
|
-
body:
|
794
|
-
params:
|
796
|
+
uri: uri,
|
797
|
+
body: body || "",
|
798
|
+
params: query_string_params,
|
799
|
+
method_name: "list_operations",
|
795
800
|
options: options
|
796
801
|
)
|
797
802
|
operation = ::Gapic::Rest::TransportOperation.new response
|
798
803
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
799
|
-
|
800
|
-
|
801
|
-
|
804
|
+
catch :response do
|
805
|
+
yield result, operation if block_given?
|
806
|
+
result
|
807
|
+
end
|
802
808
|
end
|
803
809
|
|
804
810
|
##
|
@@ -827,16 +833,18 @@ module Google
|
|
827
833
|
|
828
834
|
response = @client_stub.make_http_request(
|
829
835
|
verb,
|
830
|
-
uri:
|
831
|
-
body:
|
832
|
-
params:
|
836
|
+
uri: uri,
|
837
|
+
body: body || "",
|
838
|
+
params: query_string_params,
|
839
|
+
method_name: "get_operation",
|
833
840
|
options: options
|
834
841
|
)
|
835
842
|
operation = ::Gapic::Rest::TransportOperation.new response
|
836
843
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
837
|
-
|
838
|
-
|
839
|
-
|
844
|
+
catch :response do
|
845
|
+
yield result, operation if block_given?
|
846
|
+
result
|
847
|
+
end
|
840
848
|
end
|
841
849
|
|
842
850
|
##
|
@@ -865,16 +873,18 @@ module Google
|
|
865
873
|
|
866
874
|
response = @client_stub.make_http_request(
|
867
875
|
verb,
|
868
|
-
uri:
|
869
|
-
body:
|
870
|
-
params:
|
876
|
+
uri: uri,
|
877
|
+
body: body || "",
|
878
|
+
params: query_string_params,
|
879
|
+
method_name: "delete_operation",
|
871
880
|
options: options
|
872
881
|
)
|
873
882
|
operation = ::Gapic::Rest::TransportOperation.new response
|
874
883
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
875
|
-
|
876
|
-
|
877
|
-
|
884
|
+
catch :response do
|
885
|
+
yield result, operation if block_given?
|
886
|
+
result
|
887
|
+
end
|
878
888
|
end
|
879
889
|
|
880
890
|
##
|
@@ -903,16 +913,18 @@ module Google
|
|
903
913
|
|
904
914
|
response = @client_stub.make_http_request(
|
905
915
|
verb,
|
906
|
-
uri:
|
907
|
-
body:
|
908
|
-
params:
|
916
|
+
uri: uri,
|
917
|
+
body: body || "",
|
918
|
+
params: query_string_params,
|
919
|
+
method_name: "cancel_operation",
|
909
920
|
options: options
|
910
921
|
)
|
911
922
|
operation = ::Gapic::Rest::TransportOperation.new response
|
912
923
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
913
|
-
|
914
|
-
|
915
|
-
|
924
|
+
catch :response do
|
925
|
+
yield result, operation if block_given?
|
926
|
+
result
|
927
|
+
end
|
916
928
|
end
|
917
929
|
|
918
930
|
##
|
@@ -941,16 +953,18 @@ module Google
|
|
941
953
|
|
942
954
|
response = @client_stub.make_http_request(
|
943
955
|
verb,
|
944
|
-
uri:
|
945
|
-
body:
|
946
|
-
params:
|
956
|
+
uri: uri,
|
957
|
+
body: body || "",
|
958
|
+
params: query_string_params,
|
959
|
+
method_name: "wait_operation",
|
947
960
|
options: options
|
948
961
|
)
|
949
962
|
operation = ::Gapic::Rest::TransportOperation.new response
|
950
963
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
951
|
-
|
952
|
-
|
953
|
-
|
964
|
+
catch :response do
|
965
|
+
yield result, operation if block_given?
|
966
|
+
result
|
967
|
+
end
|
954
968
|
end
|
955
969
|
|
956
970
|
##
|