google-cloud-automl-v1beta1 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb +30 -15
  4. data/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb +24 -6
  5. data/lib/google/cloud/automl/v1beta1/automl/client.rb +6 -4
  6. data/lib/google/cloud/automl/v1beta1/automl/operations.rb +5 -3
  7. data/lib/google/cloud/automl/v1beta1/automl/rest/client.rb +6 -4
  8. data/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb +10 -8
  9. data/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb +24 -24
  10. data/lib/google/cloud/automl/v1beta1/classification_pb.rb +25 -47
  11. data/lib/google/cloud/automl/v1beta1/column_spec_pb.rb +26 -13
  12. data/lib/google/cloud/automl/v1beta1/data_items_pb.rb +28 -61
  13. data/lib/google/cloud/automl/v1beta1/data_stats_pb.rb +24 -54
  14. data/lib/google/cloud/automl/v1beta1/data_types_pb.rb +24 -22
  15. data/lib/google/cloud/automl/v1beta1/dataset_pb.rb +30 -20
  16. data/lib/google/cloud/automl/v1beta1/detection_pb.rb +26 -33
  17. data/lib/google/cloud/automl/v1beta1/geometry_pb.rb +24 -8
  18. data/lib/google/cloud/automl/v1beta1/image_pb.rb +24 -29
  19. data/lib/google/cloud/automl/v1beta1/io_pb.rb +24 -57
  20. data/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb +31 -17
  21. data/lib/google/cloud/automl/v1beta1/model_pb.rb +30 -25
  22. data/lib/google/cloud/automl/v1beta1/operations_pb.rb +27 -59
  23. data/lib/google/cloud/automl/v1beta1/prediction_service/client.rb +6 -4
  24. data/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb +5 -3
  25. data/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb +6 -4
  26. data/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb +10 -8
  27. data/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb +2 -2
  28. data/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb +27 -20
  29. data/lib/google/cloud/automl/v1beta1/ranges_pb.rb +24 -5
  30. data/lib/google/cloud/automl/v1beta1/regression_pb.rb +24 -8
  31. data/lib/google/cloud/automl/v1beta1/service_pb.rb +32 -125
  32. data/lib/google/cloud/automl/v1beta1/table_spec_pb.rb +25 -10
  33. data/lib/google/cloud/automl/v1beta1/tables_pb.rb +29 -34
  34. data/lib/google/cloud/automl/v1beta1/temporal_pb.rb +25 -5
  35. data/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb +25 -17
  36. data/lib/google/cloud/automl/v1beta1/text_pb.rb +24 -17
  37. data/lib/google/cloud/automl/v1beta1/text_segment_pb.rb +24 -6
  38. data/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb +25 -15
  39. data/lib/google/cloud/automl/v1beta1/translation_pb.rb +25 -17
  40. data/lib/google/cloud/automl/v1beta1/version.rb +1 -1
  41. data/lib/google/cloud/automl/v1beta1/video_pb.rb +24 -9
  42. data/proto_docs/google/api/client.rb +67 -4
  43. data/proto_docs/google/protobuf/any.rb +7 -4
  44. data/proto_docs/google/protobuf/struct.rb +1 -1
  45. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  46. metadata +4 -4
