google-cloud-automl-v1 0.6.0 → 0.7.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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/automl/v1/annotation_payload_pb.rb +29 -12
  4. data/lib/google/cloud/automl/v1/annotation_spec_pb.rb +24 -6
  5. data/lib/google/cloud/automl/v1/automl/client.rb +6 -4
  6. data/lib/google/cloud/automl/v1/automl/operations.rb +5 -3
  7. data/lib/google/cloud/automl/v1/automl/rest/client.rb +6 -4
  8. data/lib/google/cloud/automl/v1/automl/rest/operations.rb +10 -8
  9. data/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +18 -18
  10. data/lib/google/cloud/automl/v1/classification_pb.rb +24 -41
  11. data/lib/google/cloud/automl/v1/data_items_pb.rb +27 -55
  12. data/lib/google/cloud/automl/v1/dataset_pb.rb +28 -18
  13. data/lib/google/cloud/automl/v1/detection_pb.rb +25 -21
  14. data/lib/google/cloud/automl/v1/geometry_pb.rb +24 -8
  15. data/lib/google/cloud/automl/v1/image_pb.rb +24 -29
  16. data/lib/google/cloud/automl/v1/io_pb.rb +24 -38
  17. data/lib/google/cloud/automl/v1/model_evaluation_pb.rb +30 -15
  18. data/lib/google/cloud/automl/v1/model_pb.rb +28 -24
  19. data/lib/google/cloud/automl/v1/operations_pb.rb +27 -53
  20. data/lib/google/cloud/automl/v1/prediction_service/client.rb +6 -4
  21. data/lib/google/cloud/automl/v1/prediction_service/operations.rb +5 -3
  22. data/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +6 -4
  23. data/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +10 -8
  24. data/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb +2 -2
  25. data/lib/google/cloud/automl/v1/prediction_service_pb.rb +27 -20
  26. data/lib/google/cloud/automl/v1/service_pb.rb +30 -87
  27. data/lib/google/cloud/automl/v1/text_extraction_pb.rb +25 -17
  28. data/lib/google/cloud/automl/v1/text_pb.rb +24 -16
  29. data/lib/google/cloud/automl/v1/text_segment_pb.rb +24 -6
  30. data/lib/google/cloud/automl/v1/text_sentiment_pb.rb +25 -14
  31. data/lib/google/cloud/automl/v1/translation_pb.rb +25 -17
  32. data/lib/google/cloud/automl/v1/version.rb +1 -1
  33. data/proto_docs/google/api/client.rb +67 -4
  34. data/proto_docs/google/protobuf/any.rb +7 -4
  35. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  36. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2131e63e66e105f271d1a0a1cdf12a31903c28a412e89e79a54fe056424ebd9
4
- data.tar.gz: 5d806a357a92ed7b5371072d514a8b9d20e0bd568c8683f9ac3942b7f6661e2a
3
+ metadata.gz: cf5030a105926090fc9d2ab81b216b49549caf87e2ef852fdbfae53a6cb479ea
4
+ data.tar.gz: 20e81812e94f3335307dd1bc2944ae2ffb9cb9985076b3cc1c5c18b845665d32
5
5
  SHA512:
6
- metadata.gz: e2d5a8030cb6b934caa71b17490592b09966722e9221c68e083a1dfff8ead5cdc921e924eb082a631e8aa4d92938a9eafe28c0cc388fb8573816398fbf0c586d
7
- data.tar.gz: 848b0c7a9f8ea335e30e8c6b89745cb673d2a02d3af6bbbc247ed0477f2f2a1239e3289f2cd80cd77cc67dcb957e8efe5ad8ec0dcdf67c693affbfef5474a468
6
+ metadata.gz: 1845dd8a4dcf1c1476af124cd96058ddd29627f3623f5f9953721c09fad18b633152bab27631c69fbe5916eca5f5d3a06b26acb2566c9e2f4d28a1ca710d2823
7
+ data.tar.gz: '0079a98743ec976ff489e46ea48d169b568baeba6302c22f6794d3946c44e5924615a1662632ef93f28f2dec24bc386a4f0cc31fb0400e374b2f465b271bb524'
data/README.md CHANGED
@@ -47,7 +47,7 @@ for general usage information.
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
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://googleapis.dev/ruby/google-cloud-logging/latest)
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
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/automl/v1/annotation_payload.proto
3
4
 
