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 +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +2 -2
- data/lib/google/cloud/automl/v1/automl/client.rb +48 -54
- data/lib/google/cloud/automl/v1/automl/operations.rb +20 -14
- data/lib/google/cloud/automl/v1/automl/rest/client.rb +1736 -0
- data/lib/google/cloud/automl/v1/automl/rest/operations.rb +935 -0
- data/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +1119 -0
- data/lib/google/cloud/automl/v1/automl/rest.rb +66 -0
- data/lib/google/cloud/automl/v1/automl.rb +7 -1
- data/lib/google/cloud/automl/v1/prediction_service/client.rb +4 -4
- data/lib/google/cloud/automl/v1/prediction_service/operations.rb +20 -14
- data/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +606 -0
- data/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +935 -0
- data/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb +168 -0
- data/lib/google/cloud/automl/v1/prediction_service/rest.rb +56 -0
- data/lib/google/cloud/automl/v1/prediction_service.rb +7 -1
- data/lib/google/cloud/automl/v1/rest.rb +38 -0
- data/lib/google/cloud/automl/v1/version.rb +1 -1
- data/lib/google/cloud/automl/v1.rb +7 -2
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +20 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2131e63e66e105f271d1a0a1cdf12a31903c28a412e89e79a54fe056424ebd9
|
4
|
+
data.tar.gz: 5d806a357a92ed7b5371072d514a8b9d20e0bd568c8683f9ac3942b7f6661e2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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/
|
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
|
280
|
-
# #
|
281
|
-
# #
|
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 "
|
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
|
-
# #
|
475
|
-
#
|
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
|
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
|
657
|
-
# #
|
658
|
-
# #
|
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 "
|
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
|
762
|
-
# #
|
763
|
-
# #
|
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 "
|
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
|
859
|
-
# #
|
860
|
-
# #
|
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 "
|
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
|
1043
|
-
# #
|
1044
|
-
# #
|
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 "
|
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
|
-
# #
|
1239
|
-
#
|
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
|
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
|
1334
|
-
# #
|
1335
|
-
# #
|
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 "
|
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
|
1528
|
-
# #
|
1529
|
-
# #
|
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 "
|
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
|
1627
|
-
# #
|
1628
|
-
# #
|
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 "
|
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
|
1728
|
-
# #
|
1729
|
-
# #
|
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 "
|
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
|
-
# #
|
1928
|
-
#
|
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
|
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
|
-
# #
|
163
|
-
#
|
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
|
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
|
257
|
-
# #
|
258
|
-
# #
|
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 "
|
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
|
544
|
-
# #
|
545
|
-
# #
|
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 "
|
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
|