google-cloud-automl-v1 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1802aec97caf749530ac9d41f029e0ff654600f1eca85ab0d5dbe66c38137a5b
4
- data.tar.gz: fe72849400cc6575e9a8b2bd157c8a46d1897e61b95f461da07c88d05b9f2b4f
3
+ metadata.gz: f2131e63e66e105f271d1a0a1cdf12a31903c28a412e89e79a54fe056424ebd9
4
+ data.tar.gz: 5d806a357a92ed7b5371072d514a8b9d20e0bd568c8683f9ac3942b7f6661e2a
5
5
  SHA512:
6
- metadata.gz: f5d12261b7288b7bc3f0011f272f1ef29080e6ba3f3001852f1e567cfd8bcfce94280c7ba7d0476f9af3543f0efbe38d291a5e862021c4514d9a6b2ab269f3cc
7
- data.tar.gz: 3da91bdb4afa9e0dc6ebc90bea4768936d6bcc7f88402588717bae7cdd5f352bc5fdffebf8dadb1365871aa3576609819c88f62bb827d90838e0d9205e66f67f
6
+ metadata.gz: e2d5a8030cb6b934caa71b17490592b09966722e9221c68e083a1dfff8ead5cdc921e924eb082a631e8aa4d92938a9eafe28c0cc388fb8573816398fbf0c586d
7
+ data.tar.gz: 848b0c7a9f8ea335e30e8c6b89745cb673d2a02d3af6bbbc247ed0477f2f2a1239e3289f2cd80cd77cc67dcb957e8efe5ad8ec0dcdf67c693affbfef5474a468
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud AutoML V1 API
2
2
 
3
- API Client library for the Cloud AutoML V1 API
3
+ Train high-quality custom machine learning models with minimum effort and machine learning expertise.
4
4
 
5
5
  AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites.
6
6
 
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -276,14 +276,14 @@ module Google
276
276
  # # Call the create_dataset method.
277
277
  # result = client.create_dataset request
278
278
  #
279
- # # The returned object is of type Gapic::Operation. You can use this
280
- # # object to check the status of an operation, cancel it, or wait
281
- # # for results. Here is how to block until completion:
279
+ # # The returned object is of type Gapic::Operation. You can use it to
280
+ # # check the status of an operation, cancel it, or wait for results.
281
+ # # Here is how to wait for a response.
282
282
  # result.wait_until_done! timeout: 60
283
283
  # if result.response?
284
284
  # p result.response
285
285
  # else
286
- # puts "Error!"
286
+ # puts "No response received."
287
287
  # end
288
288
  #
289
289
  def create_dataset request, options = nil
@@ -470,13 +470,11 @@ module Google
470
470
  # # Call the list_datasets method.
471
471
  # result = client.list_datasets request
472
472
  #
473
- # # The returned object is of type Gapic::PagedEnumerable. You can
474
- # # iterate over all elements by calling #each, and the enumerable
475
- # # will lazily make API calls to fetch subsequent pages. Other
476
- # # methods are also available for managing paging directly.
477
- # result.each do |response|
473
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
474
+ # # over elements, and API calls will be issued to fetch pages as needed.
475
+ # result.each do |item|
478
476
  # # Each element is of type ::Google::Cloud::AutoML::V1::Dataset.
479
- # p response
477
+ # p item
480
478
  # end
481
479
  #
482
480
  def list_datasets request, options = nil
@@ -653,14 +651,14 @@ module Google
653
651
  # # Call the delete_dataset method.
654
652
  # result = client.delete_dataset request
655
653
  #
656
- # # The returned object is of type Gapic::Operation. You can use this
657
- # # object to check the status of an operation, cancel it, or wait
658
- # # for results. Here is how to block until completion:
654
+ # # The returned object is of type Gapic::Operation. You can use it to
655
+ # # check the status of an operation, cancel it, or wait for results.
656
+ # # Here is how to wait for a response.
659
657
  # result.wait_until_done! timeout: 60
660
658
  # if result.response?
661
659
  # p result.response
662
660
  # else
