google-cloud-automl-v1 0.7.0 → 0.9.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 dash-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
@@ -168,6 +171,15 @@ module Google
168
171
  @config
169
172
  end
170
173
 
174
+ ##
175
+ # The effective universe domain
176
+ #
177
+ # @return [String]
178
+ #
179
+ def universe_domain
180
+ @auto_ml_stub.universe_domain
181
+ end
182
+
171
183
  ##
172
184
  # Create a new AutoMl REST client object.
173
185
  #
@@ -195,8 +207,9 @@ module Google
195
207
  credentials = @config.credentials
196
208
  # Use self-signed JWT if the endpoint is unchanged from default,
197
209
  # but only if the default endpoint does not have a region prefix.
198
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
199
- !@config.endpoint.split(".").first.include?("-")
210
+ enable_self_signed_jwt = @config.endpoint.nil? ||
211
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
212
+ !@config.endpoint.split(".").first.include?("-"))
200
213
  credentials ||= Credentials.default scope: @config.scope,
201
214
  enable_self_signed_jwt: enable_self_signed_jwt
202
215
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -210,9 +223,15 @@ module Google
210
223
  config.credentials = credentials
211
224
  config.quota_project = @quota_project_id
212
225
  config.endpoint = @config.endpoint
226
+ config.universe_domain = @config.universe_domain
213
227
  end
214
228
 
215
- @auto_ml_stub = ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
229
+ @auto_ml_stub = ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.new(
230
+ endpoint: @config.endpoint,
231
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
232
+ universe_domain: @config.universe_domain,
233
+ credentials: credentials
234
+ )
216
235
  end
217
236
 
218
237
  ##
@@ -253,6 +272,29 @@ module Google
253
272
  # @return [::Gapic::Operation]
254
273
  #
255
274
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
275
+ #
276
+ # @example Basic example
277
+ # require "google/cloud/automl/v1"
278
+ #
279
+ # # Create a client object. The client can be reused for multiple calls.
280
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
281
+ #
282
+ # # Create a request. To set request fields, pass in keyword arguments.
283
+ # request = Google::Cloud::AutoML::V1::CreateDatasetRequest.new
284
+ #
285
+ # # Call the create_dataset method.
286
+ # result = client.create_dataset request
287
+ #
288
+ # # The returned object is of type Gapic::Operation. You can use it to
289
+ # # check the status of an operation, cancel it, or wait for results.
290
+ # # Here is how to wait for a response.
291
+ # result.wait_until_done! timeout: 60
292
+ # if result.response?
293
+ # p result.response
294
+ # else
295
+ # puts "No response received."
296
+ # end
297
+ #
256
298
  def create_dataset request, options = nil
257
299
  raise ::ArgumentError, "request must be provided" if request.nil?
258
300
 
@@ -316,6 +358,22 @@ module Google
316
358
  # @return [::Google::Cloud::AutoML::V1::Dataset]
317
359
  #
318
360
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
361
+ #
362
+ # @example Basic example
363
+ # require "google/cloud/automl/v1"
364
+ #
365
+ # # Create a client object. The client can be reused for multiple calls.
366
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
367
+ #
368
+ # # Create a request. To set request fields, pass in keyword arguments.
369
+ # request = Google::Cloud::AutoML::V1::GetDatasetRequest.new
370
+ #
371
+ # # Call the get_dataset method.
372
+ # result = client.get_dataset request
373
+ #
374
+ # # The returned object is of type Google::Cloud::AutoML::V1::Dataset.
375
+ # p result
376
+ #
319
377
  def get_dataset request, options = nil
320
378
  raise ::ArgumentError, "request must be provided" if request.nil?
321
379
 
@@ -394,6 +452,26 @@ module Google
394
452
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>]
395
453
  #
396
454
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
455
+ #
456
+ # @example Basic example
457
+ # require "google/cloud/automl/v1"
458
+ #
459
+ # # Create a client object. The client can be reused for multiple calls.
460
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
461
+ #
462
+ # # Create a request. To set request fields, pass in keyword arguments.
463
+ # request = Google::Cloud::AutoML::V1::ListDatasetsRequest.new
464
+ #
465
+ # # Call the list_datasets method.
466
+ # result = client.list_datasets request
467
+ #
468
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
469
+ # # over elements, and API calls will be issued to fetch pages as needed.
470
+ # result.each do |item|
471
+ # # Each element is of type ::Google::Cloud::AutoML::V1::Dataset.
472
+ # p item
473
+ # end
474
+ #
397
475
  def list_datasets request, options = nil
