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