google-cloud-automl-v1 0.5.1 → 0.7.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 +2 -2
- 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 +1738 -0
- data/lib/google/cloud/automl/v1/automl/rest/operations.rb +937 -0
- data/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +1119 -0
- data/lib/google/cloud/automl/v1/automl/rest.rb +66 -0
- data/lib/google/cloud/automl/v1/automl.rb +6 -0
- 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 +608 -0
- data/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +937 -0
- data/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb +168 -0
- data/lib/google/cloud/automl/v1/prediction_service/rest.rb +56 -0
- data/lib/google/cloud/automl/v1/prediction_service.rb +6 -0
- data/lib/google/cloud/automl/v1/prediction_service_pb.rb +27 -20
- data/lib/google/cloud/automl/v1/rest.rb +38 -0
- 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/lib/google/cloud/automl/v1.rb +5 -0
- 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 +15 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf5030a105926090fc9d2ab81b216b49549caf87e2ef852fdbfae53a6cb479ea
|
4
|
+
data.tar.gz: 20e81812e94f3335307dd1bc2944ae2ffb9cb9985076b3cc1c5c18b845665d32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1845dd8a4dcf1c1476af124cd96058ddd29627f3623f5f9953721c09fad18b633152bab27631c69fbe5916eca5f5d3a06b26acb2566c9e2f4d28a1ca710d2823
|
7
|
+
data.tar.gz: '0079a98743ec976ff489e46ea48d169b568baeba6302c22f6794d3946c44e5924615a1662632ef93f28f2dec24bc386a4f0cc31fb0400e374b2f465b271bb524'
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the Cloud AutoML V1 API
|
2
2
|
|
3
|
-
|
3
|
+
Train high-quality custom machine learning models with minimum effort and machine learning expertise.
|
4
4
|
|
5
5
|
AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites.
|
6
6
|
|
@@ -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/v1/annotation_payload.proto
|
3
4
|
|
@@ -9,20 +10,36 @@ require 'google/cloud/automl/v1/text_extraction_pb'
|
|
9
10
|
require 'google/cloud/automl/v1/text_sentiment_pb'
|
10
11
|
require 'google/cloud/automl/v1/translation_pb'
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
13
|
+
|
14
|
+
descriptor_data = "\n/google/cloud/automl/v1/annotation_payload.proto\x12\x16google.cloud.automl.v1\x1a+google/cloud/automl/v1/classification.proto\x1a&google/cloud/automl/v1/detection.proto\x1a,google/cloud/automl/v1/text_extraction.proto\x1a+google/cloud/automl/v1/text_sentiment.proto\x1a(google/cloud/automl/v1/translation.proto\"\xd3\x03\n\x11\x41nnotationPayload\x12\x44\n\x0btranslation\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1.TranslationAnnotationH\x00\x12J\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x30.google.cloud.automl.v1.ClassificationAnnotationH\x00\x12X\n\x16image_object_detection\x18\x04 \x01(\x0b\x32\x36.google.cloud.automl.v1.ImageObjectDetectionAnnotationH\x00\x12K\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x30.google.cloud.automl.v1.TextExtractionAnnotationH\x00\x12I\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32/.google.cloud.automl.v1.TextSentimentAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3"
|
15
|
+
|
16
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
17
|
+
|
18
|
+
begin
|
19
|
+
pool.add_serialized_file(descriptor_data)
|
20
|
+
rescue TypeError => e
|
21
|
+
# Compatibility code: will be removed in the next major version.
|
22
|
+
require 'google/protobuf/descriptor_pb'
|
23
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
24
|
+
parsed.clear_dependency
|
25
|
+
serialized = parsed.class.encode(parsed)
|
26
|
+
file = pool.add_serialized_file(serialized)
|
27
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
28
|
+
imports = [
|
29
|
+
["google.cloud.automl.v1.TranslationAnnotation", "google/cloud/automl/v1/translation.proto"],
|
30
|
+
["google.cloud.automl.v1.ClassificationAnnotation", "google/cloud/automl/v1/classification.proto"],
|
31
|
+
["google.cloud.automl.v1.ImageObjectDetectionAnnotation", "google/cloud/automl/v1/detection.proto"],
|
32
|
+
["google.cloud.automl.v1.TextExtractionAnnotation", "google/cloud/automl/v1/text_extraction.proto"],
|
33
|
+
["google.cloud.automl.v1.TextSentimentAnnotation", "google/cloud/automl/v1/text_sentiment.proto"],
|
34
|
+
]
|
35
|
+
imports.each do |type_name, expected_filename|
|
36
|
+
import_file = pool.lookup(type_name).file_descriptor
|
37
|
+
if import_file.name != expected_filename
|
38
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
24
39
|
end
|
25
40
|
end
|
41
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
42
|
+
warn "This will become an error in the next major version."
|
26
43
|
end
|
27
44
|
|
28
45
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/automl/v1/annotation_spec.proto
|
3
4
|
|
@@ -5,14 +6,31 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/api/resource_pb'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
|
10
|
+
descriptor_data = "\n,google/cloud/automl/v1/annotation_spec.proto\x12\x16google.cloud.automl.v1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\xa0\x01\n\x1a\x63om.google.cloud.automl.v1P\x01Z2cloud.google.com/go/automl/apiv1/automlpb;automlpb\xaa\x02\x16Google.Cloud.AutoML.V1\xca\x02\x16Google\\Cloud\\AutoMl\\V1\xea\x02\x19Google::Cloud::AutoML::V1b\x06proto3"
|
11
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
|
14
|
+
begin
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
16
|
+
rescue TypeError => e
|
17
|
+
# Compatibility code: will be removed in the next major version.
|
18
|
+
require 'google/protobuf/descriptor_pb'
|
19
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
20
|
+
parsed.clear_dependency
|
21
|
+
serialized = parsed.class.encode(parsed)
|
22
|
+
file = pool.add_serialized_file(serialized)
|
23
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
24
|
+
imports = [
|
25
|
+
]
|
26
|
+
imports.each do |type_name, expected_filename|
|
27
|
+
import_file = pool.lookup(type_name).file_descriptor
|
28
|
+
if import_file.name != expected_filename
|
29
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
14
30
|
end
|
15
31
|
end
|
32
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
33
|
+
warn "This will become an error in the next major version."
|
16
34
|
end
|
17
35
|
|
18
36
|
module Google
|
@@ -199,7 +199,7 @@ module Google
|
|
199
199
|
credentials = @config.credentials
|
200
200
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
201
201
|
# but only if the default endpoint does not have a region prefix.
|
202
|
-
enable_self_signed_jwt = @config.endpoint ==
|
202
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
203
203
|
!@config.endpoint.split(".").first.include?("-")
|
204
204
|
credentials ||= Credentials.default scope: @config.scope,
|
205
205
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -2006,9 +2006,9 @@ module Google
|
|
2006
2006
|
# * (`String`) The path to a service account key file in JSON format
|
2007
2007
|
# * (`Hash`) A service account key as a Hash
|
2008
2008
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2009
|
-
# (see the [googleauth docs](https://
|
2009
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
2010
2010
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2011
|
-
# (see the [signet docs](https://
|
2011
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
2012
2012
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2013
2013
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2014
2014
|
# * (`nil`) indicating no credentials
|
@@ -2050,7 +2050,9 @@ module Google
|
|
2050
2050
|
class Configuration
|
2051
2051
|
extend ::Gapic::Config
|
2052
2052
|
|
2053
|
-
|
2053
|
+
DEFAULT_ENDPOINT = "automl.googleapis.com"
|
2054
|
+
|
2055
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
2054
2056
|
config_attr :credentials, nil do |value|
|
2055
2057
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2056
2058
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -628,9 +628,9 @@ module Google
|
|
628
628
|
# * (`String`) The path to a service account key file in JSON format
|
629
629
|
# * (`Hash`) A service account key as a Hash
|
630
630
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
631
|
-
# (see the [googleauth docs](https://
|
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://
|
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
|
-
|
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
|