398
476
  raise ::ArgumentError, "request must be provided" if request.nil?
399
477
 
@@ -459,6 +537,22 @@ module Google
459
537
  # @return [::Google::Cloud::AutoML::V1::Dataset]
460
538
  #
461
539
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
540
+ #
541
+ # @example Basic example
542
+ # require "google/cloud/automl/v1"
543
+ #
544
+ # # Create a client object. The client can be reused for multiple calls.
545
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
546
+ #
547
+ # # Create a request. To set request fields, pass in keyword arguments.
548
+ # request = Google::Cloud::AutoML::V1::UpdateDatasetRequest.new
549
+ #
550
+ # # Call the update_dataset method.
551
+ # result = client.update_dataset request
552
+ #
553
+ # # The returned object is of type Google::Cloud::AutoML::V1::Dataset.
554
+ # p result
555
+ #
462
556
  def update_dataset request, options = nil
463
557
  raise ::ArgumentError, "request must be provided" if request.nil?
464
558
 
@@ -525,6 +619,29 @@ module Google
525
619
  # @return [::Gapic::Operation]
526
620
  #
527
621
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
622
+ #
623
+ # @example Basic example
624
+ # require "google/cloud/automl/v1"
625
+ #
626
+ # # Create a client object. The client can be reused for multiple calls.
627
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
628
+ #
629
+ # # Create a request. To set request fields, pass in keyword arguments.
630
+ # request = Google::Cloud::AutoML::V1::DeleteDatasetRequest.new
631
+ #
632
+ # # Call the delete_dataset method.
633
+ # result = client.delete_dataset request
634
+ #
635
+ # # The returned object is of type Gapic::Operation. You can use it to
636
+ # # check the status of an operation, cancel it, or wait for results.
637
+ # # Here is how to wait for a response.
638
+ # result.wait_until_done! timeout: 60
639
+ # if result.response?
640
+ # p result.response
641
+ # else
642
+ # puts "No response received."
643
+ # end
644
+ #
528
645
  def delete_dataset request, options = nil
529
646
  raise ::ArgumentError, "request must be provided" if request.nil?
530
647
 
@@ -600,6 +717,29 @@ module Google
600
717
  # @return [::Gapic::Operation]
601
718
  #
602
719
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
720
+ #
721
+ # @example Basic example
722
+ # require "google/cloud/automl/v1"
723
+ #
724
+ # # Create a client object. The client can be reused for multiple calls.
725
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
726
+ #
727
+ # # Create a request. To set request fields, pass in keyword arguments.
728
+ # request = Google::Cloud::AutoML::V1::ImportDataRequest.new
729
+ #
730
+ # # Call the import_data method.
731
+ # result = client.import_data request
732
+ #
733
+ # # The returned object is of type Gapic::Operation. You can use it to
734
+ # # check the status of an operation, cancel it, or wait for results.
735
+ # # Here is how to wait for a response.
736
+ # result.wait_until_done! timeout: 60
737
+ # if result.response?
738
+ # p result.response
739
+ # else
740
+ # puts "No response received."
741
+ # end
742
+ #
603
743
  def import_data request, options = nil
604
744
  raise ::ArgumentError, "request must be provided" if request.nil?
605
745
 
@@ -667,6 +807,29 @@ module Google
667
807
  # @return [::Gapic::Operation]
668
808
  #
669
809
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
810
+ #
811
+ # @example Basic example
812
+ # require "google/cloud/automl/v1"
813
+ #
814
+ # # Create a client object. The client can be reused for multiple calls.
815
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
816
+ #
817
+ # # Create a request. To set request fields, pass in keyword arguments.
818
+ # request = Google::Cloud::AutoML::V1::ExportDataRequest.new
819
+ #
820
+ # # Call the export_data method.
821
+ # result = client.export_data request
822
+ #
823
+ # # The returned object is of type Gapic::Operation. You can use it to
824
+ # # check the status of an operation, cancel it, or wait for results.
825
+ # # Here is how to wait for a response.
826
+ # result.wait_until_done! timeout: 60
827
+ # if result.response?
828
+ # p result.response
829
+ # else
830
+ # puts "No response received."
831
+ # end
832
+ #
670
833
  def export_data request, options = nil
671
834
  raise ::ArgumentError, "request must be provided" if request.nil?
672
835
 
@@ -730,6 +893,22 @@ module Google
730
893
  # @return [::Google::Cloud::AutoML::V1::AnnotationSpec]
731
894
  #