@@ -1,67 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/automl/v1beta1/io.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/cloud/automl/v1beta1/io.proto", :syntax => :proto3) do
8
- add_message "google.cloud.automl.v1beta1.InputConfig" do
9
- map :params, :string, :string, 2
10
- oneof :source do
11
- optional :gcs_source, :message, 1, "google.cloud.automl.v1beta1.GcsSource"
12
- optional :bigquery_source, :message, 3, "google.cloud.automl.v1beta1.BigQuerySource"
13
- end
14
- end
15
- add_message "google.cloud.automl.v1beta1.BatchPredictInputConfig" do
16
- oneof :source do
17
- optional :gcs_source, :message, 1, "google.cloud.automl.v1beta1.GcsSource"
18
- optional :bigquery_source, :message, 2, "google.cloud.automl.v1beta1.BigQuerySource"
19
- end
20
- end
21
- add_message "google.cloud.automl.v1beta1.DocumentInputConfig" do
22
- optional :gcs_source, :message, 1, "google.cloud.automl.v1beta1.GcsSource"
23
- end
24
- add_message "google.cloud.automl.v1beta1.OutputConfig" do
25
- oneof :destination do
26
- optional :gcs_destination, :message, 1, "google.cloud.automl.v1beta1.GcsDestination"
27
- optional :bigquery_destination, :message, 2, "google.cloud.automl.v1beta1.BigQueryDestination"
28
- end
29
- end
30
- add_message "google.cloud.automl.v1beta1.BatchPredictOutputConfig" do
31
- oneof :destination do
32
- optional :gcs_destination, :message, 1, "google.cloud.automl.v1beta1.GcsDestination"
33
- optional :bigquery_destination, :message, 2, "google.cloud.automl.v1beta1.BigQueryDestination"
34
- end
35
- end
36
- add_message "google.cloud.automl.v1beta1.ModelExportOutputConfig" do
37
- optional :model_format, :string, 4
38
- map :params, :string, :string, 2
39
- oneof :destination do
40
- optional :gcs_destination, :message, 1, "google.cloud.automl.v1beta1.GcsDestination"
41
- optional :gcr_destination, :message, 3, "google.cloud.automl.v1beta1.GcrDestination"
42
- end
43
- end
44
- add_message "google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig" do
45
- oneof :destination do
46
- optional :bigquery_destination, :message, 2, "google.cloud.automl.v1beta1.BigQueryDestination"
47
- end
48
- end
49
- add_message "google.cloud.automl.v1beta1.GcsSource" do
50
- repeated :input_uris, :string, 1
51
- end
52
- add_message "google.cloud.automl.v1beta1.BigQuerySource" do
53
- optional :input_uri, :string, 1
54
- end
55
- add_message "google.cloud.automl.v1beta1.GcsDestination" do
56
- optional :output_uri_prefix, :string, 1
57
- end
58
- add_message "google.cloud.automl.v1beta1.BigQueryDestination" do
59
- optional :output_uri, :string, 1
60
- end
61
- add_message "google.cloud.automl.v1beta1.GcrDestination" do
62
- optional :output_uri, :string, 1
7
+
8
+ descriptor_data = "\n$google/cloud/automl/v1beta1/io.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\x92\x02\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x12\x44\n\x06params\x18\x02 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.InputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"\xa9\x01\n\x17\x42\x61tchPredictInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x42\x08\n\x06source\"Q\n\x13\x44ocumentInputConfig\x12:\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSource\"\xb7\x01\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xc3\x01\n\x18\x42\x61tchPredictOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xcf\x02\n\x17ModelExportOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12\x46\n\x0fgcr_destination\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcrDestinationH\x00\x12\x14\n\x0cmodel_format\x18\x04 \x01(\t\x12P\n\x06params\x18\x02 \x03(\x0b\x32@.google.cloud.automl.v1beta1.ModelExportOutputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x64\x65stination\"\x86\x01\n#ExportEvaluatedExamplesOutputConfig\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x1f\n\tGcsSource\x12\x12\n\ninput_uris\x18\x01 \x03(\t\"#\n\x0e\x42igQuerySource\x12\x11\n\tinput_uri\x18\x01 \x01(\t\"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\")\n\x13\x42igQueryDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\t\"$\n\x0eGcrDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\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}"
63
28
  end
64
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."
65
32
  end
66
33
 
67
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/v1beta1/model_evaluation.proto
3
4
 
@@ -13,25 +14,38 @@ require 'google/cloud/automl/v1beta1/text_sentiment_pb'
13
14
  require 'google/cloud/automl/v1beta1/translation_pb'
14
15
  require 'google/protobuf/timestamp_pb'
15
16
 
