google-cloud-vision 0.37.2 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
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,116 +0,0 @@
1
- {
2
- "interfaces": {
3
- "google.cloud.vision.v1p3beta1.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": 20000,
17
- "rpc_timeout_multiplier": 1.0,
18
- "max_rpc_timeout_millis": 20000,
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": "non_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": "non_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": "non_idempotent",
96
- "retry_params_name": "default"
97
- },
98
- "RemoveProductFromProductSet": {
99
- "timeout_millis": 60000,
100
- "retry_codes_name": "non_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
- }
114
- }
115
- }
116
- }
@@ -1,64 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/vision/v1p3beta1/product_search.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/cloud/vision/v1p3beta1/geometry_pb'
9
- require 'google/cloud/vision/v1p3beta1/product_search_service_pb'
10
- require 'google/protobuf/timestamp_pb'
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_message "google.cloud.vision.v1p3beta1.ProductSearchParams" do
13
- optional :catalog_name, :string, 1
14
- optional :category, :enum, 2, "google.cloud.vision.v1p3beta1.ProductSearchCategory"
15
- optional :product_category, :string, 5
16
- optional :normalized_bounding_poly, :message, 3, "google.cloud.vision.v1p3beta1.NormalizedBoundingPoly"
17
- optional :bounding_poly, :message, 9, "google.cloud.vision.v1p3beta1.BoundingPoly"
18
- optional :view, :enum, 4, "google.cloud.vision.v1p3beta1.ProductSearchResultsView"
19
- optional :product_set, :string, 6
20
- repeated :product_categories, :string, 7
21
- optional :filter, :string, 8
22
- end
23
- add_message "google.cloud.vision.v1p3beta1.ProductSearchResults" do
24
- optional :category, :enum, 1, "google.cloud.vision.v1p3beta1.ProductSearchCategory"
25
- optional :product_category, :string, 4
26
- optional :index_time, :message, 2, "google.protobuf.Timestamp"
27
- repeated :products, :message, 3, "google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo"
28
- repeated :results, :message, 5, "google.cloud.vision.v1p3beta1.ProductSearchResults.Result"
29
- end
30
- add_message "google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo" do
31
- optional :product_id, :string, 1
32
- optional :image_uri, :string, 2
33
- optional :score, :float, 3
34
- end
35
- add_message "google.cloud.vision.v1p3beta1.ProductSearchResults.Result" do
36
- optional :product, :message, 1, "google.cloud.vision.v1p3beta1.Product"
37
- optional :score, :float, 2
38
- optional :image, :string, 3
39
- end
40
- add_enum "google.cloud.vision.v1p3beta1.ProductSearchCategory" do
41
- value :PRODUCT_SEARCH_CATEGORY_UNSPECIFIED, 0
42
- value :SHOES, 1
43
- value :BAGS, 2
44
- end
45
- add_enum "google.cloud.vision.v1p3beta1.ProductSearchResultsView" do
46
- value :BASIC, 0
47
- value :FULL, 1
48
- end
49
- end
50
-
51
- module Google
52
- module Cloud
53
- module Vision
54
- module V1p3beta1
55
- ProductSearchParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchParams").msgclass
56
- ProductSearchResults = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchResults").msgclass
57
- ProductSearchResults::ProductInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo").msgclass
58
- ProductSearchResults::Result = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchResults.Result").msgclass
59
- ProductSearchCategory = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchCategory").enummodule
60
- ProductSearchResultsView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSearchResultsView").enummodule
61
- end
62
- end
63
- end
64
- end
@@ -1,191 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/vision/v1p3beta1/product_search_service.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/cloud/vision/v1p3beta1/geometry_pb'
9
- require 'google/longrunning/operations_pb'
10
- require 'google/protobuf/empty_pb'
11
- require 'google/protobuf/field_mask_pb'
12
- require 'google/protobuf/timestamp_pb'
13
- require 'google/rpc/status_pb'
14
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_message "google.cloud.vision.v1p3beta1.Product" do
16
- optional :name, :string, 1
17
- optional :display_name, :string, 2
18
- optional :description, :string, 3
19
- optional :product_category, :string, 4
20
- repeated :product_labels, :message, 5, "google.cloud.vision.v1p3beta1.Product.KeyValue"
21
- end
22
- add_message "google.cloud.vision.v1p3beta1.Product.KeyValue" do
23
- optional :key, :string, 1
24
- optional :value, :string, 2
25
- end
26
- add_message "google.cloud.vision.v1p3beta1.ProductSet" do
27
- optional :name, :string, 1
28
- optional :display_name, :string, 2
29
- optional :index_time, :message, 3, "google.protobuf.Timestamp"
30
- optional :index_error, :message, 4, "google.rpc.Status"
31
- end
32
- add_message "google.cloud.vision.v1p3beta1.ReferenceImage" do
33
- optional :name, :string, 1
34
- optional :uri, :string, 2
35
- repeated :bounding_polys, :message, 3, "google.cloud.vision.v1p3beta1.BoundingPoly"
36
- end
37
- add_message "google.cloud.vision.v1p3beta1.CreateProductRequest" do
38
- optional :parent, :string, 1
39
- optional :product, :message, 2, "google.cloud.vision.v1p3beta1.Product"
40
- optional :product_id, :string, 3
41
- end
42
- add_message "google.cloud.vision.v1p3beta1.ListProductsRequest" do
43
- optional :parent, :string, 1
44
- optional :page_size, :int32, 2
45
- optional :page_token, :string, 3
46
- end
47
- add_message "google.cloud.vision.v1p3beta1.ListProductsResponse" do
48
- repeated :products, :message, 1, "google.cloud.vision.v1p3beta1.Product"
49
- optional :next_page_token, :string, 2
50
- end
51
- add_message "google.cloud.vision.v1p3beta1.GetProductRequest" do
52
- optional :name, :string, 1
53
- end
54
- add_message "google.cloud.vision.v1p3beta1.UpdateProductRequest" do
55
- optional :product, :message, 1, "google.cloud.vision.v1p3beta1.Product"
56
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
57
- end
58
- add_message "google.cloud.vision.v1p3beta1.DeleteProductRequest" do
59
- optional :name, :string, 1
60
- end
61
- add_message "google.cloud.vision.v1p3beta1.CreateProductSetRequest" do
62
- optional :parent, :string, 1
63
- optional :product_set, :message, 2, "google.cloud.vision.v1p3beta1.ProductSet"
64
- optional :product_set_id, :string, 3
65
- end
66
- add_message "google.cloud.vision.v1p3beta1.ListProductSetsRequest" do
67
- optional :parent, :string, 1
68
- optional :page_size, :int32, 2
69
- optional :page_token, :string, 3
70
- end
71
- add_message "google.cloud.vision.v1p3beta1.ListProductSetsResponse" do
72
- repeated :product_sets, :message, 1, "google.cloud.vision.v1p3beta1.ProductSet"
73
- optional :next_page_token, :string, 2
74
- end
75
- add_message "google.cloud.vision.v1p3beta1.GetProductSetRequest" do
76
- optional :name, :string, 1
77
- end
78
- add_message "google.cloud.vision.v1p3beta1.UpdateProductSetRequest" do
79
- optional :product_set, :message, 1, "google.cloud.vision.v1p3beta1.ProductSet"
80
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
81
- end
82
- add_message "google.cloud.vision.v1p3beta1.DeleteProductSetRequest" do
83
- optional :name, :string, 1
84
- end
85
- add_message "google.cloud.vision.v1p3beta1.CreateReferenceImageRequest" do
86
- optional :parent, :string, 1
87
- optional :reference_image, :message, 2, "google.cloud.vision.v1p3beta1.ReferenceImage"
88
- optional :reference_image_id, :string, 3
89
- end
90
- add_message "google.cloud.vision.v1p3beta1.ListReferenceImagesRequest" do
91
- optional :parent, :string, 1
92
- optional :page_size, :int32, 2
93
- optional :page_token, :string, 3
94
- end
95
- add_message "google.cloud.vision.v1p3beta1.ListReferenceImagesResponse" do
96
- repeated :reference_images, :message, 1, "google.cloud.vision.v1p3beta1.ReferenceImage"
97
- optional :page_size, :int32, 2
98
- optional :next_page_token, :string, 3
99
- end
100
- add_message "google.cloud.vision.v1p3beta1.GetReferenceImageRequest" do
101
- optional :name, :string, 1
102
- end
103
- add_message "google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest" do
104
- optional :name, :string, 1
105
- end
106
- add_message "google.cloud.vision.v1p3beta1.AddProductToProductSetRequest" do
107
- optional :name, :string, 1
108
- optional :product, :string, 2
109
- end
110
- add_message "google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest" do
111
- optional :name, :string, 1
112
- optional :product, :string, 2
113
- end
114
- add_message "google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest" do
115
- optional :name, :string, 1
116
- optional :page_size, :int32, 2
117
- optional :page_token, :string, 3
118
- end
119
- add_message "google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse" do
120
- repeated :products, :message, 1, "google.cloud.vision.v1p3beta1.Product"
121
- optional :next_page_token, :string, 2
122
- end
123
- add_message "google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource" do
124
- optional :csv_file_uri, :string, 1
125
- end
126
- add_message "google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig" do
127
- oneof :source do
128
- optional :gcs_source, :message, 1, "google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource"
129
- end
130
- end
131
- add_message "google.cloud.vision.v1p3beta1.ImportProductSetsRequest" do
132
- optional :parent, :string, 1
133
- optional :input_config, :message, 2, "google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig"
134
- end
135
- add_message "google.cloud.vision.v1p3beta1.ImportProductSetsResponse" do
136
- repeated :reference_images, :message, 1, "google.cloud.vision.v1p3beta1.ReferenceImage"
137
- repeated :statuses, :message, 2, "google.rpc.Status"
138
- end
139
- add_message "google.cloud.vision.v1p3beta1.BatchOperationMetadata" do
140
- optional :state, :enum, 1, "google.cloud.vision.v1p3beta1.BatchOperationMetadata.State"
141
- optional :submit_time, :message, 2, "google.protobuf.Timestamp"
142
- optional :end_time, :message, 3, "google.protobuf.Timestamp"
143
- end
144
- add_enum "google.cloud.vision.v1p3beta1.BatchOperationMetadata.State" do
145
- value :STATE_UNSPECIFIED, 0
146
- value :PROCESSING, 1
147
- value :SUCCESSFUL, 2
148
- value :FAILED, 3
149
- value :CANCELLED, 4
150
- end
151
- end
152
-
153
- module Google
154
- module Cloud
155
- module Vision
156
- module V1p3beta1
157
- Product = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Product").msgclass
158
- Product::KeyValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Product.KeyValue").msgclass
159
- ProductSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ProductSet").msgclass
160
- ReferenceImage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ReferenceImage").msgclass
161
- CreateProductRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.CreateProductRequest").msgclass
162
- ListProductsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ListProductsRequest").msgclass
163
- ListProductsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ListProductsResponse").msgclass
164
- GetProductRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.GetProductRequest").msgclass
165
- UpdateProductRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.UpdateProductRequest").msgclass
166
- DeleteProductRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.DeleteProductRequest").msgclass
167
- CreateProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.CreateProductSetRequest").msgclass
168
- ListProductSetsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ListProductSetsRequest").msgclass
169
- ListProductSetsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ListProductSetsResponse").msgclass
170
- GetProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.GetProductSetRequest").msgclass
171
- UpdateProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.UpdateProductSetRequest").msgclass
172
- DeleteProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.DeleteProductSetRequest").msgclass
173
- CreateReferenceImageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.CreateReferenceImageRequest").msgclass
174
- ListReferenceImagesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ListReferenceImagesRequest").msgclass
175
- ListReferenceImagesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ListReferenceImagesResponse").msgclass
176
- GetReferenceImageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.GetReferenceImageRequest").msgclass
177
- DeleteReferenceImageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest").msgclass
178
- AddProductToProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AddProductToProductSetRequest").msgclass
179
- RemoveProductFromProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest").msgclass
180
- ListProductsInProductSetRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest").msgclass
181
- ListProductsInProductSetResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse").msgclass
182
- ImportProductSetsGcsSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource").msgclass
183
- ImportProductSetsInputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig").msgclass
184
- ImportProductSetsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImportProductSetsRequest").msgclass
185
- ImportProductSetsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImportProductSetsResponse").msgclass
186
- BatchOperationMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.BatchOperationMetadata").msgclass
187
- BatchOperationMetadata::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.BatchOperationMetadata.State").enummodule
188
- end
189
- end
190
- end
191
- end
@@ -1,226 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: google/cloud/vision/v1p3beta1/product_search_service.proto for package 'google.cloud.vision.v1p3beta1'
3
- # Original file comments:
4
- # Copyright 2018 Google Inc.
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
- require 'grpc'
21
- require 'google/cloud/vision/v1p3beta1/product_search_service_pb'
22
-
23
- module Google
24
- module Cloud
25
- module Vision
26
- module V1p3beta1
27
- module ProductSearch
28
- # Manages Products and ProductSets of reference images for use in product
29
- # search. It uses the following resource model:
30
- #
31
- # - The API has a collection of
32
- # [ProductSet][google.cloud.vision.v1p3beta1.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
39
- # [Product][google.cloud.vision.v1p3beta1.Product] resources, named
40
- # `projects/*/locations/*/products/*`
41
- #
42
- # - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of
43
- # [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources,
44
- # named
45
- # `projects/*/locations/*/products/*/referenceImages/*`
46
- class Service
47
-
48
- include GRPC::GenericService
49
-
50
- self.marshal_class_method = :encode
51
- self.unmarshal_class_method = :decode
52
- self.service_name = 'google.cloud.vision.v1p3beta1.ProductSearch'
53
-
54
- # Creates and returns a new ProductSet resource.
55
- #
56
- # Possible errors:
57
- #
58
- # * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
59
- # 4096 characters.
60
- rpc :CreateProductSet, CreateProductSetRequest, ProductSet
61
- # Lists ProductSets in an unspecified order.
62
- #
63
- # Possible errors:
64
- #
65
- # * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
66
- # than 1.
67
- rpc :ListProductSets, ListProductSetsRequest, ListProductSetsResponse
68
- # Gets information associated with a ProductSet.
69
- #
70
- # Possible errors:
71
- #
72
- # * Returns NOT_FOUND if the ProductSet does not exist.
73
- rpc :GetProductSet, GetProductSetRequest, ProductSet
74
- # Makes changes to a ProductSet resource.
75
- # Only display_name can be updated currently.
76
- #
77
- # Possible errors:
78
- #
79
- # * Returns NOT_FOUND if the ProductSet does not exist.
80
- # * Returns INVALID_ARGUMENT if display_name is present in update_mask but
81
- # missing from the request or longer than 4096 characters.
82
- rpc :UpdateProductSet, UpdateProductSetRequest, ProductSet
83
- # Permanently deletes a ProductSet. All Products and ReferenceImages in the
84
- # ProductSet will be deleted.
85
- #
86
- # The actual image files are not deleted from Google Cloud Storage.
87
- #
88
- # Possible errors:
89
- #
90
- # * Returns NOT_FOUND if the ProductSet does not exist.
91
- rpc :DeleteProductSet, DeleteProductSetRequest, Google::Protobuf::Empty
92
- # Creates and returns a new product resource.
93
- #
94
- # Possible errors:
95
- #
96
- # * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
97
- # characters.
98
- # * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
99
- # * Returns INVALID_ARGUMENT if product_category is missing or invalid.
100
- rpc :CreateProduct, CreateProductRequest, Product
101
- # Lists products in an unspecified order.
102
- #
103
- # Possible errors:
104
- #
105
- # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
106
- rpc :ListProducts, ListProductsRequest, ListProductsResponse
107
- # Gets information associated with a Product.
108
- #
109
- # Possible errors:
110
- #
111
- # * Returns NOT_FOUND if the Product does not exist.
112
- rpc :GetProduct, GetProductRequest, Product
113
- # Makes changes to a Product resource.
114
- # Only display_name, description and labels can be updated right now.
115
- #
116
- # If labels are updated, the change will not be reflected in queries until
117
- # the next index time.
118
- #
119
- # Possible errors:
120
- #
121
- # * Returns NOT_FOUND if the Product does not exist.
122
- # * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
123
- # missing from the request or longer than 4096 characters.
124
- # * Returns INVALID_ARGUMENT if description is present in update_mask but is
125
- # longer than 4096 characters.
126
- # * Returns INVALID_ARGUMENT if product_category is present in update_mask.
127
- rpc :UpdateProduct, UpdateProductRequest, Product
128
- # Permanently deletes a product and its reference images.
129
- #
130
- # Metadata of the product and all its images will be deleted right away, but
131
- # search queries against ProductSets containing the product may still work
132
- # until all related caches are refreshed.
133
- #
134
- # Possible errors:
135
- #
136
- # * Returns NOT_FOUND if the product does not exist.
137
- rpc :DeleteProduct, DeleteProductRequest, Google::Protobuf::Empty
138
- # Creates and returns a new ReferenceImage resource.
139
- #
140
- # The `bounding_poly` field is optional. If `bounding_poly` is not specified,
141
- # the system will try to detect regions of interest in the image that are
142
- # compatible with the product_category on the parent product. If it is
143
- # specified, detection is ALWAYS skipped. The system converts polygons into
144
- # non-rotated rectangles.
145
- #
146
- # Note that the pipeline will resize the image if the image resolution is too
147
- # large to process (above 50MP).
148
- #
149
- # Possible errors:
150
- #
151
- # * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
152
- # characters.
153
- # * Returns INVALID_ARGUMENT if the product does not exist.
154
- # * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
155
- # compatible with the parent product's product_category is detected.
156
- # * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
157
- rpc :CreateReferenceImage, CreateReferenceImageRequest, ReferenceImage
158
- # Permanently deletes a reference image.
159
- #
160
- # The image metadata will be deleted right away, but search queries
161
- # against ProductSets containing the image may still work until all related
162
- # caches are refreshed.
163
- #
164
- # The actual image files are not deleted from Google Cloud Storage.
165
- #
166
- # Possible errors:
167
- #
168
- # * Returns NOT_FOUND if the reference image does not exist.
169
- rpc :DeleteReferenceImage, DeleteReferenceImageRequest, Google::Protobuf::Empty
170
- # Lists reference images.
171
- #
172
- # Possible errors:
173
- #
174
- # * Returns NOT_FOUND if the parent product does not exist.
175
- # * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
176
- # than 1.
177
- rpc :ListReferenceImages, ListReferenceImagesRequest, ListReferenceImagesResponse
178
- # Gets information associated with a ReferenceImage.
179
- #
180
- # Possible errors:
181
- #
182
- # * Returns NOT_FOUND if the specified image does not exist.
183
- rpc :GetReferenceImage, GetReferenceImageRequest, ReferenceImage
184
- # Adds a Product to the specified ProductSet. If the Product is already
185
- # present, no change is made.
186
- #
187
- # One Product can be added to at most 100 ProductSets.
188
- #
189
- # Possible errors:
190
- #
191
- # * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
192
- rpc :AddProductToProductSet, AddProductToProductSetRequest, Google::Protobuf::Empty
193
- # Removes a Product from the specified ProductSet.
194
- #
195
- # Possible errors:
196
- #
197
- # * Returns NOT_FOUND If the Product is not found under the ProductSet.
198
- rpc :RemoveProductFromProductSet, RemoveProductFromProductSetRequest, Google::Protobuf::Empty
199
- # Lists the Products in a ProductSet, in an unspecified order. If the
200
- # ProductSet does not exist, the products field of the response will be
201
- # empty.
202
- #
203
- # Possible errors:
204
- #
205
- # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
206
- rpc :ListProductsInProductSet, ListProductsInProductSetRequest, ListProductsInProductSetResponse
207
- # Asynchronous API that imports a list of reference images to specified
208
- # product sets based on a list of image information.
209
- #
210
- # The [google.longrunning.Operation][google.longrunning.Operation] API can be
211
- # used to keep track of the progress and results of the request.
212
- # `Operation.metadata` contains `BatchOperationMetadata`. (progress)
213
- # `Operation.response` contains `ImportProductSetsResponse`. (results)
214
- #
215
- # The input source of this method is a csv file on Google Cloud Storage.
216
- # For the format of the csv file please see
217
- # [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri].
218
- rpc :ImportProductSets, ImportProductSetsRequest, Google::Longrunning::Operation
219
- end
220
-
221
- Stub = Service.rpc_stub_class
222
- end
223
- end
224
- end
225
- end
226
- end