732
895
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
896
+ #
897
+ # @example Basic example
898
+ # require "google/cloud/automl/v1"
899
+ #
900
+ # # Create a client object. The client can be reused for multiple calls.
901
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
902
+ #
903
+ # # Create a request. To set request fields, pass in keyword arguments.
904
+ # request = Google::Cloud::AutoML::V1::GetAnnotationSpecRequest.new
905
+ #
906
+ # # Call the get_annotation_spec method.
907
+ # result = client.get_annotation_spec request
908
+ #
909
+ # # The returned object is of type Google::Cloud::AutoML::V1::AnnotationSpec.
910
+ # p result
911
+ #
733
912
  def get_annotation_spec request, options = nil
734
913
  raise ::ArgumentError, "request must be provided" if request.nil?
735
914
 
@@ -798,6 +977,29 @@ module Google
798
977
  # @return [::Gapic::Operation]
799
978
  #
800
979
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
980
+ #
981
+ # @example Basic example
982
+ # require "google/cloud/automl/v1"
983
+ #
984
+ # # Create a client object. The client can be reused for multiple calls.
985
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
986
+ #
987
+ # # Create a request. To set request fields, pass in keyword arguments.
988
+ # request = Google::Cloud::AutoML::V1::CreateModelRequest.new
989
+ #
990
+ # # Call the create_model method.
991
+ # result = client.create_model request
992
+ #
993
+ # # The returned object is of type Gapic::Operation. You can use it to
994
+ # # check the status of an operation, cancel it, or wait for results.
995
+ # # Here is how to wait for a response.
996
+ # result.wait_until_done! timeout: 60
997
+ # if result.response?
998
+ # p result.response
999
+ # else
1000
+ # puts "No response received."
1001
+ # end
1002
+ #
801
1003
  def create_model request, options = nil
802
1004
  raise ::ArgumentError, "request must be provided" if request.nil?
803
1005
 
@@ -861,6 +1063,22 @@ module Google
861
1063
  # @return [::Google::Cloud::AutoML::V1::Model]
862
1064
  #
863
1065
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1066
+ #
1067
+ # @example Basic example
1068
+ # require "google/cloud/automl/v1"
1069
+ #
1070
+ # # Create a client object. The client can be reused for multiple calls.
1071
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
1072
+ #
1073
+ # # Create a request. To set request fields, pass in keyword arguments.
1074
+ # request = Google::Cloud::AutoML::V1::GetModelRequest.new
1075
+ #
1076
+ # # Call the get_model method.
1077
+ # result = client.get_model request
1078
+ #
1079
+ # # The returned object is of type Google::Cloud::AutoML::V1::Model.
1080
+ # p result
1081
+ #
864
1082
  def get_model request, options = nil
865
1083
  raise ::ArgumentError, "request must be provided" if request.nil?
866
1084
 
@@ -940,6 +1158,26 @@ module Google
940
1158
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>]
941
1159
  #
942
1160
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1161
+ #
1162
+ # @example Basic example
1163
+ # require "google/cloud/automl/v1"
1164
+ #
1165
+ # # Create a client object. The client can be reused for multiple calls.
1166
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
1167
+ #
1168
+ # # Create a request. To set request fields, pass in keyword arguments.
1169
+ # request = Google::Cloud::AutoML::V1::ListModelsRequest.new
1170
+ #
1171
+ # # Call the list_models method.
1172
+ # result = client.list_models request
1173
+ #
1174
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1175
+ # # over elements, and API calls will be issued to fetch pages as needed.
1176
+ # result.each do |item|
1177
+ # # Each element is of type ::Google::Cloud::AutoML::V1::Model.
1178
+ # p item
1179
+ # end
1180
+ #
943
1181
  def list_models request, options = nil
944
1182
  raise ::ArgumentError, "request must be provided" if request.nil?
945
1183
 
@@ -1007,6 +1245,29 @@ module Google
1007
1245
  # @return [::Gapic::Operation]
1008
1246
  #
1009
1247
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1248
+ #
1249
+ # @example Basic example
1250
+ # require "google/cloud/automl/v1"
1251
+ #
1252
+ # # Create a client object. The client can be reused for multiple calls.
1253
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
1254
+ #
1255
+ # # Create a request. To set request fields, pass in keyword arguments.
1256
+ # request = Google::Cloud::AutoML::V1::DeleteModelRequest.new
1257
+ #
1258
+ # # Call the delete_model method.
1259
+ # result = client.delete_model request
1260
+ #
1261
+ # # The returned object is of type Gapic::Operation. You can use it to
1262
+ # # check the status of an operation, cancel it, or wait for results.
1263
+ # # Here is how to wait for a response.
1264
+ # result.wait_until_done! timeout: 60
1265
+ # if result.response?
1266
+ # p result.response
1267
+ # else
1268
+ # puts "No response received."
1269
+ # end
1270
+ #
1010
1271
  def delete_model request, options = nil