16
- Google::Protobuf::DescriptorPool.generated_pool.build do
17
- add_file("google/cloud/automl/v1beta1/model_evaluation.proto", :syntax => :proto3) do
18
- add_message "google.cloud.automl.v1beta1.ModelEvaluation" do
19
- optional :name, :string, 1
20
- optional :annotation_spec_id, :string, 2
21
- optional :display_name, :string, 15
22
- optional :create_time, :message, 5, "google.protobuf.Timestamp"
23
- optional :evaluated_example_count, :int32, 6
24
- oneof :metrics do
25
- optional :classification_evaluation_metrics, :message, 8, "google.cloud.automl.v1beta1.ClassificationEvaluationMetrics"
26
- optional :regression_evaluation_metrics, :message, 24, "google.cloud.automl.v1beta1.RegressionEvaluationMetrics"
27
- optional :translation_evaluation_metrics, :message, 9, "google.cloud.automl.v1beta1.TranslationEvaluationMetrics"
28
- optional :image_object_detection_evaluation_metrics, :message, 12, "google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics"
29
- optional :video_object_tracking_evaluation_metrics, :message, 14, "google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics"
30
- optional :text_sentiment_evaluation_metrics, :message, 11, "google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics"
31
- optional :text_extraction_evaluation_metrics, :message, 13, "google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics"
32
- end
17
+
18
+ descriptor_data = "\n2google/cloud/automl/v1beta1/model_evaluation.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.proto\x1a,google/cloud/automl/v1beta1/regression.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a\x31google/cloud/automl/v1beta1/text_extraction.proto\x1a\x30google/cloud/automl/v1beta1/text_sentiment.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x08\n\x0fModelEvaluation\x12i\n!classification_evaluation_metrics\x18\x08 \x01(\x0b\x32<.google.cloud.automl.v1beta1.ClassificationEvaluationMetricsH\x00\x12\x61\n\x1dregression_evaluation_metrics\x18\x18 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.RegressionEvaluationMetricsH\x00\x12\x63\n\x1etranslation_evaluation_metrics\x18\t \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TranslationEvaluationMetricsH\x00\x12w\n)image_object_detection_evaluation_metrics\x18\x0c \x01(\x0b\x32\x42.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsH\x00\x12u\n(video_object_tracking_evaluation_metrics\x18\x0e \x01(\x0b\x32\x41.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsH\x00\x12h\n!text_sentiment_evaluation_metrics\x18\x0b \x01(\x0b\x32;.google.cloud.automl.v1beta1.TextSentimentEvaluationMetricsH\x00\x12j\n\"text_extraction_evaluation_metrics\x18\r \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x61nnotation_spec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0f \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x17\x65valuated_example_count\x18\x06 \x01(\x05:\x87\x01\xea\x41\x83\x01\n%automl.googleapis.com/ModelEvaluation\x12Zprojects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}B\t\n\x07metricsB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3"
19
+
20
+ pool = Google::Protobuf::DescriptorPool.generated_pool
21
+
22
+ begin
23
+ pool.add_serialized_file(descriptor_data)
24
+ rescue TypeError => e
25
+ # Compatibility code: will be removed in the next major version.
26
+ require 'google/protobuf/descriptor_pb'
27
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
28
+ parsed.clear_dependency
29
+ serialized = parsed.class.encode(parsed)
30
+ file = pool.add_serialized_file(serialized)
31
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
32
+ imports = [
33
+ ["google.cloud.automl.v1beta1.ClassificationEvaluationMetrics", "google/cloud/automl/v1beta1/classification.proto"],
34
+ ["google.cloud.automl.v1beta1.RegressionEvaluationMetrics", "google/cloud/automl/v1beta1/regression.proto"],
35
+ ["google.cloud.automl.v1beta1.TranslationEvaluationMetrics", "google/cloud/automl/v1beta1/translation.proto"],
36
+ ["google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics", "google/cloud/automl/v1beta1/detection.proto"],
37
+ ["google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics", "google/cloud/automl/v1beta1/text_sentiment.proto"],
38
+ ["google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics", "google/cloud/automl/v1beta1/text_extraction.proto"],
39
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
40
+ ]
41
+ imports.each do |type_name, expected_filename|
42
+ import_file = pool.lookup(type_name).file_descriptor
43
+ if import_file.name != expected_filename
44
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
33
45
  end