@@ -9,20 +10,36 @@ require 'google/cloud/automl/v1/text_extraction_pb'
9
10
  require 'google/cloud/automl/v1/text_sentiment_pb'
10
11
  require 'google/cloud/automl/v1/translation_pb'
11
12
 
12
- Google::Protobuf::DescriptorPool.generated_pool.build do
13
- add_file("google/cloud/automl/v1/annotation_payload.proto", :syntax => :proto3) do
14
- add_message "google.cloud.automl.v1.AnnotationPayload" do
15
- optional :annotation_spec_id, :string, 1
16
- optional :display_name, :string, 5
17
- oneof :detail do
18
- optional :translation, :message, 2, "google.cloud.automl.v1.TranslationAnnotation"
19
- optional :classification, :message, 3, "google.cloud.automl.v1.ClassificationAnnotation"
20
- optional :image_object_detection, :message, 4, "google.cloud.automl.v1.ImageObjectDetectionAnnotation"
21
- optional :text_extraction, :message, 6, "google.cloud.automl.v1.TextExtractionAnnotation"
22
- optional :text_sentiment, :message, 7, "google.cloud.automl.v1.TextSentimentAnnotation"
23
- end
13
+
14
+ descriptor_data = "\n/google/cloud/automl/v1/annotation_payload.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\x1a&google/cloud/automl/v1/detection.proto\x1a,google/cloud/automl/v1/text_extraction.proto\x1a+google/cloud/automl/v1/text_sentiment.proto\x1a(google/cloud/automl/v1/translation.proto\"\xd3\x03\n\x11\x41nnotationPayload\x12\x44\n\x0btranslation\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1.TranslationAnnotationH\x00\x12J\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x30.google.cloud.automl.v1.ClassificationAnnotationH\x00\x12X\n\x16image_object_detection\x18\x04 \x01(\x0b\x32\x36.google.cloud.automl.v1.ImageObjectDetectionAnnotationH\x00\x12K\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x30.google.cloud.automl.v1.TextExtractionAnnotationH\x00\x12I\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32/.google.cloud.automl.v1.TextSentimentAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3"
15
+
16
+ pool = Google::Protobuf::DescriptorPool.generated_pool
17
+
18
+ begin
19
+ pool.add_serialized_file(descriptor_data)
20
+ rescue TypeError => e
21
+ # Compatibility code: will be removed in the next major version.
22
+ require 'google/protobuf/descriptor_pb'
23
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
24
+ parsed.clear_dependency
25
+ serialized = parsed.class.encode(parsed)
26
+ file = pool.add_serialized_file(serialized)
27
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
28
+ imports = [
29
+ ["google.cloud.automl.v1.TranslationAnnotation", "google/cloud/automl/v1/translation.proto"],
30
+ ["google.cloud.automl.v1.ClassificationAnnotation", "google/cloud/automl/v1/classification.proto"],
31
+ ["google.cloud.automl.v1.ImageObjectDetectionAnnotation", "google/cloud/automl/v1/detection.proto"],
32
+ ["google.cloud.automl.v1.TextExtractionAnnotation", "google/cloud/automl/v1/text_extraction.proto"],
33
+ ["google.cloud.automl.v1.TextSentimentAnnotation", "google/cloud/automl/v1/text_sentiment.proto"],
34
+ ]
35
+ imports.each do |type_name, expected_filename|
36
+ import_file = pool.lookup(type_name).file_descriptor
37
+ if import_file.name != expected_filename
38
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
24
39
  end
25
40
  end
41
+ warn "Each proto file must use a consistent fully-qualified name."
42
+ warn "This will become an error in the next major version."
26
43
  end
27
44
 
28
45
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/automl/v1/annotation_spec.proto
3
4
 
@@ -5,14 +6,31 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/api/resource_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/cloud/automl/v1/annotation_spec.proto", :syntax => :proto3) do
10
- add_message "google.cloud.automl.v1.AnnotationSpec" do
11
- optional :name, :string, 1
12
- optional :display_name, :string, 2
13
- optional :example_count, :int32, 9
9
+
10
+ descriptor_data = "\n,google/cloud/automl/v1/annotation_spec.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ]
26
+ imports.each do |type_name, expected_filename|
27
+ import_file = pool.lookup(type_name).file_descriptor
28
+ if import_file.name != expected_filename
29
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
14
30
  end
15
31
  end
