google-cloud-automl-v1beta1 0.8.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,6 +45,9 @@ module Google
45
45
  # snake_case or kebab-case, either of those cases is accepted.
46
46
  #
47
47
  class Client
48
+ # @private
49
+ DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$"
50
+
48
51
  include Paths
49
52
 
50
53
  # @private
@@ -189,6 +192,15 @@ module Google
189
192
  @config
190
193
  end
191
194
 
195
+ ##
196
+ # The effective universe domain
197
+ #
198
+ # @return [String]
199
+ #
200
+ def universe_domain
201
+ @auto_ml_stub.universe_domain
202
+ end
203
+
192
204
  ##
193
205
  # Create a new AutoMl REST client object.
194
206
  #
@@ -216,8 +228,9 @@ module Google
216
228
  credentials = @config.credentials
217
229
  # Use self-signed JWT if the endpoint is unchanged from default,
218
230
  # but only if the default endpoint does not have a region prefix.
219
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
220
- !@config.endpoint.split(".").first.include?("-")
231
+ enable_self_signed_jwt = @config.endpoint.nil? ||
232
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
233
+ !@config.endpoint.split(".").first.include?("-"))
221
234
  credentials ||= Credentials.default scope: @config.scope,
222
235
  enable_self_signed_jwt: enable_self_signed_jwt
223
236
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -231,9 +244,15 @@ module Google
231
244
  config.credentials = credentials
232
245
  config.quota_project = @quota_project_id
233
246
  config.endpoint = @config.endpoint
247
+ config.universe_domain = @config.universe_domain
234
248
  end
235
249
 
236
- @auto_ml_stub = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
250
+ @auto_ml_stub = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.new(
251
+ endpoint: @config.endpoint,
252
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
253
+ universe_domain: @config.universe_domain,
254
+ credentials: credentials
255
+ )
237
256
  end
238
257
 
239
258
  ##
@@ -274,6 +293,22 @@ module Google
274
293
  # @return [::Google::Cloud::AutoML::V1beta1::Dataset]
275
294
  #
276
295
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
296
+ #
297
+ # @example Basic example
298
+ # require "google/cloud/automl/v1beta1"
299
+ #
300
+ # # Create a client object. The client can be reused for multiple calls.
301
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
302
+ #
303
+ # # Create a request. To set request fields, pass in keyword arguments.
304
+ # request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new
305
+ #
306
+ # # Call the create_dataset method.
307
+ # result = client.create_dataset request
308
+ #
309
+ # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset.
310
+ # p result
311
+ #
277
312
  def create_dataset request, options = nil
278
313
  raise ::ArgumentError, "request must be provided" if request.nil?
279
314
 
@@ -336,6 +371,22 @@ module Google
336
371
  # @return [::Google::Cloud::AutoML::V1beta1::Dataset]
337
372
  #
338
373
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
374
+ #
375
+ # @example Basic example
376
+ # require "google/cloud/automl/v1beta1"
377
+ #
378
+ # # Create a client object. The client can be reused for multiple calls.
379
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
380
+ #
381
+ # # Create a request. To set request fields, pass in keyword arguments.
382
+ # request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new
383
+ #
384
+ # # Call the get_dataset method.
385
+ # result = client.get_dataset request
386
+ #
387
+ # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset.
388
+ # p result
389
+ #
339
390
  def get_dataset request, options = nil
340
391
  raise ::ArgumentError, "request must be provided" if request.nil?
341
392
 
@@ -415,6 +466,26 @@ module Google
415
466
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>]
416
467
  #
417
468
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
469
+ #
470
+ # @example Basic example
471
+ # require "google/cloud/automl/v1beta1"
472
+ #
473
+ # # Create a client object. The client can be reused for multiple calls.
474
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
475
+ #
476
+ # # Create a request. To set request fields, pass in keyword arguments.
477
+ # request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new
478
+ #
479
+ # # Call the list_datasets method.
480
+ # result = client.list_datasets request
481
+ #
482
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
483
+ # # over elements, and API calls will be issued to fetch pages as needed.
484
+ # result.each do |item|
485
+ # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset.
486
+ # p item
487
+ # end
488
+ #
418
489
  def list_datasets request, options = nil
419
490
  raise ::ArgumentError, "request must be provided" if request.nil?
420
491
 
@@ -480,6 +551,22 @@ module Google
480
551
  # @return [::Google::Cloud::AutoML::V1beta1::Dataset]
