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.
- 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 +6 -4
- data/lib/google/cloud/automl/v1/automl/operations.rb +5 -3
- data/lib/google/cloud/automl/v1/automl/rest/client.rb +6 -4
- data/lib/google/cloud/automl/v1/automl/rest/operations.rb +10 -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 +6 -4
- data/lib/google/cloud/automl/v1/prediction_service/operations.rb +5 -3
- data/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +6 -4
- data/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +10 -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/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +4 -4
@@ -126,7 +126,7 @@ module Google
|
|
126
126
|
credentials = @config.credentials
|
127
127
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
128
128
|
# but only if the default endpoint does not have a region prefix.
|
129
|
-
enable_self_signed_jwt = @config.endpoint ==
|
129
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
130
130
|
!@config.endpoint.split(".").first.include?("-")
|
131
131
|
credentials ||= Credentials.default scope: @config.scope,
|
132
132
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -490,9 +490,9 @@ module Google
|
|
490
490
|
# * (`String`) The path to a service account key file in JSON format
|
491
491
|
# * (`Hash`) A service account key as a Hash
|
492
492
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
493
|
-
# (see the [googleauth docs](https://
|
493
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
494
494
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
495
|
-
# (see the [signet docs](https://
|
495
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
496
496
|
# * (`nil`) indicating no credentials
|
497
497
|
# @return [::Object]
|
498
498
|
# @!attribute [rw] scope
|
@@ -525,7 +525,9 @@ module Google
|
|
525
525
|
class Configuration
|
526
526
|
extend ::Gapic::Config
|
527
527
|
|
528
|
-
|
528
|
+
DEFAULT_ENDPOINT = "automl.googleapis.com"
|
529
|
+
|
530
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
529
531
|
config_attr :credentials, nil do |value|
|
530
532
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
531
533
|
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://
|
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://
|
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
|
-
|
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
|
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
|
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
|
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
|
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
|
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_predict_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_batch_predict_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
|
@@ -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/prediction_service.proto
|
3
4
|
|
@@ -12,28 +13,34 @@ require 'google/cloud/automl/v1/data_items_pb'
|
|
12
13
|
require 'google/cloud/automl/v1/io_pb'
|
13
14
|
require 'google/longrunning/operations_pb'
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
16
|
+
|
17
|
+
descriptor_data = "\n/google/cloud/automl/v1/prediction_service.proto\x12\x16google.cloud.automl.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/automl/v1/annotation_payload.proto\x1a\'google/cloud/automl/v1/data_items.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a#google/longrunning/operations.proto\"\xf4\x01\n\x0ePredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12<\n\x07payload\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1.ExamplePayloadB\x03\xe0\x41\x02\x12\x42\n\x06params\x18\x03 \x03(\x0b\x32\x32.google.cloud.automl.v1.PredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8b\x02\n\x0fPredictResponse\x12:\n\x07payload\x18\x01 \x03(\x0b\x32).google.cloud.automl.v1.AnnotationPayload\x12\x42\n\x12preprocessed_input\x18\x03 \x01(\x0b\x32&.google.cloud.automl.v1.ExamplePayload\x12G\n\x08metadata\x18\x02 \x03(\x0b\x32\x35.google.cloud.automl.v1.PredictResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xda\x02\n\x13\x42\x61tchPredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12J\n\x0cinput_config\x18\x03 \x01(\x0b\x32/.google.cloud.automl.v1.BatchPredictInputConfigB\x03\xe0\x41\x02\x12L\n\routput_config\x18\x04 \x01(\x0b\x32\x30.google.cloud.automl.v1.BatchPredictOutputConfigB\x03\xe0\x41\x02\x12G\n\x06params\x18\x05 \x03(\x0b\x32\x37.google.cloud.automl.v1.BatchPredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x91\x01\n\x12\x42\x61tchPredictResult\x12J\n\x08metadata\x18\x01 \x03(\x0b\x32\x38.google.cloud.automl.v1.BatchPredictResult.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\x85\x04\n\x11PredictionService\x12\xaf\x01\n\x07Predict\x12&.google.cloud.automl.v1.PredictRequest\x1a\'.google.cloud.automl.v1.PredictResponse\"S\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/models/*}:predict:\x01*\xda\x41\x13name,payload,params\x12\xf2\x01\n\x0c\x42\x61tchPredict\x12+.google.cloud.automl.v1.BatchPredictRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/models/*}:batchPredict:\x01*\xda\x41&name,input_config,output_config,params\xca\x41\'\n\x12\x42\x61tchPredictResult\x12\x11OperationMetadata\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x01\n\x1a\x63om.google.cloud.automl.v1B\x16PredictionServiceProtoP\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"
|
18
|
+
|
19
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
20
|
+
|
21
|
+
begin
|
22
|
+
pool.add_serialized_file(descriptor_data)
|
23
|
+
rescue TypeError => e
|
24
|
+
# Compatibility code: will be removed in the next major version.
|
25
|
+
require 'google/protobuf/descriptor_pb'
|
26
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
27
|
+
parsed.clear_dependency
|
28
|
+
serialized = parsed.class.encode(parsed)
|
29
|
+
file = pool.add_serialized_file(serialized)
|
30
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
31
|
+
imports = [
|
32
|
+
["google.cloud.automl.v1.ExamplePayload", "google/cloud/automl/v1/data_items.proto"],
|
33
|
+
["google.cloud.automl.v1.AnnotationPayload", "google/cloud/automl/v1/annotation_payload.proto"],
|
34
|
+
["google.cloud.automl.v1.BatchPredictInputConfig", "google/cloud/automl/v1/io.proto"],
|
35
|
+
]
|
36
|
+
imports.each do |type_name, expected_filename|
|
37
|
+
import_file = pool.lookup(type_name).file_descriptor
|
38
|
+
if import_file.name != expected_filename
|
39
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
35
40
|
end
|
36
41
|
end
|
42
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
43
|
+
warn "This will become an error in the next major version."
|
37
44
|
end
|
38
45
|
|
39
46
|
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/service.proto
|
3
4
|
|
@@ -17,95 +18,37 @@ require 'google/cloud/automl/v1/model_evaluation_pb'
|
|
17
18
|
require 'google/longrunning/operations_pb'
|
18
19
|
require 'google/protobuf/field_mask_pb'
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
optional :name, :string, 1
|
48
|
-
optional :input_config, :message, 3, "google.cloud.automl.v1.InputConfig"
|
49
|
-
end
|
50
|
-
add_message "google.cloud.automl.v1.ExportDataRequest" do
|
51
|
-
optional :name, :string, 1
|
52
|
-
optional :output_config, :message, 3, "google.cloud.automl.v1.OutputConfig"
|
53
|
-
end
|
54
|
-
add_message "google.cloud.automl.v1.GetAnnotationSpecRequest" do
|
55
|
-
optional :name, :string, 1
|
56
|
-
end
|
57
|
-
add_message "google.cloud.automl.v1.CreateModelRequest" do
|
58
|
-
optional :parent, :string, 1
|
59
|
-
optional :model, :message, 4, "google.cloud.automl.v1.Model"
|
60
|
-
end
|
61
|
-
add_message "google.cloud.automl.v1.GetModelRequest" do
|
62
|
-
optional :name, :string, 1
|
63
|
-
end
|
64
|
-
add_message "google.cloud.automl.v1.ListModelsRequest" do
|
65
|
-
optional :parent, :string, 1
|
66
|
-
optional :filter, :string, 3
|
67
|
-
optional :page_size, :int32, 4
|
68
|
-
optional :page_token, :string, 6
|
69
|
-
end
|
70
|
-
add_message "google.cloud.automl.v1.ListModelsResponse" do
|
71
|
-
repeated :model, :message, 1, "google.cloud.automl.v1.Model"
|
72
|
-
optional :next_page_token, :string, 2
|
73
|
-
end
|
74
|
-
add_message "google.cloud.automl.v1.DeleteModelRequest" do
|
75
|
-
optional :name, :string, 1
|
76
|
-
end
|
77
|
-
add_message "google.cloud.automl.v1.UpdateModelRequest" do
|
78
|
-
optional :model, :message, 1, "google.cloud.automl.v1.Model"
|
79
|
-
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
80
|
-
end
|
81
|
-
add_message "google.cloud.automl.v1.DeployModelRequest" do
|
82
|
-
optional :name, :string, 1
|
83
|
-
oneof :model_deployment_metadata do
|
84
|
-
optional :image_object_detection_model_deployment_metadata, :message, 2, "google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata"
|
85
|
-
optional :image_classification_model_deployment_metadata, :message, 4, "google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata"
|
86
|
-
end
|
87
|
-
end
|
88
|
-
add_message "google.cloud.automl.v1.UndeployModelRequest" do
|
89
|
-
optional :name, :string, 1
|
90
|
-
end
|
91
|
-
add_message "google.cloud.automl.v1.ExportModelRequest" do
|
92
|
-
optional :name, :string, 1
|
93
|
-
optional :output_config, :message, 3, "google.cloud.automl.v1.ModelExportOutputConfig"
|
94
|
-
end
|
95
|
-
add_message "google.cloud.automl.v1.GetModelEvaluationRequest" do
|
96
|
-
optional :name, :string, 1
|
97
|
-
end
|
98
|
-
add_message "google.cloud.automl.v1.ListModelEvaluationsRequest" do
|
99
|
-
optional :parent, :string, 1
|
100
|
-
optional :filter, :string, 3
|
101
|
-
optional :page_size, :int32, 4
|
102
|
-
optional :page_token, :string, 6
|
103
|
-
end
|
104
|
-
add_message "google.cloud.automl.v1.ListModelEvaluationsResponse" do
|
105
|
-
repeated :model_evaluation, :message, 1, "google.cloud.automl.v1.ModelEvaluation"
|
106
|
-
optional :next_page_token, :string, 2
|
21
|
+
|
22
|
+
descriptor_data = "\n$google/cloud/automl/v1/service.proto\x12\x16google.cloud.automl.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/automl/v1/annotation_payload.proto\x1a,google/cloud/automl/v1/annotation_spec.proto\x1a$google/cloud/automl/v1/dataset.proto\x1a\"google/cloud/automl/v1/image.proto\x1a\x1fgoogle/cloud/automl/v1/io.proto\x1a\"google/cloud/automl/v1/model.proto\x1a-google/cloud/automl/v1/model_evaluation.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\"\x88\x01\n\x14\x43reateDatasetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x35\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32\x1f.google.cloud.automl.v1.DatasetB\x03\xe0\x41\x02\"H\n\x11GetDatasetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\"\x87\x01\n\x13ListDatasetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"b\n\x14ListDatasetsResponse\x12\x31\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x1f.google.cloud.automl.v1.Dataset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x14UpdateDatasetRequest\x12\x35\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x1f.google.cloud.automl.v1.DatasetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"K\n\x14\x44\x65leteDatasetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\"\x88\x01\n\x11ImportDataRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\x12>\n\x0cinput_config\x18\x03 \x01(\x0b\x32#.google.cloud.automl.v1.InputConfigB\x03\xe0\x41\x02\"\x8a\x01\n\x11\x45xportDataRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x61utoml.googleapis.com/Dataset\x12@\n\routput_config\x18\x03 \x01(\x0b\x32$.google.cloud.automl.v1.OutputConfigB\x03\xe0\x41\x02\"V\n\x18GetAnnotationSpecRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$automl.googleapis.com/AnnotationSpec\"\x82\x01\n\x12\x43reateModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x31\n\x05model\x18\x04 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ModelB\x03\xe0\x41\x02\"D\n\x0fGetModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"\x85\x01\n\x11ListModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"[\n\x12ListModelsResponse\x12,\n\x05model\x18\x01 \x03(\x0b\x32\x1d.google.cloud.automl.v1.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x12\x44\x65leteModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"}\n\x12UpdateModelRequest\x12\x31\n\x05model\x18\x01 \x01(\x0b\x32\x1d.google.cloud.automl.v1.ModelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xe3\x02\n\x12\x44\x65ployModelRequest\x12\x7f\n0image_object_detection_model_deployment_metadata\x18\x02 \x01(\x0b\x32\x43.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataH\x00\x12|\n.image_classification_model_deployment_metadata\x18\x04 \x01(\x0b\x32\x42.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataH\x00\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/ModelB\x1b\n\x19model_deployment_metadata\"I\n\x14UndeployModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\"\x94\x01\n\x12\x45xportModelRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12K\n\routput_config\x18\x03 \x01(\x0b\x32/.google.cloud.automl.v1.ModelExportOutputConfigB\x03\xe0\x41\x02\"X\n\x19GetModelEvaluationRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%automl.googleapis.com/ModelEvaluation\"\x8e\x01\n\x1bListModelEvaluationsRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"z\n\x1cListModelEvaluationsResponse\x12\x41\n\x10model_evaluation\x18\x01 \x03(\x0b\x32\'.google.cloud.automl.v1.ModelEvaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe8\x1b\n\x06\x41utoMl\x12\xcb\x01\n\rCreateDataset\x12,.google.cloud.automl.v1.CreateDatasetRequest\x1a\x1d.google.longrunning.Operation\"m\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/datasets:\x07\x64\x61taset\xda\x41\x0eparent,dataset\xca\x41\x1c\n\x07\x44\x61taset\x12\x11OperationMetadata\x12\x95\x01\n\nGetDataset\x12).google.cloud.automl.v1.GetDatasetRequest\x1a\x1f.google.cloud.automl.v1.Dataset\";\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/datasets/*}\xda\x41\x04name\x12\xa8\x01\n\x0cListDatasets\x12+.google.cloud.automl.v1.ListDatasetsRequest\x1a,.google.cloud.automl.v1.ListDatasetsResponse\"=\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/datasets\xda\x41\x06parent\x12\xbb\x01\n\rUpdateDataset\x12,.google.cloud.automl.v1.UpdateDatasetRequest\x1a\x1f.google.cloud.automl.v1.Dataset\"[\x82\xd3\xe4\x93\x02?24/v1/{dataset.name=projects/*/locations/*/datasets/*}:\x07\x64\x61taset\xda\x41\x13\x64\x61taset,update_mask\x12\xc6\x01\n\rDeleteDataset\x12,.google.cloud.automl.v1.DeleteDatasetRequest\x1a\x1d.google.longrunning.Operation\"h\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/datasets/*}\xda\x41\x04name\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x12\xdc\x01\n\nImportData\x12).google.cloud.automl.v1.ImportDataRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/datasets/*}:importData:\x01*\xda\x41\x11name,input_config\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x12\xdd\x01\n\nExportData\x12).google.cloud.automl.v1.ExportDataRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/datasets/*}:exportData:\x01*\xda\x41\x12name,output_config\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x12\xbc\x01\n\x11GetAnnotationSpec\x12\x30.google.cloud.automl.v1.GetAnnotationSpecRequest\x1a&.google.cloud.automl.v1.AnnotationSpec\"M\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}\xda\x41\x04name\x12\xbf\x01\n\x0b\x43reateModel\x12*.google.cloud.automl.v1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"e\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/models:\x05model\xda\x41\x0cparent,model\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\x12\x8d\x01\n\x08GetModel\x12\'.google.cloud.automl.v1.GetModelRequest\x1a\x1d.google.cloud.automl.v1.Model\"9\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/models/*}\xda\x41\x04name\x12\xa0\x01\n\nListModels\x12).google.cloud.automl.v1.ListModelsRequest\x1a*.google.cloud.automl.v1.ListModelsResponse\";\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/models\xda\x41\x06parent\x12\xc0\x01\n\x0b\x44\x65leteModel\x12*.google.cloud.automl.v1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"f\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/models/*}\xda\x41\x04name\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x12\xad\x01\n\x0bUpdateModel\x12*.google.cloud.automl.v1.UpdateModelRequest\x1a\x1d.google.cloud.automl.v1.Model\"S\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{model.name=projects/*/locations/*/models/*}:\x05model\xda\x41\x11model,update_mask\x12\xca\x01\n\x0b\x44\x65ployModel\x12*.google.cloud.automl.v1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"p\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:deploy:\x01*\xda\x41\x04name\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x12\xd0\x01\n\rUndeployModel\x12,.google.cloud.automl.v1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"r\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/locations/*/models/*}:undeploy:\x01*\xda\x41\x04name\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x12\xd8\x01\n\x0b\x45xportModel\x12*.google.cloud.automl.v1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"~\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:export:\x01*\xda\x41\x12name,output_config\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x12\xbe\x01\n\x12GetModelEvaluation\x12\x31.google.cloud.automl.v1.GetModelEvaluationRequest\x1a\'.google.cloud.automl.v1.ModelEvaluation\"L\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/models/*/modelEvaluations/*}\xda\x41\x04name\x12\xd8\x01\n\x14ListModelEvaluations\x12\x33.google.cloud.automl.v1.ListModelEvaluationsRequest\x1a\x34.google.cloud.automl.v1.ListModelEvaluationsResponse\"U\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/models/*}/modelEvaluations\xda\x41\rparent,filter\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xad\x01\n\x1a\x63om.google.cloud.automl.v1B\x0b\x41utoMlProtoP\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"
|
23
|
+
|
24
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
25
|
+
|
26
|
+
begin
|
27
|
+
pool.add_serialized_file(descriptor_data)
|
28
|
+
rescue TypeError => e
|
29
|
+
# Compatibility code: will be removed in the next major version.
|
30
|
+
require 'google/protobuf/descriptor_pb'
|
31
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
32
|
+
parsed.clear_dependency
|
33
|
+
serialized = parsed.class.encode(parsed)
|
34
|
+
file = pool.add_serialized_file(serialized)
|
35
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
36
|
+
imports = [
|
37
|
+
["google.cloud.automl.v1.Dataset", "google/cloud/automl/v1/dataset.proto"],
|
38
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
39
|
+
["google.cloud.automl.v1.InputConfig", "google/cloud/automl/v1/io.proto"],
|
40
|
+
["google.cloud.automl.v1.Model", "google/cloud/automl/v1/model.proto"],
|
41
|
+
["google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata", "google/cloud/automl/v1/image.proto"],
|
42
|
+
["google.cloud.automl.v1.ModelEvaluation", "google/cloud/automl/v1/model_evaluation.proto"],
|
43
|
+
]
|
44
|
+
imports.each do |type_name, expected_filename|
|
45
|
+
import_file = pool.lookup(type_name).file_descriptor
|
46
|
+
if import_file.name != expected_filename
|
47
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
107
48
|
end
|
108
49
|
end
|
50
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
51
|
+
warn "This will become an error in the next major version."
|
109
52
|
end
|
110
53
|
|
111
54
|
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/text_extraction.proto
|
3
4
|
|
@@ -5,25 +6,32 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/cloud/automl/v1/text_segment_pb'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
9
|
+
|
10
|
+
descriptor_data = "\n,google/cloud/automl/v1/text_extraction.proto\x12\x16google.cloud.automl.v1\x1a)google/cloud/automl/v1/text_segment.proto\"t\n\x18TextExtractionAnnotation\x12;\n\x0ctext_segment\x18\x03 \x01(\x0b\x32#.google.cloud.automl.v1.TextSegmentH\x00\x12\r\n\x05score\x18\x01 \x01(\x02\x42\x0c\n\nannotation\"\x92\x02\n\x1fTextExtractionEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12r\n\x1a\x63onfidence_metrics_entries\x18\x02 \x03(\x0b\x32N.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x03 \x01(\x02\x12\x11\n\tprecision\x18\x04 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x05 \x01(\x02\x42\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
|
+
["google.cloud.automl.v1.TextSegment", "google/cloud/automl/v1/text_segment.proto"],
|
26
|
+
]
|
27
|
+
imports.each do |type_name, expected_filename|
|
28
|
+
import_file = pool.lookup(type_name).file_descriptor
|
29
|
+
if import_file.name != expected_filename
|
30
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
25
31
|
end
|
26
32
|
end
|
33
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
34
|
+
warn "This will become an error in the next major version."
|
27
35
|
end
|
28
36
|
|
29
37
|
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/text.proto
|
3
4
|
|
@@ -5,24 +6,31 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/cloud/automl/v1/classification_pb'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
9
|
+
|
10
|
+
descriptor_data = "\n!google/cloud/automl/v1/text.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\"l\n!TextClassificationDatasetMetadata\x12G\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationType\"j\n\x1fTextClassificationModelMetadata\x12G\n\x13\x63lassification_type\x18\x03 \x01(\x0e\x32*.google.cloud.automl.v1.ClassificationType\"\x1f\n\x1dTextExtractionDatasetMetadata\"\x1d\n\x1bTextExtractionModelMetadata\"5\n\x1cTextSentimentDatasetMetadata\x12\x15\n\rsentiment_max\x18\x01 \x01(\x05\"\x1c\n\x1aTextSentimentModelMetadataB\xab\x01\n\x1a\x63om.google.cloud.automl.v1B\tTextProtoP\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}"
|
24
30
|
end
|
25
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."
|
26
34
|
end
|
27
35
|
|
28
36
|
module Google
|
@@ -1,16 +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/text_segment.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n)google/cloud/automl/v1/text_segment.proto\x12\x16google.cloud.automl.v1\"H\n\x0bTextSegment\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x14\n\x0cstart_offset\x18\x01 \x01(\x03\x12\x12\n\nend_offset\x18\x02 \x01(\x03\x42\xb2\x01\n\x1a\x63om.google.cloud.automl.v1B\x10TextSegmentProtoP\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}"
|
12
28
|
end
|
13
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."
|
14
32
|
end
|
15
33
|
|
16
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/text_sentiment.proto
|
3
4
|
|
@@ -5,22 +6,32 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/cloud/automl/v1/classification_pb'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
9
|
+
|
10
|
+
descriptor_data = "\n+google/cloud/automl/v1/text_sentiment.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\",\n\x17TextSentimentAnnotation\x12\x11\n\tsentiment\x18\x01 \x01(\x05\"\xa0\x02\n\x1eTextSentimentEvaluationMetrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12\x1b\n\x13mean_absolute_error\x18\x04 \x01(\x02\x12\x1a\n\x12mean_squared_error\x18\x05 \x01(\x02\x12\x14\n\x0clinear_kappa\x18\x06 \x01(\x02\x12\x17\n\x0fquadratic_kappa\x18\x07 \x01(\x02\x12\x61\n\x10\x63onfusion_matrix\x18\x08 \x01(\x0b\x32G.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrixB\xb4\x01\n\x1a\x63om.google.cloud.automl.v1B\x12TextSentimentProtoP\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
|
+
["google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix", "google/cloud/automl/v1/classification.proto"],
|
26
|
+
]
|
27
|
+
imports.each do |type_name, expected_filename|
|
28
|
+
import_file = pool.lookup(type_name).file_descriptor
|
29
|
+
if import_file.name != expected_filename
|
30
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
22
31
|
end
|
23
32
|
end
|
33
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
34
|
+
warn "This will become an error in the next major version."
|
24
35
|
end
|
25
36
|
|
26
37
|
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/translation.proto
|
3
4
|
|
@@ -6,25 +7,32 @@ require 'google/protobuf'
|
|
6
7
|
require 'google/api/field_behavior_pb'
|
7
8
|
require 'google/cloud/automl/v1/data_items_pb'
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
10
|
+
|
11
|
+
descriptor_data = "\n(google/cloud/automl/v1/translation.proto\x12\x16google.cloud.automl.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\'google/cloud/automl/v1/data_items.proto\"b\n\x1aTranslationDatasetMetadata\x12!\n\x14source_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14target_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"K\n\x1cTranslationEvaluationMetrics\x12\x12\n\nbleu_score\x18\x01 \x01(\x01\x12\x17\n\x0f\x62\x61se_bleu_score\x18\x02 \x01(\x01\"j\n\x18TranslationModelMetadata\x12\x12\n\nbase_model\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\"X\n\x15TranslationAnnotation\x12?\n\x12translated_content\x18\x01 \x01(\x0b\x32#.google.cloud.automl.v1.TextSnippetB\xb2\x01\n\x1a\x63om.google.cloud.automl.v1B\x10TranslationProtoP\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"
|
12
|
+
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
+
|
15
|
+
begin
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
17
|
+
rescue TypeError => e
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
+
parsed.clear_dependency
|
22
|
+
serialized = parsed.class.encode(parsed)
|
23
|
+
file = pool.add_serialized_file(serialized)
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
+
imports = [
|
26
|
+
["google.cloud.automl.v1.TextSnippet", "google/cloud/automl/v1/data_items.proto"],
|
27
|
+
]
|
28
|
+
imports.each do |type_name, expected_filename|
|
29
|
+
import_file = pool.lookup(type_name).file_descriptor
|
30
|
+
if import_file.name != expected_filename
|
31
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
26
32
|
end
|
27
33
|
end
|
34
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
35
|
+
warn "This will become an error in the next major version."
|
28
36
|
end
|
29
37
|
|
30
38
|
module Google
|