google-cloud-vision-v1p4beta1 0.3.0 → 0.5.0

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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +3 -3
  4. data/lib/google/cloud/vision/v1p4beta1/face_pb.rb +24 -14
  5. data/lib/google/cloud/vision/v1p4beta1/geometry_pb.rb +23 -19
  6. data/lib/google/cloud/vision/v1p4beta1/image_annotator/client.rb +10 -10
  7. data/lib/google/cloud/vision/v1p4beta1/image_annotator/operations.rb +14 -16
  8. data/lib/google/cloud/vision/v1p4beta1/image_annotator/rest/client.rb +610 -0
  9. data/lib/google/cloud/vision/v1p4beta1/image_annotator/rest/operations.rb +793 -0
  10. data/lib/google/cloud/vision/v1p4beta1/image_annotator/rest/service_stub.rb +280 -0
  11. data/lib/google/cloud/vision/v1p4beta1/image_annotator/rest.rb +55 -0
  12. data/lib/google/cloud/vision/v1p4beta1/image_annotator.rb +7 -1
  13. data/lib/google/cloud/vision/v1p4beta1/image_annotator_pb.rb +33 -270
  14. data/lib/google/cloud/vision/v1p4beta1/product_search/client.rb +26 -34
  15. data/lib/google/cloud/vision/v1p4beta1/product_search/operations.rb +14 -16
  16. data/lib/google/cloud/vision/v1p4beta1/product_search/rest/client.rb +1973 -0
  17. data/lib/google/cloud/vision/v1p4beta1/product_search/rest/operations.rb +793 -0
  18. data/lib/google/cloud/vision/v1p4beta1/product_search/rest/service_stub.rb +1178 -0
  19. data/lib/google/cloud/vision/v1p4beta1/product_search/rest.rb +70 -0
  20. data/lib/google/cloud/vision/v1p4beta1/product_search.rb +7 -1
  21. data/lib/google/cloud/vision/v1p4beta1/product_search_pb.rb +27 -29
  22. data/lib/google/cloud/vision/v1p4beta1/product_search_service_pb.rb +28 -148
  23. data/lib/google/cloud/vision/v1p4beta1/rest.rb +38 -0
  24. data/lib/google/cloud/vision/v1p4beta1/text_annotation_pb.rb +25 -66
  25. data/lib/google/cloud/vision/v1p4beta1/version.rb +1 -1
  26. data/lib/google/cloud/vision/v1p4beta1/web_detection_pb.rb +23 -30
  27. data/lib/google/cloud/vision/v1p4beta1.rb +7 -2
  28. data/proto_docs/google/api/client.rb +381 -0
  29. data/proto_docs/google/api/launch_stage.rb +71 -0
  30. data/proto_docs/google/cloud/vision/v1p4beta1/image_annotator.rb +2 -1
  31. data/proto_docs/google/protobuf/any.rb +7 -4
  32. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  33. data/proto_docs/google/rpc/status.rb +4 -2
  34. metadata +21 -8
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/vision/v1p4beta1/version"
24
+
25
+ require "google/cloud/vision/v1p4beta1/product_search/credentials"
26
+ require "google/cloud/vision/v1p4beta1/product_search/paths"
27
+ require "google/cloud/vision/v1p4beta1/product_search/rest/operations"
28
+ require "google/cloud/vision/v1p4beta1/product_search/rest/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Vision
33
+ module V1p4beta1
34
+ ##
35
+ # Manages Products and ProductSets of reference images for use in product
36
+ # search. It uses the following resource model:
37
+ #
38
+ # - The API has a collection of
39
+ # {::Google::Cloud::Vision::V1p4beta1::ProductSet ProductSet} resources, named
40
+ # `projects/*/locations/*/productSets/*`, which acts as a way to put different
41
+ # products into groups to limit identification.
42
+ #
43
+ # In parallel,
44
+ #
45
+ # - The API has a collection of
46
+ # {::Google::Cloud::Vision::V1p4beta1::Product Product} resources, named
47
+ # `projects/*/locations/*/products/*`
48
+ #
49
+ # - Each {::Google::Cloud::Vision::V1p4beta1::Product Product} has a collection of
50
+ # {::Google::Cloud::Vision::V1p4beta1::ReferenceImage ReferenceImage} resources,
51
+ # named
52
+ # `projects/*/locations/*/products/*/referenceImages/*`
53
+ #
54
+ # To load this service and instantiate a REST client:
55
+ #
56
+ # require "google/cloud/vision/v1p4beta1/product_search/rest"
57
+ # client = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
58
+ #
59
+ module ProductSearch
60
+ # Client for the REST transport
61
+ module Rest
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+
69
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
70
+ require "google/cloud/vision/v1p4beta1/product_search/rest/helpers" if ::File.file? helper_path
@@ -26,6 +26,7 @@ require "google/cloud/vision/v1p4beta1/product_search/credentials"
26
26
  require "google/cloud/vision/v1p4beta1/product_search/paths"