32
+ warn "Each proto file must use a consistent fully-qualified name."
33
+ warn "This will become an error in the next major version."
16
34
  end
17
35
 
18
36
  module Google
@@ -199,7 +199,7 @@ module Google
199
199
  credentials = @config.credentials
200
200
  # Use self-signed JWT if the endpoint is unchanged from default,
201
201
  # but only if the default endpoint does not have a region prefix.
202
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
202
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
203
203
  !@config.endpoint.split(".").first.include?("-")
204
204
  credentials ||= Credentials.default scope: @config.scope,
205
205
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -2006,9 +2006,9 @@ module Google
2006
2006
  # * (`String`) The path to a service account key file in JSON format
2007
2007
  # * (`Hash`) A service account key as a Hash
2008
2008
  # * (`Google::Auth::Credentials`) A googleauth credentials object
2009
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
2009
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2010
2010
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2011
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
2011
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2012
2012
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2013
2013
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2014
2014
  # * (`nil`) indicating no credentials
@@ -2050,7 +2050,9 @@ module Google
2050
2050
  class Configuration
2051
2051
  extend ::Gapic::Config
2052
2052
 
2053
- config_attr :endpoint, "automl.googleapis.com", ::String
2053
+ DEFAULT_ENDPOINT = "automl.googleapis.com"
2054
+
2055
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2054
2056
  config_attr :credentials, nil do |value|
2055
2057
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2056
2058
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -628,9 +628,9 @@ module Google
628
628
  # * (`String`) The path to a service account key file in JSON format
629
629
  # * (`Hash`) A service account key as a Hash
630
630
  # * (`Google::Auth::Credentials`) A googleauth credentials object
631
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
631
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
632
632
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
633
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
633
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
634
634
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
635
635
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
636
636
  # * (`nil`) indicating no credentials
@@ -672,7 +672,9 @@ module Google
672
672
  class Configuration
673
673
  extend ::Gapic::Config
674
674
 
675
- config_attr :endpoint, "automl.googleapis.com", ::String
675
+ DEFAULT_ENDPOINT = "automl.googleapis.com"
676
+
677
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
676
678
  config_attr :credentials, nil do |value|
677
679
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
678
680
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -195,7 +195,7 @@ module Google
195
195
  credentials = @config.credentials
196
196
  # Use self-signed JWT if the endpoint is unchanged from default,
197
197
  # but only if the default endpoint does not have a region prefix.
198
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
198
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
199
199
  !@config.endpoint.split(".").first.include?("-")
200
200
  credentials ||= Credentials.default scope: @config.scope,
201
201
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -1508,9 +1508,9 @@ module Google
1508
1508
  # * (`String`) The path to a service account key file in JSON format
1509
1509
  # * (`Hash`) A service account key as a Hash
1510
1510
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1511
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1511
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1512
1512
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1513
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1513
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1514
1514
  # * (`nil`) indicating no credentials
1515
1515
  # @return [::Object]
1516
1516
  # @!attribute [rw] scope
@@ -1543,7 +1543,9 @@ module Google
1543
1543
  class Configuration
1544
1544
  extend ::Gapic::Config
1545
1545
 
1546
- config_attr :endpoint, "automl.googleapis.com", ::String
1546
+ DEFAULT_ENDPOINT = "automl.googleapis.com"
1547
+
1548
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1547
1549
  config_attr :credentials, nil do |value|
1548
1550
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1549
1551
  allowed.any? { |klass| klass === value }
@@ -486,9 +486,9 @@ module Google
486
486
  # * (`String`) The path to a service account key file in JSON format
487
487
  # * (`Hash`) A service account key as a Hash
488
488
  # * (`Google::Auth::Credentials`) A googleauth credentials object
489
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
489
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
490
490
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
491
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
491
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
492
492
  # * (`nil`) indicating no credentials
493
493
  # @return [::Object]
494
494
  # @!attribute [rw] scope
@@ -521,7 +521,9 @@ module Google
521
521
  class Configuration
522
522
  extend ::Gapic::Config
523
523
 
524
- config_attr :endpoint, "automl.googleapis.com", ::String
524
+ DEFAULT_ENDPOINT = "automl.googleapis.com"
525
+
526
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
525
527
  config_attr :credentials, nil do |value|
526
528
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
527
529
  allowed.any? { |klass| klass === value }