1011
1272
  raise ::ArgumentError, "request must be provided" if request.nil?
1012
1273
 
@@ -1072,6 +1333,22 @@ module Google
1072
1333
  # @return [::Google::Cloud::AutoML::V1::Model]
1073
1334
  #
1074
1335
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1336
+ #
1337
+ # @example Basic example
1338
+ # require "google/cloud/automl/v1"
1339
+ #
1340
+ # # Create a client object. The client can be reused for multiple calls.
1341
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
1342
+ #
1343
+ # # Create a request. To set request fields, pass in keyword arguments.
1344
+ # request = Google::Cloud::AutoML::V1::UpdateModelRequest.new
1345
+ #
1346
+ # # Call the update_model method.
1347
+ # result = client.update_model request
1348
+ #
1349
+ # # The returned object is of type Google::Cloud::AutoML::V1::Model.
1350
+ # p result
1351
+ #
1075
1352
  def update_model request, options = nil
1076
1353
  raise ::ArgumentError, "request must be provided" if request.nil?
1077
1354
 
@@ -1148,6 +1425,29 @@ module Google
1148
1425
  # @return [::Gapic::Operation]
1149
1426
  #
1150
1427
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1428
+ #
1429
+ # @example Basic example
1430
+ # require "google/cloud/automl/v1"
1431
+ #
1432
+ # # Create a client object. The client can be reused for multiple calls.
1433
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
1434
+ #
1435
+ # # Create a request. To set request fields, pass in keyword arguments.
1436
+ # request = Google::Cloud::AutoML::V1::DeployModelRequest.new
1437
+ #
1438
+ # # Call the deploy_model method.
1439
+ # result = client.deploy_model request
1440
+ #
1441
+ # # The returned object is of type Gapic::Operation. You can use it to
1442
+ # # check the status of an operation, cancel it, or wait for results.
1443
+ # # Here is how to wait for a response.
1444
+ # result.wait_until_done! timeout: 60
1445
+ # if result.response?
1446
+ # p result.response
1447
+ # else
1448
+ # puts "No response received."
1449
+ # end
1450
+ #
1151
1451
  def deploy_model request, options = nil
1152
1452
  raise ::ArgumentError, "request must be provided" if request.nil?
1153
1453
 
@@ -1217,6 +1517,29 @@ module Google
1217
1517
  # @return [::Gapic::Operation]
1218
1518
  #
1219
1519
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1520
+ #
1521
+ # @example Basic example
1522
+ # require "google/cloud/automl/v1"
1523
+ #
1524
+ # # Create a client object. The client can be reused for multiple calls.
1525
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
1526
+ #
1527
+ # # Create a request. To set request fields, pass in keyword arguments.
1528
+ # request = Google::Cloud::AutoML::V1::UndeployModelRequest.new
1529
+ #
1530
+ # # Call the undeploy_model method.
1531
+ # result = client.undeploy_model request
1532
+ #
1533
+ # # The returned object is of type Gapic::Operation. You can use it to
1534
+ # # check the status of an operation, cancel it, or wait for results.
1535
+ # # Here is how to wait for a response.
1536
+ # result.wait_until_done! timeout: 60
1537
+ # if result.response?
1538
+ # p result.response
1539
+ # else
1540
+ # puts "No response received."
1541
+ # end
1542
+ #
1220
1543
  def undeploy_model request, options = nil
1221
1544
  raise ::ArgumentError, "request must be provided" if request.nil?
1222
1545
 
@@ -1288,6 +1611,29 @@ module Google
1288
1611
  # @return [::Gapic::Operation]
1289
1612
  #
1290
1613
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1614
+ #
1615
+ # @example Basic example
1616
+ # require "google/cloud/automl/v1"
1617
+ #
1618
+ # # Create a client object. The client can be reused for multiple calls.
1619
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
1620
+ #
1621
+ # # Create a request. To set request fields, pass in keyword arguments.
1622
+ # request = Google::Cloud::AutoML::V1::ExportModelRequest.new
1623
+ #
1624
+ # # Call the export_model method.
1625
+ # result = client.export_model request
1626
+ #
1627
+ # # The returned object is of type Gapic::Operation. You can use it to
1628
+ # # check the status of an operation, cancel it, or wait for results.
1629
+ # # Here is how to wait for a response.
1630
+ # result.wait_until_done! timeout: 60
1631
+ # if result.response?
1632
+ # p result.response
1633
+ # else
1634
+ # puts "No response received."
1635
+ # end
1636
+ #
1291
1637
  def export_model request, options = nil