27
27
  require "google/cloud/vision/v1p4beta1/product_search/operations"
28
28
  require "google/cloud/vision/v1p4beta1/product_search/client"
29
+ require "google/cloud/vision/v1p4beta1/product_search/rest"
29
30
 
30
31
  module Google
31
32
  module Cloud
@@ -51,11 +52,16 @@ module Google
51
52
  # named
52
53
  # `projects/*/locations/*/products/*/referenceImages/*`
53
54
  #
54
- # To load this service and instantiate a client:
55
+ # @example Load this service and instantiate a gRPC client
55
56
  #
56
57
  # require "google/cloud/vision/v1p4beta1/product_search"
57
58
  # client = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
58
59
  #
60
+ # @example Load this service and instantiate a REST client
61
+ #
62
+ # require "google/cloud/vision/v1p4beta1/product_search/rest"
63
+ # client = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
64
+ #
59
65
  module ProductSearch
60
66
  end
61
67
  end
@@ -1,44 +1,42 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/vision/v1p4beta1/product_search.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  require 'google/api/resource_pb'
8
8
  require 'google/cloud/vision/v1p4beta1/geometry_pb'
9
9
  require 'google/cloud/vision/v1p4beta1/product_search_service_pb'
10
10
  require 'google/protobuf/timestamp_pb'
11
11
 
