google-cloud-vision 0.34.0 → 0.35.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 +3 -3
- data/lib/google/cloud/vision.rb +2 -2
- data/lib/google/cloud/vision/v1.rb +2 -2
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb +67 -6
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search.rb +20 -0
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search_service.rb +34 -5
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb +2 -2
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb +11 -11
- data/lib/google/cloud/vision/v1/image_annotator_client.rb +80 -8
- data/lib/google/cloud/vision/v1/image_annotator_pb.rb +6 -0
- data/lib/google/cloud/vision/v1/product_search_client.rb +109 -0
- data/lib/google/cloud/vision/v1/product_search_client_config.json +5 -0
- data/lib/google/cloud/vision/v1/product_search_pb.rb +8 -0
- data/lib/google/cloud/vision/v1/product_search_service_pb.rb +14 -0
- data/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +25 -0
- data/lib/google/cloud/vision/v1/web_detection_pb.rb +5 -5
- data/lib/google/cloud/vision/v1p3beta1.rb +2 -2
- 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: 87ba7f880087f96739437e7d73a2a4f094b21f5a25a881fee6abe2aa8a050f2f
|
4
|
+
data.tar.gz: 601339912d7b2df023c04b3f915c19182c46aba05808187d2655aa851c51df2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e73a8ef684bf122c86ae5f3f79ba4417b4e0de059ee184fcca5b58979ccd2e94f965033a862de28bec1bbf19d77040e1eeea4a1dba0b1307635380804b17d757
|
7
|
+
data.tar.gz: 2677ac71fa18ac2e67e71608de678e390cea2a9f2230bf5c8c22ac2ed3d21d151e67f43f390bd382f8b3bfd6a2fcb30d466b882e3fbe0d77f842ed173802a981
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ steps:
|
|
14
14
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
15
15
|
2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
16
16
|
3. [Enable the Cloud Vision API.](https://console.cloud.google.com/apis/library/vision.googleapis.com)
|
17
|
-
4. [Setup Authentication.](https://googleapis.
|
17
|
+
4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-vision/latest/file.AUTHENTICATION.html)
|
18
18
|
|
19
19
|
### Installation
|
20
20
|
```
|
@@ -53,14 +53,14 @@ response = image_annotator_client.batch_annotate_images(requests)
|
|
53
53
|
- View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
54
54
|
to see the full list of Cloud APIs that we cover.
|
55
55
|
|
56
|
-
[Client Library Documentation]: https://googleapis.
|
56
|
+
[Client Library Documentation]: https://googleapis.dev/ruby/google-cloud-vision/latest
|
57
57
|
[Product Documentation]: https://cloud.google.com/vision
|
58
58
|
|
59
59
|
## Enabling Logging
|
60
60
|
|
61
61
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
62
62
|
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,
|
63
|
-
or a [`Google::Cloud::Logging::Logger`](https://googleapis.
|
63
|
+
or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
64
64
|
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)
|
65
65
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
66
66
|
|
data/lib/google/cloud/vision.rb
CHANGED
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
37
37
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
38
38
|
# 3. [Enable the Cloud Vision API.](https://console.cloud.google.com/apis/library/vision.googleapis.com)
|
39
|
-
# 4. [Setup Authentication.](https://googleapis.
|
39
|
+
# 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-vision/latest/file.AUTHENTICATION.html)
|
40
40
|
#
|
41
41
|
# ### Installation
|
42
42
|
# ```
|
@@ -79,7 +79,7 @@ module Google
|
|
79
79
|
#
|
80
80
|
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
81
81
|
# 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,
|
82
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.
|
82
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
83
83
|
# 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)
|
84
84
|
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
85
85
|
#
|
@@ -40,7 +40,7 @@ module Google
|
|
40
40
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
41
41
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
42
42
|
# 3. [Enable the Cloud Vision API.](https://console.cloud.google.com/apis/library/vision.googleapis.com)
|
43
|
-
# 4. [Setup Authentication.](https://googleapis.
|
43
|
+
# 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-vision/latest/file.AUTHENTICATION.html)
|
44
44
|
#
|
45
45
|
# ### Installation
|
46
46
|
# ```
|
@@ -76,7 +76,7 @@ module Google
|
|
76
76
|
#
|
77
77
|
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
78
78
|
# 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,
|
79
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.
|
79
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
80
80
|
# 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)
|
81
81
|
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
82
82
|
#
|
@@ -600,16 +600,35 @@ module Google
|
|
600
600
|
# Information about the file for which this response is generated.
|
601
601
|
# @!attribute [rw] responses
|
602
602
|
# @return [Array<Google::Cloud::Vision::V1::AnnotateImageResponse>]
|
603
|
-
# Individual responses to images found within the file.
|
603
|
+
# Individual responses to images found within the file. This field will be
|
604
|
+
# empty if the `error` field is set.
|
604
605
|
# @!attribute [rw] total_pages
|
605
606
|
# @return [Integer]
|
606
607
|
# This field gives the total number of pages in the file.
|
608
|
+
# @!attribute [rw] error
|
609
|
+
# @return [Google::Rpc::Status]
|
610
|
+
# If set, represents the error message for the failed request. The
|
611
|
+
# `responses` field will not be set in this case.
|
607
612
|
class AnnotateFileResponse; end
|
608
613
|
|
609
614
|
# Multiple image annotation requests are batched into a single service call.
|
610
615
|
# @!attribute [rw] requests
|
611
616
|
# @return [Array<Google::Cloud::Vision::V1::AnnotateImageRequest>]
|
612
617
|
# Individual image annotation requests for this batch.
|
618
|
+
# @!attribute [rw] parent
|
619
|
+
# @return [String]
|
620
|
+
# Optional. Target project and location to make a call.
|
621
|
+
#
|
622
|
+
# Format: `projects/{project-id}/locations/{location-id}`.
|
623
|
+
#
|
624
|
+
# If no parent is specified, a region will be chosen automatically.
|
625
|
+
#
|
626
|
+
# Supported location-ids:
|
627
|
+
# `us`: USA country only,
|
628
|
+
# `asia`: East asia areas, like Japan, Taiwan,
|
629
|
+
# `eu`: The European Union.
|
630
|
+
#
|
631
|
+
# Example: `projects/project-A/locations/eu`.
|
613
632
|
class BatchAnnotateImagesRequest; end
|
614
633
|
|
615
634
|
# Response to a batch image annotation request.
|
@@ -651,6 +670,20 @@ module Google
|
|
651
670
|
# @return [Array<Google::Cloud::Vision::V1::AnnotateFileRequest>]
|
652
671
|
# The list of file annotation requests. Right now we support only one
|
653
672
|
# AnnotateFileRequest in BatchAnnotateFilesRequest.
|
673
|
+
# @!attribute [rw] parent
|
674
|
+
# @return [String]
|
675
|
+
# Optional. Target project and location to make a call.
|
676
|
+
#
|
677
|
+
# Format: `projects/{project-id}/locations/{location-id}`.
|
678
|
+
#
|
679
|
+
# If no parent is specified, a region will be chosen automatically.
|
680
|
+
#
|
681
|
+
# Supported location-ids:
|
682
|
+
# `us`: USA country only,
|
683
|
+
# `asia`: East asia areas, like Japan, Taiwan,
|
684
|
+
# `eu`: The European Union.
|
685
|
+
#
|
686
|
+
# Example: `projects/project-A/locations/eu`.
|
654
687
|
class BatchAnnotateFilesRequest; end
|
655
688
|
|
656
689
|
# A list of file annotation responses.
|
@@ -688,6 +721,20 @@ module Google
|
|
688
721
|
# @!attribute [rw] output_config
|
689
722
|
# @return [Google::Cloud::Vision::V1::OutputConfig]
|
690
723
|
# Required. The desired output location and metadata (e.g. format).
|
724
|
+
# @!attribute [rw] parent
|
725
|
+
# @return [String]
|
726
|
+
# Optional. Target project and location to make a call.
|
727
|
+
#
|
728
|
+
# Format: `projects/{project-id}/locations/{location-id}`.
|
729
|
+
#
|
730
|
+
# If no parent is specified, a region will be chosen automatically.
|
731
|
+
#
|
732
|
+
# Supported location-ids:
|
733
|
+
# `us`: USA country only,
|
734
|
+
# `asia`: East asia areas, like Japan, Taiwan,
|
735
|
+
# `eu`: The European Union.
|
736
|
+
#
|
737
|
+
# Example: `projects/project-A/locations/eu`.
|
691
738
|
class AsyncBatchAnnotateImagesRequest; end
|
692
739
|
|
693
740
|
# Response to an async batch image annotation request.
|
@@ -701,6 +748,20 @@ module Google
|
|
701
748
|
# @!attribute [rw] requests
|
702
749
|
# @return [Array<Google::Cloud::Vision::V1::AsyncAnnotateFileRequest>]
|
703
750
|
# Individual async file annotation requests for this batch.
|
751
|
+
# @!attribute [rw] parent
|
752
|
+
# @return [String]
|
753
|
+
# Optional. Target project and location to make a call.
|
754
|
+
#
|
755
|
+
# Format: `projects/{project-id}/locations/{location-id}`.
|
756
|
+
#
|
757
|
+
# If no parent is specified, a region will be chosen automatically.
|
758
|
+
#
|
759
|
+
# Supported location-ids:
|
760
|
+
# `us`: USA country only,
|
761
|
+
# `asia`: East asia areas, like Japan, Taiwan,
|
762
|
+
# `eu`: The European Union.
|
763
|
+
#
|
764
|
+
# Example: `projects/project-A/locations/eu`.
|
704
765
|
class AsyncBatchAnnotateFilesRequest; end
|
705
766
|
|
706
767
|
# Response to an async batch file annotation request.
|
@@ -817,19 +878,19 @@ module Google
|
|
817
878
|
# Unknown likelihood.
|
818
879
|
UNKNOWN = 0
|
819
880
|
|
820
|
-
# It is very unlikely
|
881
|
+
# It is very unlikely.
|
821
882
|
VERY_UNLIKELY = 1
|
822
883
|
|
823
|
-
# It is unlikely
|
884
|
+
# It is unlikely.
|
824
885
|
UNLIKELY = 2
|
825
886
|
|
826
|
-
# It is possible
|
887
|
+
# It is possible.
|
827
888
|
POSSIBLE = 3
|
828
889
|
|
829
|
-
# It is likely
|
890
|
+
# It is likely.
|
830
891
|
LIKELY = 4
|
831
892
|
|
832
|
-
# It is very likely
|
893
|
+
# It is very likely.
|
833
894
|
VERY_LIKELY = 5
|
834
895
|
end
|
835
896
|
end
|
@@ -80,6 +80,23 @@ module Google
|
|
80
80
|
# to the query.
|
81
81
|
class Result; end
|
82
82
|
|
83
|
+
# Prediction for what the object in the bounding box is.
|
84
|
+
# @!attribute [rw] mid
|
85
|
+
# @return [String]
|
86
|
+
# Object ID that should align with EntityAnnotation mid.
|
87
|
+
# @!attribute [rw] language_code
|
88
|
+
# @return [String]
|
89
|
+
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
90
|
+
# information, see
|
91
|
+
# http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
92
|
+
# @!attribute [rw] name
|
93
|
+
# @return [String]
|
94
|
+
# Object name, expressed in its `language_code` language.
|
95
|
+
# @!attribute [rw] score
|
96
|
+
# @return [Float]
|
97
|
+
# Score of the result. Range [0, 1].
|
98
|
+
class ObjectAnnotation; end
|
99
|
+
|
83
100
|
# Information about the products similar to a single product in a query
|
84
101
|
# image.
|
85
102
|
# @!attribute [rw] bounding_poly
|
@@ -88,6 +105,9 @@ module Google
|
|
88
105
|
# @!attribute [rw] results
|
89
106
|
# @return [Array<Google::Cloud::Vision::V1::ProductSearchResults::Result>]
|
90
107
|
# List of results, one for each product match.
|
108
|
+
# @!attribute [rw] object_annotations
|
109
|
+
# @return [Array<Google::Cloud::Vision::V1::ProductSearchResults::ObjectAnnotation>]
|
110
|
+
# List of generic predictions for the object in the bounding box.
|
91
111
|
class GroupedResult; end
|
92
112
|
end
|
93
113
|
end
|
@@ -38,10 +38,8 @@ module Google
|
|
38
38
|
# @return [String]
|
39
39
|
# The category for the product identified by the reference image. This should
|
40
40
|
# be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
|
41
|
-
# "homegoods", "apparel", and "toys" are still supported but
|
42
|
-
#
|
43
|
-
# "toys-v2" for better product search accuracy. It is recommended to migrate
|
44
|
-
# existing products to these categories as well.
|
41
|
+
# "homegoods", "apparel", and "toys" are still supported, but these should
|
42
|
+
# not be used for new products.
|
45
43
|
#
|
46
44
|
# This field is immutable.
|
47
45
|
# @!attribute [rw] product_labels
|
@@ -54,7 +52,11 @@ module Google
|
|
54
52
|
# to be supported soon.
|
55
53
|
#
|
56
54
|
# Multiple values can be assigned to the same key. One product may have up to
|
57
|
-
#
|
55
|
+
# 500 product_labels.
|
56
|
+
#
|
57
|
+
# Notice that the total number of distinct product_labels over all products
|
58
|
+
# in one ProductSet cannot exceed 1M, otherwise the product search pipeline
|
59
|
+
# will refuse to work for that ProductSet.
|
58
60
|
class Product
|
59
61
|
# A product label represented as a key-value pair.
|
60
62
|
# @!attribute [rw] key
|
@@ -543,6 +545,33 @@ module Google
|
|
543
545
|
CANCELLED = 4
|
544
546
|
end
|
545
547
|
end
|
548
|
+
|
549
|
+
# Config to control which ProductSet contains the Products to be deleted.
|
550
|
+
# @!attribute [rw] product_set_id
|
551
|
+
# @return [String]
|
552
|
+
# The ProductSet that contains the Products to delete. If a Product is a
|
553
|
+
# member of product_set_id in addition to other ProductSets, the Product will
|
554
|
+
# still be deleted.
|
555
|
+
class ProductSetPurgeConfig; end
|
556
|
+
|
557
|
+
# Request message for the `PurgeProducts` method.
|
558
|
+
# @!attribute [rw] product_set_purge_config
|
559
|
+
# @return [Google::Cloud::Vision::V1::ProductSetPurgeConfig]
|
560
|
+
# Specify which ProductSet contains the Products to be deleted.
|
561
|
+
# @!attribute [rw] delete_orphan_products
|
562
|
+
# @return [true, false]
|
563
|
+
# If delete_orphan_products is true, all Products that are not in any
|
564
|
+
# ProductSet will be deleted.
|
565
|
+
# @!attribute [rw] parent
|
566
|
+
# @return [String]
|
567
|
+
# The project and location in which the Products should be deleted.
|
568
|
+
#
|
569
|
+
# Format is `projects/PROJECT_ID/locations/LOC_ID`.
|
570
|
+
# @!attribute [rw] force
|
571
|
+
# @return [true, false]
|
572
|
+
# The default value is false. Override this value to true to actually perform
|
573
|
+
# the purge.
|
574
|
+
class PurgeProductsRequest; end
|
546
575
|
end
|
547
576
|
end
|
548
577
|
end
|
@@ -185,7 +185,7 @@ module Google
|
|
185
185
|
# and the vertex order will still be (0, 1, 2, 3).
|
186
186
|
# @!attribute [rw] words
|
187
187
|
# @return [Array<Google::Cloud::Vision::V1::Word>]
|
188
|
-
# List of words in this paragraph.
|
188
|
+
# List of all words in this paragraph.
|
189
189
|
# @!attribute [rw] confidence
|
190
190
|
# @return [Float]
|
191
191
|
# Confidence of the OCR results for the paragraph. Range [0, 1].
|
@@ -241,7 +241,7 @@ module Google
|
|
241
241
|
# 2----3
|
242
242
|
# | |
|
243
243
|
# 1----0
|
244
|
-
# and the
|
244
|
+
# and the vertex order will still be (0, 1, 2, 3).
|
245
245
|
# @!attribute [rw] text
|
246
246
|
# @return [String]
|
247
247
|
# The actual UTF-8 representation of the symbol.
|
@@ -63,17 +63,6 @@ module Google
|
|
63
63
|
# (Deprecated) Overall relevancy score for the image.
|
64
64
|
class WebImage; end
|
65
65
|
|
66
|
-
# Label to provide extra metadata for the web detection.
|
67
|
-
# @!attribute [rw] label
|
68
|
-
# @return [String]
|
69
|
-
# Label for extra metadata.
|
70
|
-
# @!attribute [rw] language_code
|
71
|
-
# @return [String]
|
72
|
-
# The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
|
73
|
-
# For more information, see
|
74
|
-
# http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
75
|
-
class WebLabel; end
|
76
|
-
|
77
66
|
# Metadata for web pages.
|
78
67
|
# @!attribute [rw] url
|
79
68
|
# @return [String]
|
@@ -95,6 +84,17 @@ module Google
|
|
95
84
|
# example an original image will likely have partial matching for its
|
96
85
|
# crops.
|
97
86
|
class WebPage; end
|
87
|
+
|
88
|
+
# Label to provide extra metadata for the web detection.
|
89
|
+
# @!attribute [rw] label
|
90
|
+
# @return [String]
|
91
|
+
# Label for extra metadata.
|
92
|
+
# @!attribute [rw] language_code
|
93
|
+
# @return [String]
|
94
|
+
# The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
|
95
|
+
# For more information, see
|
96
|
+
# http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
97
|
+
class WebLabel; end
|
98
98
|
end
|
99
99
|
end
|
100
100
|
end
|
@@ -192,22 +192,34 @@ module Google
|
|
192
192
|
@batch_annotate_images = Google::Gax.create_api_call(
|
193
193
|
@image_annotator_stub.method(:batch_annotate_images),
|
194
194
|
defaults["batch_annotate_images"],
|
195
|
-
exception_transformer: exception_transformer
|
195
|
+
exception_transformer: exception_transformer,
|
196
|
+
params_extractor: proc do |request|
|
197
|
+
{'parent' => request.parent}
|
198
|
+
end
|
196
199
|
)
|
197
200
|
@batch_annotate_files = Google::Gax.create_api_call(
|
198
201
|
@image_annotator_stub.method(:batch_annotate_files),
|
199
202
|
defaults["batch_annotate_files"],
|
200
|
-
exception_transformer: exception_transformer
|
203
|
+
exception_transformer: exception_transformer,
|
204
|
+
params_extractor: proc do |request|
|
205
|
+
{'parent' => request.parent}
|
206
|
+
end
|
201
207
|
)
|
202
208
|
@async_batch_annotate_images = Google::Gax.create_api_call(
|
203
209
|
@image_annotator_stub.method(:async_batch_annotate_images),
|
204
210
|
defaults["async_batch_annotate_images"],
|
205
|
-
exception_transformer: exception_transformer
|
211
|
+
exception_transformer: exception_transformer,
|
212
|
+
params_extractor: proc do |request|
|
213
|
+
{'parent' => request.parent}
|
214
|
+
end
|
206
215
|
)
|
207
216
|
@async_batch_annotate_files = Google::Gax.create_api_call(
|
208
217
|
@image_annotator_stub.method(:async_batch_annotate_files),
|
209
218
|
defaults["async_batch_annotate_files"],
|
210
|
-
exception_transformer: exception_transformer
|
219
|
+
exception_transformer: exception_transformer,
|
220
|
+
params_extractor: proc do |request|
|
221
|
+
{'parent' => request.parent}
|
222
|
+
end
|
211
223
|
)
|
212
224
|
end
|
213
225
|
|
@@ -219,6 +231,19 @@ module Google
|
|
219
231
|
# Individual image annotation requests for this batch.
|
220
232
|
# A hash of the same form as `Google::Cloud::Vision::V1::AnnotateImageRequest`
|
221
233
|
# can also be provided.
|
234
|
+
# @param parent [String]
|
235
|
+
# Optional. Target project and location to make a call.
|
236
|
+
#
|
237
|
+
# Format: `projects/{project-id}/locations/{location-id}`.
|
238
|
+
#
|
239
|
+
# If no parent is specified, a region will be chosen automatically.
|
240
|
+
#
|
241
|
+
# Supported location-ids:
|
242
|
+
# `us`: USA country only,
|
243
|
+
# `asia`: East asia areas, like Japan, Taiwan,
|
244
|
+
# `eu`: The European Union.
|
245
|
+
#
|
246
|
+
# Example: `projects/project-A/locations/eu`.
|
222
247
|
# @param options [Google::Gax::CallOptions]
|
223
248
|
# Overrides the default settings for this call, e.g, timeout,
|
224
249
|
# retries, etc.
|
@@ -238,10 +263,12 @@ module Google
|
|
238
263
|
|
239
264
|
def batch_annotate_images \
|
240
265
|
requests,
|
266
|
+
parent: nil,
|
241
267
|
options: nil,
|
242
268
|
&block
|
243
269
|
req = {
|
244
|
-
requests: requests
|
270
|
+
requests: requests,
|
271
|
+
parent: parent
|
245
272
|
}.delete_if { |_, v| v.nil? }
|
246
273
|
req = Google::Gax::to_proto(req, Google::Cloud::Vision::V1::BatchAnnotateImagesRequest)
|
247
274
|
@batch_annotate_images.call(req, options, &block)
|
@@ -260,6 +287,19 @@ module Google
|
|
260
287
|
# AnnotateFileRequest in BatchAnnotateFilesRequest.
|
261
288
|
# A hash of the same form as `Google::Cloud::Vision::V1::AnnotateFileRequest`
|
262
289
|
# can also be provided.
|
290
|
+
# @param parent [String]
|
291
|
+
# Optional. Target project and location to make a call.
|
292
|
+
#
|
293
|
+
# Format: `projects/{project-id}/locations/{location-id}`.
|
294
|
+
#
|
295
|
+
# If no parent is specified, a region will be chosen automatically.
|
296
|
+
#
|
297
|
+
# Supported location-ids:
|
298
|
+
# `us`: USA country only,
|
299
|
+
# `asia`: East asia areas, like Japan, Taiwan,
|
300
|
+
# `eu`: The European Union.
|
301
|
+
#
|
302
|
+
# Example: `projects/project-A/locations/eu`.
|
263
303
|
# @param options [Google::Gax::CallOptions]
|
264
304
|
# Overrides the default settings for this call, e.g, timeout,
|
265
305
|
# retries, etc.
|
@@ -279,10 +319,12 @@ module Google
|
|
279
319
|
|
280
320
|
def batch_annotate_files \
|
281
321
|
requests,
|
322
|
+
parent: nil,
|
282
323
|
options: nil,
|
283
324
|
&block
|
284
325
|
req = {
|
285
|
-
requests: requests
|
326
|
+
requests: requests,
|
327
|
+
parent: parent
|
286
328
|
}.delete_if { |_, v| v.nil? }
|
287
329
|
req = Google::Gax::to_proto(req, Google::Cloud::Vision::V1::BatchAnnotateFilesRequest)
|
288
330
|
@batch_annotate_files.call(req, options, &block)
|
@@ -306,6 +348,19 @@ module Google
|
|
306
348
|
# Required. The desired output location and metadata (e.g. format).
|
307
349
|
# A hash of the same form as `Google::Cloud::Vision::V1::OutputConfig`
|
308
350
|
# can also be provided.
|
351
|
+
# @param parent [String]
|
352
|
+
# Optional. Target project and location to make a call.
|
353
|
+
#
|
354
|
+
# Format: `projects/{project-id}/locations/{location-id}`.
|
355
|
+
#
|
356
|
+
# If no parent is specified, a region will be chosen automatically.
|
357
|
+
#
|
358
|
+
# Supported location-ids:
|
359
|
+
# `us`: USA country only,
|
360
|
+
# `asia`: East asia areas, like Japan, Taiwan,
|
361
|
+
# `eu`: The European Union.
|
362
|
+
#
|
363
|
+
# Example: `projects/project-A/locations/eu`.
|
309
364
|
# @param options [Google::Gax::CallOptions]
|
310
365
|
# Overrides the default settings for this call, e.g, timeout,
|
311
366
|
# retries, etc.
|
@@ -352,10 +407,12 @@ module Google
|
|
352
407
|
def async_batch_annotate_images \
|
353
408
|
requests,
|
354
409
|
output_config,
|
410
|
+
parent: nil,
|
355
411
|
options: nil
|
356
412
|
req = {
|
357
413
|
requests: requests,
|
358
|
-
output_config: output_config
|
414
|
+
output_config: output_config,
|
415
|
+
parent: parent
|
359
416
|
}.delete_if { |_, v| v.nil? }
|
360
417
|
req = Google::Gax::to_proto(req, Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest)
|
361
418
|
operation = Google::Gax::Operation.new(
|
@@ -380,6 +437,19 @@ module Google
|
|
380
437
|
# Individual async file annotation requests for this batch.
|
381
438
|
# A hash of the same form as `Google::Cloud::Vision::V1::AsyncAnnotateFileRequest`
|
382
439
|
# can also be provided.
|
440
|
+
# @param parent [String]
|
441
|
+
# Optional. Target project and location to make a call.
|
442
|
+
#
|
443
|
+
# Format: `projects/{project-id}/locations/{location-id}`.
|
444
|
+
#
|
445
|
+
# If no parent is specified, a region will be chosen automatically.
|
446
|
+
#
|
447
|
+
# Supported location-ids:
|
448
|
+
# `us`: USA country only,
|
449
|
+
# `asia`: East asia areas, like Japan, Taiwan,
|
450
|
+
# `eu`: The European Union.
|
451
|
+
#
|
452
|
+
# Example: `projects/project-A/locations/eu`.
|
383
453
|
# @param options [Google::Gax::CallOptions]
|
384
454
|
# Overrides the default settings for this call, e.g, timeout,
|
385
455
|
# retries, etc.
|
@@ -422,9 +492,11 @@ module Google
|
|
422
492
|
|
423
493
|
def async_batch_annotate_files \
|
424
494
|
requests,
|
495
|
+
parent: nil,
|
425
496
|
options: nil
|
426
497
|
req = {
|
427
|
-
requests: requests
|
498
|
+
requests: requests,
|
499
|
+
parent: parent
|
428
500
|
}.delete_if { |_, v| v.nil? }
|
429
501
|
req = Google::Gax::to_proto(req, Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest)
|
430
502
|
operation = Google::Gax::Operation.new(
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
require 'google/api/annotations_pb'
|
8
|
+
require 'google/api/client_pb'
|
8
9
|
require 'google/cloud/vision/v1/geometry_pb'
|
9
10
|
require 'google/cloud/vision/v1/product_search_pb'
|
10
11
|
require 'google/cloud/vision/v1/text_annotation_pb'
|
@@ -200,9 +201,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
200
201
|
optional :input_config, :message, 1, "google.cloud.vision.v1.InputConfig"
|
201
202
|
repeated :responses, :message, 2, "google.cloud.vision.v1.AnnotateImageResponse"
|
202
203
|
optional :total_pages, :int32, 3
|
204
|
+
optional :error, :message, 4, "google.rpc.Status"
|
203
205
|
end
|
204
206
|
add_message "google.cloud.vision.v1.BatchAnnotateImagesRequest" do
|
205
207
|
repeated :requests, :message, 1, "google.cloud.vision.v1.AnnotateImageRequest"
|
208
|
+
optional :parent, :string, 4
|
206
209
|
end
|
207
210
|
add_message "google.cloud.vision.v1.BatchAnnotateImagesResponse" do
|
208
211
|
repeated :responses, :message, 1, "google.cloud.vision.v1.AnnotateImageResponse"
|
@@ -215,6 +218,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
215
218
|
end
|
216
219
|
add_message "google.cloud.vision.v1.BatchAnnotateFilesRequest" do
|
217
220
|
repeated :requests, :message, 1, "google.cloud.vision.v1.AnnotateFileRequest"
|
221
|
+
optional :parent, :string, 3
|
218
222
|
end
|
219
223
|
add_message "google.cloud.vision.v1.BatchAnnotateFilesResponse" do
|
220
224
|
repeated :responses, :message, 1, "google.cloud.vision.v1.AnnotateFileResponse"
|
@@ -231,12 +235,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
231
235
|
add_message "google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest" do
|
232
236
|
repeated :requests, :message, 1, "google.cloud.vision.v1.AnnotateImageRequest"
|
233
237
|
optional :output_config, :message, 2, "google.cloud.vision.v1.OutputConfig"
|
238
|
+
optional :parent, :string, 4
|
234
239
|
end
|
235
240
|
add_message "google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse" do
|
236
241
|
optional :output_config, :message, 1, "google.cloud.vision.v1.OutputConfig"
|
237
242
|
end
|
238
243
|
add_message "google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest" do
|
239
244
|
repeated :requests, :message, 1, "google.cloud.vision.v1.AsyncAnnotateFileRequest"
|
245
|
+
optional :parent, :string, 4
|
240
246
|
end
|
241
247
|
add_message "google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse" do
|
242
248
|
repeated :responses, :message, 1, "google.cloud.vision.v1.AsyncAnnotateFileResponse"
|
@@ -444,6 +444,14 @@ module Google
|
|
444
444
|
{'parent' => request.parent}
|
445
445
|
end
|
446
446
|
)
|
447
|
+
@purge_products = Google::Gax.create_api_call(
|
448
|
+
@product_search_stub.method(:purge_products),
|
449
|
+
defaults["purge_products"],
|
450
|
+
exception_transformer: exception_transformer,
|
451
|
+
params_extractor: proc do |request|
|
452
|
+
{'parent' => request.parent}
|
453
|
+
end
|
454
|
+
)
|
447
455
|
end
|
448
456
|
|
449
457
|
# Service calls
|
@@ -1376,6 +1384,107 @@ module Google
|
|
1376
1384
|
operation.on_done { |operation| yield(operation) } if block_given?
|
1377
1385
|
operation
|
1378
1386
|
end
|
1387
|
+
|
1388
|
+
# Asynchronous API to delete all Products in a ProductSet or all Products
|
1389
|
+
# that are in no ProductSet.
|
1390
|
+
#
|
1391
|
+
# If a Product is a member of the specified ProductSet in addition to other
|
1392
|
+
# ProductSets, the Product will still be deleted.
|
1393
|
+
#
|
1394
|
+
# It is recommended to not delete the specified ProductSet until after this
|
1395
|
+
# operation has completed. It is also recommended to not add any of the
|
1396
|
+
# Products involved in the batch delete to a new ProductSet while this
|
1397
|
+
# operation is running because those Products may still end up deleted.
|
1398
|
+
#
|
1399
|
+
# It's not possible to undo the PurgeProducts operation. Therefore, it is
|
1400
|
+
# recommended to keep the csv files used in ImportProductSets (if that was
|
1401
|
+
# how you originally built the Product Set) before starting PurgeProducts, in
|
1402
|
+
# case you need to re-import the data after deletion.
|
1403
|
+
#
|
1404
|
+
# If the plan is to purge all of the Products from a ProductSet and then
|
1405
|
+
# re-use the empty ProductSet to re-import new Products into the empty
|
1406
|
+
# ProductSet, you must wait until the PurgeProducts operation has finished
|
1407
|
+
# for that ProductSet.
|
1408
|
+
#
|
1409
|
+
# The {Google::Longrunning::Operation} API can be
|
1410
|
+
# used to keep track of the progress and results of the request.
|
1411
|
+
# `Operation.metadata` contains `BatchOperationMetadata`. (progress)
|
1412
|
+
#
|
1413
|
+
# @param parent [String]
|
1414
|
+
# The project and location in which the Products should be deleted.
|
1415
|
+
#
|
1416
|
+
# Format is `projects/PROJECT_ID/locations/LOC_ID`.
|
1417
|
+
# @param product_set_purge_config [Google::Cloud::Vision::V1::ProductSetPurgeConfig | Hash]
|
1418
|
+
# Specify which ProductSet contains the Products to be deleted.
|
1419
|
+
# A hash of the same form as `Google::Cloud::Vision::V1::ProductSetPurgeConfig`
|
1420
|
+
# can also be provided.
|
1421
|
+
# @param delete_orphan_products [true, false]
|
1422
|
+
# If delete_orphan_products is true, all Products that are not in any
|
1423
|
+
# ProductSet will be deleted.
|
1424
|
+
# @param force [true, false]
|
1425
|
+
# The default value is false. Override this value to true to actually perform
|
1426
|
+
# the purge.
|
1427
|
+
# @param options [Google::Gax::CallOptions]
|
1428
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1429
|
+
# retries, etc.
|
1430
|
+
# @return [Google::Gax::Operation]
|
1431
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1432
|
+
# @example
|
1433
|
+
# require "google/cloud/vision"
|
1434
|
+
#
|
1435
|
+
# product_search_client = Google::Cloud::Vision::ProductSearch.new(version: :v1)
|
1436
|
+
# formatted_parent = Google::Cloud::Vision::V1::ProductSearchClient.location_path("[PROJECT]", "[LOCATION]")
|
1437
|
+
#
|
1438
|
+
# # Register a callback during the method call.
|
1439
|
+
# operation = product_search_client.purge_products(formatted_parent) do |op|
|
1440
|
+
# raise op.results.message if op.error?
|
1441
|
+
# op_results = op.results
|
1442
|
+
# # Process the results.
|
1443
|
+
#
|
1444
|
+
# metadata = op.metadata
|
1445
|
+
# # Process the metadata.
|
1446
|
+
# end
|
1447
|
+
#
|
1448
|
+
# # Or use the return value to register a callback.
|
1449
|
+
# operation.on_done do |op|
|
1450
|
+
# raise op.results.message if op.error?
|
1451
|
+
# op_results = op.results
|
1452
|
+
# # Process the results.
|
1453
|
+
#
|
1454
|
+
# metadata = op.metadata
|
1455
|
+
# # Process the metadata.
|
1456
|
+
# end
|
1457
|
+
#
|
1458
|
+
# # Manually reload the operation.
|
1459
|
+
# operation.reload!
|
1460
|
+
#
|
1461
|
+
# # Or block until the operation completes, triggering callbacks on
|
1462
|
+
# # completion.
|
1463
|
+
# operation.wait_until_done!
|
1464
|
+
|
1465
|
+
def purge_products \
|
1466
|
+
parent,
|
1467
|
+
product_set_purge_config: nil,
|
1468
|
+
delete_orphan_products: nil,
|
1469
|
+
force: nil,
|
1470
|
+
options: nil
|
1471
|
+
req = {
|
1472
|
+
parent: parent,
|
1473
|
+
product_set_purge_config: product_set_purge_config,
|
1474
|
+
delete_orphan_products: delete_orphan_products,
|
1475
|
+
force: force
|
1476
|
+
}.delete_if { |_, v| v.nil? }
|
1477
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Vision::V1::PurgeProductsRequest)
|
1478
|
+
operation = Google::Gax::Operation.new(
|
1479
|
+
@purge_products.call(req, options),
|
1480
|
+
@operations_client,
|
1481
|
+
Google::Protobuf::Empty,
|
1482
|
+
Google::Cloud::Vision::V1::BatchOperationMetadata,
|
1483
|
+
call_options: options
|
1484
|
+
)
|
1485
|
+
operation.on_done { |operation| yield(operation) } if block_given?
|
1486
|
+
operation
|
1487
|
+
end
|
1379
1488
|
end
|
1380
1489
|
end
|
1381
1490
|
end
|
@@ -109,6 +109,11 @@
|
|
109
109
|
"timeout_millis": 60000,
|
110
110
|
"retry_codes_name": "non_idempotent",
|
111
111
|
"retry_params_name": "default"
|
112
|
+
},
|
113
|
+
"PurgeProducts": {
|
114
|
+
"timeout_millis": 60000,
|
115
|
+
"retry_codes_name": "non_idempotent",
|
116
|
+
"retry_params_name": "default"
|
112
117
|
}
|
113
118
|
}
|
114
119
|
}
|
@@ -25,9 +25,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
25
25
|
optional :score, :float, 2
|
26
26
|
optional :image, :string, 3
|
27
27
|
end
|
28
|
+
add_message "google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation" do
|
29
|
+
optional :mid, :string, 1
|
30
|
+
optional :language_code, :string, 2
|
31
|
+
optional :name, :string, 3
|
32
|
+
optional :score, :float, 4
|
33
|
+
end
|
28
34
|
add_message "google.cloud.vision.v1.ProductSearchResults.GroupedResult" do
|
29
35
|
optional :bounding_poly, :message, 1, "google.cloud.vision.v1.BoundingPoly"
|
30
36
|
repeated :results, :message, 2, "google.cloud.vision.v1.ProductSearchResults.Result"
|
37
|
+
repeated :object_annotations, :message, 3, "google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation"
|
31
38
|
end
|
32
39
|
end
|
33
40
|
|
@@ -38,6 +45,7 @@ module Google
|
|
38
45
|
ProductSearchParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchParams").msgclass
|
39
46
|
ProductSearchResults = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults").msgclass
|
40
47
|
ProductSearchResults::Result = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.Result").msgclass
|
48
|
+
ProductSearchResults::ObjectAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation").msgclass
|
41
49
|
ProductSearchResults::GroupedResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.GroupedResult").msgclass
|
42
50
|
end
|
43
51
|
end
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
require 'google/api/annotations_pb'
|
8
|
+
require 'google/api/client_pb'
|
8
9
|
require 'google/cloud/vision/v1/geometry_pb'
|
9
10
|
require 'google/longrunning/operations_pb'
|
10
11
|
require 'google/protobuf/empty_pb'
|
@@ -148,6 +149,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
148
149
|
value :FAILED, 3
|
149
150
|
value :CANCELLED, 4
|
150
151
|
end
|
152
|
+
add_message "google.cloud.vision.v1.ProductSetPurgeConfig" do
|
153
|
+
optional :product_set_id, :string, 1
|
154
|
+
end
|
155
|
+
add_message "google.cloud.vision.v1.PurgeProductsRequest" do
|
156
|
+
optional :parent, :string, 1
|
157
|
+
optional :force, :bool, 4
|
158
|
+
oneof :target do
|
159
|
+
optional :product_set_purge_config, :message, 2, "google.cloud.vision.v1.ProductSetPurgeConfig"
|
160
|
+
optional :delete_orphan_products, :bool, 3
|
161
|
+
end
|
162
|
+
end
|
151
163
|
end
|
152
164
|
|
153
165
|
module Google
|
@@ -185,6 +197,8 @@ module Google
|
|
185
197
|
ImportProductSetsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsResponse").msgclass
|
186
198
|
BatchOperationMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchOperationMetadata").msgclass
|
187
199
|
BatchOperationMetadata::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchOperationMetadata.State").enummodule
|
200
|
+
ProductSetPurgeConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSetPurgeConfig").msgclass
|
201
|
+
PurgeProductsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.PurgeProductsRequest").msgclass
|
188
202
|
end
|
189
203
|
end
|
190
204
|
end
|
@@ -200,6 +200,31 @@ module Google
|
|
200
200
|
# For the format of the csv file please see
|
201
201
|
# [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
|
202
202
|
rpc :ImportProductSets, ImportProductSetsRequest, Google::Longrunning::Operation
|
203
|
+
# Asynchronous API to delete all Products in a ProductSet or all Products
|
204
|
+
# that are in no ProductSet.
|
205
|
+
#
|
206
|
+
# If a Product is a member of the specified ProductSet in addition to other
|
207
|
+
# ProductSets, the Product will still be deleted.
|
208
|
+
#
|
209
|
+
# It is recommended to not delete the specified ProductSet until after this
|
210
|
+
# operation has completed. It is also recommended to not add any of the
|
211
|
+
# Products involved in the batch delete to a new ProductSet while this
|
212
|
+
# operation is running because those Products may still end up deleted.
|
213
|
+
#
|
214
|
+
# It's not possible to undo the PurgeProducts operation. Therefore, it is
|
215
|
+
# recommended to keep the csv files used in ImportProductSets (if that was
|
216
|
+
# how you originally built the Product Set) before starting PurgeProducts, in
|
217
|
+
# case you need to re-import the data after deletion.
|
218
|
+
#
|
219
|
+
# If the plan is to purge all of the Products from a ProductSet and then
|
220
|
+
# re-use the empty ProductSet to re-import new Products into the empty
|
221
|
+
# ProductSet, you must wait until the PurgeProducts operation has finished
|
222
|
+
# for that ProductSet.
|
223
|
+
#
|
224
|
+
# The [google.longrunning.Operation][google.longrunning.Operation] API can be
|
225
|
+
# used to keep track of the progress and results of the request.
|
226
|
+
# `Operation.metadata` contains `BatchOperationMetadata`. (progress)
|
227
|
+
rpc :PurgeProducts, PurgeProductsRequest, Google::Longrunning::Operation
|
203
228
|
end
|
204
229
|
|
205
230
|
Stub = Service.rpc_stub_class
|
@@ -23,10 +23,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
23
23
|
optional :url, :string, 1
|
24
24
|
optional :score, :float, 2
|
25
25
|
end
|
26
|
-
add_message "google.cloud.vision.v1.WebDetection.WebLabel" do
|
27
|
-
optional :label, :string, 1
|
28
|
-
optional :language_code, :string, 2
|
29
|
-
end
|
30
26
|
add_message "google.cloud.vision.v1.WebDetection.WebPage" do
|
31
27
|
optional :url, :string, 1
|
32
28
|
optional :score, :float, 2
|
@@ -34,6 +30,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
34
30
|
repeated :full_matching_images, :message, 4, "google.cloud.vision.v1.WebDetection.WebImage"
|
35
31
|
repeated :partial_matching_images, :message, 5, "google.cloud.vision.v1.WebDetection.WebImage"
|
36
32
|
end
|
33
|
+
add_message "google.cloud.vision.v1.WebDetection.WebLabel" do
|
34
|
+
optional :label, :string, 1
|
35
|
+
optional :language_code, :string, 2
|
36
|
+
end
|
37
37
|
end
|
38
38
|
|
39
39
|
module Google
|
@@ -43,8 +43,8 @@ module Google
|
|
43
43
|
WebDetection = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection").msgclass
|
44
44
|
WebDetection::WebEntity = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebEntity").msgclass
|
45
45
|
WebDetection::WebImage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebImage").msgclass
|
46
|
-
WebDetection::WebLabel = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebLabel").msgclass
|
47
46
|
WebDetection::WebPage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebPage").msgclass
|
47
|
+
WebDetection::WebLabel = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebLabel").msgclass
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
@@ -40,7 +40,7 @@ module Google
|
|
40
40
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
41
41
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
42
42
|
# 3. [Enable the Cloud Vision API.](https://console.cloud.google.com/apis/library/vision.googleapis.com)
|
43
|
-
# 4. [Setup Authentication.](https://googleapis.
|
43
|
+
# 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-vision/latest/file.AUTHENTICATION.html)
|
44
44
|
#
|
45
45
|
# ### Installation
|
46
46
|
# ```
|
@@ -76,7 +76,7 @@ module Google
|
|
76
76
|
#
|
77
77
|
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
78
78
|
# 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,
|
79
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.
|
79
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
80
80
|
# 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)
|
81
81
|
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
82
82
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-vision
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.35.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
- !ruby/object:Gem::Version
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
|
-
rubygems_version: 3.0.
|
190
|
+
rubygems_version: 3.0.4
|
191
191
|
signing_key:
|
192
192
|
specification_version: 4
|
193
193
|
summary: API Client library for Cloud Vision API
|