1292
1638
  raise ::ArgumentError, "request must be provided" if request.nil?
1293
1639
 
@@ -1351,6 +1697,22 @@ module Google
1351
1697
  # @return [::Google::Cloud::AutoML::V1::ModelEvaluation]
1352
1698
  #
1353
1699
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1700
+ #
1701
+ # @example Basic example
1702
+ # require "google/cloud/automl/v1"
1703
+ #
1704
+ # # Create a client object. The client can be reused for multiple calls.
1705
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
1706
+ #
1707
+ # # Create a request. To set request fields, pass in keyword arguments.
1708
+ # request = Google::Cloud::AutoML::V1::GetModelEvaluationRequest.new
1709
+ #
1710
+ # # Call the get_model_evaluation method.
1711
+ # result = client.get_model_evaluation request
1712
+ #
1713
+ # # The returned object is of type Google::Cloud::AutoML::V1::ModelEvaluation.
1714
+ # p result
1715
+ #
1354
1716
  def get_model_evaluation request, options = nil
1355
1717
  raise ::ArgumentError, "request must be provided" if request.nil?
1356
1718
 
@@ -1434,6 +1796,26 @@ module Google
1434
1796
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>]
1435
1797
  #
1436
1798
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1799
+ #
1800
+ # @example Basic example
1801
+ # require "google/cloud/automl/v1"
1802
+ #
1803
+ # # Create a client object. The client can be reused for multiple calls.
1804
+ # client = Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
1805
+ #
1806
+ # # Create a request. To set request fields, pass in keyword arguments.
1807
+ # request = Google::Cloud::AutoML::V1::ListModelEvaluationsRequest.new
1808
+ #
1809
+ # # Call the list_model_evaluations method.
1810
+ # result = client.list_model_evaluations request
1811
+ #
1812
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1813
+ # # over elements, and API calls will be issued to fetch pages as needed.
1814
+ # result.each do |item|
1815
+ # # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation.
1816
+ # p item
1817
+ # end
1818
+ #
1437
1819
  def list_model_evaluations request, options = nil
1438
1820
  raise ::ArgumentError, "request must be provided" if request.nil?
1439
1821
 
@@ -1500,9 +1882,9 @@ module Google
1500
1882
  # end
1501
1883
  #
1502
1884
  # @!attribute [rw] endpoint
1503
- # The hostname or hostname:port of the service endpoint.
1504
- # Defaults to `"automl.googleapis.com"`.
1505
- # @return [::String]
1885
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1886
+ # nil, indicating to use the default endpoint in the current universe domain.
1887
+ # @return [::String,nil]
1506
1888
  # @!attribute [rw] credentials
1507
1889
  # Credentials to send with calls. You may provide any of the following types:
1508
1890
  # * (`String`) The path to a service account key file in JSON format
@@ -1539,13 +1921,20 @@ module Google
1539
1921
  # @!attribute [rw] quota_project
1540
1922
  # A separate project against which to charge quota.
1541
1923
  # @return [::String]
1924
+ # @!attribute [rw] universe_domain
1925
+ # The universe domain within which to make requests. This determines the
1926
+ # default endpoint URL. The default value of nil uses the environment
1927
+ # universe (usually the default "googleapis.com" universe).
1928
+ # @return [::String,nil]
1542
1929
  #
1543
1930
  class Configuration
1544
1931
  extend ::Gapic::Config
1545
1932
 
1933
+ # @private
1934
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1546
1935
  DEFAULT_ENDPOINT = "automl.googleapis.com"
1547
1936
 
1548
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1937
+ config_attr :endpoint, nil, ::String, nil
1549
1938
  config_attr :credentials, nil do |value|
1550
1939
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1551
1940
  allowed.any? { |klass| klass === value }
@@ -1557,6 +1946,7 @@ module Google
1557
1946
  config_attr :metadata, nil, ::Hash, nil
1558
1947
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1559
1948
  config_attr :quota_project, nil, ::String, nil
1949
+ config_attr :universe_domain, nil, ::String, nil
1560
1950
 
1561
1951
  # @private
1562
1952
  def initialize parent_config = nil