34
46
  end
47
+ warn "Each proto file must use a consistent fully-qualified name."
48
+ warn "This will become an error in the next major version."
35
49
  end
36
50
 
37
51
  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/v1beta1/model.proto
3
4
 
@@ -11,33 +12,37 @@ require 'google/cloud/automl/v1beta1/translation_pb'
11
12
  require 'google/cloud/automl/v1beta1/video_pb'
12
13
  require 'google/protobuf/timestamp_pb'
13
14
 
14
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_file("google/cloud/automl/v1beta1/model.proto", :syntax => :proto3) do
16
- add_message "google.cloud.automl.v1beta1.Model" do
17
- optional :name, :string, 1
18
- optional :display_name, :string, 2
19
- optional :dataset_id, :string, 3
20
- optional :create_time, :message, 7, "google.protobuf.Timestamp"
21
- optional :update_time, :message, 11, "google.protobuf.Timestamp"
22
- optional :deployment_state, :enum, 8, "google.cloud.automl.v1beta1.Model.DeploymentState"
23
- oneof :model_metadata do
24
- optional :translation_model_metadata, :message, 15, "google.cloud.automl.v1beta1.TranslationModelMetadata"
25
- optional :image_classification_model_metadata, :message, 13, "google.cloud.automl.v1beta1.ImageClassificationModelMetadata"
26
- optional :text_classification_model_metadata, :message, 14, "google.cloud.automl.v1beta1.TextClassificationModelMetadata"
27
- optional :image_object_detection_model_metadata, :message, 20, "google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata"
28
- optional :video_classification_model_metadata, :message, 23, "google.cloud.automl.v1beta1.VideoClassificationModelMetadata"
29
- optional :video_object_tracking_model_metadata, :message, 21, "google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata"
30
- optional :text_extraction_model_metadata, :message, 19, "google.cloud.automl.v1beta1.TextExtractionModelMetadata"
31
- optional :tables_model_metadata, :message, 24, "google.cloud.automl.v1beta1.TablesModelMetadata"
32
- optional :text_sentiment_model_metadata, :message, 22, "google.cloud.automl.v1beta1.TextSentimentModelMetadata"
33
- end
34
- end
35
- add_enum "google.cloud.automl.v1beta1.Model.DeploymentState" do
36
- value :DEPLOYMENT_STATE_UNSPECIFIED, 0
37
- value :DEPLOYED, 1
38
- value :UNDEPLOYED, 2
15
+
16
+ descriptor_data = "\n\'google/cloud/automl/v1beta1/model.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\'google/cloud/automl/v1beta1/image.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a&google/cloud/automl/v1beta1/text.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\'google/cloud/automl/v1beta1/video.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\n\n\x05Model\x12[\n\x1atranslation_model_metadata\x18\x0f \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TranslationModelMetadataH\x00\x12l\n#image_classification_model_metadata\x18\r \x01(\x0b\x32=.google.cloud.automl.v1beta1.ImageClassificationModelMetadataH\x00\x12j\n\"text_classification_model_metadata\x18\x0e \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextClassificationModelMetadataH\x00\x12o\n%image_object_detection_model_metadata\x18\x14 \x01(\x0b\x32>.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataH\x00\x12l\n#video_classification_model_metadata\x18\x17 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoClassificationModelMetadataH\x00\x12m\n$video_object_tracking_model_metadata\x18\x15 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataH\x00\x12\x62\n\x1etext_extraction_model_metadata\x18\x13 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.TextExtractionModelMetadataH\x00\x12Q\n\x15tables_model_metadata\x18\x18 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.TablesModelMetadataH\x00\x12`\n\x1dtext_sentiment_model_metadata\x18\x16 \x01(\x0b\x32\x37.google.cloud.automl.v1beta1.TextSentimentModelMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\ndataset_id\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12L\n\x10\x64\x65ployment_state\x18\x08 \x01(\x0e\x32\x32.google.cloud.automl.v1beta1.Model.DeploymentState\"Q\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\x0e\n\nUNDEPLOYED\x10\x02:X\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\x10\n\x0emodel_metadataB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3"
17
+
18
+ pool = Google::Protobuf::DescriptorPool.generated_pool
19
+
20
+ begin
21
+ pool.add_serialized_file(descriptor_data)
22
+ rescue TypeError => e
23
+ # Compatibility code: will be removed in the next major version.
24
+ require 'google/protobuf/descriptor_pb'
25
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
26
+ parsed.clear_dependency
27
+ serialized = parsed.class.encode(parsed)
28
+ file = pool.add_serialized_file(serialized)
29
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
30
+ imports = [
31
+ ["google.cloud.automl.v1beta1.TranslationModelMetadata", "google/cloud/automl/v1beta1/translation.proto"],
32
+ ["google.cloud.automl.v1beta1.ImageClassificationModelMetadata", "google/cloud/automl/v1beta1/image.proto"],
33
+ ["google.cloud.automl.v1beta1.TextClassificationModelMetadata", "google/cloud/automl/v1beta1/text.proto"],
34
+ ["google.cloud.automl.v1beta1.VideoClassificationModelMetadata", "google/cloud/automl/v1beta1/video.proto"],
35
+ ["google.cloud.automl.v1beta1.TablesModelMetadata", "google/cloud/automl/v1beta1/tables.proto"],
36
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
37
+ ]
38
+ imports.each do |type_name, expected_filename|
39
+ import_file = pool.lookup(type_name).file_descriptor
40
+ if import_file.name != expected_filename
41
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
39
42
  end
