google-cloud-automl-v1 0.6.0 → 0.8.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 +1 -1
- data/lib/google/cloud/automl/v1/annotation_payload_pb.rb +29 -12
- data/lib/google/cloud/automl/v1/annotation_spec_pb.rb +24 -6
- data/lib/google/cloud/automl/v1/automl/client.rb +16 -5
- data/lib/google/cloud/automl/v1/automl/operations.rb +15 -4
- data/lib/google/cloud/automl/v1/automl/rest/client.rb +369 -4
- data/lib/google/cloud/automl/v1/automl/rest/operations.rb +108 -8
- data/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +18 -18
- data/lib/google/cloud/automl/v1/classification_pb.rb +24 -41
- data/lib/google/cloud/automl/v1/data_items_pb.rb +27 -55
- data/lib/google/cloud/automl/v1/dataset_pb.rb +28 -18
- data/lib/google/cloud/automl/v1/detection_pb.rb +25 -21
- data/lib/google/cloud/automl/v1/geometry_pb.rb +24 -8
- data/lib/google/cloud/automl/v1/image_pb.rb +24 -29
- data/lib/google/cloud/automl/v1/io_pb.rb +24 -38
- data/lib/google/cloud/automl/v1/model_evaluation_pb.rb +30 -15
- data/lib/google/cloud/automl/v1/model_pb.rb +28 -24
- data/lib/google/cloud/automl/v1/operations_pb.rb +27 -53
- data/lib/google/cloud/automl/v1/prediction_service/client.rb +16 -5
- data/lib/google/cloud/automl/v1/prediction_service/operations.rb +15 -4
- data/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +45 -4
- data/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +108 -8
- data/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb +2 -2
- data/lib/google/cloud/automl/v1/prediction_service_pb.rb +27 -20
- data/lib/google/cloud/automl/v1/service_pb.rb +30 -87
- data/lib/google/cloud/automl/v1/text_extraction_pb.rb +25 -17
- data/lib/google/cloud/automl/v1/text_pb.rb +24 -16
- data/lib/google/cloud/automl/v1/text_segment_pb.rb +24 -6
- data/lib/google/cloud/automl/v1/text_sentiment_pb.rb +25 -14
- data/lib/google/cloud/automl/v1/translation_pb.rb +25 -17
- data/lib/google/cloud/automl/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +5 -5
@@ -195,7 +195,7 @@ module Google
|
|
195
195
|
credentials = @config.credentials
|
196
196
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
197
197
|
# but only if the default endpoint does not have a region prefix.
|
198
|
-
enable_self_signed_jwt = @config.endpoint ==
|
198
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
199
199
|
!@config.endpoint.split(".").first.include?("-")
|
200
200
|
credentials ||= Credentials.default scope: @config.scope,
|
201
201
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -253,6 +253,29 @@ module Google
|
|
253
253
|
# @return [::Gapic::Operation]
|
254
254
|
#
|
255
255
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
256
|
+
#
|
257
|
+
# @example Basic example
|
258
|
+
# require "google/cloud/automl/v1"
|
259
|
+
#
|
260
|
+
# # Create a client object. The client can be reused for multiple calls.
|
261
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
262
|
+
#
|
263
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
264
|
+
# request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new
|
265
|
+
#
|
266
|
+
# # Call the create_dataset method.
|
267
|
+
# result = client.create_dataset request
|
268
|
+
#
|
269
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
270
|
+
# # check the status of an operation, cancel it, or wait for results.
|
271
|
+
# # Here is how to wait for a response.
|
272
|
+
# result.wait_until_done! timeout: 60
|
273
|
+
# if result.response?
|
274
|
+
# p result.response
|
275
|
+
# else
|
276
|
+
# puts "No response received."
|
277
|
+
# end
|
278
|
+
#
|
256
279
|
def create_dataset request, options = nil
|
257
280
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
258
281
|
|
@@ -316,6 +339,22 @@ module Google
|
|
316
339
|
# @return [::Google::Cloud::AutoML::V1::Dataset]
|
317
340
|
#
|
318
341
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
342
|
+
#
|
343
|
+
# @example Basic example
|
344
|
+
# require "google/cloud/automl/v1"
|
345
|
+
#
|
346
|
+
# # Create a client object. The client can be reused for multiple calls.
|
347
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
348
|
+
#
|
349
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
350
|
+
# request = Google::Cloud::AutoML::V1::GetDatasetRequest.new
|
351
|
+
#
|
352
|
+
# # Call the get_dataset method.
|
353
|
+
# result = client.get_dataset request
|
354
|
+
#
|
355
|
+
# # The returned object is of type Google::Cloud::AutoML::V1::Dataset.
|
356
|
+
# p result
|
357
|
+
#
|
319
358
|
def get_dataset request, options = nil
|
320
359
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
321
360
|
|
@@ -394,6 +433,26 @@ module Google
|
|
394
433
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>]
|
395
434
|
#
|
396
435
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
436
|
+
#
|
437
|
+
# @example Basic example
|
438
|
+
# require "google/cloud/automl/v1"
|
439
|
+
#
|
440
|
+
# # Create a client object. The client can be reused for multiple calls.
|
441
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
442
|
+
#
|
443
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
444
|
+
# request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new
|
445
|
+
#
|
446
|
+
# # Call the list_datasets method.
|
447
|
+
# result = client.list_datasets request
|
448
|
+
#
|
449
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
450
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
451
|
+
# result.each do |item|
|
452
|
+
# # Each element is of type ::Google::Cloud::AutoML::V1::Dataset.
|
453
|
+
# p item
|
454
|
+
# end
|
455
|
+
#
|
397
456
|
def list_datasets request, options = nil
|
398
457
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
399
458
|
|
@@ -459,6 +518,22 @@ module Google
|
|
459
518
|
# @return [::Google::Cloud::AutoML::V1::Dataset]
|
460
519
|
#
|
461
520
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
521
|
+
#
|
522
|
+
# @example Basic example
|
523
|
+
# require "google/cloud/automl/v1"
|
524
|
+
#
|
525
|
+
# # Create a client object. The client can be reused for multiple calls.
|
526
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
527
|
+
#
|
528
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
529
|
+
# request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new
|
530
|
+
#
|
531
|
+
# # Call the update_dataset method.
|
532
|
+
# result = client.update_dataset request
|
533
|
+
#
|
534
|
+
# # The returned object is of type Google::Cloud::AutoML::V1::Dataset.
|
535
|
+
# p result
|
536
|
+
#
|
462
537
|
def update_dataset request, options = nil
|
463
538
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
464
539
|
|
@@ -525,6 +600,29 @@ module Google
|
|
525
600
|
# @return [::Gapic::Operation]
|
526
601
|
#
|
527
602
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
603
|
+
#
|
604
|
+
# @example Basic example
|
605
|
+
# require "google/cloud/automl/v1"
|
606
|
+
#
|
607
|
+
# # Create a client object. The client can be reused for multiple calls.
|
608
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
609
|
+
#
|
610
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
611
|
+
# request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new
|
612
|
+
#
|
613
|
+
# # Call the delete_dataset method.
|
614
|
+
# result = client.delete_dataset request
|
615
|
+
#
|
616
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
617
|
+
# # check the status of an operation, cancel it, or wait for results.
|
618
|
+
# # Here is how to wait for a response.
|
619
|
+
# result.wait_until_done! timeout: 60
|
620
|
+
# if result.response?
|
621
|
+
# p result.response
|
622
|
+
# else
|
623
|
+
# puts "No response received."
|
624
|
+
# end
|
625
|
+
#
|
528
626
|
def delete_dataset request, options = nil
|
529
627
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
530
628
|
|
@@ -600,6 +698,29 @@ module Google
|
|
600
698
|
# @return [::Gapic::Operation]
|
601
699
|
#
|
602
700
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
701
|
+
#
|
702
|
+
# @example Basic example
|
703
|
+
# require "google/cloud/automl/v1"
|
704
|
+
#
|
705
|
+
# # Create a client object. The client can be reused for multiple calls.
|
706
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
707
|
+
#
|
708
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
709
|
+
# request = Google::Cloud::AutoML::V1::ImportDataRequest.new
|
710
|
+
#
|
711
|
+
# # Call the import_data method.
|
712
|
+
# result = client.import_data request
|
713
|
+
#
|
714
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
715
|
+
# # check the status of an operation, cancel it, or wait for results.
|
716
|
+
# # Here is how to wait for a response.
|
717
|
+
# result.wait_until_done! timeout: 60
|
718
|
+
# if result.response?
|
719
|
+
# p result.response
|
720
|
+
# else
|
721
|
+
# puts "No response received."
|
722
|
+
# end
|
723
|
+
#
|
603
724
|
def import_data request, options = nil
|
604
725
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
605
726
|
|
@@ -667,6 +788,29 @@ module Google
|
|
667
788
|
# @return [::Gapic::Operation]
|
668
789
|
#
|
669
790
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
791
|
+
#
|
792
|
+
# @example Basic example
|
793
|
+
# require "google/cloud/automl/v1"
|
794
|
+
#
|
795
|
+
# # Create a client object. The client can be reused for multiple calls.
|
796
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
797
|
+
#
|
798
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
799
|
+
# request = Google::Cloud::AutoML::V1::ExportDataRequest.new
|
800
|
+
#
|
801
|
+
# # Call the export_data method.
|
802
|
+
# result = client.export_data request
|
803
|
+
#
|
804
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
805
|
+
# # check the status of an operation, cancel it, or wait for results.
|
806
|
+
# # Here is how to wait for a response.
|
807
|
+
# result.wait_until_done! timeout: 60
|
808
|
+
# if result.response?
|
809
|
+
# p result.response
|
810
|
+
# else
|
811
|
+
# puts "No response received."
|
812
|
+
# end
|
813
|
+
#
|
670
814
|
def export_data request, options = nil
|
671
815
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
672
816
|
|
@@ -730,6 +874,22 @@ module Google
|
|
730
874
|
# @return [::Google::Cloud::AutoML::V1::AnnotationSpec]
|
731
875
|
#
|
732
876
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
877
|
+
#
|
878
|
+
# @example Basic example
|
879
|
+
# require "google/cloud/automl/v1"
|
880
|
+
#
|
881
|
+
# # Create a client object. The client can be reused for multiple calls.
|
882
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
883
|
+
#
|
884
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
885
|
+
# request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new
|
886
|
+
#
|
887
|
+
# # Call the get_annotation_spec method.
|
888
|
+
# result = client.get_annotation_spec request
|
889
|
+
#
|
890
|
+
# # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec.
|
891
|
+
# p result
|
892
|
+
#
|
733
893
|
def get_annotation_spec request, options = nil
|
734
894
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
735
895
|
|
@@ -798,6 +958,29 @@ module Google
|
|
798
958
|
# @return [::Gapic::Operation]
|
799
959
|
#
|
800
960
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
961
|
+
#
|
962
|
+
# @example Basic example
|
963
|
+
# require "google/cloud/automl/v1"
|
964
|
+
#
|
965
|
+
# # Create a client object. The client can be reused for multiple calls.
|
966
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
967
|
+
#
|
968
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
969
|
+
# request = Google::Cloud::AutoML::V1::CreateModelRequest.new
|
970
|
+
#
|
971
|
+
# # Call the create_model method.
|
972
|
+
# result = client.create_model request
|
973
|
+
#
|
974
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
975
|
+
# # check the status of an operation, cancel it, or wait for results.
|
976
|
+
# # Here is how to wait for a response.
|
977
|
+
# result.wait_until_done! timeout: 60
|
978
|
+
# if result.response?
|
979
|
+
# p result.response
|
980
|
+
# else
|
981
|
+
# puts "No response received."
|
982
|
+
# end
|
983
|
+
#
|
801
984
|
def create_model request, options = nil
|
802
985
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
803
986
|
|
@@ -861,6 +1044,22 @@ module Google
|
|
861
1044
|
# @return [::Google::Cloud::AutoML::V1::Model]
|
862
1045
|
#
|
863
1046
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1047
|
+
#
|
1048
|
+
# @example Basic example
|
1049
|
+
# require "google/cloud/automl/v1"
|
1050
|
+
#
|
1051
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1052
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
1053
|
+
#
|
1054
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1055
|
+
# request = Google::Cloud::AutoML::V1::GetModelRequest.new
|
1056
|
+
#
|
1057
|
+
# # Call the get_model method.
|
1058
|
+
# result = client.get_model request
|
1059
|
+
#
|
1060
|
+
# # The returned object is of type Google::Cloud::AutoML::V1::Model.
|
1061
|
+
# p result
|
1062
|
+
#
|
864
1063
|
def get_model request, options = nil
|
865
1064
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
866
1065
|
|
@@ -940,6 +1139,26 @@ module Google
|
|
940
1139
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>]
|
941
1140
|
#
|
942
1141
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1142
|
+
#
|
1143
|
+
# @example Basic example
|
1144
|
+
# require "google/cloud/automl/v1"
|
1145
|
+
#
|
1146
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1147
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
1148
|
+
#
|
1149
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1150
|
+
# request = Google::Cloud::AutoML::V1::ListModelsRequest.new
|
1151
|
+
#
|
1152
|
+
# # Call the list_models method.
|
1153
|
+
# result = client.list_models request
|
1154
|
+
#
|
1155
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1156
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1157
|
+
# result.each do |item|
|
1158
|
+
# # Each element is of type ::Google::Cloud::AutoML::V1::Model.
|
1159
|
+
# p item
|
1160
|
+
# end
|
1161
|
+
#
|
943
1162
|
def list_models request, options = nil
|
944
1163
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
945
1164
|
|
@@ -1007,6 +1226,29 @@ module Google
|
|
1007
1226
|
# @return [::Gapic::Operation]
|
1008
1227
|
#
|
1009
1228
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1229
|
+
#
|
1230
|
+
# @example Basic example
|
1231
|
+
# require "google/cloud/automl/v1"
|
1232
|
+
#
|
1233
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1234
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
1235
|
+
#
|
1236
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1237
|
+
# request = Google::Cloud::AutoML::V1::DeleteModelRequest.new
|
1238
|
+
#
|
1239
|
+
# # Call the delete_model method.
|
1240
|
+
# result = client.delete_model request
|
1241
|
+
#
|
1242
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1243
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1244
|
+
# # Here is how to wait for a response.
|
1245
|
+
# result.wait_until_done! timeout: 60
|
1246
|
+
# if result.response?
|
1247
|
+
# p result.response
|
1248
|
+
# else
|
1249
|
+
# puts "No response received."
|
1250
|
+
# end
|
1251
|
+
#
|
1010
1252
|
def delete_model request, options = nil
|
1011
1253
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1012
1254
|
|
@@ -1072,6 +1314,22 @@ module Google
|
|
1072
1314
|
# @return [::Google::Cloud::AutoML::V1::Model]
|
1073
1315
|
#
|
1074
1316
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1317
|
+
#
|
1318
|
+
# @example Basic example
|
1319
|
+
# require "google/cloud/automl/v1"
|
1320
|
+
#
|
1321
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1322
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
1323
|
+
#
|
1324
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1325
|
+
# request = Google::Cloud::AutoML::V1::UpdateModelRequest.new
|
1326
|
+
#
|
1327
|
+
# # Call the update_model method.
|
1328
|
+
# result = client.update_model request
|
1329
|
+
#
|
1330
|
+
# # The returned object is of type Google::Cloud::AutoML::V1::Model.
|
1331
|
+
# p result
|
1332
|
+
#
|
1075
1333
|
def update_model request, options = nil
|
1076
1334
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1077
1335
|
|
@@ -1148,6 +1406,29 @@ module Google
|
|
1148
1406
|
# @return [::Gapic::Operation]
|
1149
1407
|
#
|
1150
1408
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1409
|
+
#
|
1410
|
+
# @example Basic example
|
1411
|
+
# require "google/cloud/automl/v1"
|
1412
|
+
#
|
1413
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1414
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
1415
|
+
#
|
1416
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1417
|
+
# request = Google::Cloud::AutoML::V1::DeployModelRequest.new
|
1418
|
+
#
|
1419
|
+
# # Call the deploy_model method.
|
1420
|
+
# result = client.deploy_model request
|
1421
|
+
#
|
1422
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1423
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1424
|
+
# # Here is how to wait for a response.
|
1425
|
+
# result.wait_until_done! timeout: 60
|
1426
|
+
# if result.response?
|
1427
|
+
# p result.response
|
1428
|
+
# else
|
1429
|
+
# puts "No response received."
|
1430
|
+
# end
|
1431
|
+
#
|
1151
1432
|
def deploy_model request, options = nil
|
1152
1433
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1153
1434
|
|
@@ -1217,6 +1498,29 @@ module Google
|
|
1217
1498
|
# @return [::Gapic::Operation]
|
1218
1499
|
#
|
1219
1500
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1501
|
+
#
|
1502
|
+
# @example Basic example
|
1503
|
+
# require "google/cloud/automl/v1"
|
1504
|
+
#
|
1505
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1506
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
1507
|
+
#
|
1508
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1509
|
+
# request = Google::Cloud::AutoML::V1::UndeployModelRequest.new
|
1510
|
+
#
|
1511
|
+
# # Call the undeploy_model method.
|
1512
|
+
# result = client.undeploy_model request
|
1513
|
+
#
|
1514
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1515
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1516
|
+
# # Here is how to wait for a response.
|
1517
|
+
# result.wait_until_done! timeout: 60
|
1518
|
+
# if result.response?
|
1519
|
+
# p result.response
|
1520
|
+
# else
|
1521
|
+
# puts "No response received."
|
1522
|
+
# end
|
1523
|
+
#
|
1220
1524
|
def undeploy_model request, options = nil
|
1221
1525
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1222
1526
|
|
@@ -1288,6 +1592,29 @@ module Google
|
|
1288
1592
|
# @return [::Gapic::Operation]
|
1289
1593
|
#
|
1290
1594
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1595
|
+
#
|
1596
|
+
# @example Basic example
|
1597
|
+
# require "google/cloud/automl/v1"
|
1598
|
+
#
|
1599
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1600
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
1601
|
+
#
|
1602
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1603
|
+
# request = Google::Cloud::AutoML::V1::ExportModelRequest.new
|
1604
|
+
#
|
1605
|
+
# # Call the export_model method.
|
1606
|
+
# result = client.export_model request
|
1607
|
+
#
|
1608
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1609
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1610
|
+
# # Here is how to wait for a response.
|
1611
|
+
# result.wait_until_done! timeout: 60
|
1612
|
+
# if result.response?
|
1613
|
+
# p result.response
|
1614
|
+
# else
|
1615
|
+
# puts "No response received."
|
1616
|
+
# end
|
1617
|
+
#
|
1291
1618
|
def export_model request, options = nil
|
1292
1619
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1293
1620
|
|
@@ -1351,6 +1678,22 @@ module Google
|
|
1351
1678
|
# @return [::Google::Cloud::AutoML::V1::ModelEvaluation]
|
1352
1679
|
#
|
1353
1680
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1681
|
+
#
|
1682
|
+
# @example Basic example
|
1683
|
+
# require "google/cloud/automl/v1"
|
1684
|
+
#
|
1685
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1686
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
1687
|
+
#
|
1688
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1689
|
+
# request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new
|
1690
|
+
#
|
1691
|
+
# # Call the get_model_evaluation method.
|
1692
|
+
# result = client.get_model_evaluation request
|
1693
|
+
#
|
1694
|
+
# # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation.
|
1695
|
+
# p result
|
1696
|
+
#
|
1354
1697
|
def get_model_evaluation request, options = nil
|
1355
1698
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1356
1699
|
|
@@ -1434,6 +1777,26 @@ module Google
|
|
1434
1777
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>]
|
1435
1778
|
#
|
1436
1779
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1780
|
+
#
|
1781
|
+
# @example Basic example
|
1782
|
+
# require "google/cloud/automl/v1"
|
1783
|
+
#
|
1784
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1785
|
+
# client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
1786
|
+
#
|
1787
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1788
|
+
# request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new
|
1789
|
+
#
|
1790
|
+
# # Call the list_model_evaluations method.
|
1791
|
+
# result = client.list_model_evaluations request
|
1792
|
+
#
|
1793
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1794
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1795
|
+
# result.each do |item|
|
1796
|
+
# # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation.
|
1797
|
+
# p item
|
1798
|
+
# end
|
1799
|
+
#
|
1437
1800
|
def list_model_evaluations request, options = nil
|
1438
1801
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1439
1802
|
|
@@ -1508,9 +1871,9 @@ module Google
|
|
1508
1871
|
# * (`String`) The path to a service account key file in JSON format
|
1509
1872
|
# * (`Hash`) A service account key as a Hash
|
1510
1873
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1511
|
-
# (see the [googleauth docs](https://
|
1874
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1512
1875
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1513
|
-
# (see the [signet docs](https://
|
1876
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1514
1877
|
# * (`nil`) indicating no credentials
|
1515
1878
|
# @return [::Object]
|
1516
1879
|
# @!attribute [rw] scope
|
@@ -1543,7 +1906,9 @@ module Google
|
|
1543
1906
|
class Configuration
|
1544
1907
|
extend ::Gapic::Config
|
1545
1908
|
|
1546
|
-
|
1909
|
+
DEFAULT_ENDPOINT = "automl.googleapis.com"
|
1910
|
+
|
1911
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1547
1912
|
config_attr :credentials, nil do |value|
|
1548
1913
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1549
1914
|
allowed.any? { |klass| klass === value }
|