@@ -649,7 +651,7 @@ module Google
649
651
 
650
652
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
651
653
  query_string_params = if query_string_params.any?
652
- query_string_params.to_h { |p| p.split("=", 2) }
654
+ query_string_params.to_h { |p| p.split "=", 2 }
653
655
  else
654
656
  {}
655
657
  end
@@ -687,7 +689,7 @@ module Google
687
689
 
688
690
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
689
691
  query_string_params = if query_string_params.any?
690
- query_string_params.to_h { |p| p.split("=", 2) }
692
+ query_string_params.to_h { |p| p.split "=", 2 }
691
693
  else
692
694
  {}
693
695
  end
@@ -725,7 +727,7 @@ module Google
725
727
 
726
728
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
727
729
  query_string_params = if query_string_params.any?
728
- query_string_params.to_h { |p| p.split("=", 2) }
730
+ query_string_params.to_h { |p| p.split "=", 2 }
729
731
  else
730
732
  {}
731
733
  end
@@ -763,7 +765,7 @@ module Google
763
765
 
764
766
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
765
767
  query_string_params = if query_string_params.any?
766
- query_string_params.to_h { |p| p.split("=", 2) }
768
+ query_string_params.to_h { |p| p.split "=", 2 }
767
769
  else
768
770
  {}
769
771
  end
@@ -801,7 +803,7 @@ module Google
801
803
 
802
804
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb
803
805
  query_string_params = if query_string_params.any?
804
- query_string_params.to_h { |p| p.split("=", 2) }
806
+ query_string_params.to_h { |p| p.split "=", 2 }
805
807
  else
806
808
  {}
807
809
  end
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -249,7 +249,7 @@ module Google
249
249
 
250
250
  verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb
251
251
  query_string_params = if query_string_params.any?
252
- query_string_params.to_h { |p| p.split("=", 2) }
252
+ query_string_params.to_h { |p| p.split "=", 2 }
253
253
  else
254
254
  {}
255
255
  end
@@ -287,7 +287,7 @@ module Google
287
287
 
288
288
  verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb
289
289
  query_string_params = if query_string_params.any?
290
- query_string_params.to_h { |p| p.split("=", 2) }
290
+ query_string_params.to_h { |p| p.split "=", 2 }
291
291
  else
292
292
  {}
293
293
  end
@@ -325,7 +325,7 @@ module Google
325
325
 
326
326
  verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_spec_request request_pb
327
327
  query_string_params = if query_string_params.any?
328
- query_string_params.to_h { |p| p.split("=", 2) }
328
+ query_string_params.to_h { |p| p.split "=", 2 }
329
329
  else
330
330
  {}
331
331
  end
@@ -363,7 +363,7 @@ module Google
363
363
 
364
364
  verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb
365
365
  query_string_params = if query_string_params.any?
366
- query_string_params.to_h { |p| p.split("=", 2) }
366
+ query_string_params.to_h { |p| p.split "=", 2 }
367
367
  else
368
368
  {}
369
369
  end
@@ -401,7 +401,7 @@ module Google
401
401
 
402
402
  verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb
403
403
  query_string_params = if query_string_params.any?
404
- query_string_params.to_h { |p| p.split("=", 2) }
404
+ query_string_params.to_h { |p| p.split "=", 2 }
405
405
  else
406
406
  {}
407
407
  end
@@ -439,7 +439,7 @@ module Google
439
439
 
440
440
  verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb
441
441
  query_string_params = if query_string_params.any?
442
- query_string_params.to_h { |p| p.split("=", 2) }
442
+ query_string_params.to_h { |p| p.split "=", 2 }
443
443
  else
444
444
  {}
445
445
  end
@@ -477,7 +477,7 @@ module Google
477
477
 
478
478
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb
479
479
  query_string_params = if query_string_params.any?
480
- query_string_params.to_h { |p| p.split("=", 2) }
480
+ query_string_params.to_h { |p| p.split "=", 2 }
481
481
  else
482
482
  {}
483
483
  end
@@ -515,7 +515,7 @@ module Google
515
515
 
516
516
  verb, uri, query_string_params, body = ServiceStub.transcode_update_model_request request_pb
517
517
  query_string_params = if query_string_params.any?
518
- query_string_params.to_h { |p| p.split("=", 2) }
518
+ query_string_params.to_h { |p| p.split "=", 2 }
519
519
  else
