google-cloud-vision 0.37.2 → 1.0.2

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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +343 -0
  6. data/README.md +94 -49
  7. data/lib/{google/cloud/vision/v1/doc/google/protobuf/wrappers.rb → google-cloud-vision.rb} +4 -11
  8. data/lib/google/cloud/vision.rb +131 -214
  9. data/lib/google/cloud/vision/version.rb +6 -2
  10. metadata +74 -102
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/vision/v1.rb +0 -249
  13. data/lib/google/cloud/vision/v1/credentials.rb +0 -42
  14. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/geometry.rb +0 -66
  15. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb +0 -923
  16. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search.rb +0 -115
  17. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search_service.rb +0 -569
  18. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb +0 -254
  19. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb +0 -102
  20. data/lib/google/cloud/vision/v1/doc/google/longrunning/operations.rb +0 -51
  21. data/lib/google/cloud/vision/v1/doc/google/protobuf/any.rb +0 -131
  22. data/lib/google/cloud/vision/v1/doc/google/protobuf/empty.rb +0 -29
  23. data/lib/google/cloud/vision/v1/doc/google/protobuf/field_mask.rb +0 -222
  24. data/lib/google/cloud/vision/v1/doc/google/protobuf/timestamp.rb +0 -113
  25. data/lib/google/cloud/vision/v1/doc/google/rpc/status.rb +0 -39
  26. data/lib/google/cloud/vision/v1/doc/google/type/color.rb +0 -161
  27. data/lib/google/cloud/vision/v1/doc/google/type/latlng.rb +0 -31
  28. data/lib/google/cloud/vision/v1/geometry_pb.rb +0 -39
  29. data/lib/google/cloud/vision/v1/helpers.rb +0 -1154
  30. data/lib/google/cloud/vision/v1/image_annotator_client.rb +0 -516
  31. data/lib/google/cloud/vision/v1/image_annotator_client_config.json +0 -46
  32. data/lib/google/cloud/vision/v1/image_annotator_pb.rb +0 -344
  33. data/lib/google/cloud/vision/v1/image_annotator_services_pb.rb +0 -74
  34. data/lib/google/cloud/vision/v1/product_search_client.rb +0 -1490
  35. data/lib/google/cloud/vision/v1/product_search_client_config.json +0 -121
  36. data/lib/google/cloud/vision/v1/product_search_pb.rb +0 -54
  37. data/lib/google/cloud/vision/v1/product_search_service_pb.rb +0 -207
  38. data/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +0 -233
  39. data/lib/google/cloud/vision/v1/text_annotation_pb.rb +0 -94
  40. data/lib/google/cloud/vision/v1/web_detection_pb.rb +0 -51
  41. data/lib/google/cloud/vision/v1p3beta1.rb +0 -253
  42. data/lib/google/cloud/vision/v1p3beta1/credentials.rb +0 -42
  43. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/geometry.rb +0 -72
  44. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/image_annotator.rb +0 -763
  45. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search.rb +0 -156
  46. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search_service.rb +0 -538
  47. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/text_annotation.rb +0 -255
  48. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/web_detection.rb +0 -101
  49. data/lib/google/cloud/vision/v1p3beta1/doc/google/longrunning/operations.rb +0 -51
  50. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/any.rb +0 -131
  51. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/empty.rb +0 -29
  52. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/field_mask.rb +0 -222
  53. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/timestamp.rb +0 -113
  54. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/wrappers.rb +0 -26
  55. data/lib/google/cloud/vision/v1p3beta1/doc/google/rpc/status.rb +0 -39
  56. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/color.rb +0 -161
  57. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/latlng.rb +0 -31
  58. data/lib/google/cloud/vision/v1p3beta1/geometry_pb.rb +0 -43
  59. data/lib/google/cloud/vision/v1p3beta1/helpers.rb +0 -1154
  60. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client.rb +0 -312
  61. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client_config.json +0 -36
  62. data/lib/google/cloud/vision/v1p3beta1/image_annotator_pb.rb +0 -304
  63. data/lib/google/cloud/vision/v1p3beta1/image_annotator_services_pb.rb +0 -55
  64. data/lib/google/cloud/vision/v1p3beta1/product_search_client.rb +0 -1419
  65. data/lib/google/cloud/vision/v1p3beta1/product_search_client_config.json +0 -116
  66. data/lib/google/cloud/vision/v1p3beta1/product_search_pb.rb +0 -64
  67. data/lib/google/cloud/vision/v1p3beta1/product_search_service_pb.rb +0 -191
  68. data/lib/google/cloud/vision/v1p3beta1/product_search_service_services_pb.rb +0 -226
  69. data/lib/google/cloud/vision/v1p3beta1/text_annotation_pb.rb +0 -94
  70. data/lib/google/cloud/vision/v1p3beta1/web_detection_pb.rb +0 -51
