google-cloud-data_labeling-v1beta1 0.4.0 → 0.5.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: 04ab9a77647935f2932de4d9c485b939a494ce337466a008833f8147858669ec
4
- data.tar.gz: 603b507cb5a3ac6940e36bf74613f11f383db0d3ad2abfdc81f416262bc6b6db
3
+ metadata.gz: b6920a0f3268c7bdd43770aaea8770d34b6eebeafc2e6df3f119ac494d72c1bb
4
+ data.tar.gz: 03a7de11fa2a4858921e0b3364384d701a96fd15c056140b6caaac5c6ab5b230
5
5
  SHA512:
6
- metadata.gz: 5a57f7697827dc22a27af58615700bb635e6c7c9deb6ae07a80506de41b391e5948fa6f14d08966ba459ca6e3159fc9ac8f2b90c283e559056e398091908da0b
7
- data.tar.gz: 9278a5768c1fc4504ee8428073ff05f873d2972754b316a16b07f781a313aa8e847bb17b204ea5d2cb39451a4e084d094a40dc558ee111d96d5e724e67b74b81
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 Client library for the AI Platform Data Labeling Service V1beta1 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
 
@@ -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/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
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
 
@@ -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 == Client.configure.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
- # # iterate over all elements by calling #each, and the enumerable
518
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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 this
705
- # # object to check the status of an operation, cancel it, or wait
706
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
812
- # # object to check the status of an operation, cancel it, or wait
813
- # # for results. Here is how to block until completion:
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 "Error!"
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
- # # iterate over all elements by calling #each, and the enumerable
1006
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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
- # # iterate over all elements by calling #each, and the enumerable
1197
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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 this
1397
- # # object to check the status of an operation, cancel it, or wait
1398
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
1512
- # # object to check the status of an operation, cancel it, or wait
1513
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
1619
- # # object to check the status of an operation, cancel it, or wait
1620
- # # for results. Here is how to block until completion:
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 "Error!"
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
- # # iterate over all elements by calling #each, and the enumerable
1818
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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
- # # iterate over all elements by calling #each, and the enumerable
2098
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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 this
2278
- # # object to check the status of an operation, cancel it, or wait
2279
- # # for results. Here is how to block until completion:
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 "Error!"
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
- # # iterate over all elements by calling #each, and the enumerable
2470
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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
- # # iterate over all elements by calling #each, and the enumerable
2780
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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
- # # iterate over all elements by calling #each, and the enumerable
2888
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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
- # # iterate over all elements by calling #each, and the enumerable
3538
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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://googleapis.dev/ruby/googleauth/latest/index.html))
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://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
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
- config_attr :endpoint, "datalabeling.googleapis.com", ::String
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
@@ -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
@@ -622,9 +620,9 @@ module Google
622
620
  # * (`String`) The path to a service account key file in JSON format
623
621
  # * (`Hash`) A service account key as a Hash
624
622
  # * (`Google::Auth::Credentials`) A googleauth credentials object
625
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
623
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
626
624
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
627
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
625
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
628
626
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
629
627
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
630
628
  # * (`nil`) indicating no credentials
@@ -666,7 +664,9 @@ module Google
666
664
  class Configuration
667
665
  extend ::Gapic::Config
668
666
 
669
- config_attr :endpoint, "datalabeling.googleapis.com", ::String
667
+ DEFAULT_ENDPOINT = "datalabeling.googleapis.com"
668
+
669
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
670
670
  config_attr :credentials, nil do |value|
671
671
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
672
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
- # To load this service and instantiate a client:
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
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module DataLabeling
23
23
  module V1beta1
24
- VERSION = "0.4.0"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -23,9 +23,9 @@ module Google
23
23
  module Cloud
24
24
  module DataLabeling
25
25
  ##
26
- # To load this package, including all its services, and instantiate a client:
26
+ # API client module.
27
27
  #
28
- # @example
28
+ # @example Load this package, including all its services, and instantiate a gRPC client
29
29
  #
30
30
  # require "google/cloud/data_labeling/v1beta1"
31
31
  # client = ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new