520
520
  {}
521
521
  end
@@ -553,7 +553,7 @@ module Google
553
553
 
554
554
  verb, uri, query_string_params, body = ServiceStub.transcode_deploy_model_request request_pb
555
555
  query_string_params = if query_string_params.any?
556
- query_string_params.to_h { |p| p.split("=", 2) }
556
+ query_string_params.to_h { |p| p.split "=", 2 }
557
557
  else
558
558
  {}
559
559
  end
@@ -591,7 +591,7 @@ module Google
591
591
 
592
592
  verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_model_request request_pb
593
593
  query_string_params = if query_string_params.any?
594
- query_string_params.to_h { |p| p.split("=", 2) }
594
+ query_string_params.to_h { |p| p.split "=", 2 }
595
595
  else
596
596
  {}
597
597
  end
@@ -629,7 +629,7 @@ module Google
629
629
 
630
630
  verb, uri, query_string_params, body = ServiceStub.transcode_export_model_request request_pb
631
631
  query_string_params = if query_string_params.any?
632
- query_string_params.to_h { |p| p.split("=", 2) }
632
+ query_string_params.to_h { |p| p.split "=", 2 }
633
633
  else
634
634
  {}
635
635
  end
@@ -667,7 +667,7 @@ module Google
667
667
 
668
668
  verb, uri, query_string_params, body = ServiceStub.transcode_get_model_evaluation_request request_pb
669
669
  query_string_params = if query_string_params.any?
670
- query_string_params.to_h { |p| p.split("=", 2) }
670
+ query_string_params.to_h { |p| p.split "=", 2 }
671
671
  else
672
672
  {}
673
673
  end
@@ -705,7 +705,7 @@ module Google
705
705
 
706
706
  verb, uri, query_string_params, body = ServiceStub.transcode_list_model_evaluations_request request_pb
707
707
  query_string_params = if query_string_params.any?
708
- query_string_params.to_h { |p| p.split("=", 2) }
708
+ query_string_params.to_h { |p| p.split "=", 2 }
709
709
  else
710
710
  {}
711
711
  end
@@ -1,51 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/automl/v1/classification.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/cloud/automl/v1/classification.proto", :syntax => :proto3) do
8
- add_message "google.cloud.automl.v1.ClassificationAnnotation" do
9
- optional :score, :float, 1
10
- end
11
- add_message "google.cloud.automl.v1.ClassificationEvaluationMetrics" do
12
- optional :au_prc, :float, 1
13
- optional :au_roc, :float, 6
14
- optional :log_loss, :float, 7
15
- repeated :confidence_metrics_entry, :message, 3, "google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry"
16
- optional :confusion_matrix, :message, 4, "google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix"
17
- repeated :annotation_spec_id, :string, 5
18
- end
19
- add_message "google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry" do
20
- optional :confidence_threshold, :float, 1
21
- optional :position_threshold, :int32, 14
22
- optional :recall, :float, 2
23
- optional :precision, :float, 3
24
- optional :false_positive_rate, :float, 8
25
- optional :f1_score, :float, 4
26
- optional :recall_at1, :float, 5
27
- optional :precision_at1, :float, 6
28
- optional :false_positive_rate_at1, :float, 9
29
- optional :f1_score_at1, :float, 7
30
- optional :true_positive_count, :int64, 10
31
- optional :false_positive_count, :int64, 11
32
- optional :false_negative_count, :int64, 12
33
- optional :true_negative_count, :int64, 13
34
- end
35
- add_message "google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix" do
36
- repeated :annotation_spec_id, :string, 1
37
- repeated :display_name, :string, 3
38
- repeated :row, :message, 2, "google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row"
39
- end
40
- add_message "google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row" do
41
- repeated :example_count, :int32, 1
42
- end
43
- add_enum "google.cloud.automl.v1.ClassificationType" do
44
- value :CLASSIFICATION_TYPE_UNSPECIFIED, 0
45
- value :MULTICLASS, 1
46
- value :MULTILABEL, 2
7
+
8
+ descriptor_data = "\n+google/cloud/automl/v1/classification.proto\x12\x16google.cloud.automl.v1\")\n\x18\x43lassificationAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\"\x81\x07\n\x1f\x43lassificationEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12\x0e\n\x06\x61u_roc\x18\x06 \x01(\x02\x12\x10\n\x08log_loss\x18\x07 \x01(\x02\x12p\n\x18\x63onfidence_metrics_entry\x18\x03 \x03(\x0b\x32N.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry\x12\x61\n\x10\x63onfusion_matrix\x18\x04 \x01(\x0b\x32G.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x05 \x03(\t\x1a\xfc\x02\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x1a\n\x12position_threshold\x18\x0e \x01(\x05\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x1b\n\x13\x66\x61lse_positive_rate\x18\x08 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\x12\x12\n\nrecall_at1\x18\x05 \x01(\x02\x12\x15\n\rprecision_at1\x18\x06 \x01(\x02\x12\x1f\n\x17\x66\x61lse_positive_rate_at1\x18\t \x01(\x02\x12\x14\n\x0c\x66\x31_score_at1\x18\x07 \x01(\x02\x12\x1b\n\x13true_positive_count\x18\n \x01(\x03\x12\x1c\n\x14\x66\x61lse_positive_count\x18\x0b \x01(\x03\x12\x1c\n\x14\x66\x61lse_negative_count\x18\x0c \x01(\x03\x12\x1b\n\x13true_negative_count\x18\r \x01(\x03\x1a\xbb\x01\n\x0f\x43onfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x03(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x03(\t\x12X\n\x03row\x18\x02 \x03(\x0b\x32K.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row\x1a\x1c\n\x03Row\x12\x15\n\rexample_count\x18\x01 \x03(\x05*Y\n\x12\x43lassificationType\x12#\n\x1f\x43LASSIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTICLASS\x10\x01\x12\x0e\n\nMULTILABEL\x10\x02\x42\xb5\x01\n\x1a\x63om.google.cloud.automl.v1B\x13\x43lassificationProtoP\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
47
28
  end