@@ -1,121 +0,0 @@
1
- {
2
- "interfaces": {
3
- "google.cloud.vision.v1.ProductSearch": {
4
- "retry_codes": {
5
- "idempotent": [
6
- "DEADLINE_EXCEEDED",
7
- "UNAVAILABLE"
8
- ],
9
- "non_idempotent": []
10
- },
11
- "retry_params": {
12
- "default": {
13
- "initial_retry_delay_millis": 100,
14
- "retry_delay_multiplier": 1.3,
15
- "max_retry_delay_millis": 60000,
16
- "initial_rpc_timeout_millis": 60000,
17
- "rpc_timeout_multiplier": 1.0,
18
- "max_rpc_timeout_millis": 60000,
19
- "total_timeout_millis": 600000
20
- }
21
- },
22
- "methods": {
23
- "CreateProductSet": {
24
- "timeout_millis": 60000,
25
- "retry_codes_name": "non_idempotent",
26
- "retry_params_name": "default"
27
- },
28
- "ListProductSets": {
29
- "timeout_millis": 60000,
30
- "retry_codes_name": "idempotent",
31
- "retry_params_name": "default"
32
- },
33
- "GetProductSet": {
34
- "timeout_millis": 60000,
35
- "retry_codes_name": "idempotent",
36
- "retry_params_name": "default"
37
- },
38
- "UpdateProductSet": {
39
- "timeout_millis": 60000,
40
- "retry_codes_name": "idempotent",
41
- "retry_params_name": "default"
42
- },
43
- "DeleteProductSet": {
44
- "timeout_millis": 60000,
45
- "retry_codes_name": "idempotent",
46
- "retry_params_name": "default"
47
- },
48
- "CreateProduct": {
49
- "timeout_millis": 60000,
50
- "retry_codes_name": "non_idempotent",
51
- "retry_params_name": "default"
52
- },
53
- "ListProducts": {
54
- "timeout_millis": 60000,
55
- "retry_codes_name": "idempotent",
56
- "retry_params_name": "default"
57
- },
58
- "GetProduct": {
59
- "timeout_millis": 60000,
60
- "retry_codes_name": "idempotent",
61
- "retry_params_name": "default"
62
- },
63
- "UpdateProduct": {
64
- "timeout_millis": 60000,
65
- "retry_codes_name": "idempotent",
66
- "retry_params_name": "default"
67
- },
68
- "DeleteProduct": {
69
- "timeout_millis": 60000,
70
- "retry_codes_name": "idempotent",
71
- "retry_params_name": "default"
72
- },
73
- "CreateReferenceImage": {
74
- "timeout_millis": 60000,
75
- "retry_codes_name": "non_idempotent",
76
- "retry_params_name": "default"
77
- },
78
- "DeleteReferenceImage": {
79
- "timeout_millis": 60000,
80
- "retry_codes_name": "idempotent",
81
- "retry_params_name": "default"
82
- },
83
- "ListReferenceImages": {
84
- "timeout_millis": 60000,
85
- "retry_codes_name": "idempotent",
86
- "retry_params_name": "default"
87
- },
88
- "GetReferenceImage": {
89
- "timeout_millis": 60000,
90
- "retry_codes_name": "idempotent",
91
- "retry_params_name": "default"
92
- },
93
- "AddProductToProductSet": {
94
- "timeout_millis": 60000,
95
- "retry_codes_name": "idempotent",
96
- "retry_params_name": "default"
97
- },
98
- "RemoveProductFromProductSet": {
99
- "timeout_millis": 60000,
100
- "retry_codes_name": "idempotent",
101
- "retry_params_name": "default"
102
- },
103
- "ListProductsInProductSet": {
104
- "timeout_millis": 60000,
105
- "retry_codes_name": "idempotent",
106
- "retry_params_name": "default"
107
- },
108
- "ImportProductSets": {
109
- "timeout_millis": 60000,
110
- "retry_codes_name": "non_idempotent",
111
- "retry_params_name": "default"
112
- },
113
- "PurgeProducts": {
114
- "timeout_millis": 60000,
115
- "retry_codes_name": "non_idempotent",
116
- "retry_params_name": "default"
117
- }
118
- }
119
- }
120
- }
121
- }
@@ -1,54 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/vision/v1/product_search.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/cloud/vision/v1/geometry_pb'
8
- require 'google/cloud/vision/v1/product_search_service_pb'
9
- require 'google/protobuf/timestamp_pb'
10
- require 'google/api/annotations_pb'
11
- require 'google/api/resource_pb'
12
- Google::Protobuf::DescriptorPool.generated_pool.build do
13
- add_message "google.cloud.vision.v1.ProductSearchParams" do
14
- optional :bounding_poly, :message, 9, "google.cloud.vision.v1.BoundingPoly"
15
- optional :product_set, :string, 6
16
- repeated :product_categories, :string, 7
17
- optional :filter, :string, 8
18
- end
19
- add_message "google.cloud.vision.v1.ProductSearchResults" do
20
- optional :index_time, :message, 2, "google.protobuf.Timestamp"
21
- repeated :results, :message, 5, "google.cloud.vision.v1.ProductSearchResults.Result"
22
- repeated :product_grouped_results, :message, 6, "google.cloud.vision.v1.ProductSearchResults.GroupedResult"
23
- end
24
- add_message "google.cloud.vision.v1.ProductSearchResults.Result" do
25
- optional :product, :message, 1, "google.cloud.vision.v1.Product"
26
- optional :score, :float, 2
27
- optional :image, :string, 3
28
- end
29
- add_message "google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation" do
30
- optional :mid, :string, 1
31
- optional :language_code, :string, 2
32
- optional :name, :string, 3
33
- optional :score, :float, 4
34
- end
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"
39
- end
40
- end
41
-
42
- module Google
43
- module Cloud
44
- module Vision
45
- module V1
46
- ProductSearchParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchParams").msgclass
47
- ProductSearchResults = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults").msgclass
48
- ProductSearchResults::Result = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.Result").msgclass
49
- ProductSearchResults::ObjectAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation").msgclass
50
- ProductSearchResults::GroupedResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSearchResults.GroupedResult").msgclass
51
- end
52
- end
53
- end
54
- end
@@ -1,207 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/vision/v1/product_search_service.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/api/client_pb'
9
- require 'google/api/field_behavior_pb'
10
- require 'google/api/resource_pb'
11
- require 'google/cloud/vision/v1/geometry_pb'
12
- require 'google/longrunning/operations_pb'
13
- require 'google/protobuf/empty_pb'
14
- require 'google/protobuf/field_mask_pb'
15
- require 'google/protobuf/timestamp_pb'
16
- require 'google/rpc/status_pb'
17
- Google::Protobuf::DescriptorPool.generated_pool.build do
18
- add_message "google.cloud.vision.v1.Product" do
19
- optional :name, :string, 1
20
- optional :display_name, :string, 2
21
- optional :description, :string, 3
22
- optional :product_category, :string, 4
23
- repeated :product_labels, :message, 5, "google.cloud.vision.v1.Product.KeyValue"
24
- end
25
- add_message "google.cloud.vision.v1.Product.KeyValue" do
26
- optional :key, :string, 1
27
- optional :value, :string, 2
28
- end
29
- add_message "google.cloud.vision.v1.ProductSet" do
30
- optional :name, :string, 1
31
- optional :display_name, :string, 2
32
- optional :index_time, :message, 3, "google.protobuf.Timestamp"
33
- optional :index_error, :message, 4, "google.rpc.Status"
34
- end
35
- add_message "google.cloud.vision.v1.ReferenceImage" do
36
- optional :name, :string, 1
37
- optional :uri, :string, 2
38
- repeated :bounding_polys, :message, 3, "google.cloud.vision.v1.BoundingPoly"
39
- end
40
- add_message "google.cloud.vision.v1.CreateProductRequest" do
41
- optional :parent, :string, 1
42
- optional :product, :message, 2, "google.cloud.vision.v1.Product"
43
- optional :product_id, :string, 3
44
- end
45
- add_message "google.cloud.vision.v1.ListProductsRequest" do
46
- optional :parent, :string, 1
47
- optional :page_size, :int32, 2
48
- optional :page_token, :string, 3
49
- end
50
- add_message "google.cloud.vision.v1.ListProductsResponse" do
51
- repeated :products, :message, 1, "google.cloud.vision.v1.Product"
52
- optional :next_page_token, :string, 2
53
- end
54
- add_message "google.cloud.vision.v1.GetProductRequest" do
55
- optional :name, :string, 1
56
- end
57
- add_message "google.cloud.vision.v1.UpdateProductRequest" do
58
- optional :product, :message, 1, "google.cloud.vision.v1.Product"
59
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
60
- end
61
- add_message "google.cloud.vision.v1.DeleteProductRequest" do
62
- optional :name, :string, 1
63
- end
64
- add_message "google.cloud.vision.v1.CreateProductSetRequest" do
65
- optional :parent, :string, 1
66
- optional :product_set, :message, 2, "google.cloud.vision.v1.ProductSet"
67
- optional :product_set_id, :string, 3
68
- end
69
- add_message "google.cloud.vision.v1.ListProductSetsRequest" do
70
- optional :parent, :string, 1
71
- optional :page_size, :int32, 2
72
- optional :page_token, :string, 3
73
- end
74
- add_message "google.cloud.vision.v1.ListProductSetsResponse" do
75
- repeated :product_sets, :message, 1, "google.cloud.vision.v1.ProductSet"
76
- optional :next_page_token, :string, 2
77
- end
78
- add_message "google.cloud.vision.v1.GetProductSetRequest" do
79
- optional :name, :string, 1
80
- end
81
- add_message "google.cloud.vision.v1.UpdateProductSetRequest" do
82
- optional :product_set, :message, 1, "google.cloud.vision.v1.ProductSet"
83
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
84
- end
85
- add_message "google.cloud.vision.v1.DeleteProductSetRequest" do
86
- optional :name, :string, 1
87
- end
88
- add_message "google.cloud.vision.v1.CreateReferenceImageRequest" do
89
- optional :parent, :string, 1
90
- optional :reference_image, :message, 2, "google.cloud.vision.v1.ReferenceImage"
91
- optional :reference_image_id, :string, 3
92
- end
93
- add_message "google.cloud.vision.v1.ListReferenceImagesRequest" do
94
- optional :parent, :string, 1
95
- optional :page_size, :int32, 2
96
- optional :page_token, :string, 3
97
- end
98
- add_message "google.cloud.vision.v1.ListReferenceImagesResponse" do
99
- repeated :reference_images, :message, 1, "google.cloud.vision.v1.ReferenceImage"
100
- optional :page_size, :int32, 2
101
- optional :next_page_token, :string, 3
102
- end
103
- add_message "google.cloud.vision.v1.GetReferenceImageRequest" do
104
- optional :name, :string, 1
105
- end
106
- add_message "google.cloud.vision.v1.DeleteReferenceImageRequest" do
107
- optional :name, :string, 1
108
- end
109
- add_message "google.cloud.vision.v1.AddProductToProductSetRequest" do
110
- optional :name, :string, 1
111
- optional :product, :string, 2
112
- end
113
- add_message "google.cloud.vision.v1.RemoveProductFromProductSetRequest" do
114
- optional :name, :string, 1
115
- optional :product, :string, 2
116
- end
117
- add_message "google.cloud.vision.v1.ListProductsInProductSetRequest" do
118
- optional :name, :string, 1
119
- optional :page_size, :int32, 2
120
- optional :page_token, :string, 3
121
- end
122
- add_message "google.cloud.vision.v1.ListProductsInProductSetResponse" do
123
- repeated :products, :message, 1, "google.cloud.vision.v1.Product"
124
- optional :next_page_token, :string, 2
125
- end
126
- add_message "google.cloud.vision.v1.ImportProductSetsGcsSource" do
127
- optional :csv_file_uri, :string, 1
128
- end
129
- add_message "google.cloud.vision.v1.ImportProductSetsInputConfig" do
130
- oneof :source do
131
- optional :gcs_source, :message, 1, "google.cloud.vision.v1.ImportProductSetsGcsSource"
132
- end
133
- end
134
- add_message "google.cloud.vision.v1.ImportProductSetsRequest" do
135
- optional :parent, :string, 1
136
- optional :input_config, :message, 2, "google.cloud.vision.v1.ImportProductSetsInputConfig"
137
- end
138
- add_message "google.cloud.vision.v1.ImportProductSetsResponse" do
139
- repeated :reference_images, :message, 1, "google.cloud.vision.v1.ReferenceImage"
140
- repeated :statuses, :message, 2, "google.rpc.Status"
141
- end
142
- add_message "google.cloud.vision.v1.BatchOperationMetadata" do
143
- optional :state, :enum, 1, "google.cloud.vision.v1.BatchOperationMetadata.State"
144
- optional :submit_time, :message, 2, "google.protobuf.Timestamp"
145
- optional :end_time, :message, 3, "google.protobuf.Timestamp"
146
- end
147
- add_enum "google.cloud.vision.v1.BatchOperationMetadata.State" do
148
- value :STATE_UNSPECIFIED, 0
149
- value :PROCESSING, 1
150
- value :SUCCESSFUL, 2
151
- value :FAILED, 3
152
- value :CANCELLED, 4
153
- end
154
- add_message "google.cloud.vision.v1.ProductSetPurgeConfig" do
155
- optional :product_set_id, :string, 1
156
- end
157
- add_message "google.cloud.vision.v1.PurgeProductsRequest" do
158
- optional :parent, :string, 1
159
- optional :force, :bool, 4
160
- oneof :target do
161
- optional :product_set_purge_config, :message, 2, "google.cloud.vision.v1.ProductSetPurgeConfig"
162
- optional :delete_orphan_products, :bool, 3
163
- end
164
- end
165
- end
166
-
167
- module Google
168
- module Cloud
169
- module Vision
170
- module V1
171
- Product = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Product").msgclass
172
- Product::KeyValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Product.KeyValue").msgclass
173
- ProductSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSet").msgclass
174
- ReferenceImage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ReferenceImage").msgclass
175
- CreateProductRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CreateProductRequest").msgclass
176
- ListProductsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsRequest").msgclass
177
- ListProductsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsResponse").msgclass
178
- GetProductRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GetProductRequest").msgclass
179
- UpdateProductRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.UpdateProductRequest").msgclass
180
- DeleteProductRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.DeleteProductRequest").msgclass
181
- CreateProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CreateProductSetRequest").msgclass
182
- ListProductSetsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductSetsRequest").msgclass
183
- ListProductSetsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductSetsResponse").msgclass
184
- GetProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GetProductSetRequest").msgclass
185
- UpdateProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.UpdateProductSetRequest").msgclass
186
- DeleteProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.DeleteProductSetRequest").msgclass
187
- CreateReferenceImageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CreateReferenceImageRequest").msgclass
188
- ListReferenceImagesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListReferenceImagesRequest").msgclass
189
- ListReferenceImagesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListReferenceImagesResponse").msgclass
190
- GetReferenceImageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GetReferenceImageRequest").msgclass
191
- DeleteReferenceImageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.DeleteReferenceImageRequest").msgclass
192
- AddProductToProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AddProductToProductSetRequest").msgclass
193
- RemoveProductFromProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.RemoveProductFromProductSetRequest").msgclass
194
- ListProductsInProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsInProductSetRequest").msgclass
195
- ListProductsInProductSetResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ListProductsInProductSetResponse").msgclass
196
- ImportProductSetsGcsSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsGcsSource").msgclass
197
- ImportProductSetsInputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsInputConfig").msgclass
198
- ImportProductSetsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsRequest").msgclass
199
- ImportProductSetsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImportProductSetsResponse").msgclass
200
- BatchOperationMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchOperationMetadata").msgclass
201
- BatchOperationMetadata::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchOperationMetadata.State").enummodule
202
- ProductSetPurgeConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ProductSetPurgeConfig").msgclass
203
- PurgeProductsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.PurgeProductsRequest").msgclass
204
- end
205
- end
206
- end
207
- end
@@ -1,233 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: google/cloud/vision/v1/product_search_service.proto for package 'google.cloud.vision.v1'
3
- # Original file comments:
4
- # Copyright 2019 Google LLC.
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
- #
19
-
20
-
21
- require 'grpc'
22
- require 'google/cloud/vision/v1/product_search_service_pb'
23
-
24
- module Google
25
- module Cloud
26
- module Vision
27
- module V1
28
- module ProductSearch
29
- # Manages Products and ProductSets of reference images for use in product
30
- # search. It uses the following resource model:
31
- #
32
- # - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
33
- # `projects/*/locations/*/productSets/*`, which acts as a way to put different
34
- # products into groups to limit identification.
35
- #
36
- # In parallel,
37
- #
38
- # - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
39
- # `projects/*/locations/*/products/*`
40
- #
41
- # - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
42
- # `projects/*/locations/*/products/*/referenceImages/*`
43
- class Service
44
-
45
- include GRPC::GenericService
46
-
47
- self.marshal_class_method = :encode
48
- self.unmarshal_class_method = :decode
49
- self.service_name = 'google.cloud.vision.v1.ProductSearch'
50
-
51
- # Creates and returns a new ProductSet resource.
52
- #
53
- # Possible errors:
54
- #
55
- # * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
56
- # 4096 characters.
57
- rpc :CreateProductSet, CreateProductSetRequest, ProductSet
58
- # Lists ProductSets in an unspecified order.
59
- #
60
- # Possible errors:
61
- #
62
- # * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
63
- # than 1.
64
- rpc :ListProductSets, ListProductSetsRequest, ListProductSetsResponse
65
- # Gets information associated with a ProductSet.
66
- #
67
- # Possible errors:
68
- #
69
- # * Returns NOT_FOUND if the ProductSet does not exist.
70
- rpc :GetProductSet, GetProductSetRequest, ProductSet
71
- # Makes changes to a ProductSet resource.
72
- # Only display_name can be updated currently.
73
- #
74
- # Possible errors:
75
- #
76
- # * Returns NOT_FOUND if the ProductSet does not exist.
77
- # * Returns INVALID_ARGUMENT if display_name is present in update_mask but
78
- # missing from the request or longer than 4096 characters.
79
- rpc :UpdateProductSet, UpdateProductSetRequest, ProductSet
80
- # Permanently deletes a ProductSet. Products and ReferenceImages in the
81
- # ProductSet are not deleted.
82
- #
83
- # The actual image files are not deleted from Google Cloud Storage.
84
- rpc :DeleteProductSet, DeleteProductSetRequest, Google::Protobuf::Empty
85
- # Creates and returns a new product resource.
86
- #
87
- # Possible errors:
88
- #
89
- # * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
90
- # characters.
91
- # * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
92
- # * Returns INVALID_ARGUMENT if product_category is missing or invalid.
93
- rpc :CreateProduct, CreateProductRequest, Product
94
- # Lists products in an unspecified order.
95
- #
96
- # Possible errors:
97
- #
98
- # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
99
- rpc :ListProducts, ListProductsRequest, ListProductsResponse
100
- # Gets information associated with a Product.
101
- #
102
- # Possible errors:
103
- #
104
- # * Returns NOT_FOUND if the Product does not exist.
105
- rpc :GetProduct, GetProductRequest, Product
106
- # Makes changes to a Product resource.
107
- # Only the `display_name`, `description`, and `labels` fields can be updated
108
- # right now.
109
- #
110
- # If labels are updated, the change will not be reflected in queries until
111
- # the next index time.
112
- #
113
- # Possible errors:
114
- #
115
- # * Returns NOT_FOUND if the Product does not exist.
116
- # * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
117
- # missing from the request or longer than 4096 characters.
118
- # * Returns INVALID_ARGUMENT if description is present in update_mask but is
119
- # longer than 4096 characters.
120
- # * Returns INVALID_ARGUMENT if product_category is present in update_mask.
121
- rpc :UpdateProduct, UpdateProductRequest, Product
122
- # Permanently deletes a product and its reference images.
123
- #
124
- # Metadata of the product and all its images will be deleted right away, but
125
- # search queries against ProductSets containing the product may still work
126
- # until all related caches are refreshed.
127
- rpc :DeleteProduct, DeleteProductRequest, Google::Protobuf::Empty
128
- # Creates and returns a new ReferenceImage resource.
129
- #
130
- # The `bounding_poly` field is optional. If `bounding_poly` is not specified,
131
- # the system will try to detect regions of interest in the image that are
132
- # compatible with the product_category on the parent product. If it is
133
- # specified, detection is ALWAYS skipped. The system converts polygons into
134
- # non-rotated rectangles.
135
- #
136
- # Note that the pipeline will resize the image if the image resolution is too
137
- # large to process (above 50MP).
138
- #
139
- # Possible errors:
140
- #
141
- # * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
142
- # characters.
143
- # * Returns INVALID_ARGUMENT if the product does not exist.
144
- # * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
145
- # compatible with the parent product's product_category is detected.
146
- # * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
147
- rpc :CreateReferenceImage, CreateReferenceImageRequest, ReferenceImage
148
- # Permanently deletes a reference image.
149
- #
150
- # The image metadata will be deleted right away, but search queries
151
- # against ProductSets containing the image may still work until all related
152
- # caches are refreshed.
153
- #
154
- # The actual image files are not deleted from Google Cloud Storage.
155
- rpc :DeleteReferenceImage, DeleteReferenceImageRequest, Google::Protobuf::Empty
156
- # Lists reference images.
157
- #
158
- # Possible errors:
159
- #
160
- # * Returns NOT_FOUND if the parent product does not exist.
161
- # * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
162
- # than 1.
163
- rpc :ListReferenceImages, ListReferenceImagesRequest, ListReferenceImagesResponse
164
- # Gets information associated with a ReferenceImage.
165
- #
166
- # Possible errors:
167
- #
168
- # * Returns NOT_FOUND if the specified image does not exist.
169
- rpc :GetReferenceImage, GetReferenceImageRequest, ReferenceImage
170
- # Adds a Product to the specified ProductSet. If the Product is already
171
- # present, no change is made.
172
- #
173
- # One Product can be added to at most 100 ProductSets.
174
- #
175
- # Possible errors:
176
- #
177
- # * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
178
- rpc :AddProductToProductSet, AddProductToProductSetRequest, Google::Protobuf::Empty
179
- # Removes a Product from the specified ProductSet.
180
- rpc :RemoveProductFromProductSet, RemoveProductFromProductSetRequest, Google::Protobuf::Empty
181
- # Lists the Products in a ProductSet, in an unspecified order. If the
182
- # ProductSet does not exist, the products field of the response will be
183
- # empty.
184
- #
185
- # Possible errors:
186
- #
187
- # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
188
- rpc :ListProductsInProductSet, ListProductsInProductSetRequest, ListProductsInProductSetResponse
189
- # Asynchronous API that imports a list of reference images to specified
190
- # product sets based on a list of image information.
191
- #
192
- # The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
193
- # progress and results of the request.
194
- # `Operation.metadata` contains `BatchOperationMetadata`. (progress)
195
- # `Operation.response` contains `ImportProductSetsResponse`. (results)
196
- #
197
- # The input source of this method is a csv file on Google Cloud Storage.
198
- # For the format of the csv file please see
199
- # [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
200
- rpc :ImportProductSets, ImportProductSetsRequest, Google::Longrunning::Operation
201
- # Asynchronous API to delete all Products in a ProductSet or all Products
202
- # that are in no ProductSet.
203
- #
204
- # If a Product is a member of the specified ProductSet in addition to other
205
- # ProductSets, the Product will still be deleted.
206
- #
207
- # It is recommended to not delete the specified ProductSet until after this
208
- # operation has completed. It is also recommended to not add any of the
209
- # Products involved in the batch delete to a new ProductSet while this
210
- # operation is running because those Products may still end up deleted.
211
- #
212
- # It's not possible to undo the PurgeProducts operation. Therefore, it is
213
- # recommended to keep the csv files used in ImportProductSets (if that was
214
- # how you originally built the Product Set) before starting PurgeProducts, in
215
- # case you need to re-import the data after deletion.
216
- #
217
- # If the plan is to purge all of the Products from a ProductSet and then
218
- # re-use the empty ProductSet to re-import new Products into the empty
219
- # ProductSet, you must wait until the PurgeProducts operation has finished
220
- # for that ProductSet.
221
- #
222
- # The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
223
- # progress and results of the request.
224
- # `Operation.metadata` contains `BatchOperationMetadata`. (progress)
225
- rpc :PurgeProducts, PurgeProductsRequest, Google::Longrunning::Operation
226
- end
227
-
228
- Stub = Service.rpc_stub_class
229
- end
230
- end
231
- end
232
- end
233
- end