481
552
  #
482
553
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
554
+ #
555
+ # @example Basic example
556
+ # require "google/cloud/automl/v1beta1"
557
+ #
558
+ # # Create a client object. The client can be reused for multiple calls.
559
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
560
+ #
561
+ # # Create a request. To set request fields, pass in keyword arguments.
562
+ # request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new
563
+ #
564
+ # # Call the update_dataset method.
565
+ # result = client.update_dataset request
566
+ #
567
+ # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset.
568
+ # p result
569
+ #
483
570
  def update_dataset request, options = nil
484
571
  raise ::ArgumentError, "request must be provided" if request.nil?
485
572
 
@@ -546,6 +633,29 @@ module Google
546
633
  # @return [::Gapic::Operation]
547
634
  #
548
635
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
636
+ #
637
+ # @example Basic example
638
+ # require "google/cloud/automl/v1beta1"
639
+ #
640
+ # # Create a client object. The client can be reused for multiple calls.
641
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
642
+ #
643
+ # # Create a request. To set request fields, pass in keyword arguments.
644
+ # request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new
645
+ #
646
+ # # Call the delete_dataset method.
647
+ # result = client.delete_dataset request
648
+ #
649
+ # # The returned object is of type Gapic::Operation. You can use it to
650
+ # # check the status of an operation, cancel it, or wait for results.
651
+ # # Here is how to wait for a response.
652
+ # result.wait_until_done! timeout: 60
653
+ # if result.response?
654
+ # p result.response
655
+ # else
656
+ # puts "No response received."
657
+ # end
658
+ #
549
659
  def delete_dataset request, options = nil
550
660
  raise ::ArgumentError, "request must be provided" if request.nil?
551
661
 
@@ -621,6 +731,29 @@ module Google
621
731
  # @return [::Gapic::Operation]
622
732
  #
623
733
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
734
+ #
735
+ # @example Basic example
736
+ # require "google/cloud/automl/v1beta1"
737
+ #
738
+ # # Create a client object. The client can be reused for multiple calls.
739
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
740
+ #
741
+ # # Create a request. To set request fields, pass in keyword arguments.
742
+ # request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new
743
+ #
744
+ # # Call the import_data method.
745
+ # result = client.import_data request
746
+ #
747
+ # # The returned object is of type Gapic::Operation. You can use it to
748
+ # # check the status of an operation, cancel it, or wait for results.
749
+ # # Here is how to wait for a response.
750
+ # result.wait_until_done! timeout: 60
751
+ # if result.response?
752
+ # p result.response
753
+ # else
754
+ # puts "No response received."
755
+ # end
756
+ #
624
757
  def import_data request, options = nil
625
758
  raise ::ArgumentError, "request must be provided" if request.nil?
626
759
 
@@ -688,6 +821,29 @@ module Google
688
821
  # @return [::Gapic::Operation]
689
822
  #
690
823
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
824
+ #
825
+ # @example Basic example
826
+ # require "google/cloud/automl/v1beta1"
827
+ #
828
+ # # Create a client object. The client can be reused for multiple calls.
829
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
830
+ #
831
+ # # Create a request. To set request fields, pass in keyword arguments.
832
+ # request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new
833
+ #
834
+ # # Call the export_data method.
835
+ # result = client.export_data request
836
+ #
837
+ # # The returned object is of type Gapic::Operation. You can use it to
838
+ # # check the status of an operation, cancel it, or wait for results.
839
+ # # Here is how to wait for a response.
840
+ # result.wait_until_done! timeout: 60
841
+ # if result.response?
842
+ # p result.response
843
+ # else
844
+ # puts "No response received."
845
+ # end
846
+ #
691
847
  def export_data request, options = nil
692
848
  raise ::ArgumentError, "request must be provided" if request.nil?
693
849
 
@@ -751,6 +907,22 @@ module Google
751
907
  # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec]
752
908
  #
753
909
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
910
+ #
911
+ # @example Basic example
912
+ # require "google/cloud/automl/v1beta1"
913
+ #
914
+ # # Create a client object. The client can be reused for multiple calls.
915
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
916
+ #
917
+ # # Create a request. To set request fields, pass in keyword arguments.
918
+ # request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new
919
+ #
920
+ # # Call the get_annotation_spec method.
921
+ # result = client.get_annotation_spec request
922
+ #
923
+ # # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec.
924
+ # p result
925
+ #
754
926
  def get_annotation_spec request, options = nil