40
43
  end
44
+ warn "Each proto file must use a consistent fully-qualified name."
45
+ warn "This will become an error in the next major version."
41
46
  end
42
47
 
43
48
  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/v1beta1/operations.proto
3
4
 
@@ -9,67 +10,34 @@ require 'google/cloud/automl/v1beta1/model_evaluation_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
  require 'google/rpc/status_pb'
11
12
 
12
- Google::Protobuf::DescriptorPool.generated_pool.build do
13
- add_file("google/cloud/automl/v1beta1/operations.proto", :syntax => :proto3) do
14
- add_message "google.cloud.automl.v1beta1.OperationMetadata" do
15
- optional :progress_percent, :int32, 13
16
- repeated :partial_failures, :message, 2, "google.rpc.Status"
17
- optional :create_time, :message, 3, "google.protobuf.Timestamp"
18
- optional :update_time, :message, 4, "google.protobuf.Timestamp"
19
- oneof :details do
20
- optional :delete_details, :message, 8, "google.cloud.automl.v1beta1.DeleteOperationMetadata"
21
- optional :deploy_model_details, :message, 24, "google.cloud.automl.v1beta1.DeployModelOperationMetadata"
22
- optional :undeploy_model_details, :message, 25, "google.cloud.automl.v1beta1.UndeployModelOperationMetadata"
23
- optional :create_model_details, :message, 10, "google.cloud.automl.v1beta1.CreateModelOperationMetadata"
24
- optional :import_data_details, :message, 15, "google.cloud.automl.v1beta1.ImportDataOperationMetadata"
25
- optional :batch_predict_details, :message, 16, "google.cloud.automl.v1beta1.BatchPredictOperationMetadata"
26
- optional :export_data_details, :message, 21, "google.cloud.automl.v1beta1.ExportDataOperationMetadata"
27
- optional :export_model_details, :message, 22, "google.cloud.automl.v1beta1.ExportModelOperationMetadata"
28
- optional :export_evaluated_examples_details, :message, 26, "google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata"
29
- end
30
- end
31
- add_message "google.cloud.automl.v1beta1.DeleteOperationMetadata" do
32
- end
33
- add_message "google.cloud.automl.v1beta1.DeployModelOperationMetadata" do
34
- end
35
- add_message "google.cloud.automl.v1beta1.UndeployModelOperationMetadata" do
36
- end
37
- add_message "google.cloud.automl.v1beta1.CreateModelOperationMetadata" do
38
- end
39
- add_message "google.cloud.automl.v1beta1.ImportDataOperationMetadata" do
40
- end
41
- add_message "google.cloud.automl.v1beta1.ExportDataOperationMetadata" do
42
- optional :output_info, :message, 1, "google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo"
43
- end
44
- add_message "google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo" do
45
- oneof :output_location do
46
- optional :gcs_output_directory, :string, 1
47
- optional :bigquery_output_dataset, :string, 2
48
- end
49
- end
50
- add_message "google.cloud.automl.v1beta1.BatchPredictOperationMetadata" do
51
- optional :input_config, :message, 1, "google.cloud.automl.v1beta1.BatchPredictInputConfig"
52
- optional :output_info, :message, 2, "google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo"
53
- end
54
- add_message "google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo" do
55
- oneof :output_location do
56
- optional :gcs_output_directory, :string, 1
57
- optional :bigquery_output_dataset, :string, 2
58
- end
59
- end
60
- add_message "google.cloud.automl.v1beta1.ExportModelOperationMetadata" do
61
- optional :output_info, :message, 2, "google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo"
62
- end
63
- add_message "google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo" do
64
- optional :gcs_output_directory, :string, 1
65
- end
66
- add_message "google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata" do
67
- optional :output_info, :message, 2, "google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo"
68
- end
69
- add_message "google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo" do
70
- optional :bigquery_output_dataset, :string, 2
13
+
14
+ descriptor_data = "\n,google/cloud/automl/v1beta1/operations.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a$google/cloud/automl/v1beta1/io.proto\x1a\'google/cloud/automl/v1beta1/model.proto\x1a\x32google/cloud/automl/v1beta1/model_evaluation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8b\x08\n\x11OperationMetadata\x12N\n\x0e\x64\x65lete_details\x18\x08 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.DeleteOperationMetadataH\x00\x12Y\n\x14\x64\x65ploy_model_details\x18\x18 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.DeployModelOperationMetadataH\x00\x12]\n\x16undeploy_model_details\x18\x19 \x01(\x0b\x32;.google.cloud.automl.v1beta1.UndeployModelOperationMetadataH\x00\x12Y\n\x14\x63reate_model_details\x18\n \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.CreateModelOperationMetadataH\x00\x12W\n\x13import_data_details\x18\x0f \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ImportDataOperationMetadataH\x00\x12[\n\x15\x62\x61tch_predict_details\x18\x10 \x01(\x0b\x32:.google.cloud.automl.v1beta1.BatchPredictOperationMetadataH\x00\x12W\n\x13\x65xport_data_details\x18\x15 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ExportDataOperationMetadataH\x00\x12Y\n\x14\x65xport_model_details\x18\x16 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.ExportModelOperationMetadataH\x00\x12r\n!export_evaluated_examples_details\x18\x1a \x01(\x0b\x32\x45.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataH\x00\x12\x18\n\x10progress_percent\x18\r \x01(\x05\x12,\n\x10partial_failures\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x64\x65tails\"\x19\n\x17\x44\x65leteOperationMetadata\"\x1e\n\x1c\x44\x65ployModelOperationMetadata\" \n\x1eUndeployModelOperationMetadata\"\x1e\n\x1c\x43reateModelOperationMetadata\"\x1d\n\x1bImportDataOperationMetadata\"\xef\x01\n\x1b\x45xportDataOperationMetadata\x12\x62\n\x0boutput_info\x18\x01 \x01(\x0b\x32M.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo\x1al\n\x14\x45xportDataOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xc3\x02\n\x1d\x42\x61tchPredictOperationMetadata\x12J\n\x0cinput_config\x18\x01 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfig\x12\x66\n\x0boutput_info\x18\x02 \x01(\x0b\x32Q.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo\x1an\n\x16\x42\x61tchPredictOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xbb\x01\n\x1c\x45xportModelOperationMetadata\x12\x64\n\x0boutput_info\x18\x02 \x01(\x0b\x32O.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo\x1a\x35\n\x15\x45xportModelOutputInfo\x12\x1c\n\x14gcs_output_directory\x18\x01 \x01(\t\"\xee\x01\n(ExportEvaluatedExamplesOperationMetadata\x12|\n\x0boutput_info\x18\x02 \x01(\x0b\x32g.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo\x1a\x44\n!ExportEvaluatedExamplesOutputInfo\x12\x1f\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\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.rpc.Status", "google/rpc/status.proto"],
30
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
31
+ ["google.cloud.automl.v1beta1.BatchPredictInputConfig", "google/cloud/automl/v1beta1/io.proto"],
32
+ ]
33
+ imports.each do |type_name, expected_filename|
34
+ import_file = pool.lookup(type_name).file_descriptor
35
+ if import_file.name != expected_filename
36
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
71
37
  end
