google-cloud-vision-v1 0.6.3 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +11 -6
- data/lib/google/cloud/vision/v1/geometry_pb.rb +0 -1
- data/lib/google/cloud/vision/v1/image_annotator/client.rb +3 -2
- data/lib/google/cloud/vision/v1/image_annotator/operations.rb +23 -12
- data/lib/google/cloud/vision/v1/image_annotator_pb.rb +1 -7
- data/lib/google/cloud/vision/v1/image_annotator_services_pb.rb +1 -1
- data/lib/google/cloud/vision/v1/product_search/client.rb +96 -57
- data/lib/google/cloud/vision/v1/product_search/operations.rb +23 -12
- data/lib/google/cloud/vision/v1/product_search_pb.rb +1 -1
- data/lib/google/cloud/vision/v1/product_search_service_pb.rb +1 -0
- data/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +1 -1
- data/lib/google/cloud/vision/v1/text_annotation_pb.rb +1 -1
- data/lib/google/cloud/vision/v1/version.rb +1 -1
- data/lib/google/cloud/vision/v1/web_detection_pb.rb +0 -1
- data/lib/google/cloud/vision/v1.rb +2 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/vision/v1/image_annotator.rb +2 -26
- data/proto_docs/google/protobuf/any.rb +3 -3
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aebb4578523c977c01e5bea900bf0619bfbd12e92f26053889cef42adbdacb11
|
4
|
+
data.tar.gz: baa5772d5085c6614ffc93ecffc7740f1c7c9f43ab31b7525a4ac0550166b369
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49aa986aa6ae100d0303f8e9cbf5ab1b90f9b8a5ef052538e03cb5f5e39436a8edc28ea34d35df9fd41e395b931b554761c563024a3fed9f77a6d95bbd6606eb
|
7
|
+
data.tar.gz: 6d2f788ceb7e31cdbd21f095ecb8f957dd28c7f36d80245be65f747aee434f9b8999c6125b5c751672b5ef99dc467947479ab85b8031b3b4ba6671f73f93f7c9
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Vision::V1::CreateProductSetRequest.new # (request fi
|
|
37
37
|
response = client.create_product_set request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-vision-v1/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/vision)
|
@@ -69,16 +69,21 @@ module GRPC
|
|
69
69
|
end
|
70
70
|
```
|
71
71
|
|
72
|
+
|
73
|
+
## Google Cloud Samples
|
74
|
+
|
75
|
+
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
76
|
+
|
72
77
|
## Supported Ruby Versions
|
73
78
|
|
74
|
-
This library is supported on Ruby 2.
|
79
|
+
This library is supported on Ruby 2.6+.
|
75
80
|
|
76
81
|
Google provides official support for Ruby versions that are actively supported
|
77
82
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
78
|
-
in security maintenance, and not end of life.
|
79
|
-
|
80
|
-
|
81
|
-
|
83
|
+
in security maintenance, and not end of life. Older versions of Ruby _may_
|
84
|
+
still work, but are unsupported and not recommended. See
|
85
|
+
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
86
|
+
support schedule.
|
82
87
|
|
83
88
|
## Which client should I use?
|
84
89
|
|
@@ -157,6 +157,7 @@ module Google
|
|
157
157
|
|
158
158
|
@operations_client = Operations.new do |config|
|
159
159
|
config.credentials = credentials
|
160
|
+
config.quota_project = @quota_project_id
|
160
161
|
config.endpoint = @config.endpoint
|
161
162
|
end
|
162
163
|
|
@@ -293,8 +294,8 @@ module Google
|
|
293
294
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
294
295
|
#
|
295
296
|
# @param requests [::Array<::Google::Cloud::Vision::V1::AnnotateFileRequest, ::Hash>]
|
296
|
-
# Required. The list of file annotation requests. Right now we support only
|
297
|
-
#
|
297
|
+
# Required. The list of file annotation requests. Right now we support only one
|
298
|
+
# AnnotateFileRequest in BatchAnnotateFilesRequest.
|
298
299
|
# @param parent [::String]
|
299
300
|
# Optional. Target project and location to make a call.
|
300
301
|
#
|
@@ -95,6 +95,9 @@ module Google
|
|
95
95
|
channel_args: @config.channel_args,
|
96
96
|
interceptors: @config.interceptors
|
97
97
|
)
|
98
|
+
|
99
|
+
# Used by an LRO wrapper for some methods of this service
|
100
|
+
@operations_client = self
|
98
101
|
end
|
99
102
|
|
100
103
|
# Service calls
|
@@ -181,9 +184,11 @@ module Google
|
|
181
184
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
182
185
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
183
186
|
|
184
|
-
header_params = {
|
185
|
-
|
186
|
-
|
187
|
+
header_params = {}
|
188
|
+
if request.name
|
189
|
+
header_params["name"] = request.name
|
190
|
+
end
|
191
|
+
|
187
192
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
188
193
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
189
194
|
|
@@ -275,9 +280,11 @@ module Google
|
|
275
280
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
276
281
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
277
282
|
|
278
|
-
header_params = {
|
279
|
-
|
280
|
-
|
283
|
+
header_params = {}
|
284
|
+
if request.name
|
285
|
+
header_params["name"] = request.name
|
286
|
+
end
|
287
|
+
|
281
288
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
282
289
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
283
290
|
|
@@ -362,9 +369,11 @@ module Google
|
|
362
369
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
363
370
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
364
371
|
|
365
|
-
header_params = {
|
366
|
-
|
367
|
-
|
372
|
+
header_params = {}
|
373
|
+
if request.name
|
374
|
+
header_params["name"] = request.name
|
375
|
+
end
|
376
|
+
|
368
377
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
369
378
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
370
379
|
|
@@ -454,9 +463,11 @@ module Google
|
|
454
463
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
455
464
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
456
465
|
|
457
|
-
header_params = {
|
458
|
-
|
459
|
-
|
466
|
+
header_params = {}
|
467
|
+
if request.name
|
468
|
+
header_params["name"] = request.name
|
469
|
+
end
|
470
|
+
|
460
471
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
461
472
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
462
473
|
|
@@ -11,11 +11,11 @@ require 'google/cloud/vision/v1/product_search_pb'
|
|
11
11
|
require 'google/cloud/vision/v1/text_annotation_pb'
|
12
12
|
require 'google/cloud/vision/v1/web_detection_pb'
|
13
13
|
require 'google/longrunning/operations_pb'
|
14
|
-
require 'google/protobuf/field_mask_pb'
|
15
14
|
require 'google/protobuf/timestamp_pb'
|
16
15
|
require 'google/rpc/status_pb'
|
17
16
|
require 'google/type/color_pb'
|
18
17
|
require 'google/type/latlng_pb'
|
18
|
+
|
19
19
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
20
20
|
add_file("google/cloud/vision/v1/image_annotator.proto", :syntax => :proto3) do
|
21
21
|
add_message "google.cloud.vision.v1.Feature" do
|
@@ -138,12 +138,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
138
138
|
optional :medical, :enum, 3, "google.cloud.vision.v1.Likelihood"
|
139
139
|
optional :violence, :enum, 4, "google.cloud.vision.v1.Likelihood"
|
140
140
|
optional :racy, :enum, 9, "google.cloud.vision.v1.Likelihood"
|
141
|
-
optional :adult_confidence, :float, 16
|
142
|
-
optional :spoof_confidence, :float, 18
|
143
|
-
optional :medical_confidence, :float, 20
|
144
|
-
optional :violence_confidence, :float, 22
|
145
|
-
optional :racy_confidence, :float, 24
|
146
|
-
optional :nsfw_confidence, :float, 26
|
147
141
|
end
|
148
142
|
add_message "google.cloud.vision.v1.LatLongRect" do
|
149
143
|
optional :min_lat_lng, :message, 1, "google.type.LatLng"
|
@@ -243,6 +243,7 @@ module Google
|
|
243
243
|
|
244
244
|
@operations_client = Operations.new do |config|
|
245
245
|
config.credentials = credentials
|
246
|
+
config.quota_project = @quota_project_id
|
246
247
|
config.endpoint = @config.endpoint
|
247
248
|
end
|
248
249
|
|
@@ -339,9 +340,11 @@ module Google
|
|
339
340
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
340
341
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
341
342
|
|
342
|
-
header_params = {
|
343
|
-
|
344
|
-
|
343
|
+
header_params = {}
|
344
|
+
if request.parent
|
345
|
+
header_params["parent"] = request.parent
|
346
|
+
end
|
347
|
+
|
345
348
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
346
349
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
347
350
|
|
@@ -439,9 +442,11 @@ module Google
|
|
439
442
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
440
443
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
441
444
|
|
442
|
-
header_params = {
|
443
|
-
|
444
|
-
|
445
|
+
header_params = {}
|
446
|
+
if request.parent
|
447
|
+
header_params["parent"] = request.parent
|
448
|
+
end
|
449
|
+
|
445
450
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
446
451
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
447
452
|
|
@@ -530,9 +535,11 @@ module Google
|
|
530
535
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
531
536
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
532
537
|
|
533
|
-
header_params = {
|
534
|
-
|
535
|
-
|
538
|
+
header_params = {}
|
539
|
+
if request.name
|
540
|
+
header_params["name"] = request.name
|
541
|
+
end
|
542
|
+
|
536
543
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
537
544
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
538
545
|
|
@@ -625,9 +632,11 @@ module Google
|
|
625
632
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
626
633
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
627
634
|
|
628
|
-
header_params = {
|
629
|
-
|
630
|
-
|
635
|
+
header_params = {}
|
636
|
+
if request.product_set&.name
|
637
|
+
header_params["product_set.name"] = request.product_set.name
|
638
|
+
end
|
639
|
+
|
631
640
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
632
641
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
633
642
|
|
@@ -714,9 +723,11 @@ module Google
|
|
714
723
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
715
724
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
716
725
|
|
717
|
-
header_params = {
|
718
|
-
|
719
|
-
|
726
|
+
header_params = {}
|
727
|
+
if request.name
|
728
|
+
header_params["name"] = request.name
|
729
|
+
end
|
730
|
+
|
720
731
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
721
732
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
722
733
|
|
@@ -814,9 +825,11 @@ module Google
|
|
814
825
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
815
826
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
816
827
|
|
817
|
-
header_params = {
|
818
|
-
|
819
|
-
|
828
|
+
header_params = {}
|
829
|
+
if request.parent
|
830
|
+
header_params["parent"] = request.parent
|
831
|
+
end
|
832
|
+
|
820
833
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
821
834
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
822
835
|
|
@@ -914,9 +927,11 @@ module Google
|
|
914
927
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
915
928
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
916
929
|
|
917
|
-
header_params = {
|
918
|
-
|
919
|
-
|
930
|
+
header_params = {}
|
931
|
+
if request.parent
|
932
|
+
header_params["parent"] = request.parent
|
933
|
+
end
|
934
|
+
|
920
935
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
921
936
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
922
937
|
|
@@ -1005,9 +1020,11 @@ module Google
|
|
1005
1020
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1006
1021
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1007
1022
|
|
1008
|
-
header_params = {
|
1009
|
-
|
1010
|
-
|
1023
|
+
header_params = {}
|
1024
|
+
if request.name
|
1025
|
+
header_params["name"] = request.name
|
1026
|
+
end
|
1027
|
+
|
1011
1028
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1012
1029
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1013
1030
|
|
@@ -1109,9 +1126,11 @@ module Google
|
|
1109
1126
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1110
1127
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1111
1128
|
|
1112
|
-
header_params = {
|
1113
|
-
|
1114
|
-
|
1129
|
+
header_params = {}
|
1130
|
+
if request.product&.name
|
1131
|
+
header_params["product.name"] = request.product.name
|
1132
|
+
end
|
1133
|
+
|
1115
1134
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1116
1135
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1117
1136
|
|
@@ -1199,9 +1218,11 @@ module Google
|
|
1199
1218
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1200
1219
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1201
1220
|
|
1202
|
-
header_params = {
|
1203
|
-
|
1204
|
-
|
1221
|
+
header_params = {}
|
1222
|
+
if request.name
|
1223
|
+
header_params["name"] = request.name
|
1224
|
+
end
|
1225
|
+
|
1205
1226
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1206
1227
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1207
1228
|
|
@@ -1311,9 +1332,11 @@ module Google
|
|
1311
1332
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1312
1333
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1313
1334
|
|
1314
|
-
header_params = {
|
1315
|
-
|
1316
|
-
|
1335
|
+
header_params = {}
|
1336
|
+
if request.parent
|
1337
|
+
header_params["parent"] = request.parent
|
1338
|
+
end
|
1339
|
+
|
1317
1340
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1318
1341
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1319
1342
|
|
@@ -1403,9 +1426,11 @@ module Google
|
|
1403
1426
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1404
1427
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1405
1428
|
|
1406
|
-
header_params = {
|
1407
|
-
|
1408
|
-
|
1429
|
+
header_params = {}
|
1430
|
+
if request.name
|
1431
|
+
header_params["name"] = request.name
|
1432
|
+
end
|
1433
|
+
|
1409
1434
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1410
1435
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1411
1436
|
|
@@ -1508,9 +1533,11 @@ module Google
|
|
1508
1533
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1509
1534
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1510
1535
|
|
1511
|
-
header_params = {
|
1512
|
-
|
1513
|
-
|
1536
|
+
header_params = {}
|
1537
|
+
if request.parent
|
1538
|
+
header_params["parent"] = request.parent
|
1539
|
+
end
|
1540
|
+
|
1514
1541
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1515
1542
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1516
1543
|
|
@@ -1599,9 +1626,11 @@ module Google
|
|
1599
1626
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1600
1627
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1601
1628
|
|
1602
|
-
header_params = {
|
1603
|
-
|
1604
|
-
|
1629
|
+
header_params = {}
|
1630
|
+
if request.name
|
1631
|
+
header_params["name"] = request.name
|
1632
|
+
end
|
1633
|
+
|
1605
1634
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1606
1635
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1607
1636
|
|
@@ -1697,9 +1726,11 @@ module Google
|
|
1697
1726
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1698
1727
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1699
1728
|
|
1700
|
-
header_params = {
|
1701
|
-
|
1702
|
-
|
1729
|
+
header_params = {}
|
1730
|
+
if request.name
|
1731
|
+
header_params["name"] = request.name
|
1732
|
+
end
|
1733
|
+
|
1703
1734
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1704
1735
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1705
1736
|
|
@@ -1788,9 +1819,11 @@ module Google
|
|
1788
1819
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1789
1820
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1790
1821
|
|
1791
|
-
header_params = {
|
1792
|
-
|
1793
|
-
|
1822
|
+
header_params = {}
|
1823
|
+
if request.name
|
1824
|
+
header_params["name"] = request.name
|
1825
|
+
end
|
1826
|
+
|
1794
1827
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1795
1828
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1796
1829
|
|
@@ -1890,9 +1923,11 @@ module Google
|
|
1890
1923
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1891
1924
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1892
1925
|
|
1893
|
-
header_params = {
|
1894
|
-
|
1895
|
-
|
1926
|
+
header_params = {}
|
1927
|
+
if request.name
|
1928
|
+
header_params["name"] = request.name
|
1929
|
+
end
|
1930
|
+
|
1896
1931
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1897
1932
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1898
1933
|
|
@@ -1995,9 +2030,11 @@ module Google
|
|
1995
2030
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1996
2031
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1997
2032
|
|
1998
|
-
header_params = {
|
1999
|
-
|
2000
|
-
|
2033
|
+
header_params = {}
|
2034
|
+
if request.parent
|
2035
|
+
header_params["parent"] = request.parent
|
2036
|
+
end
|
2037
|
+
|
2001
2038
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2002
2039
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2003
2040
|
|
@@ -2119,9 +2156,11 @@ module Google
|
|
2119
2156
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
2120
2157
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2121
2158
|
|
2122
|
-
header_params = {
|
2123
|
-
|
2124
|
-
|
2159
|
+
header_params = {}
|
2160
|
+
if request.parent
|
2161
|
+
header_params["parent"] = request.parent
|
2162
|
+
end
|
2163
|
+
|
2125
2164
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2126
2165
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2127
2166
|
|
@@ -95,6 +95,9 @@ module Google
|
|
95
95
|
channel_args: @config.channel_args,
|
96
96
|
interceptors: @config.interceptors
|
97
97
|
)
|
98
|
+
|
99
|
+
# Used by an LRO wrapper for some methods of this service
|
100
|
+
@operations_client = self
|
98
101
|
end
|
99
102
|
|
100
103
|
# Service calls
|
@@ -181,9 +184,11 @@ module Google
|
|
181
184
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
182
185
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
183
186
|
|
184
|
-
header_params = {
|
185
|
-
|
186
|
-
|
187
|
+
header_params = {}
|
188
|
+
if request.name
|
189
|
+
header_params["name"] = request.name
|
190
|
+
end
|
191
|
+
|
187
192
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
188
193
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
189
194
|
|
@@ -275,9 +280,11 @@ module Google
|
|
275
280
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
276
281
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
277
282
|
|
278
|
-
header_params = {
|
279
|
-
|
280
|
-
|
283
|
+
header_params = {}
|
284
|
+
if request.name
|
285
|
+
header_params["name"] = request.name
|
286
|
+
end
|
287
|
+
|
281
288
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
282
289
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
283
290
|
|
@@ -362,9 +369,11 @@ module Google
|
|
362
369
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
363
370
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
364
371
|
|
365
|
-
header_params = {
|
366
|
-
|
367
|
-
|
372
|
+
header_params = {}
|
373
|
+
if request.name
|
374
|
+
header_params["name"] = request.name
|
375
|
+
end
|
376
|
+
|
368
377
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
369
378
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
370
379
|
|
@@ -454,9 +463,11 @@ module Google
|
|
454
463
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
455
464
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
456
465
|
|
457
|
-
header_params = {
|
458
|
-
|
459
|
-
|
466
|
+
header_params = {}
|
467
|
+
if request.name
|
468
|
+
header_params["name"] = request.name
|
469
|
+
end
|
470
|
+
|
460
471
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
461
472
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
462
473
|
|
@@ -7,7 +7,7 @@ require 'google/api/resource_pb'
|
|
7
7
|
require 'google/cloud/vision/v1/geometry_pb'
|
8
8
|
require 'google/cloud/vision/v1/product_search_service_pb'
|
9
9
|
require 'google/protobuf/timestamp_pb'
|
10
|
-
|
10
|
+
|
11
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
12
|
add_file("google/cloud/vision/v1/product_search.proto", :syntax => :proto3) do
|
13
13
|
add_message "google.cloud.vision.v1.ProductSearchParams" do
|
@@ -13,6 +13,7 @@ require 'google/protobuf/empty_pb'
|
|
13
13
|
require 'google/protobuf/field_mask_pb'
|
14
14
|
require 'google/protobuf/timestamp_pb'
|
15
15
|
require 'google/rpc/status_pb'
|
16
|
+
|
16
17
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
18
|
add_file("google/cloud/vision/v1/product_search_service.proto", :syntax => :proto3) do
|
18
19
|
add_message "google.cloud.vision.v1.Product" do
|
@@ -4,7 +4,7 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'google/cloud/vision/v1/geometry_pb'
|
7
|
-
|
7
|
+
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
9
|
add_file("google/cloud/vision/v1/text_annotation.proto", :syntax => :proto3) do
|
10
10
|
add_message "google.cloud.vision.v1.TextAnnotation" do
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
@@ -458,30 +458,6 @@ module Google
|
|
458
458
|
# include (but is not limited to) skimpy or sheer clothing, strategically
|
459
459
|
# covered nudity, lewd or provocative poses, or close-ups of sensitive
|
460
460
|
# body areas.
|
461
|
-
# @!attribute [rw] adult_confidence
|
462
|
-
# @return [::Float]
|
463
|
-
# Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
|
464
|
-
# very confident.
|
465
|
-
# @!attribute [rw] spoof_confidence
|
466
|
-
# @return [::Float]
|
467
|
-
# Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
|
468
|
-
# very confident.
|
469
|
-
# @!attribute [rw] medical_confidence
|
470
|
-
# @return [::Float]
|
471
|
-
# Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
|
472
|
-
# very confident.
|
473
|
-
# @!attribute [rw] violence_confidence
|
474
|
-
# @return [::Float]
|
475
|
-
# Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
|
476
|
-
# very confident.
|
477
|
-
# @!attribute [rw] racy_confidence
|
478
|
-
# @return [::Float]
|
479
|
-
# Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
|
480
|
-
# confident.
|
481
|
-
# @!attribute [rw] nsfw_confidence
|
482
|
-
# @return [::Float]
|
483
|
-
# Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
|
484
|
-
# confident.
|
485
461
|
class SafeSearchAnnotation
|
486
462
|
include ::Google::Protobuf::MessageExts
|
487
463
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -798,8 +774,8 @@ module Google
|
|
798
774
|
# A list of requests to annotate files using the BatchAnnotateFiles API.
|
799
775
|
# @!attribute [rw] requests
|
800
776
|
# @return [::Array<::Google::Cloud::Vision::V1::AnnotateFileRequest>]
|
801
|
-
# Required. The list of file annotation requests. Right now we support only
|
802
|
-
#
|
777
|
+
# Required. The list of file annotation requests. Right now we support only one
|
778
|
+
# AnnotateFileRequest in BatchAnnotateFilesRequest.
|
803
779
|
# @!attribute [rw] parent
|
804
780
|
# @return [::String]
|
805
781
|
# Optional. Target project and location to make a call.
|
@@ -44,7 +44,7 @@ module Google
|
|
44
44
|
# foo = any.unpack(Foo.class);
|
45
45
|
# }
|
46
46
|
#
|
47
|
-
#
|
47
|
+
# Example 3: Pack and unpack a message in Python.
|
48
48
|
#
|
49
49
|
# foo = Foo(...)
|
50
50
|
# any = Any()
|
@@ -54,7 +54,7 @@ module Google
|
|
54
54
|
# any.Unpack(foo)
|
55
55
|
# ...
|
56
56
|
#
|
57
|
-
#
|
57
|
+
# Example 4: Pack and unpack a message in Go
|
58
58
|
#
|
59
59
|
# foo := &pb.Foo{...}
|
60
60
|
# any, err := anypb.New(foo)
|
@@ -75,7 +75,7 @@ module Google
|
|
75
75
|
#
|
76
76
|
#
|
77
77
|
# JSON
|
78
|
-
#
|
78
|
+
#
|
79
79
|
# The JSON representation of an `Any` value uses the regular
|
80
80
|
# representation of the deserialized, embedded message, with an
|
81
81
|
# additional field `@type` which contains the type URL. Example:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-vision-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.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:
|
11
|
+
date: 2022-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.10'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.10'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -50,28 +50,28 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
53
|
+
version: 1.26.1
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 1.
|
60
|
+
version: 1.26.1
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: minitest
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '5.
|
67
|
+
version: '5.16'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '5.
|
74
|
+
version: '5.16'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: minitest-focus
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,14 +106,14 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
109
|
+
version: '13.0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
116
|
+
version: '13.0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: redcarpet
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -224,14 +224,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
224
224
|
requirements:
|
225
225
|
- - ">="
|
226
226
|
- !ruby/object:Gem::Version
|
227
|
-
version: '2.
|
227
|
+
version: '2.6'
|
228
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
229
|
requirements:
|
230
230
|
- - ">="
|
231
231
|
- !ruby/object:Gem::Version
|
232
232
|
version: '0'
|
233
233
|
requirements: []
|
234
|
-
rubygems_version: 3.
|
234
|
+
rubygems_version: 3.3.14
|
235
235
|
signing_key:
|
236
236
|
specification_version: 4
|
237
237
|
summary: API Client library for the Cloud Vision V1 API
|