755
927
  raise ::ArgumentError, "request must be provided" if request.nil?
756
928
 
@@ -815,6 +987,22 @@ module Google
815
987
  # @return [::Google::Cloud::AutoML::V1beta1::TableSpec]
816
988
  #
817
989
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
990
+ #
991
+ # @example Basic example
992
+ # require "google/cloud/automl/v1beta1"
993
+ #
994
+ # # Create a client object. The client can be reused for multiple calls.
995
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
996
+ #
997
+ # # Create a request. To set request fields, pass in keyword arguments.
998
+ # request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new
999
+ #
1000
+ # # Call the get_table_spec method.
1001
+ # result = client.get_table_spec request
1002
+ #
1003
+ # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec.
1004
+ # p result
1005
+ #
818
1006
  def get_table_spec request, options = nil
819
1007
  raise ::ArgumentError, "request must be provided" if request.nil?
820
1008
 
@@ -889,6 +1077,26 @@ module Google
889
1077
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>]
890
1078
  #
891
1079
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1080
+ #
1081
+ # @example Basic example
1082
+ # require "google/cloud/automl/v1beta1"
1083
+ #
1084
+ # # Create a client object. The client can be reused for multiple calls.
1085
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
1086
+ #
1087
+ # # Create a request. To set request fields, pass in keyword arguments.
1088
+ # request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new
1089
+ #
1090
+ # # Call the list_table_specs method.
1091
+ # result = client.list_table_specs request
1092
+ #
1093
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1094
+ # # over elements, and API calls will be issued to fetch pages as needed.
1095
+ # result.each do |item|
1096
+ # # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec.
1097
+ # p item
1098
+ # end
1099
+ #
892
1100
  def list_table_specs request, options = nil
893
1101
  raise ::ArgumentError, "request must be provided" if request.nil?
894
1102
 
@@ -954,6 +1162,22 @@ module Google
954
1162
  # @return [::Google::Cloud::AutoML::V1beta1::TableSpec]
955
1163
  #
956
1164
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1165
+ #
1166
+ # @example Basic example
1167
+ # require "google/cloud/automl/v1beta1"
1168
+ #
1169
+ # # Create a client object. The client can be reused for multiple calls.
1170
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
1171
+ #
1172
+ # # Create a request. To set request fields, pass in keyword arguments.
1173
+ # request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new
1174
+ #
1175
+ # # Call the update_table_spec method.
1176
+ # result = client.update_table_spec request
1177
+ #
1178
+ # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec.
1179
+ # p result
1180
+ #
957
1181
  def update_table_spec request, options = nil
958
1182
  raise ::ArgumentError, "request must be provided" if request.nil?
959
1183
 
@@ -1018,6 +1242,22 @@ module Google
1018
1242
  # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec]
1019
1243
  #
1020
1244
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1245
+ #
1246
+ # @example Basic example
1247
+ # require "google/cloud/automl/v1beta1"
1248
+ #
1249
+ # # Create a client object. The client can be reused for multiple calls.
1250
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
1251
+ #
1252
+ # # Create a request. To set request fields, pass in keyword arguments.
1253
+ # request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new
1254
+ #
1255
+ # # Call the get_column_spec method.
1256
+ # result = client.get_column_spec request
1257
+ #
1258
+ # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec.
1259
+ # p result
1260
+ #
1021
1261
  def get_column_spec request, options = nil
1022
1262
  raise ::ArgumentError, "request must be provided" if request.nil?
1023
1263
 
@@ -1092,6 +1332,26 @@ module Google
1092
1332
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>]
1093
1333
  #
1094
1334
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1335
+ #
1336
+ # @example Basic example
1337
+ # require "google/cloud/automl/v1beta1"
1338
+ #
1339
+ # # Create a client object. The client can be reused for multiple calls.
1340
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
1341
+ #
1342
+ # # Create a request. To set request fields, pass in keyword arguments.
1343
+ # request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new
1344
+ #
1345
+ # # Call the list_column_specs method.
1346
+ # result = client.list_column_specs request
1347
+ #
1348
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1349
+ # # over elements, and API calls will be issued to fetch pages as needed.
1350
+ # result.each do |item|
1351
+ # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec.
1352
+ # p item
1353
+ # end
1354
+ #
1095
1355
  def list_column_specs request, options = nil
1096
1356
  raise ::ArgumentError, "request must be provided" if request.nil?