72
38
  end
39
+ warn "Each proto file must use a consistent fully-qualified name."
40
+ warn "This will become an error in the next major version."
73
41
  end
74
42
 
75
43
  module Google
@@ -130,7 +130,7 @@ module Google
130
130
  credentials = @config.credentials
131
131
  # Use self-signed JWT if the endpoint is unchanged from default,
132
132
  # but only if the default endpoint does not have a region prefix.
133
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
133
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
134
134
  !@config.endpoint.split(".").first.include?("-")
135
135
  credentials ||= Credentials.default scope: @config.scope,
136
136
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -509,9 +509,9 @@ module Google
509
509
  # * (`String`) The path to a service account key file in JSON format
510
510
  # * (`Hash`) A service account key as a Hash
511
511
  # * (`Google::Auth::Credentials`) A googleauth credentials object
512
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
512
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
513
513
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
514
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
514
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
515
515
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
516
516
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
517
517
  # * (`nil`) indicating no credentials
@@ -553,7 +553,9 @@ module Google
553
553
  class Configuration
554
554
  extend ::Gapic::Config
555
555
 
556
- config_attr :endpoint, "automl.googleapis.com", ::String
556
+ DEFAULT_ENDPOINT = "automl.googleapis.com"
557
+
558
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
557
559
  config_attr :credentials, nil do |value|
