google-cloud-automl-v1 0.6.0 → 0.8.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/README.md +1 -1
- data/lib/google/cloud/automl/v1/annotation_payload_pb.rb +29 -12
- data/lib/google/cloud/automl/v1/annotation_spec_pb.rb +24 -6
- data/lib/google/cloud/automl/v1/automl/client.rb +16 -5
- data/lib/google/cloud/automl/v1/automl/operations.rb +15 -4
- data/lib/google/cloud/automl/v1/automl/rest/client.rb +369 -4
- data/lib/google/cloud/automl/v1/automl/rest/operations.rb +108 -8
- data/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +18 -18
- data/lib/google/cloud/automl/v1/classification_pb.rb +24 -41
- data/lib/google/cloud/automl/v1/data_items_pb.rb +27 -55
- data/lib/google/cloud/automl/v1/dataset_pb.rb +28 -18
- data/lib/google/cloud/automl/v1/detection_pb.rb +25 -21
- data/lib/google/cloud/automl/v1/geometry_pb.rb +24 -8
- data/lib/google/cloud/automl/v1/image_pb.rb +24 -29
- data/lib/google/cloud/automl/v1/io_pb.rb +24 -38
- data/lib/google/cloud/automl/v1/model_evaluation_pb.rb +30 -15
- data/lib/google/cloud/automl/v1/model_pb.rb +28 -24
- data/lib/google/cloud/automl/v1/operations_pb.rb +27 -53
- data/lib/google/cloud/automl/v1/prediction_service/client.rb +16 -5
- data/lib/google/cloud/automl/v1/prediction_service/operations.rb +15 -4
- data/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +45 -4
- data/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +108 -8
- data/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb +2 -2
- data/lib/google/cloud/automl/v1/prediction_service_pb.rb +27 -20
- data/lib/google/cloud/automl/v1/service_pb.rb +30 -87
- data/lib/google/cloud/automl/v1/text_extraction_pb.rb +25 -17
- data/lib/google/cloud/automl/v1/text_pb.rb +24 -16
- data/lib/google/cloud/automl/v1/text_segment_pb.rb +24 -6
- data/lib/google/cloud/automl/v1/text_sentiment_pb.rb +25 -14
- data/lib/google/cloud/automl/v1/translation_pb.rb +25 -17
- data/lib/google/cloud/automl/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +5 -5
@@ -136,6 +136,26 @@ module Google
|
|
136
136
|
# @return [::Gapic::Operation]
|
137
137
|
#
|
138
138
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
139
|
+
#
|
140
|
+
# @example Basic example
|
141
|
+
# require "google/longrunning"
|
142
|
+
#
|
143
|
+
# # Create a client object. The client can be reused for multiple calls.
|
144
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
145
|
+
#
|
146
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
147
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
148
|
+
#
|
149
|
+
# # Call the list_operations method.
|
150
|
+
# result = client.list_operations request
|
151
|
+
#
|
152
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
153
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
154
|
+
# result.each do |item|
|
155
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
156
|
+
# p item
|
157
|
+
# end
|
158
|
+
#
|
139
159
|
def list_operations request, options = nil
|
140
160
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
141
161
|
|
@@ -201,6 +221,29 @@ module Google
|
|
201
221
|
# @return [::Gapic::Operation]
|
202
222
|
#
|
203
223
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
224
|
+
#
|
225
|
+
# @example Basic example
|
226
|
+
# require "google/longrunning"
|
227
|
+
#
|
228
|
+
# # Create a client object. The client can be reused for multiple calls.
|
229
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
230
|
+
#
|
231
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
232
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
233
|
+
#
|
234
|
+
# # Call the get_operation method.
|
235
|
+
# result = client.get_operation request
|
236
|
+
#
|
237
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
238
|
+
# # check the status of an operation, cancel it, or wait for results.
|
239
|
+
# # Here is how to wait for a response.
|
240
|
+
# result.wait_until_done! timeout: 60
|
241
|
+
# if result.response?
|
242
|
+
# p result.response
|
243
|
+
# else
|
244
|
+
# puts "No response received."
|
245
|
+
# end
|
246
|
+
#
|
204
247
|
def get_operation request, options = nil
|
205
248
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
206
249
|
|
@@ -267,6 +310,22 @@ module Google
|
|
267
310
|
# @return [::Google::Protobuf::Empty]
|
268
311
|
#
|
269
312
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
313
|
+
#
|
314
|
+
# @example Basic example
|
315
|
+
# require "google/longrunning"
|
316
|
+
#
|
317
|
+
# # Create a client object. The client can be reused for multiple calls.
|
318
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
319
|
+
#
|
320
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
321
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
322
|
+
#
|
323
|
+
# # Call the delete_operation method.
|
324
|
+
# result = client.delete_operation request
|
325
|
+
#
|
326
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
327
|
+
# p result
|
328
|
+
#
|
270
329
|
def delete_operation request, options = nil
|
271
330
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
272
331
|
|
@@ -338,6 +397,22 @@ module Google
|
|
338
397
|
# @return [::Google::Protobuf::Empty]
|
339
398
|
#
|
340
399
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
400
|
+
#
|
401
|
+
# @example Basic example
|
402
|
+
# require "google/longrunning"
|
403
|
+
#
|
404
|
+
# # Create a client object. The client can be reused for multiple calls.
|
405
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
406
|
+
#
|
407
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
408
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
409
|
+
#
|
410
|
+
# # Call the cancel_operation method.
|
411
|
+
# result = client.cancel_operation request
|
412
|
+
#
|
413
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
414
|
+
# p result
|
415
|
+
#
|
341
416
|
def cancel_operation request, options = nil
|
342
417
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
343
418
|
|
@@ -412,6 +487,29 @@ module Google
|
|
412
487
|
# @return [::Gapic::Operation]
|
413
488
|
#
|
414
489
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
490
|
+
#
|
491
|
+
# @example Basic example
|
492
|
+
# require "google/longrunning"
|
493
|
+
#
|
494
|
+
# # Create a client object. The client can be reused for multiple calls.
|
495
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
496
|
+
#
|
497
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
498
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
499
|
+
#
|
500
|
+
# # Call the wait_operation method.
|
501
|
+
# result = client.wait_operation request
|
502
|
+
#
|
503
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
504
|
+
# # check the status of an operation, cancel it, or wait for results.
|
505
|
+
# # Here is how to wait for a response.
|
506
|
+
# result.wait_until_done! timeout: 60
|
507
|
+
# if result.response?
|
508
|
+
# p result.response
|
509
|
+
# else
|
510
|
+
# puts "No response received."
|
511
|
+
# end
|
512
|
+
#
|
415
513
|
def wait_operation request, options = nil
|
416
514
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
417
515
|
|
@@ -486,9 +584,9 @@ module Google
|
|
486
584
|
# * (`String`) The path to a service account key file in JSON format
|
487
585
|
# * (`Hash`) A service account key as a Hash
|
488
586
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
489
|
-
# (see the [googleauth docs](https://
|
587
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
490
588
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
491
|
-
# (see the [signet docs](https://
|
589
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
492
590
|
# * (`nil`) indicating no credentials
|
493
591
|
# @return [::Object]
|
494
592
|
# @!attribute [rw] scope
|
@@ -521,7 +619,9 @@ module Google
|
|
521
619
|
class Configuration
|
522
620
|
extend ::Gapic::Config
|
523
621
|
|
524
|
-
|
622
|
+
DEFAULT_ENDPOINT = "automl.googleapis.com"
|
623
|
+
|
624
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
525
625
|
config_attr :credentials, nil do |value|
|
526
626
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
527
627
|
allowed.any? { |klass| klass === value }
|
@@ -649,7 +749,7 @@ module Google
|
|
649
749
|
|
650
750
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
|
651
751
|
query_string_params = if query_string_params.any?
|
652
|
-
query_string_params.to_h { |p| p.split
|
752
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
653
753
|
else
|
654
754
|
{}
|
655
755
|
end
|
@@ -687,7 +787,7 @@ module Google
|
|
687
787
|
|
688
788
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
|
689
789
|
query_string_params = if query_string_params.any?
|
690
|
-
query_string_params.to_h { |p| p.split
|
790
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
691
791
|
else
|
692
792
|
{}
|
693
793
|
end
|
@@ -725,7 +825,7 @@ module Google
|
|
725
825
|
|
726
826
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
|
727
827
|
query_string_params = if query_string_params.any?
|
728
|
-
query_string_params.to_h { |p| p.split
|
828
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
729
829
|
else
|
730
830
|
{}
|
731
831
|
end
|
@@ -763,7 +863,7 @@ module Google
|
|
763
863
|
|
764
864
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
|
765
865
|
query_string_params = if query_string_params.any?
|
766
|
-
query_string_params.to_h { |p| p.split
|
866
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
767
867
|
else
|
768
868
|
{}
|
769
869
|
end
|
@@ -801,7 +901,7 @@ module Google
|
|
801
901
|
|
802
902
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb
|
803
903
|
query_string_params = if query_string_params.any?
|
804
|
-
query_string_params.to_h { |p| p.split
|
904
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
805
905
|
else
|
806
906
|
{}
|
807
907
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
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
|
@@ -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/dataset.proto
|
3
4
|
|
@@ -9,26 +10,35 @@ require 'google/cloud/automl/v1/text_pb'
|
|
9
10
|
require 'google/cloud/automl/v1/translation_pb'
|
10
11
|
require 'google/protobuf/timestamp_pb'
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
13
|
+
|
14
|
+
descriptor_data = "\n$google/cloud/automl/v1/dataset.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\x1a\"google/cloud/automl/v1/image.proto\x1a!google/cloud/automl/v1/text.proto\x1a(google/cloud/automl/v1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x07\n\x07\x44\x61taset\x12Z\n\x1ctranslation_dataset_metadata\x18\x17 \x01(\x0b\x32\x32.google.cloud.automl.v1.TranslationDatasetMetadataH\x00\x12k\n%image_classification_dataset_metadata\x18\x18 \x01(\x0b\x32:.google.cloud.automl.v1.ImageClassificationDatasetMetadataH\x00\x12i\n$text_classification_dataset_metadata\x18\x19 \x01(\x0b\x32\x39.google.cloud.automl.v1.TextClassificationDatasetMetadataH\x00\x12n\n\'image_object_detection_dataset_metadata\x18\x1a \x01(\x0b\x32;.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadataH\x00\x12\x61\n text_extraction_dataset_metadata\x18\x1c \x01(\x0b\x32\x35.google.cloud.automl.v1.TextExtractionDatasetMetadataH\x00\x12_\n\x1ftext_sentiment_dataset_metadata\x18\x1e \x01(\x0b\x32\x34.google.cloud.automl.v1.TextSentimentDatasetMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x15\n\rexample_count\x18\x15 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t\x12;\n\x06labels\x18\' \x03(\x0b\x32+.google.cloud.automl.v1.Dataset.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:^\xea\x41[\n\x1d\x61utoml.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}B\x12\n\x10\x64\x61taset_metadataB\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.TranslationDatasetMetadata", "google/cloud/automl/v1/translation.proto"],
|
30
|
+
["google.cloud.automl.v1.ImageClassificationDatasetMetadata", "google/cloud/automl/v1/image.proto"],
|
31
|
+
["google.cloud.automl.v1.TextClassificationDatasetMetadata", "google/cloud/automl/v1/text.proto"],
|
32
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
33
|
+
]
|
34
|
+
imports.each do |type_name, expected_filename|
|
35
|
+
import_file = pool.lookup(type_name).file_descriptor
|
36
|
+
if import_file.name != expected_filename
|
37
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
30
38
|
end
|
31
39
|
end
|
40
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
41
|
+
warn "This will become an error in the next major version."
|
32
42
|
end
|
33
43
|
|
34
44
|
module Google
|