google-cloud-automl-v1beta1 0.7.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb +30 -15
- data/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb +24 -6
- data/lib/google/cloud/automl/v1beta1/automl/client.rb +16 -5
- data/lib/google/cloud/automl/v1beta1/automl/operations.rb +15 -4
- data/lib/google/cloud/automl/v1beta1/automl/rest/client.rb +473 -4
- data/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb +108 -8
- data/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb +24 -24
- data/lib/google/cloud/automl/v1beta1/classification_pb.rb +25 -47
- data/lib/google/cloud/automl/v1beta1/column_spec_pb.rb +26 -13
- data/lib/google/cloud/automl/v1beta1/data_items_pb.rb +28 -61
- data/lib/google/cloud/automl/v1beta1/data_stats_pb.rb +24 -54
- data/lib/google/cloud/automl/v1beta1/data_types_pb.rb +24 -22
- data/lib/google/cloud/automl/v1beta1/dataset_pb.rb +30 -20
- data/lib/google/cloud/automl/v1beta1/detection_pb.rb +26 -33
- data/lib/google/cloud/automl/v1beta1/geometry_pb.rb +24 -8
- data/lib/google/cloud/automl/v1beta1/image_pb.rb +24 -29
- data/lib/google/cloud/automl/v1beta1/io_pb.rb +24 -57
- data/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb +31 -17
- data/lib/google/cloud/automl/v1beta1/model_pb.rb +30 -25
- data/lib/google/cloud/automl/v1beta1/operations_pb.rb +27 -59
- data/lib/google/cloud/automl/v1beta1/prediction_service/client.rb +16 -5
- data/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb +15 -4
- data/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb +45 -4
- data/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb +108 -8
- data/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb +2 -2
- data/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb +27 -20
- data/lib/google/cloud/automl/v1beta1/ranges_pb.rb +24 -5
- data/lib/google/cloud/automl/v1beta1/regression_pb.rb +24 -8
- data/lib/google/cloud/automl/v1beta1/service_pb.rb +32 -125
- data/lib/google/cloud/automl/v1beta1/table_spec_pb.rb +25 -10
- data/lib/google/cloud/automl/v1beta1/tables_pb.rb +29 -34
- data/lib/google/cloud/automl/v1beta1/temporal_pb.rb +25 -5
- data/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb +25 -17
- data/lib/google/cloud/automl/v1beta1/text_pb.rb +24 -17
- data/lib/google/cloud/automl/v1beta1/text_segment_pb.rb +24 -6
- data/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb +25 -15
- data/lib/google/cloud/automl/v1beta1/translation_pb.rb +25 -17
- data/lib/google/cloud/automl/v1beta1/version.rb +1 -1
- data/lib/google/cloud/automl/v1beta1/video_pb.rb +24 -9
- 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/struct.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bf1b96f77dedc0dbaba52ba692cf645236765a3d3a66af8a58e074d8ca3c774
|
4
|
+
data.tar.gz: 6e7cfba1204e5ee9c70eb42f2f1ede66a6d49e41fda61b4cc91f980f6c706ae9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffe6a1cf5e7867d3f6debf6013f990ad73cf2b0959336bfeb3d8ea99fd5e1d6a5c81fd877ccc8dcb7fe4e1d730408e239b246de358161bfb6d118d06de14d289
|
7
|
+
data.tar.gz: c64a0f26e21756799b5db97e510fd205a8425da5d2a2c19f927b2d0d58a11ed1bb36f083ce222d0f3d4bed72a77270e78d4949984d80c7f15426d3c098a9d291
|
data/README.md
CHANGED
@@ -47,7 +47,7 @@ for general usage information.
|
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
49
|
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
50
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
53
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/automl/v1beta1/annotation_payload.proto
|
3
4
|
|
@@ -10,23 +11,37 @@ require 'google/cloud/automl/v1beta1/text_extraction_pb'
|
|
10
11
|
require 'google/cloud/automl/v1beta1/text_sentiment_pb'
|
11
12
|
require 'google/cloud/automl/v1beta1/translation_pb'
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
14
|
+
|
15
|
+
descriptor_data = "\n4google/cloud/automl/v1beta1/annotation_payload.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.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\"\xe6\x05\n\x11\x41nnotationPayload\x12I\n\x0btranslation\x18\x02 \x01(\x0b\x32\x32.google.cloud.automl.v1beta1.TranslationAnnotationH\x00\x12O\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.ClassificationAnnotationH\x00\x12]\n\x16image_object_detection\x18\x04 \x01(\x0b\x32;.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationH\x00\x12Z\n\x14video_classification\x18\t \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoClassificationAnnotationH\x00\x12[\n\x15video_object_tracking\x18\x08 \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationH\x00\x12P\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TextExtractionAnnotationH\x00\x12N\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.TextSentimentAnnotationH\x00\x12?\n\x06tables\x18\n \x01(\x0b\x32-.google.cloud.automl.v1beta1.TablesAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\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"
|
16
|
+
|
17
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
18
|
+
|
19
|
+
begin
|
20
|
+
pool.add_serialized_file(descriptor_data)
|
21
|
+
rescue TypeError => e
|
22
|
+
# Compatibility code: will be removed in the next major version.
|
23
|
+
require 'google/protobuf/descriptor_pb'
|
24
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
25
|
+
parsed.clear_dependency
|
26
|
+
serialized = parsed.class.encode(parsed)
|
27
|
+
file = pool.add_serialized_file(serialized)
|
28
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
29
|
+
imports = [
|
30
|
+
["google.cloud.automl.v1beta1.TranslationAnnotation", "google/cloud/automl/v1beta1/translation.proto"],
|
31
|
+
["google.cloud.automl.v1beta1.ClassificationAnnotation", "google/cloud/automl/v1beta1/classification.proto"],
|
32
|
+
["google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation", "google/cloud/automl/v1beta1/detection.proto"],
|
33
|
+
["google.cloud.automl.v1beta1.TextExtractionAnnotation", "google/cloud/automl/v1beta1/text_extraction.proto"],
|
34
|
+
["google.cloud.automl.v1beta1.TextSentimentAnnotation", "google/cloud/automl/v1beta1/text_sentiment.proto"],
|
35
|
+
["google.cloud.automl.v1beta1.TablesAnnotation", "google/cloud/automl/v1beta1/tables.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}"
|
28
41
|
end
|
29
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."
|
30
45
|
end
|
31
46
|
|
32
47
|
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/annotation_spec.proto
|
3
4
|
|
@@ -5,14 +6,31 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/api/resource_pb'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
|
10
|
+
descriptor_data = "\n1google/cloud/automl/v1beta1/annotation_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\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"
|
11
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
|
14
|
+
begin
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
16
|
+
rescue TypeError => e
|
17
|
+
# Compatibility code: will be removed in the next major version.
|
18
|
+
require 'google/protobuf/descriptor_pb'
|
19
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
20
|
+
parsed.clear_dependency
|
21
|
+
serialized = parsed.class.encode(parsed)
|
22
|
+
file = pool.add_serialized_file(serialized)
|
23
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
24
|
+
imports = [
|
25
|
+
]
|
26
|
+
imports.each do |type_name, expected_filename|
|
27
|
+
import_file = pool.lookup(type_name).file_descriptor
|
28
|
+
if import_file.name != expected_filename
|
29
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
14
30
|
end
|
15
31
|
end
|
32
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
33
|
+
warn "This will become an error in the next major version."
|
16
34
|
end
|
17
35
|
|
18
36
|
module Google
|
@@ -220,7 +220,7 @@ module Google
|
|
220
220
|
credentials = @config.credentials
|
221
221
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
222
222
|
# but only if the default endpoint does not have a region prefix.
|
223
|
-
enable_self_signed_jwt = @config.endpoint ==
|
223
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
224
224
|
!@config.endpoint.split(".").first.include?("-")
|
225
225
|
credentials ||= Credentials.default scope: @config.scope,
|
226
226
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -241,7 +241,8 @@ module Google
|
|
241
241
|
credentials: credentials,
|
242
242
|
endpoint: @config.endpoint,
|
243
243
|
channel_args: @config.channel_args,
|
244
|
-
interceptors: @config.interceptors
|
244
|
+
interceptors: @config.interceptors,
|
245
|
+
channel_pool_config: @config.channel_pool
|
245
246
|
)
|
246
247
|
end
|
247
248
|
|
@@ -2596,9 +2597,9 @@ module Google
|
|
2596
2597
|
# * (`String`) The path to a service account key file in JSON format
|
2597
2598
|
# * (`Hash`) A service account key as a Hash
|
2598
2599
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2599
|
-
# (see the [googleauth docs](https://
|
2600
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
2600
2601
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2601
|
-
# (see the [signet docs](https://
|
2602
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
2602
2603
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2603
2604
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2604
2605
|
# * (`nil`) indicating no credentials
|
@@ -2640,7 +2641,9 @@ module Google
|
|
2640
2641
|
class Configuration
|
2641
2642
|
extend ::Gapic::Config
|
2642
2643
|
|
2643
|
-
|
2644
|
+
DEFAULT_ENDPOINT = "automl.googleapis.com"
|
2645
|
+
|
2646
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
2644
2647
|
config_attr :credentials, nil do |value|
|
2645
2648
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2646
2649
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -2675,6 +2678,14 @@ module Google
|
|
2675
2678
|
end
|
2676
2679
|
end
|
2677
2680
|
|
2681
|
+
##
|
2682
|
+
# Configuration for the channel pool
|
2683
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
2684
|
+
#
|
2685
|
+
def channel_pool
|
2686
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
2687
|
+
end
|
2688
|
+
|
2678
2689
|
##
|
2679
2690
|
# Configuration RPC class for the AutoMl API.
|
2680
2691
|
#
|
@@ -93,7 +93,8 @@ module Google
|
|
93
93
|
credentials: credentials,
|
94
94
|
endpoint: @config.endpoint,
|
95
95
|
channel_args: @config.channel_args,
|
96
|
-
interceptors: @config.interceptors
|
96
|
+
interceptors: @config.interceptors,
|
97
|
+
channel_pool_config: @config.channel_pool
|
97
98
|
)
|
98
99
|
|
99
100
|
# Used by an LRO wrapper for some methods of this service
|
@@ -628,9 +629,9 @@ module Google
|
|
628
629
|
# * (`String`) The path to a service account key file in JSON format
|
629
630
|
# * (`Hash`) A service account key as a Hash
|
630
631
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
631
|
-
# (see the [googleauth docs](https://
|
632
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
632
633
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
633
|
-
# (see the [signet docs](https://
|
634
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
634
635
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
635
636
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
636
637
|
# * (`nil`) indicating no credentials
|
@@ -672,7 +673,9 @@ module Google
|
|
672
673
|
class Configuration
|
673
674
|
extend ::Gapic::Config
|
674
675
|
|
675
|
-
|
676
|
+
DEFAULT_ENDPOINT = "automl.googleapis.com"
|
677
|
+
|
678
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
676
679
|
config_attr :credentials, nil do |value|
|
677
680
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
678
681
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -707,6 +710,14 @@ module Google
|
|
707
710
|
end
|
708
711
|
end
|
709
712
|
|
713
|
+
##
|
714
|
+
# Configuration for the channel pool
|
715
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
716
|
+
#
|
717
|
+
def channel_pool
|
718
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
719
|
+
end
|
720
|
+
|
710
721
|
##
|
711
722
|
# Configuration RPC class for the Operations API.
|
712
723
|
#
|