48
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
49
32
  end
50
33
 
51
34
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/automl/v1/data_items.proto
3
4
 
@@ -7,63 +8,34 @@ require 'google/cloud/automl/v1/geometry_pb'
7
8
  require 'google/cloud/automl/v1/io_pb'
8
9
  require 'google/cloud/automl/v1/text_segment_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("google/cloud/automl/v1/data_items.proto", :syntax => :proto3) do
12
- add_message "google.cloud.automl.v1.Image" do
13
- optional :thumbnail_uri, :string, 4
14
- oneof :data do
15
- optional :image_bytes, :bytes, 1
16
- end
17
- end
18
- add_message "google.cloud.automl.v1.TextSnippet" do
19
- optional :content, :string, 1
20
- optional :mime_type, :string, 2
21
- optional :content_uri, :string, 4
22
- end
23
- add_message "google.cloud.automl.v1.DocumentDimensions" do
24
- optional :unit, :enum, 1, "google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit"
25
- optional :width, :float, 2
26
- optional :height, :float, 3
27
- end
28
- add_enum "google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit" do
29
- value :DOCUMENT_DIMENSION_UNIT_UNSPECIFIED, 0
30
- value :INCH, 1
31
- value :CENTIMETER, 2
32
- value :POINT, 3
33
- end
34
- add_message "google.cloud.automl.v1.Document" do
35
- optional :input_config, :message, 1, "google.cloud.automl.v1.DocumentInputConfig"
36
- optional :document_text, :message, 2, "google.cloud.automl.v1.TextSnippet"
37
- repeated :layout, :message, 3, "google.cloud.automl.v1.Document.Layout"
38
- optional :document_dimensions, :message, 4, "google.cloud.automl.v1.DocumentDimensions"
39
- optional :page_count, :int32, 5
40
- end
41
- add_message "google.cloud.automl.v1.Document.Layout" do
42
- optional :text_segment, :message, 1, "google.cloud.automl.v1.TextSegment"
43
- optional :page_number, :int32, 2
44
- optional :bounding_poly, :message, 3, "google.cloud.automl.v1.BoundingPoly"
45
- optional :text_segment_type, :enum, 4, "google.cloud.automl.v1.Document.Layout.TextSegmentType"
46
- end
47
- add_enum "google.cloud.automl.v1.Document.Layout.TextSegmentType" do
48
- value :TEXT_SEGMENT_TYPE_UNSPECIFIED, 0
49
- value :TOKEN, 1
50
- value :PARAGRAPH, 2
51
- value :FORM_FIELD, 3
52
- value :FORM_FIELD_NAME, 4
53
- value :FORM_FIELD_CONTENTS, 5
54
- value :TABLE, 6
55
- value :TABLE_HEADER, 7
56
- value :TABLE_ROW, 8
57
- value :TABLE_CELL, 9
58
- end
59
- add_message "google.cloud.automl.v1.ExamplePayload" do
60
- oneof :payload do
61
- optional :image, :message, 1, "google.cloud.automl.v1.Image"
62
- optional :text_snippet, :message, 2, "google.cloud.automl.v1.TextSnippet"
63
- optional :document, :message, 4, "google.cloud.automl.v1.Document"
64
- end
11
+
12
+ descriptor_data = "\n\'google/cloud/automl/v1/data_items.proto\x12\x16google.cloud.automl.v1\x1a%google/cloud/automl/v1/geometry.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a)google/cloud/automl/v1/text_segment.proto\"=\n\x05Image\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\x0cH\x00\x12\x15\n\rthumbnail_uri\x18\x04 \x01(\tB\x06\n\x04\x64\x61ta\"F\n\x0bTextSnippet\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x13\n\x0b\x63ontent_uri\x18\x04 \x01(\t\"\xea\x01\n\x12\x44ocumentDimensions\x12N\n\x04unit\x18\x01 \x01(\x0e\x32@.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit\x12\r\n\x05width\x18\x02 \x01(\x02\x12\x0e\n\x06height\x18\x03 \x01(\x02\"e\n\x15\x44ocumentDimensionUnit\x12\'\n#DOCUMENT_DIMENSION_UNIT_UNSPECIFIED\x10\x00\x12\x08\n\x04INCH\x10\x01\x12\x0e\n\nCENTIMETER\x10\x02\x12\t\n\x05POINT\x10\x03\"\xd6\x05\n\x08\x44ocument\x12\x41\n\x0cinput_config\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1.DocumentInputConfig\x12:\n\rdocument_text\x18\x02 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippet\x12\x37\n\x06layout\x18\x03 \x03(\x0b\x32\'.google.cloud.automl.v1.Document.Layout\x12G\n\x13\x64ocument_dimensions\x18\x04 \x01(\x0b\x32*.google.cloud.automl.v1.DocumentDimensions\x12\x12\n\npage_count\x18\x05 \x01(\x05\x1a\xb4\x03\n\x06Layout\x12\x39\n\x0ctext_segment\x18\x01 \x01(\x0b\x32#.google.cloud.automl.v1.TextSegment\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\x12;\n\rbounding_poly\x18\x03 \x01(\x0b\x32$.google.cloud.automl.v1.BoundingPoly\x12R\n\x11text_segment_type\x18\x04 \x01(\x0e\x32\x37.google.cloud.automl.v1.Document.Layout.TextSegmentType\"\xc8\x01\n\x0fTextSegmentType\x12!\n\x1dTEXT_SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TOKEN\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x0e\n\nFORM_FIELD\x10\x03\x12\x13\n\x0f\x46ORM_FIELD_NAME\x10\x04\x12\x17\n\x13\x46ORM_FIELD_CONTENTS\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x10\n\x0cTABLE_HEADER\x10\x07\x12\r\n\tTABLE_ROW\x10\x08\x12\x0e\n\nTABLE_CELL\x10\t\"\xbe\x01\n\x0e\x45xamplePayload\x12.\n\x05image\x18\x01 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ImageH\x00\x12;\n\x0ctext_snippet\x18\x02 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippetH\x00\x12\x34\n\x08\x64ocument\x18\x04 \x01(\x0b\x32 .google.cloud.automl.v1.DocumentH\x00\x42\t\n\x07payloadB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError => e
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["google.cloud.automl.v1.DocumentInputConfig", "google/cloud/automl/v1/io.proto"],
28
+ ["google.cloud.automl.v1.TextSegment", "google/cloud/automl/v1/text_segment.proto"],
29
+ ["google.cloud.automl.v1.BoundingPoly", "google/cloud/automl/v1/geometry.proto"],
30
+ ]
31
+ imports.each do |type_name, expected_filename|
32
+ import_file = pool.lookup(type_name).file_descriptor
33
+ if import_file.name != expected_filename
34
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
65
35
  end
66
36
  end
37
+ warn "Each proto file must use a consistent fully-qualified name."
38
+ warn "This will become an error in the next major version."
67
39
  end
68
40
 
69
41
  module Google