google-cloud-data_labeling-v1beta1 0.3.5 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +14 -9
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb +66 -82
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/operations.rb +20 -17
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service.rb +1 -1
- data/lib/google/cloud/data_labeling/v1beta1/version.rb +1 -1
- data/lib/google/cloud/data_labeling/v1beta1.rb +3 -1
- data/lib/google/cloud/datalabeling/v1beta1/annotation_pb.rb +28 -135
- data/lib/google/cloud/datalabeling/v1beta1/annotation_spec_set_pb.rb +26 -14
- data/lib/google/cloud/datalabeling/v1beta1/data_labeling_service_pb.rb +33 -225
- data/lib/google/cloud/datalabeling/v1beta1/data_payloads_pb.rb +27 -24
- data/lib/google/cloud/datalabeling/v1beta1/dataset_pb.rb +30 -105
- data/lib/google/cloud/datalabeling/v1beta1/evaluation_job_pb.rb +31 -44
- data/lib/google/cloud/datalabeling/v1beta1/evaluation_pb.rb +28 -62
- data/lib/google/cloud/datalabeling/v1beta1/human_annotation_config_pb.rb +27 -66
- data/lib/google/cloud/datalabeling/v1beta1/instruction_pb.rb +27 -20
- data/lib/google/cloud/datalabeling/v1beta1/operations_pb.rb +30 -86
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/any.rb +4 -1
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +15 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6920a0f3268c7bdd43770aaea8770d34b6eebeafc2e6df3f119ac494d72c1bb
|
4
|
+
data.tar.gz: 03a7de11fa2a4858921e0b3364384d701a96fd15c056140b6caaac5c6ab5b230
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7efeb62f4170620e23575e27a6b1f1ce8d582d630ab3af4c585a3f880cd5e17cee9a8e103b114c1dbfa12d09ca7aa435023b231a9784d7d90f36a0afc945b380
|
7
|
+
data.tar.gz: 2da4c69f8ec93af1648bb228628ee2da1a0bbe02735852888340c240488435c750e26049d554203ca1d1aacf8e04f4fef9c60695bc974dbb8d52634b846e097e
|
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 AI Platform Data Labeling Service V1beta1 API
|
2
2
|
|
3
|
-
API
|
3
|
+
Public API for Google Cloud AI Data Labeling Service.
|
4
4
|
|
5
5
|
AI Platform Data Labeling Service lets you work with human labelers to generate highly accurate labels for a collection of data that you can use in machine learning models.
|
6
6
|
|
@@ -37,7 +37,7 @@ request = ::Google::Cloud::DataLabeling::V1beta1::CreateDatasetRequest.new # (re
|
|
37
37
|
response = client.create_dataset request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-data_labeling-v1beta1/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/ai-platform/data-labeling/docs)
|
@@ -46,8 +46,8 @@ 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/
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
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
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/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.
|
53
53
|
|
@@ -69,16 +69,21 @@ module GRPC
|
|
69
69
|
end
|
70
70
|
```
|
71
71
|
|
72
|
+
|
73
|
+
## Google Cloud Samples
|
74
|
+
|
75
|
+
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
76
|
+
|
72
77
|
## Supported Ruby Versions
|
73
78
|
|
74
|
-
This library is supported on Ruby 2.
|
79
|
+
This library is supported on Ruby 2.6+.
|
75
80
|
|
76
81
|
Google provides official support for Ruby versions that are actively supported
|
77
82
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
78
|
-
in security maintenance, and not end of life.
|
79
|
-
|
80
|
-
|
81
|
-
|
83
|
+
in security maintenance, and not end of life. Older versions of Ruby _may_
|
84
|
+
still work, but are unsupported and not recommended. See
|
85
|
+
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
86
|
+
support schedule.
|
82
87
|
|
83
88
|
## Which client should I use?
|
84
89
|
|
@@ -252,7 +252,7 @@ module Google
|
|
252
252
|
credentials = @config.credentials
|
253
253
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
254
254
|
# but only if the default endpoint does not have a region prefix.
|
255
|
-
enable_self_signed_jwt = @config.endpoint ==
|
255
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
256
256
|
!@config.endpoint.split(".").first.include?("-")
|
257
257
|
credentials ||= Credentials.default scope: @config.scope,
|
258
258
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -513,13 +513,11 @@ module Google
|
|
513
513
|
# # Call the list_datasets method.
|
514
514
|
# result = client.list_datasets request
|
515
515
|
#
|
516
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
517
|
-
# #
|
518
|
-
#
|
519
|
-
# # methods are also available for managing paging directly.
|
520
|
-
# result.each do |response|
|
516
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
517
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
518
|
+
# result.each do |item|
|
521
519
|
# # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::Dataset.
|
522
|
-
# p
|
520
|
+
# p item
|
523
521
|
# end
|
524
522
|
#
|
525
523
|
def list_datasets request, options = nil
|
@@ -701,14 +699,14 @@ module Google
|
|
701
699
|
# # Call the import_data method.
|
702
700
|
# result = client.import_data request
|
703
701
|
#
|
704
|
-
# # The returned object is of type Gapic::Operation. You can use
|
705
|
-
# #
|
706
|
-
# #
|
702
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
703
|
+
# # check the status of an operation, cancel it, or wait for results.
|
704
|
+
# # Here is how to wait for a response.
|
707
705
|
# result.wait_until_done! timeout: 60
|
708
706
|
# if result.response?
|
709
707
|
# p result.response
|
710
708
|
# else
|
711
|
-
# puts "
|
709
|
+
# puts "No response received."
|
712
710
|
# end
|
713
711
|
#
|
714
712
|
def import_data request, options = nil
|
@@ -808,14 +806,14 @@ module Google
|
|
808
806
|
# # Call the export_data method.
|
809
807
|
# result = client.export_data request
|
810
808
|
#
|
811
|
-
# # The returned object is of type Gapic::Operation. You can use
|
812
|
-
# #
|
813
|
-
# #
|
809
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
810
|
+
# # check the status of an operation, cancel it, or wait for results.
|
811
|
+
# # Here is how to wait for a response.
|
814
812
|
# result.wait_until_done! timeout: 60
|
815
813
|
# if result.response?
|
816
814
|
# p result.response
|
817
815
|
# else
|
818
|
-
# puts "
|
816
|
+
# puts "No response received."
|
819
817
|
# end
|
820
818
|
#
|
821
819
|
def export_data request, options = nil
|
@@ -1001,13 +999,11 @@ module Google
|
|
1001
999
|
# # Call the list_data_items method.
|
1002
1000
|
# result = client.list_data_items request
|
1003
1001
|
#
|
1004
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1005
|
-
# #
|
1006
|
-
#
|
1007
|
-
# # methods are also available for managing paging directly.
|
1008
|
-
# result.each do |response|
|
1002
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1003
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1004
|
+
# result.each do |item|
|
1009
1005
|
# # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::DataItem.
|
1010
|
-
# p
|
1006
|
+
# p item
|
1011
1007
|
# end
|
1012
1008
|
#
|
1013
1009
|
def list_data_items request, options = nil
|
@@ -1192,13 +1188,11 @@ module Google
|
|
1192
1188
|
# # Call the list_annotated_datasets method.
|
1193
1189
|
# result = client.list_annotated_datasets request
|
1194
1190
|
#
|
1195
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1196
|
-
# #
|
1197
|
-
#
|
1198
|
-
# # methods are also available for managing paging directly.
|
1199
|
-
# result.each do |response|
|
1191
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1192
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1193
|
+
# result.each do |item|
|
1200
1194
|
# # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset.
|
1201
|
-
# p
|
1195
|
+
# p item
|
1202
1196
|
# end
|
1203
1197
|
#
|
1204
1198
|
def list_annotated_datasets request, options = nil
|
@@ -1393,14 +1387,14 @@ module Google
|
|
1393
1387
|
# # Call the label_image method.
|
1394
1388
|
# result = client.label_image request
|
1395
1389
|
#
|
1396
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1397
|
-
# #
|
1398
|
-
# #
|
1390
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1391
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1392
|
+
# # Here is how to wait for a response.
|
1399
1393
|
# result.wait_until_done! timeout: 60
|
1400
1394
|
# if result.response?
|
1401
1395
|
# p result.response
|
1402
1396
|
# else
|
1403
|
-
# puts "
|
1397
|
+
# puts "No response received."
|
1404
1398
|
# end
|
1405
1399
|
#
|
1406
1400
|
def label_image request, options = nil
|
@@ -1508,14 +1502,14 @@ module Google
|
|
1508
1502
|
# # Call the label_video method.
|
1509
1503
|
# result = client.label_video request
|
1510
1504
|
#
|
1511
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1512
|
-
# #
|
1513
|
-
# #
|
1505
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1506
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1507
|
+
# # Here is how to wait for a response.
|
1514
1508
|
# result.wait_until_done! timeout: 60
|
1515
1509
|
# if result.response?
|
1516
1510
|
# p result.response
|
1517
1511
|
# else
|
1518
|
-
# puts "
|
1512
|
+
# puts "No response received."
|
1519
1513
|
# end
|
1520
1514
|
#
|
1521
1515
|
def label_video request, options = nil
|
@@ -1615,14 +1609,14 @@ module Google
|
|
1615
1609
|
# # Call the label_text method.
|
1616
1610
|
# result = client.label_text request
|
1617
1611
|
#
|
1618
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1619
|
-
# #
|
1620
|
-
# #
|
1612
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1613
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1614
|
+
# # Here is how to wait for a response.
|
1621
1615
|
# result.wait_until_done! timeout: 60
|
1622
1616
|
# if result.response?
|
1623
1617
|
# p result.response
|
1624
1618
|
# else
|
1625
|
-
# puts "
|
1619
|
+
# puts "No response received."
|
1626
1620
|
# end
|
1627
1621
|
#
|
1628
1622
|
def label_text request, options = nil
|
@@ -1813,13 +1807,11 @@ module Google
|
|
1813
1807
|
# # Call the list_examples method.
|
1814
1808
|
# result = client.list_examples request
|
1815
1809
|
#
|
1816
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1817
|
-
# #
|
1818
|
-
#
|
1819
|
-
# # methods are also available for managing paging directly.
|
1820
|
-
# result.each do |response|
|
1810
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1811
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1812
|
+
# result.each do |item|
|
1821
1813
|
# # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::Example.
|
1822
|
-
# p
|
1814
|
+
# p item
|
1823
1815
|
# end
|
1824
1816
|
#
|
1825
1817
|
def list_examples request, options = nil
|
@@ -2093,13 +2085,11 @@ module Google
|
|
2093
2085
|
# # Call the list_annotation_spec_sets method.
|
2094
2086
|
# result = client.list_annotation_spec_sets request
|
2095
2087
|
#
|
2096
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2097
|
-
# #
|
2098
|
-
#
|
2099
|
-
# # methods are also available for managing paging directly.
|
2100
|
-
# result.each do |response|
|
2088
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2089
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2090
|
+
# result.each do |item|
|
2101
2091
|
# # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet.
|
2102
|
-
# p
|
2092
|
+
# p item
|
2103
2093
|
# end
|
2104
2094
|
#
|
2105
2095
|
def list_annotation_spec_sets request, options = nil
|
@@ -2274,14 +2264,14 @@ module Google
|
|
2274
2264
|
# # Call the create_instruction method.
|
2275
2265
|
# result = client.create_instruction request
|
2276
2266
|
#
|
2277
|
-
# # The returned object is of type Gapic::Operation. You can use
|
2278
|
-
# #
|
2279
|
-
# #
|
2267
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2268
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2269
|
+
# # Here is how to wait for a response.
|
2280
2270
|
# result.wait_until_done! timeout: 60
|
2281
2271
|
# if result.response?
|
2282
2272
|
# p result.response
|
2283
2273
|
# else
|
2284
|
-
# puts "
|
2274
|
+
# puts "No response received."
|
2285
2275
|
# end
|
2286
2276
|
#
|
2287
2277
|
def create_instruction request, options = nil
|
@@ -2465,13 +2455,11 @@ module Google
|
|
2465
2455
|
# # Call the list_instructions method.
|
2466
2456
|
# result = client.list_instructions request
|
2467
2457
|
#
|
2468
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2469
|
-
# #
|
2470
|
-
#
|
2471
|
-
# # methods are also available for managing paging directly.
|
2472
|
-
# result.each do |response|
|
2458
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2459
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2460
|
+
# result.each do |item|
|
2473
2461
|
# # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::Instruction.
|
2474
|
-
# p
|
2462
|
+
# p item
|
2475
2463
|
# end
|
2476
2464
|
#
|
2477
2465
|
def list_instructions request, options = nil
|
@@ -2775,13 +2763,11 @@ module Google
|
|
2775
2763
|
# # Call the search_evaluations method.
|
2776
2764
|
# result = client.search_evaluations request
|
2777
2765
|
#
|
2778
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2779
|
-
# #
|
2780
|
-
#
|
2781
|
-
# # methods are also available for managing paging directly.
|
2782
|
-
# result.each do |response|
|
2766
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2767
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2768
|
+
# result.each do |item|
|
2783
2769
|
# # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::Evaluation.
|
2784
|
-
# p
|
2770
|
+
# p item
|
2785
2771
|
# end
|
2786
2772
|
#
|
2787
2773
|
def search_evaluations request, options = nil
|
@@ -2883,13 +2869,11 @@ module Google
|
|
2883
2869
|
# # Call the search_example_comparisons method.
|
2884
2870
|
# result = client.search_example_comparisons request
|
2885
2871
|
#
|
2886
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2887
|
-
# #
|
2888
|
-
#
|
2889
|
-
# # methods are also available for managing paging directly.
|
2890
|
-
# result.each do |response|
|
2872
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2873
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2874
|
+
# result.each do |item|
|
2891
2875
|
# # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison.
|
2892
|
-
# p
|
2876
|
+
# p item
|
2893
2877
|
# end
|
2894
2878
|
#
|
2895
2879
|
def search_example_comparisons request, options = nil
|
@@ -3533,13 +3517,11 @@ module Google
|
|
3533
3517
|
# # Call the list_evaluation_jobs method.
|
3534
3518
|
# result = client.list_evaluation_jobs request
|
3535
3519
|
#
|
3536
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
3537
|
-
# #
|
3538
|
-
#
|
3539
|
-
# # methods are also available for managing paging directly.
|
3540
|
-
# result.each do |response|
|
3520
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3521
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3522
|
+
# result.each do |item|
|
3541
3523
|
# # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob.
|
3542
|
-
# p
|
3524
|
+
# p item
|
3543
3525
|
# end
|
3544
3526
|
#
|
3545
3527
|
def list_evaluation_jobs request, options = nil
|
@@ -3622,9 +3604,9 @@ module Google
|
|
3622
3604
|
# * (`String`) The path to a service account key file in JSON format
|
3623
3605
|
# * (`Hash`) A service account key as a Hash
|
3624
3606
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
3625
|
-
# (see the [googleauth docs](https://
|
3607
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
3626
3608
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
3627
|
-
# (see the [signet docs](https://
|
3609
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
3628
3610
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
3629
3611
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
3630
3612
|
# * (`nil`) indicating no credentials
|
@@ -3666,7 +3648,9 @@ module Google
|
|
3666
3648
|
class Configuration
|
3667
3649
|
extend ::Gapic::Config
|
3668
3650
|
|
3669
|
-
|
3651
|
+
DEFAULT_ENDPOINT = "datalabeling.googleapis.com"
|
3652
|
+
|
3653
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
3670
3654
|
config_attr :credentials, nil do |value|
|
3671
3655
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
3672
3656
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -95,6 +95,9 @@ module Google
|
|
95
95
|
channel_args: @config.channel_args,
|
96
96
|
interceptors: @config.interceptors
|
97
97
|
)
|
98
|
+
|
99
|
+
# Used by an LRO wrapper for some methods of this service
|
100
|
+
@operations_client = self
|
98
101
|
end
|
99
102
|
|
100
103
|
# Service calls
|
@@ -155,13 +158,11 @@ module Google
|
|
155
158
|
# # Call the list_operations method.
|
156
159
|
# result = client.list_operations request
|
157
160
|
#
|
158
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
159
|
-
# #
|
160
|
-
#
|
161
|
-
# # methods are also available for managing paging directly.
|
162
|
-
# 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|
|
163
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
164
|
-
# p
|
165
|
+
# p item
|
165
166
|
# end
|
166
167
|
#
|
167
168
|
def list_operations request, options = nil
|
@@ -250,14 +251,14 @@ module Google
|
|
250
251
|
# # Call the get_operation method.
|
251
252
|
# result = client.get_operation request
|
252
253
|
#
|
253
|
-
# # The returned object is of type Gapic::Operation. You can use
|
254
|
-
# #
|
255
|
-
# #
|
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.
|
256
257
|
# result.wait_until_done! timeout: 60
|
257
258
|
# if result.response?
|
258
259
|
# p result.response
|
259
260
|
# else
|
260
|
-
# puts "
|
261
|
+
# puts "No response received."
|
261
262
|
# end
|
262
263
|
#
|
263
264
|
def get_operation request, options = nil
|
@@ -537,14 +538,14 @@ module Google
|
|
537
538
|
# # Call the wait_operation method.
|
538
539
|
# result = client.wait_operation request
|
539
540
|
#
|
540
|
-
# # The returned object is of type Gapic::Operation. You can use
|
541
|
-
# #
|
542
|
-
# #
|
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.
|
543
544
|
# result.wait_until_done! timeout: 60
|
544
545
|
# if result.response?
|
545
546
|
# p result.response
|
546
547
|
# else
|
547
|
-
# puts "
|
548
|
+
# puts "No response received."
|
548
549
|
# end
|
549
550
|
#
|
550
551
|
def wait_operation request, options = nil
|
@@ -619,9 +620,9 @@ module Google
|
|
619
620
|
# * (`String`) The path to a service account key file in JSON format
|
620
621
|
# * (`Hash`) A service account key as a Hash
|
621
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
622
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
623
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
624
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
625
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
626
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
627
628
|
# * (`nil`) indicating no credentials
|
@@ -663,7 +664,9 @@ module Google
|
|
663
664
|
class Configuration
|
664
665
|
extend ::Gapic::Config
|
665
666
|
|
666
|
-
|
667
|
+
DEFAULT_ENDPOINT = "datalabeling.googleapis.com"
|
668
|
+
|
669
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
667
670
|
config_attr :credentials, nil do |value|
|
668
671
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
669
672
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -34,7 +34,7 @@ module Google
|
|
34
34
|
##
|
35
35
|
# Service for the AI Platform Data Labeling API.
|
36
36
|
#
|
37
|
-
#
|
37
|
+
# @example Load this service and instantiate a gRPC client
|
38
38
|
#
|
39
39
|
# require "google/cloud/data_labeling/v1beta1/data_labeling_service"
|
40
40
|
# client = ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
|
@@ -23,7 +23,9 @@ module Google
|
|
23
23
|
module Cloud
|
24
24
|
module DataLabeling
|
25
25
|
##
|
26
|
-
#
|
26
|
+
# API client module.
|
27
|
+
#
|
28
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
27
29
|
#
|
28
30
|
# require "google/cloud/data_labeling/v1beta1"
|
29
31
|
# client = ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
|