google-cloud-vision 0.30.3 → 0.30.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/LOGGING.md +1 -1
- data/lib/google-cloud-vision.rb +1 -1
- data/lib/google/cloud/vision/v1.rb +4 -4
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb +31 -31
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb +1 -1
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb +1 -1
- data/lib/google/cloud/vision/v1/doc/google/longrunning/operations.rb +9 -9
- data/lib/google/cloud/vision/v1/doc/google/protobuf/any.rb +8 -8
- data/lib/google/cloud/vision/v1/doc/google/protobuf/wrappers.rb +18 -18
- data/lib/google/cloud/vision/v1/doc/google/rpc/status.rb +11 -11
- data/lib/google/cloud/vision/v1/image_annotator_client.rb +5 -5
- data/lib/google/cloud/vision/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe3749e507b7805dca06c8a3def8d9a8b9ef304db045cbc3cfafbb909d60198f
|
4
|
+
data.tar.gz: 4a4249af10a0a2bc4720d1de86d1b5b913f7e0542358cdfd1c2310b4f03f9a20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e40b6316cce217c6d546e269981cf3cbbdb5fe2cf99e14985308370839e90fccb26584ca96993e083935401f037c25bcd2c29afde59f392c8610bdc94814b90
|
7
|
+
data.tar.gz: 42ea947494ff179667fc0a62d54e49d74558b22417dd793e257bd4f0e3a8a197f6a6e598e0e031d5622242a1646f0bc68a6d3223b458a70c97223077c90bd0fb
|
data/CHANGELOG.md
CHANGED
data/LOGGING.md
CHANGED
@@ -5,7 +5,7 @@ To enable logging for this library, set the logger for the underlying
|
|
5
5
|
that you set may be a Ruby stdlib
|
6
6
|
[`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as
|
7
7
|
shown below, or a
|
8
|
-
[`Google::Cloud::Logging::Logger`](https://
|
8
|
+
[`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/docs/google-cloud-logging/latest/Google/Cloud/Logging/Logger)
|
9
9
|
that will write logs to [Stackdriver
|
10
10
|
Logging](https://cloud.google.com/logging/). See
|
11
11
|
[grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
data/lib/google-cloud-vision.rb
CHANGED
@@ -22,7 +22,7 @@ module Google
|
|
22
22
|
# rubocop:disable LineLength
|
23
23
|
|
24
24
|
##
|
25
|
-
# # Ruby Client for Cloud Vision API ([Alpha](https://github.com/
|
25
|
+
# # Ruby Client for Cloud Vision API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
|
26
26
|
#
|
27
27
|
# [Cloud Vision API][Product Documentation]:
|
28
28
|
# Integrates Google Vision features, including image labeling, face, logo, and
|
@@ -37,7 +37,7 @@ module Google
|
|
37
37
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
38
38
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
39
39
|
# 3. [Enable the Cloud Vision API.](https://console.cloud.google.com/apis/library/vision.googleapis.com)
|
40
|
-
# 4. [Setup Authentication.](https://
|
40
|
+
# 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
41
41
|
#
|
42
42
|
# ### Installation
|
43
43
|
# ```
|
@@ -64,7 +64,7 @@ module Google
|
|
64
64
|
# ### Next Steps
|
65
65
|
# - Read the [Cloud Vision API Product documentation][Product Documentation]
|
66
66
|
# to learn more about the product and see How-to Guides.
|
67
|
-
# - View this [repository's main README](https://github.com/
|
67
|
+
# - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
68
68
|
# to see the full list of Cloud APIs that we cover.
|
69
69
|
#
|
70
70
|
# [Product Documentation]: https://cloud.google.com/vision
|
@@ -73,7 +73,7 @@ module Google
|
|
73
73
|
#
|
74
74
|
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
75
75
|
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
76
|
-
# or a [`Google::Cloud::Logging::Logger`](https://
|
76
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
77
77
|
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
78
78
|
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
79
79
|
#
|
@@ -18,15 +18,15 @@ module Google
|
|
18
18
|
module Vision
|
19
19
|
module V1
|
20
20
|
# The type of Google Cloud Vision API detection to perform, and the maximum
|
21
|
-
# number of results to return for that type. Multiple
|
22
|
-
# be specified in the
|
21
|
+
# number of results to return for that type. Multiple `Feature` objects can
|
22
|
+
# be specified in the `features` list.
|
23
23
|
# @!attribute [rw] type
|
24
24
|
# @return [Google::Cloud::Vision::V1::Feature::Type]
|
25
25
|
# The feature type.
|
26
26
|
# @!attribute [rw] max_results
|
27
27
|
# @return [Integer]
|
28
28
|
# Maximum number of results of this type. Does not apply to
|
29
|
-
#
|
29
|
+
# `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
|
30
30
|
# @!attribute [rw] model
|
31
31
|
# @return [String]
|
32
32
|
# Model to use for the feature.
|
@@ -52,11 +52,11 @@ module Google
|
|
52
52
|
|
53
53
|
# Run text detection / optical character recognition (OCR). Text detection
|
54
54
|
# is optimized for areas of text within a larger image; if the image is
|
55
|
-
# a document, use
|
55
|
+
# a document, use `DOCUMENT_TEXT_DETECTION` instead.
|
56
56
|
TEXT_DETECTION = 5
|
57
57
|
|
58
58
|
# Run dense text document OCR. Takes precedence when both
|
59
|
-
#
|
59
|
+
# `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
|
60
60
|
DOCUMENT_TEXT_DETECTION = 11
|
61
61
|
|
62
62
|
# Run Safe Search to detect potentially unsafe
|
@@ -81,10 +81,10 @@ module Google
|
|
81
81
|
# External image source (Google Cloud Storage or web URL image location).
|
82
82
|
# @!attribute [rw] gcs_image_uri
|
83
83
|
# @return [String]
|
84
|
-
# **Use
|
84
|
+
# **Use `image_uri` instead.**
|
85
85
|
#
|
86
86
|
# The Google Cloud Storage URI of the form
|
87
|
-
#
|
87
|
+
# `gs://bucket_name/object_name`. Object versioning is not supported. See
|
88
88
|
# [Google Cloud Storage Request
|
89
89
|
# URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
|
90
90
|
# @!attribute [rw] image_uri
|
@@ -92,7 +92,7 @@ module Google
|
|
92
92
|
# The URI of the source image. Can be either:
|
93
93
|
#
|
94
94
|
# 1. A Google Cloud Storage URI of the form
|
95
|
-
#
|
95
|
+
# `gs://bucket_name/object_name`. Object versioning is not supported. See
|
96
96
|
# [Google Cloud Storage Request
|
97
97
|
# URIs](https://cloud.google.com/storage/docs/reference-uris) for more
|
98
98
|
# info.
|
@@ -104,7 +104,7 @@ module Google
|
|
104
104
|
# throttles requests to the site for abuse prevention. You should not
|
105
105
|
# depend on externally-hosted images for production applications.
|
106
106
|
#
|
107
|
-
# When both
|
107
|
+
# When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
|
108
108
|
# precedence.
|
109
109
|
class ImageSource; end
|
110
110
|
|
@@ -112,12 +112,12 @@ module Google
|
|
112
112
|
# @!attribute [rw] content
|
113
113
|
# @return [String]
|
114
114
|
# Image content, represented as a stream of bytes.
|
115
|
-
# Note: As with all
|
115
|
+
# Note: As with all `bytes` fields, protobuffers use a pure binary
|
116
116
|
# representation, whereas JSON representations use base64.
|
117
117
|
# @!attribute [rw] source
|
118
118
|
# @return [Google::Cloud::Vision::V1::ImageSource]
|
119
119
|
# Google Cloud Storage image location, or publicly-accessible image
|
120
|
-
# URL. If both
|
120
|
+
# URL. If both `content` and `source` are provided for an image, `content`
|
121
121
|
# takes precedence and is used to perform the image annotation request.
|
122
122
|
class Image; end
|
123
123
|
|
@@ -125,16 +125,16 @@ module Google
|
|
125
125
|
# @!attribute [rw] bounding_poly
|
126
126
|
# @return [Google::Cloud::Vision::V1::BoundingPoly]
|
127
127
|
# The bounding polygon around the face. The coordinates of the bounding box
|
128
|
-
# are in the original image's scale, as returned in
|
128
|
+
# are in the original image's scale, as returned in `ImageParams`.
|
129
129
|
# The bounding box is computed to "frame" the face in accordance with human
|
130
130
|
# expectations. It is based on the landmarker results.
|
131
131
|
# Note that one or more x and/or y coordinates may not be generated in the
|
132
|
-
#
|
132
|
+
# `BoundingPoly` (the polygon will be unbounded) if only a partial face
|
133
133
|
# appears in the image to be annotated.
|
134
134
|
# @!attribute [rw] fd_bounding_poly
|
135
135
|
# @return [Google::Cloud::Vision::V1::BoundingPoly]
|
136
|
-
# The
|
137
|
-
#
|
136
|
+
# The `fd_bounding_poly` bounding polygon is tighter than the
|
137
|
+
# `boundingPoly`, and encloses only the skin part of the face. Typically, it
|
138
138
|
# is used to eliminate the face from any image analysis that detects the
|
139
139
|
# "amount of skin" visible in an image. It is not based on the
|
140
140
|
# landmarker results, only on the initial face detection, hence
|
@@ -194,7 +194,7 @@ module Google
|
|
194
194
|
class Landmark
|
195
195
|
# Face landmark (feature) type.
|
196
196
|
# Left and right are defined from the vantage of the viewer of the image
|
197
|
-
# without considering mirror projections typical of photos. So,
|
197
|
+
# without considering mirror projections typical of photos. So, `LEFT_EYE`,
|
198
198
|
# typically, is the person's right eye.
|
199
199
|
module Type
|
200
200
|
# Unknown face landmark detected. Should not be filled.
|
@@ -311,7 +311,7 @@ module Google
|
|
311
311
|
# lat/long location coordinates.
|
312
312
|
class LocationInfo; end
|
313
313
|
|
314
|
-
# A
|
314
|
+
# A `Property` consists of a user-supplied name/value pair.
|
315
315
|
# @!attribute [rw] name
|
316
316
|
# @return [String]
|
317
317
|
# Name of the property.
|
@@ -332,16 +332,16 @@ module Google
|
|
332
332
|
# @!attribute [rw] locale
|
333
333
|
# @return [String]
|
334
334
|
# The language code for the locale in which the entity textual
|
335
|
-
#
|
335
|
+
# `description` is expressed.
|
336
336
|
# @!attribute [rw] description
|
337
337
|
# @return [String]
|
338
|
-
# Entity textual description, expressed in its
|
338
|
+
# Entity textual description, expressed in its `locale` language.
|
339
339
|
# @!attribute [rw] score
|
340
340
|
# @return [Float]
|
341
341
|
# Overall score of the result. Range [0, 1].
|
342
342
|
# @!attribute [rw] confidence
|
343
343
|
# @return [Float]
|
344
|
-
# **Deprecated. Use
|
344
|
+
# **Deprecated. Use `score` instead.**
|
345
345
|
# The accuracy of the entity detection in an image.
|
346
346
|
# For example, for an image in which the "Eiffel Tower" entity is detected,
|
347
347
|
# this field represents the confidence that there is a tower in the query
|
@@ -356,17 +356,17 @@ module Google
|
|
356
356
|
# @!attribute [rw] bounding_poly
|
357
357
|
# @return [Google::Cloud::Vision::V1::BoundingPoly]
|
358
358
|
# Image region to which this entity belongs. Not produced
|
359
|
-
# for
|
359
|
+
# for `LABEL_DETECTION` features.
|
360
360
|
# @!attribute [rw] locations
|
361
361
|
# @return [Array<Google::Cloud::Vision::V1::LocationInfo>]
|
362
362
|
# The location information for the detected entity. Multiple
|
363
|
-
#
|
363
|
+
# `LocationInfo` elements can be present because one location may
|
364
364
|
# indicate the location of the scene in the image, and another location
|
365
365
|
# may indicate the location of the place where the image was taken.
|
366
366
|
# Location information is usually present for landmarks.
|
367
367
|
# @!attribute [rw] properties
|
368
368
|
# @return [Array<Google::Cloud::Vision::V1::Property>]
|
369
|
-
# Some entities may have optional user-supplied
|
369
|
+
# Some entities may have optional user-supplied `Property` (name/value)
|
370
370
|
# fields, such a score or string that qualifies the entity.
|
371
371
|
class EntityAnnotation; end
|
372
372
|
|
@@ -381,7 +381,7 @@ module Google
|
|
381
381
|
# http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
382
382
|
# @!attribute [rw] name
|
383
383
|
# @return [String]
|
384
|
-
# Object name, expressed in its
|
384
|
+
# Object name, expressed in its `language_code` language.
|
385
385
|
# @!attribute [rw] score
|
386
386
|
# @return [Float]
|
387
387
|
# Score of the result. Range [0, 1].
|
@@ -417,7 +417,7 @@ module Google
|
|
417
417
|
# body areas.
|
418
418
|
class SafeSearchAnnotation; end
|
419
419
|
|
420
|
-
# Rectangle determined by min and max
|
420
|
+
# Rectangle determined by min and max `LatLng` pairs.
|
421
421
|
# @!attribute [rw] min_lat_lng
|
422
422
|
# @return [Google::Type::LatLng]
|
423
423
|
# Min lat/long pair.
|
@@ -456,7 +456,7 @@ module Google
|
|
456
456
|
# @!attribute [rw] bounding_poly
|
457
457
|
# @return [Google::Cloud::Vision::V1::BoundingPoly]
|
458
458
|
# The bounding polygon for the crop region. The coordinates of the bounding
|
459
|
-
# box are in the original image's scale, as returned in
|
459
|
+
# box are in the original image's scale, as returned in `ImageParams`.
|
460
460
|
# @!attribute [rw] confidence
|
461
461
|
# @return [Float]
|
462
462
|
# Confidence of this being a salient region. Range [0, 1].
|
@@ -497,7 +497,7 @@ module Google
|
|
497
497
|
# @return [Array<String>]
|
498
498
|
# List of languages to use for TEXT_DETECTION. In most cases, an empty value
|
499
499
|
# yields the best results since it enables automatic language detection. For
|
500
|
-
# languages based on the Latin alphabet, setting
|
500
|
+
# languages based on the Latin alphabet, setting `language_hints` is not
|
501
501
|
# needed. In rare cases, when the language of the text in the image is known,
|
502
502
|
# setting a hint will help get better results (although it will be a
|
503
503
|
# significant hindrance if the hint is wrong). Text detection returns an
|
@@ -577,7 +577,7 @@ module Google
|
|
577
577
|
# @return [Google::Rpc::Status]
|
578
578
|
# If set, represents the error message for the operation.
|
579
579
|
# Note that filled-in image annotations are guaranteed to be
|
580
|
-
# correct, even when
|
580
|
+
# correct, even when `error` is set.
|
581
581
|
# @!attribute [rw] context
|
582
582
|
# @return [Google::Cloud::Vision::V1::ImageAnnotationContext]
|
583
583
|
# If present, contextual information is needed to understand where this image
|
@@ -662,9 +662,9 @@ module Google
|
|
662
662
|
# The valid range is [1, 100]. If not specified, the default value is 20.
|
663
663
|
#
|
664
664
|
# For example, for one pdf file with 100 pages, 100 response protos will
|
665
|
-
# be generated. If
|
665
|
+
# be generated. If `batch_size` = 20, then 5 json files each
|
666
666
|
# containing 20 response protos will be written under the prefix
|
667
|
-
#
|
667
|
+
# `gcs_destination`.`uri`.
|
668
668
|
#
|
669
669
|
# Currently, batch_size only applies to GcsDestination, with potential future
|
670
670
|
# support for other output configurations.
|
@@ -683,7 +683,7 @@ module Google
|
|
683
683
|
# Google Cloud Storage URI where the results will be stored. Results will
|
684
684
|
# be in JSON format and preceded by its corresponding input URI. This field
|
685
685
|
# can either represent a single file, or a prefix for multiple outputs.
|
686
|
-
# Prefixes must end in a
|
686
|
+
# Prefixes must end in a `/`.
|
687
687
|
#
|
688
688
|
# Examples:
|
689
689
|
#
|
@@ -65,7 +65,7 @@ module Google
|
|
65
65
|
EOL_SURE_SPACE = 3
|
66
66
|
|
67
67
|
# End-line hyphen that is not present in text; does not co-occur with
|
68
|
-
#
|
68
|
+
# `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
|
69
69
|
HYPHEN = 4
|
70
70
|
|
71
71
|
# Line break that ends a paragraph.
|
@@ -90,7 +90,7 @@ module Google
|
|
90
90
|
# Label for extra metadata.
|
91
91
|
# @!attribute [rw] language_code
|
92
92
|
# @return [String]
|
93
|
-
# The BCP-47 language code for
|
93
|
+
# The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
|
94
94
|
# For more information, see
|
95
95
|
# http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
96
96
|
class WebLabel; end
|
@@ -21,7 +21,7 @@ module Google
|
|
21
21
|
# @return [String]
|
22
22
|
# The server-assigned name, which is only unique within the same service that
|
23
23
|
# originally returns it. If you use the default HTTP mapping, the
|
24
|
-
#
|
24
|
+
# `name` should have the format of `operations/some/unique/name`.
|
25
25
|
# @!attribute [rw] metadata
|
26
26
|
# @return [Google::Protobuf::Any]
|
27
27
|
# Service-specific metadata associated with the operation. It typically
|
@@ -30,8 +30,8 @@ module Google
|
|
30
30
|
# long-running operation should document the metadata type, if any.
|
31
31
|
# @!attribute [rw] done
|
32
32
|
# @return [true, false]
|
33
|
-
# If the value is
|
34
|
-
# If true, the operation is completed, and either
|
33
|
+
# If the value is `false`, it means the operation is still in progress.
|
34
|
+
# If true, the operation is completed, and either `error` or `response` is
|
35
35
|
# available.
|
36
36
|
# @!attribute [rw] error
|
37
37
|
# @return [Google::Rpc::Status]
|
@@ -39,13 +39,13 @@ module Google
|
|
39
39
|
# @!attribute [rw] response
|
40
40
|
# @return [Google::Protobuf::Any]
|
41
41
|
# The normal response of the operation in case of success. If the original
|
42
|
-
# method returns no data on success, such as
|
43
|
-
#
|
44
|
-
#
|
45
|
-
# methods, the response should have the type
|
42
|
+
# method returns no data on success, such as `Delete`, the response is
|
43
|
+
# `google.protobuf.Empty`. If the original method is standard
|
44
|
+
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
45
|
+
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
46
46
|
# is the original method name. For example, if the original method name
|
47
|
-
# is
|
48
|
-
#
|
47
|
+
# is `TakeSnapshot()`, the inferred response type is
|
48
|
+
# `TakeSnapshotResponse`.
|
49
49
|
class Operation; end
|
50
50
|
|
51
51
|
# The request message for {Google::Longrunning::Operations::GetOperation Operations::GetOperation}.
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
module Google
|
17
17
|
module Protobuf
|
18
|
-
#
|
18
|
+
# `Any` contains an arbitrary serialized protocol buffer message along with a
|
19
19
|
# URL that describes the type of the serialized message.
|
20
20
|
#
|
21
21
|
# Protobuf library provides support to pack/unpack Any values in the form
|
@@ -69,9 +69,9 @@ module Google
|
|
69
69
|
#
|
70
70
|
# = JSON
|
71
71
|
#
|
72
|
-
# The JSON representation of an
|
72
|
+
# The JSON representation of an `Any` value uses the regular
|
73
73
|
# representation of the deserialized, embedded message, with an
|
74
|
-
# additional field
|
74
|
+
# additional field `@type` which contains the type URL. Example:
|
75
75
|
#
|
76
76
|
# package google.profile;
|
77
77
|
# message Person {
|
@@ -87,7 +87,7 @@ module Google
|
|
87
87
|
#
|
88
88
|
# If the embedded message type is well-known and has a custom JSON
|
89
89
|
# representation, that representation will be embedded adding a field
|
90
|
-
#
|
90
|
+
# `value` which holds the custom JSON in addition to the `@type`
|
91
91
|
# field. Example (for message {Google::Protobuf::Duration}):
|
92
92
|
#
|
93
93
|
# {
|
@@ -99,15 +99,15 @@ module Google
|
|
99
99
|
# A URL/resource name that uniquely identifies the type of the serialized
|
100
100
|
# protocol buffer message. The last segment of the URL's path must represent
|
101
101
|
# the fully qualified name of the type (as in
|
102
|
-
#
|
102
|
+
# `path/google.protobuf.Duration`). The name should be in a canonical form
|
103
103
|
# (e.g., leading "." is not accepted).
|
104
104
|
#
|
105
105
|
# In practice, teams usually precompile into the binary all types that they
|
106
106
|
# expect it to use in the context of Any. However, for URLs which use the
|
107
|
-
# scheme
|
107
|
+
# scheme `http`, `https`, or no scheme, one can optionally set up a type
|
108
108
|
# server that maps type URLs to message definitions as follows:
|
109
109
|
#
|
110
|
-
# * If no scheme is provided,
|
110
|
+
# * If no scheme is provided, `https` is assumed.
|
111
111
|
# * An HTTP GET on the URL must yield a {Google::Protobuf::Type}
|
112
112
|
# value in binary format, or produce an error.
|
113
113
|
# * Applications are allowed to cache lookup results based on the
|
@@ -120,7 +120,7 @@ module Google
|
|
120
120
|
# protobuf release, and it is not used for type URLs beginning with
|
121
121
|
# type.googleapis.com.
|
122
122
|
#
|
123
|
-
# Schemes other than
|
123
|
+
# Schemes other than `http`, `https` (or the empty scheme) might be
|
124
124
|
# used with implementation specific semantics.
|
125
125
|
# @!attribute [rw] value
|
126
126
|
# @return [String]
|
@@ -15,73 +15,73 @@
|
|
15
15
|
|
16
16
|
module Google
|
17
17
|
module Protobuf
|
18
|
-
# Wrapper message for
|
18
|
+
# Wrapper message for `double`.
|
19
19
|
#
|
20
|
-
# The JSON representation for
|
20
|
+
# The JSON representation for `DoubleValue` is JSON number.
|
21
21
|
# @!attribute [rw] value
|
22
22
|
# @return [Float]
|
23
23
|
# The double value.
|
24
24
|
class DoubleValue; end
|
25
25
|
|
26
|
-
# Wrapper message for
|
26
|
+
# Wrapper message for `float`.
|
27
27
|
#
|
28
|
-
# The JSON representation for
|
28
|
+
# The JSON representation for `FloatValue` is JSON number.
|
29
29
|
# @!attribute [rw] value
|
30
30
|
# @return [Float]
|
31
31
|
# The float value.
|
32
32
|
class FloatValue; end
|
33
33
|
|
34
|
-
# Wrapper message for
|
34
|
+
# Wrapper message for `int64`.
|
35
35
|
#
|
36
|
-
# The JSON representation for
|
36
|
+
# The JSON representation for `Int64Value` is JSON string.
|
37
37
|
# @!attribute [rw] value
|
38
38
|
# @return [Integer]
|
39
39
|
# The int64 value.
|
40
40
|
class Int64Value; end
|
41
41
|
|
42
|
-
# Wrapper message for
|
42
|
+
# Wrapper message for `uint64`.
|
43
43
|
#
|
44
|
-
# The JSON representation for
|
44
|
+
# The JSON representation for `UInt64Value` is JSON string.
|
45
45
|
# @!attribute [rw] value
|
46
46
|
# @return [Integer]
|
47
47
|
# The uint64 value.
|
48
48
|
class UInt64Value; end
|
49
49
|
|
50
|
-
# Wrapper message for
|
50
|
+
# Wrapper message for `int32`.
|
51
51
|
#
|
52
|
-
# The JSON representation for
|
52
|
+
# The JSON representation for `Int32Value` is JSON number.
|
53
53
|
# @!attribute [rw] value
|
54
54
|
# @return [Integer]
|
55
55
|
# The int32 value.
|
56
56
|
class Int32Value; end
|
57
57
|
|
58
|
-
# Wrapper message for
|
58
|
+
# Wrapper message for `uint32`.
|
59
59
|
#
|
60
|
-
# The JSON representation for
|
60
|
+
# The JSON representation for `UInt32Value` is JSON number.
|
61
61
|
# @!attribute [rw] value
|
62
62
|
# @return [Integer]
|
63
63
|
# The uint32 value.
|
64
64
|
class UInt32Value; end
|
65
65
|
|
66
|
-
# Wrapper message for
|
66
|
+
# Wrapper message for `bool`.
|
67
67
|
#
|
68
|
-
# The JSON representation for
|
68
|
+
# The JSON representation for `BoolValue` is JSON `true` and `false`.
|
69
69
|
# @!attribute [rw] value
|
70
70
|
# @return [true, false]
|
71
71
|
# The bool value.
|
72
72
|
class BoolValue; end
|
73
73
|
|
74
|
-
# Wrapper message for
|
74
|
+
# Wrapper message for `string`.
|
75
75
|
#
|
76
|
-
# The JSON representation for
|
76
|
+
# The JSON representation for `StringValue` is JSON string.
|
77
77
|
# @!attribute [rw] value
|
78
78
|
# @return [String]
|
79
79
|
# The string value.
|
80
80
|
class StringValue; end
|
81
81
|
|
82
|
-
# Wrapper message for
|
82
|
+
# Wrapper message for `bytes`.
|
83
83
|
#
|
84
|
-
# The JSON representation for
|
84
|
+
# The JSON representation for `BytesValue` is JSON string.
|
85
85
|
# @!attribute [rw] value
|
86
86
|
# @return [String]
|
87
87
|
# The bytes value.
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
module Google
|
17
17
|
module Rpc
|
18
|
-
# The
|
18
|
+
# The `Status` type defines a logical error model that is suitable for different
|
19
19
|
# programming environments, including REST APIs and RPC APIs. It is used by
|
20
20
|
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
21
21
|
#
|
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
#
|
25
25
|
# = Overview
|
26
26
|
#
|
27
|
-
# The
|
27
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
28
28
|
# and error details. The error code should be an enum value of
|
29
29
|
# {Google::Rpc::Code}, but it may accept additional error codes if needed. The
|
30
30
|
# error message should be a developer-facing English message that helps
|
@@ -32,40 +32,40 @@ module Google
|
|
32
32
|
# error message is needed, put the localized message in the error details or
|
33
33
|
# localize it in the client. The optional error details may contain arbitrary
|
34
34
|
# information about the error. There is a predefined set of error detail types
|
35
|
-
# in the package
|
35
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
36
36
|
#
|
37
37
|
# = Language mapping
|
38
38
|
#
|
39
|
-
# The
|
40
|
-
# is not necessarily the actual wire format. When the
|
39
|
+
# The `Status` message is the logical representation of the error model, but it
|
40
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
41
41
|
# exposed in different client libraries and different wire protocols, it can be
|
42
42
|
# mapped differently. For example, it will likely be mapped to some exceptions
|
43
43
|
# in Java, but more likely mapped to some error codes in C.
|
44
44
|
#
|
45
45
|
# = Other uses
|
46
46
|
#
|
47
|
-
# The error model and the
|
47
|
+
# The error model and the `Status` message can be used in a variety of
|
48
48
|
# environments, either with or without APIs, to provide a
|
49
49
|
# consistent developer experience across different environments.
|
50
50
|
#
|
51
51
|
# Example uses of this error model include:
|
52
52
|
#
|
53
53
|
# * Partial errors. If a service needs to return partial errors to the client,
|
54
|
-
# it may embed the
|
54
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
55
55
|
# errors.
|
56
56
|
#
|
57
57
|
# * Workflow errors. A typical workflow has multiple steps. Each step may
|
58
|
-
# have a
|
58
|
+
# have a `Status` message for error reporting.
|
59
59
|
#
|
60
60
|
# * Batch operations. If a client uses batch request and batch response, the
|
61
|
-
#
|
61
|
+
# `Status` message should be used directly inside batch response, one for
|
62
62
|
# each error sub-response.
|
63
63
|
#
|
64
64
|
# * Asynchronous operations. If an API call embeds asynchronous operation
|
65
65
|
# results in its response, the status of those operations should be
|
66
|
-
# represented directly using the
|
66
|
+
# represented directly using the `Status` message.
|
67
67
|
#
|
68
|
-
# * Logging. If some API errors are stored in logs, the message
|
68
|
+
# * Logging. If some API errors are stored in logs, the message `Status` could
|
69
69
|
# be used directly after any stripping needed for security/privacy reasons.
|
70
70
|
# @!attribute [rw] code
|
71
71
|
# @return [Integer]
|
@@ -212,7 +212,7 @@ module Google
|
|
212
212
|
#
|
213
213
|
# image_annotator_client = Google::Cloud::Vision::V1.new
|
214
214
|
#
|
215
|
-
# # TODO: Initialize
|
215
|
+
# # TODO: Initialize `requests`:
|
216
216
|
# requests = []
|
217
217
|
# response = image_annotator_client.batch_annotate_images(requests)
|
218
218
|
|
@@ -230,9 +230,9 @@ module Google
|
|
230
230
|
# Run asynchronous image detection and annotation for a list of generic
|
231
231
|
# files, such as PDF files, which may contain multiple pages and multiple
|
232
232
|
# images per page. Progress and results can be retrieved through the
|
233
|
-
#
|
234
|
-
#
|
235
|
-
#
|
233
|
+
# `google.longrunning.Operations` interface.
|
234
|
+
# `Operation.metadata` contains `OperationMetadata` (metadata).
|
235
|
+
# `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
|
236
236
|
#
|
237
237
|
# @param requests [Array<Google::Cloud::Vision::V1::AsyncAnnotateFileRequest | Hash>]
|
238
238
|
# Individual async file annotation requests for this batch.
|
@@ -248,7 +248,7 @@ module Google
|
|
248
248
|
#
|
249
249
|
# image_annotator_client = Google::Cloud::Vision::V1.new
|
250
250
|
#
|
251
|
-
# # TODO: Initialize
|
251
|
+
# # TODO: Initialize `requests`:
|
252
252
|
# requests = []
|
253
253
|
#
|
254
254
|
# # Register a callback during the method call.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-vision
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.30.
|
4
|
+
version: 0.30.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-09-
|
12
|
+
date: 2018-09-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -233,7 +233,7 @@ files:
|
|
233
233
|
- lib/google/cloud/vision/v1/text_annotation_pb.rb
|
234
234
|
- lib/google/cloud/vision/v1/web_detection_pb.rb
|
235
235
|
- lib/google/cloud/vision/version.rb
|
236
|
-
homepage: https://github.com/
|
236
|
+
homepage: https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-vision
|
237
237
|
licenses:
|
238
238
|
- Apache-2.0
|
239
239
|
metadata: {}
|