1097
1357
 
@@ -1157,6 +1417,22 @@ module Google
1157
1417
  # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec]
1158
1418
  #
1159
1419
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1420
+ #
1421
+ # @example Basic example
1422
+ # require "google/cloud/automl/v1beta1"
1423
+ #
1424
+ # # Create a client object. The client can be reused for multiple calls.
1425
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
1426
+ #
1427
+ # # Create a request. To set request fields, pass in keyword arguments.
1428
+ # request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new
1429
+ #
1430
+ # # Call the update_column_spec method.
1431
+ # result = client.update_column_spec request
1432
+ #
1433
+ # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec.
1434
+ # p result
1435
+ #
1160
1436
  def update_column_spec request, options = nil
1161
1437
  raise ::ArgumentError, "request must be provided" if request.nil?
1162
1438
 
@@ -1225,6 +1501,29 @@ module Google
1225
1501
  # @return [::Gapic::Operation]
1226
1502
  #
1227
1503
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1504
+ #
1505
+ # @example Basic example
1506
+ # require "google/cloud/automl/v1beta1"
1507
+ #
1508
+ # # Create a client object. The client can be reused for multiple calls.
1509
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
1510
+ #
1511
+ # # Create a request. To set request fields, pass in keyword arguments.
1512
+ # request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new
1513
+ #
1514
+ # # Call the create_model method.
1515
+ # result = client.create_model request
1516
+ #
1517
+ # # The returned object is of type Gapic::Operation. You can use it to
1518
+ # # check the status of an operation, cancel it, or wait for results.
1519
+ # # Here is how to wait for a response.
1520
+ # result.wait_until_done! timeout: 60
1521
+ # if result.response?
1522
+ # p result.response
1523
+ # else
1524
+ # puts "No response received."
1525
+ # end
1526
+ #
1228
1527
  def create_model request, options = nil
1229
1528
  raise ::ArgumentError, "request must be provided" if request.nil?
1230
1529
 
@@ -1288,6 +1587,22 @@ module Google
1288
1587
  # @return [::Google::Cloud::AutoML::V1beta1::Model]
1289
1588
  #
1290
1589
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1590
+ #
1591
+ # @example Basic example
1592
+ # require "google/cloud/automl/v1beta1"
1593
+ #
1594
+ # # Create a client object. The client can be reused for multiple calls.
1595
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
1596
+ #
1597
+ # # Create a request. To set request fields, pass in keyword arguments.
1598
+ # request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new
1599
+ #
1600
+ # # Call the get_model method.
1601
+ # result = client.get_model request
1602
+ #
1603
+ # # The returned object is of type Google::Cloud::AutoML::V1beta1::Model.
1604
+ # p result
1605
+ #
1291
1606
  def get_model request, options = nil
1292
1607
  raise ::ArgumentError, "request must be provided" if request.nil?
1293
1608
 
@@ -1367,6 +1682,26 @@ module Google
1367
1682
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>]
1368
1683
  #
1369
1684
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1685
+ #
1686
+ # @example Basic example
1687
+ # require "google/cloud/automl/v1beta1"
1688
+ #
1689
+ # # Create a client object. The client can be reused for multiple calls.
1690
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
1691
+ #
1692
+ # # Create a request. To set request fields, pass in keyword arguments.
1693
+ # request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new
1694
+ #
1695
+ # # Call the list_models method.
1696
+ # result = client.list_models request
1697
+ #
1698
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1699
+ # # over elements, and API calls will be issued to fetch pages as needed.
1700
+ # result.each do |item|
1701
+ # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model.
1702
+ # p item
1703
+ # end
1704
+ #
1370
1705
  def list_models request, options = nil
1371
1706
  raise ::ArgumentError, "request must be provided" if request.nil?
1372
1707
 
@@ -1434,6 +1769,29 @@ module Google
1434
1769
  # @return [::Gapic::Operation]
1435
1770
  #
1436
1771
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1772
+ #
1773
+ # @example Basic example
1774
+ # require "google/cloud/automl/v1beta1"
1775
+ #
1776
+ # # Create a client object. The client can be reused for multiple calls.
1777
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
1778
+ #
1779
+ # # Create a request. To set request fields, pass in keyword arguments.
1780
+ # request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new
1781
+ #
1782
+ # # Call the delete_model method.
1783
+ # result = client.delete_model request
1784
+ #
1785
+ # # The returned object is of type Gapic::Operation. You can use it to
1786
+ # # check the status of an operation, cancel it, or wait for results.
1787
+ # # Here is how to wait for a response.
1788
+ # result.wait_until_done! timeout: 60
1789
+ # if result.response?
1790
+ # p result.response
1791
+ # else
1792
+ # puts "No response received."
1793
+ # end
1794
+ #
1437
1795
  def delete_model request, options = nil