663
- # puts "Error!"
661
+ # puts "No response received."
664
662
  # end
665
663
  #
666
664
  def delete_dataset request, options = nil
@@ -758,14 +756,14 @@ module Google
758
756
  # # Call the import_data method.
759
757
  # result = client.import_data request
760
758
  #
761
- # # The returned object is of type Gapic::Operation. You can use this
762
- # # object to check the status of an operation, cancel it, or wait
763
- # # for results. Here is how to block until completion:
759
+ # # The returned object is of type Gapic::Operation. You can use it to
760
+ # # check the status of an operation, cancel it, or wait for results.
761
+ # # Here is how to wait for a response.
764
762
  # result.wait_until_done! timeout: 60
765
763
  # if result.response?
766
764
  # p result.response
767
765
  # else
768
- # puts "Error!"
766
+ # puts "No response received."
769
767
  # end
770
768
  #
771
769
  def import_data request, options = nil
@@ -855,14 +853,14 @@ module Google
855
853
  # # Call the export_data method.
856
854
  # result = client.export_data request
857
855
  #
858
- # # The returned object is of type Gapic::Operation. You can use this
859
- # # object to check the status of an operation, cancel it, or wait
860
- # # for results. Here is how to block until completion:
856
+ # # The returned object is of type Gapic::Operation. You can use it to
857
+ # # check the status of an operation, cancel it, or wait for results.
858
+ # # Here is how to wait for a response.
861
859
  # result.wait_until_done! timeout: 60
862
860
  # if result.response?
863
861
  # p result.response
864
862
  # else
865
- # puts "Error!"
863
+ # puts "No response received."
866
864
  # end
867
865
  #
868
866
  def export_data request, options = nil
@@ -1039,14 +1037,14 @@ module Google
1039
1037
  # # Call the create_model method.
1040
1038
  # result = client.create_model request
1041
1039
  #
1042
- # # The returned object is of type Gapic::Operation. You can use this
1043
- # # object to check the status of an operation, cancel it, or wait
1044
- # # for results. Here is how to block until completion:
1040
+ # # The returned object is of type Gapic::Operation. You can use it to
1041
+ # # check the status of an operation, cancel it, or wait for results.
1042
+ # # Here is how to wait for a response.
1045
1043
  # result.wait_until_done! timeout: 60
1046
1044
  # if result.response?
1047
1045
  # p result.response
1048
1046
  # else
1049
- # puts "Error!"
1047
+ # puts "No response received."
1050
1048
  # end
1051
1049
  #
1052
1050
  def create_model request, options = nil
@@ -1234,13 +1232,11 @@ module Google
1234
1232
  # # Call the list_models method.
1235
1233
  # result = client.list_models request
1236
1234
  #
1237
- # # The returned object is of type Gapic::PagedEnumerable. You can
1238
- # # iterate over all elements by calling #each, and the enumerable
1239
- # # will lazily make API calls to fetch subsequent pages. Other
1240
- # # methods are also available for managing paging directly.
1241
- # result.each do |response|
1235
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1236
+ # # over elements, and API calls will be issued to fetch pages as needed.
1237
+ # result.each do |item|
1242
1238
  # # Each element is of type ::Google::Cloud::AutoML::V1::Model.
1243
- # p response
1239
+ # p item
1244
1240
  # end
1245
1241
  #
1246
1242
  def list_models request, options = nil
@@ -1330,14 +1326,14 @@ module Google
1330
1326
  # # Call the delete_model method.
1331
1327
  # result = client.delete_model request
1332
1328
  #
1333
- # # The returned object is of type Gapic::Operation. You can use this
1334
- # # object to check the status of an operation, cancel it, or wait
1335
- # # for results. Here is how to block until completion:
1329
+ # # The returned object is of type Gapic::Operation. You can use it to
1330
+ # # check the status of an operation, cancel it, or wait for results.
1331
+ # # Here is how to wait for a response.
1336
1332
  # result.wait_until_done! timeout: 60
1337
1333
  # if result.response?
1338
1334
  # p result.response
1339
1335
  # else
1340
- # puts "Error!"
1336
+ # puts "No response received."
1341
1337
  # end