558
560
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
559
561
  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
@@ -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 == Client.configure.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
@@ -447,9 +447,9 @@ module Google
447
447
  # * (`String`) The path to a service account key file in JSON format
448
448
  # * (`Hash`) A service account key as a Hash
449
449
  # * (`Google::Auth::Credentials`) A googleauth credentials object
450
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
450
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
451
451
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
452
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
452
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
453
453
  # * (`nil`) indicating no credentials
454
454
  # @return [::Object]
455
455
  # @!attribute [rw] scope
@@ -482,7 +482,9 @@ module Google
482
482
  class Configuration
483
483
  extend ::Gapic::Config
484
484
 
485
- config_attr :endpoint, "automl.googleapis.com", ::String
485
+ DEFAULT_ENDPOINT = "automl.googleapis.com"
486
+
487
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
486
488
  config_attr :credentials, nil do |value|
487
489
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
488
490
  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_predict_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_batch_predict_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
@@ -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/v1beta1/prediction_service.proto
3
4
 
@@ -13,28 +14,34 @@ require 'google/cloud/automl/v1beta1/io_pb'
13
14
  require 'google/cloud/automl/v1beta1/operations_pb'
14
15
  require 'google/longrunning/operations_pb'
15
16
 
16
- Google::Protobuf::DescriptorPool.generated_pool.build do
17
- add_file("google/cloud/automl/v1beta1/prediction_service.proto", :syntax => :proto3) do
18
- add_message "google.cloud.automl.v1beta1.PredictRequest" do
19
- optional :name, :string, 1
20
- optional :payload, :message, 2, "google.cloud.automl.v1beta1.ExamplePayload"
21
- map :params, :string, :string, 3
22
- end
23
- add_message "google.cloud.automl.v1beta1.PredictResponse" do
24
- repeated :payload, :message, 1, "google.cloud.automl.v1beta1.AnnotationPayload"
25
- optional :preprocessed_input, :message, 3, "google.cloud.automl.v1beta1.ExamplePayload"
26
- map :metadata, :string, :string, 2
27
- end
28
- add_message "google.cloud.automl.v1beta1.BatchPredictRequest" do
29
- optional :name, :string, 1
30
- optional :input_config, :message, 3, "google.cloud.automl.v1beta1.BatchPredictInputConfig"
31
- optional :output_config, :message, 4, "google.cloud.automl.v1beta1.BatchPredictOutputConfig"
32
- map :params, :string, :string, 5
33
- end
34
- add_message "google.cloud.automl.v1beta1.BatchPredictResult" do
35
- map :metadata, :string, :string, 1
17
+
18
+ descriptor_data = "\n4google/cloud/automl/v1beta1/prediction_service.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/automl/v1beta1/annotation_payload.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\x1a$google/cloud/automl/v1beta1/io.proto\x1a,google/cloud/automl/v1beta1/operations.proto\x1a#google/longrunning/operations.proto\"\xfe\x01\n\x0ePredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x41\n\x07payload\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayloadB\x03\xe0\x41\x02\x12G\n\x06params\x18\x03 \x03(\x0b\x32\x37.google.cloud.automl.v1beta1.PredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9a\x02\n\x0fPredictResponse\x12?\n\x07payload\x18\x01 \x03(\x0b\x32..google.cloud.automl.v1beta1.AnnotationPayload\x12G\n\x12preprocessed_input\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayload\x12L\n\x08metadata\x18\x02 \x03(\x0b\x32:.google.cloud.automl.v1beta1.PredictResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xee\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\x12O\n\x0cinput_config\x18\x03 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfigB\x03\xe0\x41\x02\x12Q\n\routput_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.BatchPredictOutputConfigB\x03\xe0\x41\x02\x12Q\n\x06params\x18\x05 \x03(\x0b\x32<.google.cloud.automl.v1beta1.BatchPredictRequest.ParamsEntryB\x03\xe0\x41\x02\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x96\x01\n\x12\x42\x61tchPredictResult\x12O\n\x08metadata\x18\x01 \x03(\x0b\x32=.google.cloud.automl.v1beta1.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\x9e\x04\n\x11PredictionService\x12\xbe\x01\n\x07Predict\x12+.google.cloud.automl.v1beta1.PredictRequest\x1a,.google.cloud.automl.v1beta1.PredictResponse\"X\x82\xd3\xe4\x93\x02<\"7/v1beta1/{name=projects/*/locations/*/models/*}:predict:\x01*\xda\x41\x13name,payload,params\x12\xfc\x01\n\x0c\x42\x61tchPredict\x12\x30.google.cloud.automl.v1beta1.BatchPredictRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\x82\xd3\xe4\x93\x02\x41\"</v1beta1/{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\xb3\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x16PredictionServiceProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3"
19
+
20
+ pool = Google::Protobuf::DescriptorPool.generated_pool
21
+
22
+ begin
23
+ pool.add_serialized_file(descriptor_data)
24
+ rescue TypeError => e
25
+ # Compatibility code: will be removed in the next major version.
26
+ require 'google/protobuf/descriptor_pb'
27
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
28
+ parsed.clear_dependency
29
+ serialized = parsed.class.encode(parsed)
30
+ file = pool.add_serialized_file(serialized)
31
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
32
+ imports = [
33
+ ["google.cloud.automl.v1beta1.ExamplePayload", "google/cloud/automl/v1beta1/data_items.proto"],
34
+ ["google.cloud.automl.v1beta1.AnnotationPayload", "google/cloud/automl/v1beta1/annotation_payload.proto"],
35
+ ["google.cloud.automl.v1beta1.BatchPredictInputConfig", "google/cloud/automl/v1beta1/io.proto"],
36
+ ]
37
+ imports.each do |type_name, expected_filename|
38
+ import_file = pool.lookup(type_name).file_descriptor
39
+ if import_file.name != expected_filename
40
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
36
41
  end
37
42
  end
43
+ warn "Each proto file must use a consistent fully-qualified name."
44
+ warn "This will become an error in the next major version."
38
45
  end
39
46
 
40
47
  module Google