1438
1796
  raise ::ArgumentError, "request must be provided" if request.nil?
1439
1797
 
@@ -1512,6 +1870,29 @@ module Google
1512
1870
  # @return [::Gapic::Operation]
1513
1871
  #
1514
1872
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1873
+ #
1874
+ # @example Basic example
1875
+ # require "google/cloud/automl/v1beta1"
1876
+ #
1877
+ # # Create a client object. The client can be reused for multiple calls.
1878
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
1879
+ #
1880
+ # # Create a request. To set request fields, pass in keyword arguments.
1881
+ # request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new
1882
+ #
1883
+ # # Call the deploy_model method.
1884
+ # result = client.deploy_model request
1885
+ #
1886
+ # # The returned object is of type Gapic::Operation. You can use it to
1887
+ # # check the status of an operation, cancel it, or wait for results.
1888
+ # # Here is how to wait for a response.
1889
+ # result.wait_until_done! timeout: 60
1890
+ # if result.response?
1891
+ # p result.response
1892
+ # else
1893
+ # puts "No response received."
1894
+ # end
1895
+ #
1515
1896
  def deploy_model request, options = nil
1516
1897
  raise ::ArgumentError, "request must be provided" if request.nil?
1517
1898
 
@@ -1581,6 +1962,29 @@ module Google
1581
1962
  # @return [::Gapic::Operation]
1582
1963
  #
1583
1964
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1965
+ #
1966
+ # @example Basic example
1967
+ # require "google/cloud/automl/v1beta1"
1968
+ #
1969
+ # # Create a client object. The client can be reused for multiple calls.
1970
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
1971
+ #
1972
+ # # Create a request. To set request fields, pass in keyword arguments.
1973
+ # request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new
1974
+ #
1975
+ # # Call the undeploy_model method.
1976
+ # result = client.undeploy_model request
1977
+ #
1978
+ # # The returned object is of type Gapic::Operation. You can use it to
1979
+ # # check the status of an operation, cancel it, or wait for results.
1980
+ # # Here is how to wait for a response.
1981
+ # result.wait_until_done! timeout: 60
1982
+ # if result.response?
1983
+ # p result.response
1984
+ # else
1985
+ # puts "No response received."
1986
+ # end
1987
+ #
1584
1988
  def undeploy_model request, options = nil
1585
1989
  raise ::ArgumentError, "request must be provided" if request.nil?
1586
1990
 
@@ -1653,6 +2057,29 @@ module Google
1653
2057
  # @return [::Gapic::Operation]
1654
2058
  #
1655
2059
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2060
+ #
2061
+ # @example Basic example
2062
+ # require "google/cloud/automl/v1beta1"
2063
+ #
2064
+ # # Create a client object. The client can be reused for multiple calls.
2065
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
2066
+ #
2067
+ # # Create a request. To set request fields, pass in keyword arguments.
2068
+ # request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new
2069
+ #
2070
+ # # Call the export_model method.
2071
+ # result = client.export_model request
2072
+ #
2073
+ # # The returned object is of type Gapic::Operation. You can use it to
2074
+ # # check the status of an operation, cancel it, or wait for results.
2075
+ # # Here is how to wait for a response.
2076
+ # result.wait_until_done! timeout: 60
2077
+ # if result.response?
2078
+ # p result.response
2079
+ # else
2080
+ # puts "No response received."
2081
+ # end
2082
+ #
1656
2083
  def export_model request, options = nil
1657
2084
  raise ::ArgumentError, "request must be provided" if request.nil?
1658
2085
 
@@ -1732,6 +2159,29 @@ module Google
1732
2159
  # @return [::Gapic::Operation]
1733
2160
  #