12
- Google::Protobuf::DescriptorPool.generated_pool.build do
13
- add_file("google/cloud/vision/v1p4beta1/product_search.proto", :syntax => :proto3) do
14
- add_message "google.cloud.vision.v1p4beta1.ProductSearchParams" do
15
- optional :bounding_poly, :message, 9, "google.cloud.vision.v1p4beta1.BoundingPoly"
16
- optional :product_set, :string, 6
17
- repeated :product_categories, :string, 7
18
- optional :filter, :string, 8
19
- end
20
- add_message "google.cloud.vision.v1p4beta1.ProductSearchResults" do
21
- optional :index_time, :message, 2, "google.protobuf.Timestamp"
22
- repeated :results, :message, 5, "google.cloud.vision.v1p4beta1.ProductSearchResults.Result"
23
- repeated :product_grouped_results, :message, 6, "google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult"
24
- end
25
- add_message "google.cloud.vision.v1p4beta1.ProductSearchResults.Result" do
26
- optional :product, :message, 1, "google.cloud.vision.v1p4beta1.Product"
27
- optional :score, :float, 2
28
- optional :image, :string, 3
29
- end
30
- add_message "google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation" do
31
- optional :mid, :string, 1
32
- optional :language_code, :string, 2
33
- optional :name, :string, 3
34
- optional :score, :float, 4
35
- end
36
- add_message "google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult" do
37
- optional :bounding_poly, :message, 1, "google.cloud.vision.v1p4beta1.BoundingPoly"
38
- repeated :results, :message, 2, "google.cloud.vision.v1p4beta1.ProductSearchResults.Result"
39
- repeated :object_annotations, :message, 3, "google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation"
12
+
13
+ descriptor_data = "\n2google/cloud/vision/v1p4beta1/product_search.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x19google/api/resource.proto\x1a,google/cloud/vision/v1p4beta1/geometry.proto\x1a:google/cloud/vision/v1p4beta1/product_search_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc1\x01\n\x13ProductSearchParams\x12\x42\n\rbounding_poly\x18\t \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.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\"\xb2\x05\n\x14ProductSearchResults\x12.\n\nindex_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12K\n\x07results\x18\x05 \x03(\x0b\x32:.google.cloud.vision.v1p4beta1.ProductSearchResults.Result\x12\x62\n\x17product_grouped_results\x18\x06 \x03(\x0b\x32\x41.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult\x1a_\n\x06Result\x12\x37\n\x07product\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1p4beta1.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\x82\x02\n\rGroupedResult\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12K\n\x07results\x18\x02 \x03(\x0b\x32:.google.cloud.vision.v1p4beta1.ProductSearchResults.Result\x12`\n\x12object_annotations\x18\x03 \x03(\x0b\x32\x44.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationB~\n!com.google.cloud.vision.v1p4beta1B\x12ProductSearchProtoP\x01Z9cloud.google.com/go/vision/apiv1p4beta1/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.v1p4beta1.BoundingPoly", "google/cloud/vision/v1p4beta1/geometry.proto"],
29
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
30
+ ["google.cloud.vision.v1p4beta1.Product", "google/cloud/vision/v1p4beta1/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}"
40
36
  end
41
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."
42
40
  end
43
41
 
44
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/v1p4beta1/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
- Google::Protobuf::DescriptorPool.generated_pool.build do
18
- add_file("google/cloud/vision/v1p4beta1/product_search_service.proto", :syntax => :proto3) do
19
- add_message "google.cloud.vision.v1p4beta1.Product" do
20
- optional :name, :string, 1
21
- optional :display_name, :string, 2
22
- optional :description, :string, 3
23
- optional :product_category, :string, 4
24
- repeated :product_labels, :message, 5, "google.cloud.vision.v1p4beta1.Product.KeyValue"
25
- end
26
- add_message "google.cloud.vision.v1p4beta1.Product.KeyValue" do
27
- optional :key, :string, 1
28
- optional :value, :string, 2
29
- end
30
- add_message "google.cloud.vision.v1p4beta1.ProductSet" do
31
- optional :name, :string, 1
32
- optional :display_name, :string, 2
33
- optional :index_time, :message, 3, "google.protobuf.Timestamp"
34
- optional :index_error, :message, 4, "google.rpc.Status"
35
- end
36
- add_message "google.cloud.vision.v1p4beta1.ReferenceImage" do
37
- optional :name, :string, 1
38
- optional :uri, :string, 2
39
- repeated :bounding_polys, :message, 3, "google.cloud.vision.v1p4beta1.BoundingPoly"
40
- end
41
- add_message "google.cloud.vision.v1p4beta1.CreateProductRequest" do
42
- optional :parent, :string, 1
43
- optional :product, :message, 2, "google.cloud.vision.v1p4beta1.Product"
44
- optional :product_id, :string, 3
45
- end
46
- add_message "google.cloud.vision.v1p4beta1.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.v1p4beta1.ListProductsResponse" do
52
- repeated :products, :message, 1, "google.cloud.vision.v1p4beta1.Product"
53
- optional :next_page_token, :string, 2
54
- end
55
- add_message "google.cloud.vision.v1p4beta1.GetProductRequest" do
56
- optional :name, :string, 1
57
- end
58
- add_message "google.cloud.vision.v1p4beta1.UpdateProductRequest" do
59
- optional :product, :message, 1, "google.cloud.vision.v1p4beta1.Product"
60
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
61
- end
62
- add_message "google.cloud.vision.v1p4beta1.DeleteProductRequest" do
63
- optional :name, :string, 1
64
- end
65
- add_message "google.cloud.vision.v1p4beta1.CreateProductSetRequest" do
66
- optional :parent, :string, 1
67
- optional :product_set, :message, 2, "google.cloud.vision.v1p4beta1.ProductSet"
68
- optional :product_set_id, :string, 3
69
- end
70
- add_message "google.cloud.vision.v1p4beta1.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.v1p4beta1.ListProductSetsResponse" do
76
- repeated :product_sets, :message, 1, "google.cloud.vision.v1p4beta1.ProductSet"
77
- optional :next_page_token, :string, 2
78
- end
79
- add_message "google.cloud.vision.v1p4beta1.GetProductSetRequest" do
80
- optional :name, :string, 1
81
- end
82
- add_message "google.cloud.vision.v1p4beta1.UpdateProductSetRequest" do
83
- optional :product_set, :message, 1, "google.cloud.vision.v1p4beta1.ProductSet"
84
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
85
- end
86
- add_message "google.cloud.vision.v1p4beta1.DeleteProductSetRequest" do
87
- optional :name, :string, 1
88
- end
89
- add_message "google.cloud.vision.v1p4beta1.CreateReferenceImageRequest" do
90
- optional :parent, :string, 1
91
- optional :reference_image, :message, 2, "google.cloud.vision.v1p4beta1.ReferenceImage"
92
- optional :reference_image_id, :string, 3
93
- end
94
- add_message "google.cloud.vision.v1p4beta1.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.v1p4beta1.ListReferenceImagesResponse" do
100
- repeated :reference_images, :message, 1, "google.cloud.vision.v1p4beta1.ReferenceImage"
101
- optional :page_size, :int32, 2
102
- optional :next_page_token, :string, 3
103
- end
104
- add_message "google.cloud.vision.v1p4beta1.GetReferenceImageRequest" do
105
- optional :name, :string, 1
106
- end
107
- add_message "google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest" do
108
- optional :name, :string, 1
109
- end
110
- add_message "google.cloud.vision.v1p4beta1.AddProductToProductSetRequest" do
111
- optional :name, :string, 1
112
- optional :product, :string, 2
113
- end
114
- add_message "google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest" do
115
- optional :name, :string, 1
116
- optional :product, :string, 2
117
- end
118
- add_message "google.cloud.vision.v1p4beta1.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.v1p4beta1.ListProductsInProductSetResponse" do
124
- repeated :products, :message, 1, "google.cloud.vision.v1p4beta1.Product"
125
- optional :next_page_token, :string, 2
126
- end
127
- add_message "google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource" do
128
- optional :csv_file_uri, :string, 1
129
- end
130
- add_message "google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig" do
131
- oneof :source do
132
- optional :gcs_source, :message, 1, "google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource"
133
- end
134
- end
135
- add_message "google.cloud.vision.v1p4beta1.ImportProductSetsRequest" do
136
- optional :parent, :string, 1
137
- optional :input_config, :message, 2, "google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig"
138
- end
139
- add_message "google.cloud.vision.v1p4beta1.ImportProductSetsResponse" do
140
- repeated :reference_images, :message, 1, "google.cloud.vision.v1p4beta1.ReferenceImage"
141
- repeated :statuses, :message, 2, "google.rpc.Status"
142
- end
143
- add_message "google.cloud.vision.v1p4beta1.BatchOperationMetadata" do
144
- optional :state, :enum, 1, "google.cloud.vision.v1p4beta1.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.v1p4beta1.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.v1p4beta1.ProductSetPurgeConfig" do
156
- optional :product_set_id, :string, 1
157
- end
158
- add_message "google.cloud.vision.v1p4beta1.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.v1p4beta1.ProductSetPurgeConfig"
163
- optional :delete_orphan_products, :bool, 3
164
- end
18
+
19
+ descriptor_data = "\n:google/cloud/vision/v1p4beta1/product_search_service.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\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/v1p4beta1/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\"\xb2\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\x12G\n\x0eproduct_labels\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.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}\"\x85\x02\n\x0eReferenceImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\x0e\x62ounding_polys\x18\x03 \x03(\x0b\x32+.google.cloud.vision.v1p4beta1.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}\"\xa3\x01\n\x14\x43reateProductRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x07product\x18\x02 \x01(\x0b\x32&.google.cloud.vision.v1p4beta1.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\"i\n\x14ListProductsResponse\x12\x38\n\x08products\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.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\"\x85\x01\n\x14UpdateProductRequest\x12<\n\x07product\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1p4beta1.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\"\xb1\x01\n\x17\x43reateProductSetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\x0bproduct_set\x18\x02 \x01(\x0b\x32).google.cloud.vision.v1p4beta1.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\"s\n\x17ListProductSetsResponse\x12?\n\x0cproduct_sets\x18\x01 \x03(\x0b\x32).google.cloud.vision.v1p4beta1.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\"\x8f\x01\n\x17UpdateProductSetRequest\x12\x43\n\x0bproduct_set\x18\x01 \x01(\x0b\x32).google.cloud.vision.v1p4beta1.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\"\xbd\x01\n\x1b\x43reateReferenceImageRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\x12K\n\x0freference_image\x18\x02 \x01(\x0b\x32-.google.cloud.vision.v1p4beta1.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\"\x92\x01\n\x1bListReferenceImagesResponse\x12G\n\x10reference_images\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p4beta1.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\"u\n ListProductsInProductSetResponse\x12\x38\n\x08products\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.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\"y\n\x1cImportProductSetsInputConfig\x12O\n\ngcs_source\x18\x01 \x01(\x0b\x32\x39.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceH\x00\x42\x08\n\x06source\"\xad\x01\n\x18ImportProductSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12V\n\x0cinput_config\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigB\x03\xe0\x41\x02\"\x8a\x01\n\x19ImportProductSetsResponse\x12G\n\x10reference_images\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p4beta1.ReferenceImage\x12$\n\x08statuses\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\"\x9e\x02\n\x16\x42\x61tchOperationMetadata\x12J\n\x05state\x18\x01 \x01(\x0e\x32;.google.cloud.vision.v1p4beta1.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\"\xe6\x01\n\x14PurgeProductsRequest\x12X\n\x18product_set_purge_config\x18\x02 \x01(\x0b\x32\x34.google.cloud.vision.v1p4beta1.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\xd2 \n\rProductSearch\x12\xe6\x01\n\x10\x43reateProductSet\x12\x36.google.cloud.vision.v1p4beta1.CreateProductSetRequest\x1a).google.cloud.vision.v1p4beta1.ProductSet\"o\x82\xd3\xe4\x93\x02\x45\"6/v1p4beta1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\xda\x41!parent,product_set,product_set_id\x12\xc9\x01\n\x0fListProductSets\x12\x35.google.cloud.vision.v1p4beta1.ListProductSetsRequest\x1a\x36.google.cloud.vision.v1p4beta1.ListProductSetsResponse\"G\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p4beta1/{parent=projects/*/locations/*}/productSets\xda\x41\x06parent\x12\xb6\x01\n\rGetProductSet\x12\x33.google.cloud.vision.v1p4beta1.GetProductSetRequest\x1a).google.cloud.vision.v1p4beta1.ProductSet\"E\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p4beta1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xe8\x01\n\x10UpdateProductSet\x12\x36.google.cloud.vision.v1p4beta1.UpdateProductSetRequest\x1a).google.cloud.vision.v1p4beta1.ProductSet\"q\x82\xd3\xe4\x93\x02Q2B/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}:\x0bproduct_set\xda\x41\x17product_set,update_mask\x12\xa9\x01\n\x10\x44\x65leteProductSet\x12\x36.google.cloud.vision.v1p4beta1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty\"E\x82\xd3\xe4\x93\x02\x38*6/v1p4beta1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xce\x01\n\rCreateProduct\x12\x33.google.cloud.vision.v1p4beta1.CreateProductRequest\x1a&.google.cloud.vision.v1p4beta1.Product\"`\x82\xd3\xe4\x93\x02>\"3/v1p4beta1/{parent=projects/*/locations/*}/products:\x07product\xda\x41\x19parent,product,product_id\x12\xbd\x01\n\x0cListProducts\x12\x32.google.cloud.vision.v1p4beta1.ListProductsRequest\x1a\x33.google.cloud.vision.v1p4beta1.ListProductsResponse\"D\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p4beta1/{parent=projects/*/locations/*}/products\xda\x41\x06parent\x12\xaa\x01\n\nGetProduct\x12\x30.google.cloud.vision.v1p4beta1.GetProductRequest\x1a&.google.cloud.vision.v1p4beta1.Product\"B\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p4beta1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xd0\x01\n\rUpdateProduct\x12\x33.google.cloud.vision.v1p4beta1.UpdateProductRequest\x1a&.google.cloud.vision.v1p4beta1.Product\"b\x82\xd3\xe4\x93\x02\x46\x32;/v1p4beta1/{product.name=projects/*/locations/*/products/*}:\x07product\xda\x41\x13product,update_mask\x12\xa0\x01\n\rDeleteProduct\x12\x33.google.cloud.vision.v1p4beta1.DeleteProductRequest\x1a\x16.google.protobuf.Empty\"B\x82\xd3\xe4\x93\x02\x35*3/v1p4beta1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\x8e\x02\n\x14\x43reateReferenceImage\x12:.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest\x1a-.google.cloud.vision.v1p4beta1.ReferenceImage\"\x8a\x01\x82\xd3\xe4\x93\x02X\"E/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\x0freference_image\xda\x41)parent,reference_image,reference_image_id\x12\xc0\x01\n\x14\x44\x65leteReferenceImage\x12:.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty\"T\x82\xd3\xe4\x93\x02G*E/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xe4\x01\n\x13ListReferenceImages\x12\x39.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest\x1a:.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse\"V\x82\xd3\xe4\x93\x02G\x12\x45/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages\xda\x41\x06parent\x12\xd1\x01\n\x11GetReferenceImage\x12\x37.google.cloud.vision.v1p4beta1.GetReferenceImageRequest\x1a-.google.cloud.vision.v1p4beta1.ReferenceImage\"T\x82\xd3\xe4\x93\x02G\x12\x45/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xcb\x01\n\x16\x41\x64\x64ProductToProductSet\x12<.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty\"[\x82\xd3\xe4\x93\x02\x46\"A/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\xda\x41\x0cname,product\x12\xd8\x01\n\x1bRemoveProductFromProductSet\x12\x41.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty\"^\x82\xd3\xe4\x93\x02I\"D/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\xda\x41\x0cname,product\x12\xeb\x01\n\x18ListProductsInProductSet\x12>.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest\x1a?.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse\"N\x82\xd3\xe4\x93\x02\x41\x12?/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products\xda\x41\x04name\x12\x82\x02\n\x11ImportProductSets\x12\x37.google.cloud.vision.v1p4beta1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\x82\xd3\xe4\x93\x02\x42\"=/v1p4beta1/{parent=projects/*/locations/*}/productSets:import:\x01*\xda\x41\x13parent,input_config\xca\x41\x33\n\x19ImportProductSetsResponse\x12\x16\x42\x61tchOperationMetadata\x12\xe4\x01\n\rPurgeProducts\x12\x33.google.cloud.vision.v1p4beta1.PurgeProductsRequest\x1a\x1d.google.longrunning.Operation\"\x7f\x82\xd3\xe4\x93\x02>\"9/v1p4beta1/{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-visionB\x85\x01\n!com.google.cloud.vision.v1p4beta1B\x19ProductSearchServiceProtoP\x01Z9cloud.google.com/go/vision/apiv1p4beta1/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.v1p4beta1.BoundingPoly", "google/cloud/vision/v1p4beta1/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
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/vision/v1p4beta1/product_search/rest"
20
+ require "google/cloud/vision/v1p4beta1/image_annotator/rest"
21
+ require "google/cloud/vision/v1p4beta1/version"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Vision
26
+ ##
27
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
28
+ #
29
+ # @example
30
+ #
31
+ # require "google/cloud/vision/v1p4beta1/rest"
32
+ # client = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
33
+ #
34
+ module V1p4beta1
35
+ end
36
+ end
37
+ end
38
+ end
@@ -1,78 +1,37 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/vision/v1p4beta1/text_annotation.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  require 'google/cloud/vision/v1p4beta1/geometry_pb'
8
8
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("google/cloud/vision/v1p4beta1/text_annotation.proto", :syntax => :proto3) do
11
- add_message "google.cloud.vision.v1p4beta1.TextAnnotation" do
12
- repeated :pages, :message, 1, "google.cloud.vision.v1p4beta1.Page"
13
- optional :text, :string, 2
14
- end
15
- add_message "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage" do
16
- optional :language_code, :string, 1
17
- optional :confidence, :float, 2
18
- end
19
- add_message "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak" do
20
- optional :type, :enum, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType"
21
- optional :is_prefix, :bool, 2
22
- end
23
- add_enum "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType" do
24
- value :UNKNOWN, 0
25
- value :SPACE, 1
26
- value :SURE_SPACE, 2
27
- value :EOL_SURE_SPACE, 3
28
- value :HYPHEN, 4
29
- value :LINE_BREAK, 5
30
- end
31
- add_message "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty" do
32
- repeated :detected_languages, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage"
33
- optional :detected_break, :message, 2, "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak"
34
- end
35
- add_message "google.cloud.vision.v1p4beta1.Page" do
36
- optional :property, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty"
37
- optional :width, :int32, 2
38
- optional :height, :int32, 3
39
- repeated :blocks, :message, 4, "google.cloud.vision.v1p4beta1.Block"
40
- optional :confidence, :float, 5
41
- end
42
- add_message "google.cloud.vision.v1p4beta1.Block" do
43
- optional :property, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty"
44
- optional :bounding_box, :message, 2, "google.cloud.vision.v1p4beta1.BoundingPoly"
45
- repeated :paragraphs, :message, 3, "google.cloud.vision.v1p4beta1.Paragraph"
46
- optional :block_type, :enum, 4, "google.cloud.vision.v1p4beta1.Block.BlockType"
47
- optional :confidence, :float, 5
48
- end
49
- add_enum "google.cloud.vision.v1p4beta1.Block.BlockType" do
50
- value :UNKNOWN, 0
51
- value :TEXT, 1
52
- value :TABLE, 2
53
- value :PICTURE, 3
54
- value :RULER, 4
55
- value :BARCODE, 5
56
- end
57
- add_message "google.cloud.vision.v1p4beta1.Paragraph" do
58
- optional :property, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty"
59
- optional :bounding_box, :message, 2, "google.cloud.vision.v1p4beta1.BoundingPoly"
60
- repeated :words, :message, 3, "google.cloud.vision.v1p4beta1.Word"
61
- optional :confidence, :float, 4
62
- end
63
- add_message "google.cloud.vision.v1p4beta1.Word" do
64
- optional :property, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty"
65
- optional :bounding_box, :message, 2, "google.cloud.vision.v1p4beta1.BoundingPoly"
66
- repeated :symbols, :message, 3, "google.cloud.vision.v1p4beta1.Symbol"
67
- optional :confidence, :float, 4
68
- end
69
- add_message "google.cloud.vision.v1p4beta1.Symbol" do
70
- optional :property, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty"
71
- optional :bounding_box, :message, 2, "google.cloud.vision.v1p4beta1.BoundingPoly"
72
- optional :text, :string, 3
73
- optional :confidence, :float, 4
9
+
10
+ descriptor_data = "\n3google/cloud/vision/v1p4beta1/text_annotation.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a,google/cloud/vision/v1p4beta1/geometry.proto\"\xb2\x04\n\x0eTextAnnotation\x12\x32\n\x05pages\x18\x01 \x03(\x0b\x32#.google.cloud.vision.v1p4beta1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xdc\x01\n\rDetectedBreak\x12S\n\x04type\x18\x01 \x01(\x0e\x32\x45.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08\"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xbf\x01\n\x0cTextProperty\x12Z\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32>.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage\x12S\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak\"\xbd\x01\n\x04Page\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12\x34\n\x06\x62locks\x18\x04 \x03(\x0b\x32$.google.cloud.vision.v1p4beta1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02\"\x82\x03\n\x05\x42lock\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12<\n\nparagraphs\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1p4beta1.Paragraph\x12\x42\n\nblock_type\x18\x04 \x01(\x0e\x32..google.cloud.vision.v1p4beta1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02\"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05\"\xe4\x01\n\tParagraph\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x32\n\x05words\x18\x03 \x03(\x0b\x32#.google.cloud.vision.v1p4beta1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02\"\xe3\x01\n\x04Word\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x36\n\x07symbols\x18\x03 \x03(\x0b\x32%.google.cloud.vision.v1p4beta1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02\"\xbb\x01\n\x06Symbol\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42\x7f\n!com.google.cloud.vision.v1p4beta1B\x13TextAnnotationProtoP\x01Z9cloud.google.com/go/vision/apiv1p4beta1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.cloud.vision.v1p4beta1.BoundingPoly", "google/cloud/vision/v1p4beta1/geometry.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
74
31
  end
75
32
  end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
76
35
  end
77
36
 
78
37
  module Google
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Vision
23
23
  module V1p4beta1
24
- VERSION = "0.3.0"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,41 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/vision/v1p4beta1/web_detection.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/cloud/vision/v1p4beta1/web_detection.proto", :syntax => :proto3) do
10
- add_message "google.cloud.vision.v1p4beta1.WebDetection" do
11
- repeated :web_entities, :message, 1, "google.cloud.vision.v1p4beta1.WebDetection.WebEntity"
12
- repeated :full_matching_images, :message, 2, "google.cloud.vision.v1p4beta1.WebDetection.WebImage"
13
- repeated :partial_matching_images, :message, 3, "google.cloud.vision.v1p4beta1.WebDetection.WebImage"
14
- repeated :pages_with_matching_images, :message, 4, "google.cloud.vision.v1p4beta1.WebDetection.WebPage"
15
- repeated :visually_similar_images, :message, 6, "google.cloud.vision.v1p4beta1.WebDetection.WebImage"
16
- repeated :best_guess_labels, :message, 8, "google.cloud.vision.v1p4beta1.WebDetection.WebLabel"
17
- end
18
- add_message "google.cloud.vision.v1p4beta1.WebDetection.WebEntity" do
19
- optional :entity_id, :string, 1
20
- optional :score, :float, 2
21
- optional :description, :string, 3
22
- end
23
- add_message "google.cloud.vision.v1p4beta1.WebDetection.WebImage" do
24
- optional :url, :string, 1
25
- optional :score, :float, 2
26
- end
27
- add_message "google.cloud.vision.v1p4beta1.WebDetection.WebPage" do
28
- optional :url, :string, 1
29
- optional :score, :float, 2
30
- optional :page_title, :string, 3
31
- repeated :full_matching_images, :message, 4, "google.cloud.vision.v1p4beta1.WebDetection.WebImage"
32
- repeated :partial_matching_images, :message, 5, "google.cloud.vision.v1p4beta1.WebDetection.WebImage"
33
- end
34
- add_message "google.cloud.vision.v1p4beta1.WebDetection.WebLabel" do
35
- optional :label, :string, 1
36
- optional :language_code, :string, 2
8
+ descriptor_data = "\n1google/cloud/vision/v1p4beta1/web_detection.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\"\x8c\x07\n\x0cWebDetection\x12K\n\x0cweb_entities\x18\x01 \x03(\x0b\x32\x35.google.cloud.vision.v1p4beta1.WebDetection.WebEntity\x12R\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12W\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.WebDetection.WebPage\x12U\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12O\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebLabel\x1a\x42\n\tWebEntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x1a&\n\x08WebImage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x1a\xe4\x01\n\x07WebPage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x12\n\npage_title\x18\x03 \x01(\t\x12R\n\x14\x66ull_matching_images\x18\x04 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tB}\n!com.google.cloud.vision.v1p4beta1B\x11WebDetectionProtoP\x01Z9cloud.google.com/go/vision/apiv1p4beta1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
37
28
  end
38
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
39
32
  end
40
33
 
41
34
  module Google
@@ -24,13 +24,18 @@ module Google
24
24
  module Cloud
25
25
  module Vision
26
26
  ##
27
- # To load this package, including all its services, and instantiate a client:
27
+ # API client module.
28
28
  #
29
- # @example
29
+ # @example Load this package, including all its services, and instantiate a gRPC client
30
30
  #
31
31
  # require "google/cloud/vision/v1p4beta1"
32
32
  # client = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
33
33
  #
34
+ # @example Load this package, including all its services, and instantiate a REST client
35
+ #
36
+ # require "google/cloud/vision/v1p4beta1"
37
+ # client = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
38
+ #
34
39
  module V1p4beta1
35
40
  end
36
41
  end