google-cloud-vision-v1 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/google/cloud/vision/v1/geometry_pb.rb +24 -18
- data/lib/google/cloud/vision/v1/image_annotator/client.rb +6 -4
- data/lib/google/cloud/vision/v1/image_annotator/operations.rb +5 -3
- data/lib/google/cloud/vision/v1/image_annotator/rest/client.rb +6 -4
- data/lib/google/cloud/vision/v1/image_annotator/rest/operations.rb +9 -7
- data/lib/google/cloud/vision/v1/image_annotator/rest/service_stub.rb +4 -4
- data/lib/google/cloud/vision/v1/image_annotator_pb.rb +32 -273
- data/lib/google/cloud/vision/v1/product_search/client.rb +6 -4
- data/lib/google/cloud/vision/v1/product_search/operations.rb +5 -3
- data/lib/google/cloud/vision/v1/product_search/rest/client.rb +6 -4
- data/lib/google/cloud/vision/v1/product_search/rest/operations.rb +9 -7
- data/lib/google/cloud/vision/v1/product_search/rest/service_stub.rb +19 -19
- data/lib/google/cloud/vision/v1/product_search_pb.rb +27 -28
- data/lib/google/cloud/vision/v1/product_search_service_pb.rb +28 -148
- data/lib/google/cloud/vision/v1/text_annotation_pb.rb +25 -65
- data/lib/google/cloud/vision/v1/version.rb +1 -1
- data/lib/google/cloud/vision/v1/web_detection_pb.rb +24 -29
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +7 -5
@@ -231,7 +231,7 @@ module Google
|
|
231
231
|
credentials = @config.credentials
|
232
232
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
233
233
|
# but only if the default endpoint does not have a region prefix.
|
234
|
-
enable_self_signed_jwt = @config.endpoint ==
|
234
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
235
235
|
!@config.endpoint.split(".").first.include?("-")
|
236
236
|
credentials ||= Credentials.default scope: @config.scope,
|
237
237
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -2211,9 +2211,9 @@ module Google
|
|
2211
2211
|
# * (`String`) The path to a service account key file in JSON format
|
2212
2212
|
# * (`Hash`) A service account key as a Hash
|
2213
2213
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2214
|
-
# (see the [googleauth docs](https://
|
2214
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
2215
2215
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2216
|
-
# (see the [signet docs](https://
|
2216
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
2217
2217
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2218
2218
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2219
2219
|
# * (`nil`) indicating no credentials
|
@@ -2255,7 +2255,9 @@ module Google
|
|
2255
2255
|
class Configuration
|
2256
2256
|
extend ::Gapic::Config
|
2257
2257
|
|
2258
|
-
|
2258
|
+
DEFAULT_ENDPOINT = "vision.googleapis.com"
|
2259
|
+
|
2260
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
2259
2261
|
config_attr :credentials, nil do |value|
|
2260
2262
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2261
2263
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -620,9 +620,9 @@ module Google
|
|
620
620
|
# * (`String`) The path to a service account key file in JSON format
|
621
621
|
# * (`Hash`) A service account key as a Hash
|
622
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
623
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
624
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
625
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
626
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
627
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
628
628
|
# * (`nil`) indicating no credentials
|
@@ -664,7 +664,9 @@ module Google
|
|
664
664
|
class Configuration
|
665
665
|
extend ::Gapic::Config
|
666
666
|
|
667
|
-
|
667
|
+
DEFAULT_ENDPOINT = "vision.googleapis.com"
|
668
|
+
|
669
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
668
670
|
config_attr :credentials, nil do |value|
|
669
671
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
670
672
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -227,7 +227,7 @@ module Google
|
|
227
227
|
credentials = @config.credentials
|
228
228
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
229
229
|
# but only if the default endpoint does not have a region prefix.
|
230
|
-
enable_self_signed_jwt = @config.endpoint ==
|
230
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
231
231
|
!@config.endpoint.split(".").first.include?("-")
|
232
232
|
credentials ||= Credentials.default scope: @config.scope,
|
233
233
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -1735,9 +1735,9 @@ module Google
|
|
1735
1735
|
# * (`String`) The path to a service account key file in JSON format
|
1736
1736
|
# * (`Hash`) A service account key as a Hash
|
1737
1737
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1738
|
-
# (see the [googleauth docs](https://
|
1738
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1739
1739
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1740
|
-
# (see the [signet docs](https://
|
1740
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1741
1741
|
# * (`nil`) indicating no credentials
|
1742
1742
|
# @return [::Object]
|
1743
1743
|
# @!attribute [rw] scope
|
@@ -1770,7 +1770,9 @@ module Google
|
|
1770
1770
|
class Configuration
|
1771
1771
|
extend ::Gapic::Config
|
1772
1772
|
|
1773
|
-
|
1773
|
+
DEFAULT_ENDPOINT = "vision.googleapis.com"
|
1774
|
+
|
1775
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1774
1776
|
config_attr :credentials, nil do |value|
|
1775
1777
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1776
1778
|
allowed.any? { |klass| klass === value }
|
@@ -411,9 +411,9 @@ module Google
|
|
411
411
|
# * (`String`) The path to a service account key file in JSON format
|
412
412
|
# * (`Hash`) A service account key as a Hash
|
413
413
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
414
|
-
# (see the [googleauth docs](https://
|
414
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
415
415
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
416
|
-
# (see the [signet docs](https://
|
416
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
417
417
|
# * (`nil`) indicating no credentials
|
418
418
|
# @return [::Object]
|
419
419
|
# @!attribute [rw] scope
|
@@ -446,7 +446,9 @@ module Google
|
|
446
446
|
class Configuration
|
447
447
|
extend ::Gapic::Config
|
448
448
|
|
449
|
-
|
449
|
+
DEFAULT_ENDPOINT = "vision.googleapis.com"
|
450
|
+
|
451
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
450
452
|
config_attr :credentials, nil do |value|
|
451
453
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
452
454
|
allowed.any? { |klass| klass === value }
|
@@ -567,7 +569,7 @@ module Google
|
|
567
569
|
|
568
570
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
|
569
571
|
query_string_params = if query_string_params.any?
|
570
|
-
query_string_params.to_h { |p| p.split
|
572
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
571
573
|
else
|
572
574
|
{}
|
573
575
|
end
|
@@ -605,7 +607,7 @@ module Google
|
|
605
607
|
|
606
608
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
|
607
609
|
query_string_params = if query_string_params.any?
|
608
|
-
query_string_params.to_h { |p| p.split
|
610
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
609
611
|
else
|
610
612
|
{}
|
611
613
|
end
|
@@ -643,7 +645,7 @@ module Google
|
|
643
645
|
|
644
646
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
|
645
647
|
query_string_params = if query_string_params.any?
|
646
|
-
query_string_params.to_h { |p| p.split
|
648
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
647
649
|
else
|
648
650
|
{}
|
649
651
|
end
|
@@ -681,7 +683,7 @@ module Google
|
|
681
683
|
|
682
684
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
|
683
685
|
query_string_params = if query_string_params.any?
|
684
|
-
query_string_params.to_h { |p| p.split
|
686
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
685
687
|
else
|
686
688
|
{}
|
687
689
|
end
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_product_set_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
|
98
98
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_product_sets_request request_pb
|
99
99
|
query_string_params = if query_string_params.any?
|
100
|
-
query_string_params.to_h { |p| p.split
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
101
|
else
|
102
102
|
{}
|
103
103
|
end
|
@@ -135,7 +135,7 @@ module Google
|
|
135
135
|
|
136
136
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_product_set_request request_pb
|
137
137
|
query_string_params = if query_string_params.any?
|
138
|
-
query_string_params.to_h { |p| p.split
|
138
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
139
139
|
else
|
140
140
|
{}
|
141
141
|
end
|
@@ -173,7 +173,7 @@ module Google
|
|
173
173
|
|
174
174
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_product_set_request request_pb
|
175
175
|
query_string_params = if query_string_params.any?
|
176
|
-
query_string_params.to_h { |p| p.split
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
177
|
else
|
178
178
|
{}
|
179
179
|
end
|
@@ -211,7 +211,7 @@ module Google
|
|
211
211
|
|
212
212
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_product_set_request request_pb
|
213
213
|
query_string_params = if query_string_params.any?
|
214
|
-
query_string_params.to_h { |p| p.split
|
214
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
215
215
|
else
|
216
216
|
{}
|
217
217
|
end
|
@@ -249,7 +249,7 @@ module Google
|
|
249
249
|
|
250
250
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_product_request request_pb
|
251
251
|
query_string_params = if query_string_params.any?
|
252
|
-
query_string_params.to_h { |p| p.split
|
252
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
253
253
|
else
|
254
254
|
{}
|
255
255
|
end
|
@@ -287,7 +287,7 @@ module Google
|
|
287
287
|
|
288
288
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_products_request request_pb
|
289
289
|
query_string_params = if query_string_params.any?
|
290
|
-
query_string_params.to_h { |p| p.split
|
290
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
291
291
|
else
|
292
292
|
{}
|
293
293
|
end
|
@@ -325,7 +325,7 @@ module Google
|
|
325
325
|
|
326
326
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_product_request request_pb
|
327
327
|
query_string_params = if query_string_params.any?
|
328
|
-
query_string_params.to_h { |p| p.split
|
328
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
329
329
|
else
|
330
330
|
{}
|
331
331
|
end
|
@@ -363,7 +363,7 @@ module Google
|
|
363
363
|
|
364
364
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_product_request request_pb
|
365
365
|
query_string_params = if query_string_params.any?
|
366
|
-
query_string_params.to_h { |p| p.split
|
366
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
367
367
|
else
|
368
368
|
{}
|
369
369
|
end
|
@@ -401,7 +401,7 @@ module Google
|
|
401
401
|
|
402
402
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_product_request request_pb
|
403
403
|
query_string_params = if query_string_params.any?
|
404
|
-
query_string_params.to_h { |p| p.split
|
404
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
405
405
|
else
|
406
406
|
{}
|
407
407
|
end
|
@@ -439,7 +439,7 @@ module Google
|
|
439
439
|
|
440
440
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_reference_image_request request_pb
|
441
441
|
query_string_params = if query_string_params.any?
|
442
|
-
query_string_params.to_h { |p| p.split
|
442
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
443
443
|
else
|
444
444
|
{}
|
445
445
|
end
|
@@ -477,7 +477,7 @@ module Google
|
|
477
477
|
|
478
478
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_reference_image_request request_pb
|
479
479
|
query_string_params = if query_string_params.any?
|
480
|
-
query_string_params.to_h { |p| p.split
|
480
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
481
481
|
else
|
482
482
|
{}
|
483
483
|
end
|
@@ -515,7 +515,7 @@ module Google
|
|
515
515
|
|
516
516
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_reference_images_request request_pb
|
517
517
|
query_string_params = if query_string_params.any?
|
518
|
-
query_string_params.to_h { |p| p.split
|
518
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
519
519
|
else
|
520
520
|
{}
|
521
521
|
end
|
@@ -553,7 +553,7 @@ module Google
|
|
553
553
|
|
554
554
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_reference_image_request request_pb
|
555
555
|
query_string_params = if query_string_params.any?
|
556
|
-
query_string_params.to_h { |p| p.split
|
556
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
557
557
|
else
|
558
558
|
{}
|
559
559
|
end
|
@@ -591,7 +591,7 @@ module Google
|
|
591
591
|
|
592
592
|
verb, uri, query_string_params, body = ServiceStub.transcode_add_product_to_product_set_request request_pb
|
593
593
|
query_string_params = if query_string_params.any?
|
594
|
-
query_string_params.to_h { |p| p.split
|
594
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
595
595
|
else
|
596
596
|
{}
|
597
597
|
end
|
@@ -629,7 +629,7 @@ module Google
|
|
629
629
|
|
630
630
|
verb, uri, query_string_params, body = ServiceStub.transcode_remove_product_from_product_set_request request_pb
|
631
631
|
query_string_params = if query_string_params.any?
|
632
|
-
query_string_params.to_h { |p| p.split
|
632
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
633
633
|
else
|
634
634
|
{}
|
635
635
|
end
|
@@ -667,7 +667,7 @@ module Google
|
|
667
667
|
|
668
668
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_products_in_product_set_request request_pb
|
669
669
|
query_string_params = if query_string_params.any?
|
670
|
-
query_string_params.to_h { |p| p.split
|
670
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
671
671
|
else
|
672
672
|
{}
|
673
673
|
end
|
@@ -705,7 +705,7 @@ module Google
|
|
705
705
|
|
706
706
|
verb, uri, query_string_params, body = ServiceStub.transcode_import_product_sets_request request_pb
|
707
707
|
query_string_params = if query_string_params.any?
|
708
|
-
query_string_params.to_h { |p| p.split
|
708
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
709
709
|
else
|
710
710
|
{}
|
711
711
|
end
|
@@ -743,7 +743,7 @@ module Google
|
|
743
743
|
|
744
744
|
verb, uri, query_string_params, body = ServiceStub.transcode_purge_products_request request_pb
|
745
745
|
query_string_params = if query_string_params.any?
|
746
|
-
query_string_params.to_h { |p| p.split
|
746
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
747
747
|
else
|
748
748
|
{}
|
749
749
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/vision/v1/product_search.proto
|
3
4
|
|
@@ -8,36 +9,34 @@ require 'google/cloud/vision/v1/geometry_pb'
|
|
8
9
|
require 'google/cloud/vision/v1/product_search_service_pb'
|
9
10
|
require 'google/protobuf/timestamp_pb'
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
add_message "google.cloud.vision.v1.ProductSearchResults.GroupedResult" do
|
36
|
-
optional :bounding_poly, :message, 1, "google.cloud.vision.v1.BoundingPoly"
|
37
|
-
repeated :results, :message, 2, "google.cloud.vision.v1.ProductSearchResults.Result"
|
38
|
-
repeated :object_annotations, :message, 3, "google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation"
|
12
|
+
|
13
|
+
descriptor_data = "\n+google/cloud/vision/v1/product_search.proto\x12\x16google.cloud.vision.v1\x1a\x19google/api/resource.proto\x1a%google/cloud/vision/v1/geometry.proto\x1a\x33google/cloud/vision/v1/product_search_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x01\n\x13ProductSearchParams\x12;\n\rbounding_poly\x18\t \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12:\n\x0bproduct_set\x18\x06 \x01(\tB%\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x1a\n\x12product_categories\x18\x07 \x03(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t\"\x88\x05\n\x14ProductSearchResults\x12.\n\nindex_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x07results\x18\x05 \x03(\x0b\x32\x33.google.cloud.vision.v1.ProductSearchResults.Result\x12[\n\x17product_grouped_results\x18\x06 \x03(\x0b\x32:.google.cloud.vision.v1.ProductSearchResults.GroupedResult\x1aX\n\x06Result\x12\x30\n\x07product\x18\x01 \x01(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\r\n\x05score\x18\x02 \x01(\x02\x12\r\n\x05image\x18\x03 \x01(\t\x1aS\n\x10ObjectAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x1a\xed\x01\n\rGroupedResult\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x44\n\x07results\x18\x02 \x03(\x0b\x32\x33.google.cloud.vision.v1.ProductSearchResults.Result\x12Y\n\x12object_annotations\x18\x03 \x03(\x0b\x32=.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationBs\n\x1a\x63om.google.cloud.vision.v1B\x12ProductSearchProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3"
|
14
|
+
|
15
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
16
|
+
|
17
|
+
begin
|
18
|
+
pool.add_serialized_file(descriptor_data)
|
19
|
+
rescue TypeError => e
|
20
|
+
# Compatibility code: will be removed in the next major version.
|
21
|
+
require 'google/protobuf/descriptor_pb'
|
22
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
23
|
+
parsed.clear_dependency
|
24
|
+
serialized = parsed.class.encode(parsed)
|
25
|
+
file = pool.add_serialized_file(serialized)
|
26
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
27
|
+
imports = [
|
28
|
+
["google.cloud.vision.v1.BoundingPoly", "google/cloud/vision/v1/geometry.proto"],
|
29
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
30
|
+
["google.cloud.vision.v1.Product", "google/cloud/vision/v1/product_search_service.proto"],
|
31
|
+
]
|
32
|
+
imports.each do |type_name, expected_filename|
|
33
|
+
import_file = pool.lookup(type_name).file_descriptor
|
34
|
+
if import_file.name != expected_filename
|
35
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
39
36
|
end
|
40
37
|
end
|
38
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
39
|
+
warn "This will become an error in the next major version."
|
41
40
|
end
|
42
41
|
|
43
42
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/vision/v1/product_search_service.proto
|
3
4
|
|
@@ -14,156 +15,35 @@ require 'google/protobuf/field_mask_pb'
|
|
14
15
|
require 'google/protobuf/timestamp_pb'
|
15
16
|
require 'google/rpc/status_pb'
|
16
17
|
|
17
|
-
|
18
|
-
add_file("google/cloud/vision/v1/product_search_service.proto", :syntax => :proto3) do
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
optional :parent, :string, 1
|
43
|
-
optional :product, :message, 2, "google.cloud.vision.v1.Product"
|
44
|
-
optional :product_id, :string, 3
|
45
|
-
end
|
46
|
-
add_message "google.cloud.vision.v1.ListProductsRequest" do
|
47
|
-
optional :parent, :string, 1
|
48
|
-
optional :page_size, :int32, 2
|
49
|
-
optional :page_token, :string, 3
|
50
|
-
end
|
51
|
-
add_message "google.cloud.vision.v1.ListProductsResponse" do
|
52
|
-
repeated :products, :message, 1, "google.cloud.vision.v1.Product"
|
53
|
-
optional :next_page_token, :string, 2
|
54
|
-
end
|
55
|
-
add_message "google.cloud.vision.v1.GetProductRequest" do
|
56
|
-
optional :name, :string, 1
|
57
|
-
end
|
58
|
-
add_message "google.cloud.vision.v1.UpdateProductRequest" do
|
59
|
-
optional :product, :message, 1, "google.cloud.vision.v1.Product"
|
60
|
-
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
61
|
-
end
|
62
|
-
add_message "google.cloud.vision.v1.DeleteProductRequest" do
|
63
|
-
optional :name, :string, 1
|
64
|
-
end
|
65
|
-
add_message "google.cloud.vision.v1.CreateProductSetRequest" do
|
66
|
-
optional :parent, :string, 1
|
67
|
-
optional :product_set, :message, 2, "google.cloud.vision.v1.ProductSet"
|
68
|
-
optional :product_set_id, :string, 3
|
69
|
-
end
|
70
|
-
add_message "google.cloud.vision.v1.ListProductSetsRequest" do
|
71
|
-
optional :parent, :string, 1
|
72
|
-
optional :page_size, :int32, 2
|
73
|
-
optional :page_token, :string, 3
|
74
|
-
end
|
75
|
-
add_message "google.cloud.vision.v1.ListProductSetsResponse" do
|
76
|
-
repeated :product_sets, :message, 1, "google.cloud.vision.v1.ProductSet"
|
77
|
-
optional :next_page_token, :string, 2
|
78
|
-
end
|
79
|
-
add_message "google.cloud.vision.v1.GetProductSetRequest" do
|
80
|
-
optional :name, :string, 1
|
81
|
-
end
|
82
|
-
add_message "google.cloud.vision.v1.UpdateProductSetRequest" do
|
83
|
-
optional :product_set, :message, 1, "google.cloud.vision.v1.ProductSet"
|
84
|
-
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
85
|
-
end
|
86
|
-
add_message "google.cloud.vision.v1.DeleteProductSetRequest" do
|
87
|
-
optional :name, :string, 1
|
88
|
-
end
|
89
|
-
add_message "google.cloud.vision.v1.CreateReferenceImageRequest" do
|
90
|
-
optional :parent, :string, 1
|
91
|
-
optional :reference_image, :message, 2, "google.cloud.vision.v1.ReferenceImage"
|
92
|
-
optional :reference_image_id, :string, 3
|
93
|
-
end
|
94
|
-
add_message "google.cloud.vision.v1.ListReferenceImagesRequest" do
|
95
|
-
optional :parent, :string, 1
|
96
|
-
optional :page_size, :int32, 2
|
97
|
-
optional :page_token, :string, 3
|
98
|
-
end
|
99
|
-
add_message "google.cloud.vision.v1.ListReferenceImagesResponse" do
|
100
|
-
repeated :reference_images, :message, 1, "google.cloud.vision.v1.ReferenceImage"
|
101
|
-
optional :page_size, :int32, 2
|
102
|
-
optional :next_page_token, :string, 3
|
103
|
-
end
|
104
|
-
add_message "google.cloud.vision.v1.GetReferenceImageRequest" do
|
105
|
-
optional :name, :string, 1
|
106
|
-
end
|
107
|
-
add_message "google.cloud.vision.v1.DeleteReferenceImageRequest" do
|
108
|
-
optional :name, :string, 1
|
109
|
-
end
|
110
|
-
add_message "google.cloud.vision.v1.AddProductToProductSetRequest" do
|
111
|
-
optional :name, :string, 1
|
112
|
-
optional :product, :string, 2
|
113
|
-
end
|
114
|
-
add_message "google.cloud.vision.v1.RemoveProductFromProductSetRequest" do
|
115
|
-
optional :name, :string, 1
|
116
|
-
optional :product, :string, 2
|
117
|
-
end
|
118
|
-
add_message "google.cloud.vision.v1.ListProductsInProductSetRequest" do
|
119
|
-
optional :name, :string, 1
|
120
|
-
optional :page_size, :int32, 2
|
121
|
-
optional :page_token, :string, 3
|
122
|
-
end
|
123
|
-
add_message "google.cloud.vision.v1.ListProductsInProductSetResponse" do
|
124
|
-
repeated :products, :message, 1, "google.cloud.vision.v1.Product"
|
125
|
-
optional :next_page_token, :string, 2
|
126
|
-
end
|
127
|
-
add_message "google.cloud.vision.v1.ImportProductSetsGcsSource" do
|
128
|
-
optional :csv_file_uri, :string, 1
|
129
|
-
end
|
130
|
-
add_message "google.cloud.vision.v1.ImportProductSetsInputConfig" do
|
131
|
-
oneof :source do
|
132
|
-
optional :gcs_source, :message, 1, "google.cloud.vision.v1.ImportProductSetsGcsSource"
|
133
|
-
end
|
134
|
-
end
|
135
|
-
add_message "google.cloud.vision.v1.ImportProductSetsRequest" do
|
136
|
-
optional :parent, :string, 1
|
137
|
-
optional :input_config, :message, 2, "google.cloud.vision.v1.ImportProductSetsInputConfig"
|
138
|
-
end
|
139
|
-
add_message "google.cloud.vision.v1.ImportProductSetsResponse" do
|
140
|
-
repeated :reference_images, :message, 1, "google.cloud.vision.v1.ReferenceImage"
|
141
|
-
repeated :statuses, :message, 2, "google.rpc.Status"
|
142
|
-
end
|
143
|
-
add_message "google.cloud.vision.v1.BatchOperationMetadata" do
|
144
|
-
optional :state, :enum, 1, "google.cloud.vision.v1.BatchOperationMetadata.State"
|
145
|
-
optional :submit_time, :message, 2, "google.protobuf.Timestamp"
|
146
|
-
optional :end_time, :message, 3, "google.protobuf.Timestamp"
|
147
|
-
end
|
148
|
-
add_enum "google.cloud.vision.v1.BatchOperationMetadata.State" do
|
149
|
-
value :STATE_UNSPECIFIED, 0
|
150
|
-
value :PROCESSING, 1
|
151
|
-
value :SUCCESSFUL, 2
|
152
|
-
value :FAILED, 3
|
153
|
-
value :CANCELLED, 4
|
154
|
-
end
|
155
|
-
add_message "google.cloud.vision.v1.ProductSetPurgeConfig" do
|
156
|
-
optional :product_set_id, :string, 1
|
157
|
-
end
|
158
|
-
add_message "google.cloud.vision.v1.PurgeProductsRequest" do
|
159
|
-
optional :parent, :string, 1
|
160
|
-
optional :force, :bool, 4
|
161
|
-
oneof :target do
|
162
|
-
optional :product_set_purge_config, :message, 2, "google.cloud.vision.v1.ProductSetPurgeConfig"
|
163
|
-
optional :delete_orphan_products, :bool, 3
|
164
|
-
end
|
18
|
+
|
19
|
+
descriptor_data = "\n3google/cloud/vision/v1/product_search_service.proto\x12\x16google.cloud.vision.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a%google/cloud/vision/v1/geometry.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xab\x02\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x1d\n\x10product_category\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12@\n\x0eproduct_labels\x18\x05 \x03(\x0b\x32(.google.cloud.vision.v1.Product.KeyValue\x1a&\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:^\xea\x41[\n\x1dvision.googleapis.com/Product\x12:projects/{project}/locations/{location}/products/{product}\"\xfd\x01\n\nProductSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x33\n\nindex_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12,\n\x0bindex_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03:h\xea\x41\x65\n vision.googleapis.com/ProductSet\x12\x41projects/{project}/locations/{location}/productSets/{product_set}\"\xfe\x01\n\x0eReferenceImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x0e\x62ounding_polys\x18\x03 \x03(\x0b\x32$.google.cloud.vision.v1.BoundingPolyB\x03\xe0\x41\x01:\x88\x01\xea\x41\x84\x01\n$vision.googleapis.com/ReferenceImage\x12\\projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}\"\x9c\x01\n\x14\x43reateProductRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x35\n\x07product\x18\x02 \x01(\x0b\x32\x1f.google.cloud.vision.v1.ProductB\x03\xe0\x41\x02\x12\x12\n\nproduct_id\x18\x03 \x01(\t\"w\n\x13ListProductsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"b\n\x14ListProductsResponse\x12\x31\n\x08products\x18\x01 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"H\n\x11GetProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"~\n\x14UpdateProductRequest\x12\x35\n\x07product\x18\x01 \x01(\x0b\x32\x1f.google.cloud.vision.v1.ProductB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14\x44\x65leteProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\xaa\x01\n\x17\x43reateProductSetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x0bproduct_set\x18\x02 \x01(\x0b\x32\".google.cloud.vision.v1.ProductSetB\x03\xe0\x41\x02\x12\x16\n\x0eproduct_set_id\x18\x03 \x01(\t\"z\n\x16ListProductSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"l\n\x17ListProductSetsResponse\x12\x38\n\x0cproduct_sets\x18\x01 \x03(\x0b\x32\".google.cloud.vision.v1.ProductSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x14GetProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\"\x88\x01\n\x17UpdateProductSetRequest\x12<\n\x0bproduct_set\x18\x01 \x01(\x0b\x32\".google.cloud.vision.v1.ProductSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"Q\n\x17\x44\x65leteProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\"\xb6\x01\n\x1b\x43reateReferenceImageRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\x12\x44\n\x0freference_image\x18\x02 \x01(\x0b\x32&.google.cloud.vision.v1.ReferenceImageB\x03\xe0\x41\x02\x12\x1a\n\x12reference_image_id\x18\x03 \x01(\t\"z\n\x1aListReferenceImagesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8b\x01\n\x1bListReferenceImagesResponse\x12@\n\x10reference_images\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.ReferenceImage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"V\n\x18GetReferenceImageRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$vision.googleapis.com/ReferenceImage\"Y\n\x1b\x44\x65leteReferenceImageRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$vision.googleapis.com/ReferenceImage\"\x8f\x01\n\x1d\x41\x64\x64ProductToProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x36\n\x07product\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\x94\x01\n\"RemoveProductFromProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x36\n\x07product\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\x80\x01\n\x1fListProductsInProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n ListProductsInProductSetResponse\x12\x31\n\x08products\x18\x01 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"2\n\x1aImportProductSetsGcsSource\x12\x14\n\x0c\x63sv_file_uri\x18\x01 \x01(\t\"r\n\x1cImportProductSetsInputConfig\x12H\n\ngcs_source\x18\x01 \x01(\x0b\x32\x32.google.cloud.vision.v1.ImportProductSetsGcsSourceH\x00\x42\x08\n\x06source\"\xa6\x01\n\x18ImportProductSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12O\n\x0cinput_config\x18\x02 \x01(\x0b\x32\x34.google.cloud.vision.v1.ImportProductSetsInputConfigB\x03\xe0\x41\x02\"\x83\x01\n\x19ImportProductSetsResponse\x12@\n\x10reference_images\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.ReferenceImage\x12$\n\x08statuses\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\"\x97\x02\n\x16\x42\x61tchOperationMetadata\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.vision.v1.BatchOperationMetadata.State\x12/\n\x0bsubmit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\x0e\n\nSUCCESSFUL\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\"/\n\x15ProductSetPurgeConfig\x12\x16\n\x0eproduct_set_id\x18\x01 \x01(\t\"\xdf\x01\n\x14PurgeProductsRequest\x12Q\n\x18product_set_purge_config\x18\x02 \x01(\x0b\x32-.google.cloud.vision.v1.ProductSetPurgeConfigH\x00\x12 \n\x16\x64\x65lete_orphan_products\x18\x03 \x01(\x08H\x00\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05\x66orce\x18\x04 \x01(\x08\x42\x08\n\x06target2\xf4\x1d\n\rProductSearch\x12\xd1\x01\n\x10\x43reateProductSet\x12/.google.cloud.vision.v1.CreateProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\"h\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\xda\x41!parent,product_set,product_set_id\x12\xb4\x01\n\x0fListProductSets\x12..google.cloud.vision.v1.ListProductSetsRequest\x1a/.google.cloud.vision.v1.ListProductSetsResponse\"@\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/productSets\xda\x41\x06parent\x12\xa1\x01\n\rGetProductSet\x12,.google.cloud.vision.v1.GetProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\">\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xd3\x01\n\x10UpdateProductSet\x12/.google.cloud.vision.v1.UpdateProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\"j\x82\xd3\xe4\x93\x02J2;/v1/{product_set.name=projects/*/locations/*/productSets/*}:\x0bproduct_set\xda\x41\x17product_set,update_mask\x12\x9b\x01\n\x10\x44\x65leteProductSet\x12/.google.cloud.vision.v1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty\">\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xb9\x01\n\rCreateProduct\x12,.google.cloud.vision.v1.CreateProductRequest\x1a\x1f.google.cloud.vision.v1.Product\"Y\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/products:\x07product\xda\x41\x19parent,product,product_id\x12\xa8\x01\n\x0cListProducts\x12+.google.cloud.vision.v1.ListProductsRequest\x1a,.google.cloud.vision.v1.ListProductsResponse\"=\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/products\xda\x41\x06parent\x12\x95\x01\n\nGetProduct\x12).google.cloud.vision.v1.GetProductRequest\x1a\x1f.google.cloud.vision.v1.Product\";\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xbb\x01\n\rUpdateProduct\x12,.google.cloud.vision.v1.UpdateProductRequest\x1a\x1f.google.cloud.vision.v1.Product\"[\x82\xd3\xe4\x93\x02?24/v1/{product.name=projects/*/locations/*/products/*}:\x07product\xda\x41\x13product,update_mask\x12\x92\x01\n\rDeleteProduct\x12,.google.cloud.vision.v1.DeleteProductRequest\x1a\x16.google.protobuf.Empty\";\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xf9\x01\n\x14\x43reateReferenceImage\x12\x33.google.cloud.vision.v1.CreateReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage\"\x83\x01\x82\xd3\xe4\x93\x02Q\">/v1/{parent=projects/*/locations/*/products/*}/referenceImages:\x0freference_image\xda\x41)parent,reference_image,reference_image_id\x12\xb2\x01\n\x14\x44\x65leteReferenceImage\x12\x33.google.cloud.vision.v1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty\"M\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xcf\x01\n\x13ListReferenceImages\x12\x32.google.cloud.vision.v1.ListReferenceImagesRequest\x1a\x33.google.cloud.vision.v1.ListReferenceImagesResponse\"O\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/products/*}/referenceImages\xda\x41\x06parent\x12\xbc\x01\n\x11GetReferenceImage\x12\x30.google.cloud.vision.v1.GetReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage\"M\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xbd\x01\n\x16\x41\x64\x64ProductToProductSet\x12\x35.google.cloud.vision.v1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty\"T\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\xda\x41\x0cname,product\x12\xca\x01\n\x1bRemoveProductFromProductSet\x12:.google.cloud.vision.v1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty\"W\x82\xd3\xe4\x93\x02\x42\"=/v1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\xda\x41\x0cname,product\x12\xd6\x01\n\x18ListProductsInProductSet\x12\x37.google.cloud.vision.v1.ListProductsInProductSetRequest\x1a\x38.google.cloud.vision.v1.ListProductsInProductSetResponse\"G\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/productSets/*}/products\xda\x41\x04name\x12\xf4\x01\n\x11ImportProductSets\x12\x30.google.cloud.vision.v1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\x82\xd3\xe4\x93\x02;\"6/v1/{parent=projects/*/locations/*}/productSets:import:\x01*\xda\x41\x13parent,input_config\xca\x41\x33\n\x19ImportProductSetsResponse\x12\x16\x42\x61tchOperationMetadata\x12\xd6\x01\n\rPurgeProducts\x12,.google.cloud.vision.v1.PurgeProductsRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02\x37\"2/v1/{parent=projects/*/locations/*}/products:purge:\x01*\xda\x41\x06parent\xca\x41/\n\x15google.protobuf.Empty\x12\x16\x42\x61tchOperationMetadata\x1av\xca\x41\x15vision.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-visionBz\n\x1a\x63om.google.cloud.vision.v1B\x19ProductSearchServiceProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3"
|
20
|
+
|
21
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
22
|
+
|
23
|
+
begin
|
24
|
+
pool.add_serialized_file(descriptor_data)
|
25
|
+
rescue TypeError => e
|
26
|
+
# Compatibility code: will be removed in the next major version.
|
27
|
+
require 'google/protobuf/descriptor_pb'
|
28
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
29
|
+
parsed.clear_dependency
|
30
|
+
serialized = parsed.class.encode(parsed)
|
31
|
+
file = pool.add_serialized_file(serialized)
|
32
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
33
|
+
imports = [
|
34
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
35
|
+
["google.rpc.Status", "google/rpc/status.proto"],
|
36
|
+
["google.cloud.vision.v1.BoundingPoly", "google/cloud/vision/v1/geometry.proto"],
|
37
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
38
|
+
]
|
39
|
+
imports.each do |type_name, expected_filename|
|
40
|
+
import_file = pool.lookup(type_name).file_descriptor
|
41
|
+
if import_file.name != expected_filename
|
42
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
165
43
|
end
|
166
44
|
end
|
45
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
46
|
+
warn "This will become an error in the next major version."
|
167
47
|
end
|
168
48
|
|
169
49
|
module Google
|