1734
2161
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2162
+ #
2163
+ # @example Basic example
2164
+ # require "google/cloud/automl/v1beta1"
2165
+ #
2166
+ # # Create a client object. The client can be reused for multiple calls.
2167
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
2168
+ #
2169
+ # # Create a request. To set request fields, pass in keyword arguments.
2170
+ # request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new
2171
+ #
2172
+ # # Call the export_evaluated_examples method.
2173
+ # result = client.export_evaluated_examples request
2174
+ #
2175
+ # # The returned object is of type Gapic::Operation. You can use it to
2176
+ # # check the status of an operation, cancel it, or wait for results.
2177
+ # # Here is how to wait for a response.
2178
+ # result.wait_until_done! timeout: 60
2179
+ # if result.response?
2180
+ # p result.response
2181
+ # else
2182
+ # puts "No response received."
2183
+ # end
2184
+ #
1735
2185
  def export_evaluated_examples request, options = nil
1736
2186
  raise ::ArgumentError, "request must be provided" if request.nil?
1737
2187
 
@@ -1795,6 +2245,22 @@ module Google
1795
2245
  # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation]
1796
2246
  #
1797
2247
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2248
+ #
2249
+ # @example Basic example
2250
+ # require "google/cloud/automl/v1beta1"
2251
+ #
2252
+ # # Create a client object. The client can be reused for multiple calls.
2253
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
2254
+ #
2255
+ # # Create a request. To set request fields, pass in keyword arguments.
2256
+ # request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new
2257
+ #
2258
+ # # Call the get_model_evaluation method.
2259
+ # result = client.get_model_evaluation request
2260
+ #
2261
+ # # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation.
2262
+ # p result
2263
+ #
1798
2264
  def get_model_evaluation request, options = nil
1799
2265
  raise ::ArgumentError, "request must be provided" if request.nil?
1800
2266
 
@@ -1878,6 +2344,26 @@ module Google
1878
2344
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>]
1879
2345
  #
1880
2346
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2347
+ #
2348
+ # @example Basic example
2349
+ # require "google/cloud/automl/v1beta1"
2350
+ #
2351
+ # # Create a client object. The client can be reused for multiple calls.
2352
+ # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
2353
+ #
2354
+ # # Create a request. To set request fields, pass in keyword arguments.
2355
+ # request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new
2356
+ #
2357
+ # # Call the list_model_evaluations method.
2358
+ # result = client.list_model_evaluations request
2359
+ #
2360
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2361
+ # # over elements, and API calls will be issued to fetch pages as needed.
2362
+ # result.each do |item|
2363
+ # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.
2364
+ # p item
2365
+ # end
2366
+ #
1881
2367
  def list_model_evaluations request, options = nil
1882
2368
  raise ::ArgumentError, "request must be provided" if request.nil?
1883
2369
 
@@ -1944,9 +2430,9 @@ module Google
1944
2430
  # end
1945
2431
  #
1946
2432
  # @!attribute [rw] endpoint
1947
- # The hostname or hostname:port of the service endpoint.
1948
- # Defaults to `"automl.googleapis.com"`.
1949
- # @return [::String]
2433
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2434
+ # nil, indicating to use the default endpoint in the current universe domain.
2435
+ # @return [::String,nil]
1950
2436
  # @!attribute [rw] credentials
1951
2437
  # Credentials to send with calls. You may provide any of the following types:
1952
2438
  # * (`String`) The path to a service account key file in JSON format
@@ -1983,13 +2469,20 @@ module Google
1983
2469
  # @!attribute [rw] quota_project
1984
2470
  # A separate project against which to charge quota.
1985
2471
  # @return [::String]
2472
+ # @!attribute [rw] universe_domain
2473
+ # The universe domain within which to make requests. This determines the
2474
+ # default endpoint URL. The default value of nil uses the environment
2475
+ # universe (usually the default "googleapis.com" universe).
2476
+ # @return [::String,nil]
1986
2477
  #
1987
2478
  class Configuration
1988
2479
  extend ::Gapic::Config
1989
2480
 
2481
+ # @private
2482
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1990
2483
  DEFAULT_ENDPOINT = "automl.googleapis.com"
1991
2484
 
1992
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2485
+ config_attr :endpoint, nil, ::String, nil
1993
2486
  config_attr :credentials, nil do |value|
1994
2487
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1995
2488
  allowed.any? { |klass| klass === value }
@@ -2001,6 +2494,7 @@ module Google
2001
2494
  config_attr :metadata, nil, ::Hash, nil
2002
2495
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2003
2496
  config_attr :quota_project, nil, ::String, nil
2497
+ config_attr :universe_domain, nil, ::String, nil
2004
2498
 
2005
2499
  # @private
2006
2500
  def initialize parent_config = nil