1342
1338
  #
1343
1339
  def delete_model request, options = nil
@@ -1524,14 +1520,14 @@ module Google
1524
1520
  # # Call the deploy_model method.
1525
1521
  # result = client.deploy_model request
1526
1522
  #
1527
- # # The returned object is of type Gapic::Operation. You can use this
1528
- # # object to check the status of an operation, cancel it, or wait
1529
- # # for results. Here is how to block until completion:
1523
+ # # The returned object is of type Gapic::Operation. You can use it to
1524
+ # # check the status of an operation, cancel it, or wait for results.
1525
+ # # Here is how to wait for a response.
1530
1526
  # result.wait_until_done! timeout: 60
1531
1527
  # if result.response?
1532
1528
  # p result.response
1533
1529
  # else
1534
- # puts "Error!"
1530
+ # puts "No response received."
1535
1531
  # end
1536
1532
  #
1537
1533
  def deploy_model request, options = nil
@@ -1623,14 +1619,14 @@ module Google
1623
1619
  # # Call the undeploy_model method.
1624
1620
  # result = client.undeploy_model request
1625
1621
  #
1626
- # # The returned object is of type Gapic::Operation. You can use this
1627
- # # object to check the status of an operation, cancel it, or wait
1628
- # # for results. Here is how to block until completion:
1622
+ # # The returned object is of type Gapic::Operation. You can use it to
1623
+ # # check the status of an operation, cancel it, or wait for results.
1624
+ # # Here is how to wait for a response.
1629
1625
  # result.wait_until_done! timeout: 60
1630
1626
  # if result.response?
1631
1627
  # p result.response
1632
1628
  # else
1633
- # puts "Error!"
1629
+ # puts "No response received."
1634
1630
  # end
1635
1631
  #
1636
1632
  def undeploy_model request, options = nil
@@ -1724,14 +1720,14 @@ module Google
1724
1720
  # # Call the export_model method.
1725
1721
  # result = client.export_model request
1726
1722
  #
1727
- # # The returned object is of type Gapic::Operation. You can use this
1728
- # # object to check the status of an operation, cancel it, or wait
1729
- # # for results. Here is how to block until completion:
1723
+ # # The returned object is of type Gapic::Operation. You can use it to
1724
+ # # check the status of an operation, cancel it, or wait for results.
1725
+ # # Here is how to wait for a response.
1730
1726
  # result.wait_until_done! timeout: 60
1731
1727
  # if result.response?
1732
1728
  # p result.response
1733
1729
  # else
1734
- # puts "Error!"
1730
+ # puts "No response received."
1735
1731
  # end
1736
1732
  #
1737
1733
  def export_model request, options = nil
@@ -1923,13 +1919,11 @@ module Google
1923
1919
  # # Call the list_model_evaluations method.
1924
1920
  # result = client.list_model_evaluations request
1925
1921
  #
1926
- # # The returned object is of type Gapic::PagedEnumerable. You can
1927
- # # iterate over all elements by calling #each, and the enumerable
1928
- # # will lazily make API calls to fetch subsequent pages. Other
1929
- # # methods are also available for managing paging directly.
1930
- # result.each do |response|
1922
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1923
+ # # over elements, and API calls will be issued to fetch pages as needed.
1924
+ # result.each do |item|
1931
1925
  # # Each element is of type ::Google::Cloud::AutoML::V1::ModelEvaluation.
1932
- # p response
1926
+ # p item
1933
1927
  # end
1934
1928
  #
1935
1929
  def list_model_evaluations request, options = nil
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil
@@ -567,6 +565,14 @@ module Google
567
565
  gapic_version: ::Google::Cloud::AutoML::V1::VERSION
568
566
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
569
567
 
568
+ header_params = {}
569
+ if request.name
570
+ header_params["name"] = request.name
571
+ end
572
+
573
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
574
+ metadata[:"x-goog-request-params"] ||= request_params_header
575
+
570
576
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
571
577
  metadata: metadata,
572
578
  retry_policy: @config.rpcs.wait_operation.retry_policy