google-cloud-vision 0.32.2 → 0.32.3

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/AUTHENTICATION.md +199 -0
  4. data/lib/google/cloud/vision.rb +8 -6
  5. data/lib/google/cloud/vision/v1.rb +8 -6
  6. data/lib/google/cloud/vision/v1/credentials.rb +1 -1
  7. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/geometry.rb +1 -1
  8. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb +1 -1
  9. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search.rb +3 -2
  10. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search_service.rb +13 -8
  11. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb +4 -3
  12. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb +1 -1
  13. data/lib/google/cloud/vision/v1/doc/google/longrunning/operations.rb +2 -44
  14. data/lib/google/cloud/vision/v1/doc/google/protobuf/any.rb +3 -2
  15. data/lib/google/cloud/vision/v1/doc/google/protobuf/empty.rb +1 -1
  16. data/lib/google/cloud/vision/v1/doc/google/protobuf/field_mask.rb +19 -27
  17. data/lib/google/cloud/vision/v1/doc/google/protobuf/timestamp.rb +16 -14
  18. data/lib/google/cloud/vision/v1/doc/google/protobuf/wrappers.rb +1 -65
  19. data/lib/google/cloud/vision/v1/doc/google/rpc/status.rb +18 -15
  20. data/lib/google/cloud/vision/v1/doc/google/type/color.rb +8 -3
  21. data/lib/google/cloud/vision/v1/doc/google/type/latlng.rb +1 -35
  22. data/lib/google/cloud/vision/v1/helpers.rb +44 -44
  23. data/lib/google/cloud/vision/v1/image_annotator_client.rb +1 -1
  24. data/lib/google/cloud/vision/v1/product_search_client.rb +102 -50
  25. data/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +9 -7
  26. data/lib/google/cloud/vision/v1p3beta1.rb +8 -4
  27. data/lib/google/cloud/vision/v1p3beta1/credentials.rb +1 -1
  28. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/geometry.rb +1 -1
  29. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/image_annotator.rb +1 -1
  30. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search.rb +4 -2
  31. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search_service.rb +12 -7
  32. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/text_annotation.rb +4 -3
  33. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/web_detection.rb +1 -1
  34. data/lib/google/cloud/vision/v1p3beta1/doc/google/longrunning/operations.rb +2 -44
  35. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/any.rb +3 -2
  36. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/empty.rb +1 -1
  37. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/field_mask.rb +19 -27
  38. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/timestamp.rb +16 -14
  39. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/wrappers.rb +1 -65
  40. data/lib/google/cloud/vision/v1p3beta1/doc/google/rpc/status.rb +18 -15
  41. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/color.rb +8 -3
  42. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/latlng.rb +1 -35
  43. data/lib/google/cloud/vision/v1p3beta1/helpers.rb +44 -44
  44. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client.rb +1 -1
  45. data/lib/google/cloud/vision/v1p3beta1/product_search_client.rb +98 -40
  46. data/lib/google/cloud/vision/v1p3beta1/product_search_service_services_pb.rb +9 -5
  47. metadata +6 -6
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -37,16 +37,20 @@ module Google
37
37
  # Manages Products and ProductSets of reference images for use in product
38
38
  # search. It uses the following resource model:
39
39
  #
40
- # * The API has a collection of {Google::Cloud::Vision::V1p3beta1::ProductSet ProductSet} resources, named
40
+ # * The API has a collection of
41
+ # {Google::Cloud::Vision::V1p3beta1::ProductSet ProductSet} resources, named
41
42
  # `projects/*/locations/*/productSets/*`, which acts as a way to put different
42
43
  # products into groups to limit identification.
43
44
  #
44
45
  # In parallel,
45
46
  #
46
- # * The API has a collection of {Google::Cloud::Vision::V1p3beta1::Product Product} resources, named
47
+ # * The API has a collection of
48
+ # {Google::Cloud::Vision::V1p3beta1::Product Product} resources, named
47
49
  # `projects/*/locations/*/products/*`
48
50
  #
49
- # * Each {Google::Cloud::Vision::V1p3beta1::Product Product} has a collection of {Google::Cloud::Vision::V1p3beta1::ReferenceImage ReferenceImage} resources, named
51
+ # * Each {Google::Cloud::Vision::V1p3beta1::Product Product} has a collection of
52
+ # {Google::Cloud::Vision::V1p3beta1::ReferenceImage ReferenceImage} resources,
53
+ # named
50
54
  # `projects/*/locations/*/products/*/referenceImages/*`
51
55
  #
52
56
  # @!attribute [r] product_search_stub
@@ -106,18 +110,18 @@ module Google
106
110
 
107
111
  private_constant :LOCATION_PATH_TEMPLATE
108
112
 
109
- PRODUCT_SET_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
110
- "projects/{project}/locations/{location}/productSets/{product_set}"
111
- )
112
-
113
- private_constant :PRODUCT_SET_PATH_TEMPLATE
114
-
115
113
  PRODUCT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
116
114
  "projects/{project}/locations/{location}/products/{product}"
117
115
  )
118
116
 
119
117
  private_constant :PRODUCT_PATH_TEMPLATE
120
118
 
119
+ PRODUCT_SET_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
120
+ "projects/{project}/locations/{location}/productSets/{product_set}"
121
+ )
122
+
123
+ private_constant :PRODUCT_SET_PATH_TEMPLATE
124
+
121
125
  REFERENCE_IMAGE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
122
126
  "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}"
123
127
  )
@@ -135,29 +139,29 @@ module Google
135
139
  )
136
140
  end
137
141
 
138
- # Returns a fully-qualified product_set resource name string.
142
+ # Returns a fully-qualified product resource name string.
139
143
  # @param project [String]
140
144
  # @param location [String]
141
- # @param product_set [String]
145
+ # @param product [String]
142
146
  # @return [String]
143
- def self.product_set_path project, location, product_set
144
- PRODUCT_SET_PATH_TEMPLATE.render(
147
+ def self.product_path project, location, product
148
+ PRODUCT_PATH_TEMPLATE.render(
145
149
  :"project" => project,
146
150
  :"location" => location,
147
- :"product_set" => product_set
151
+ :"product" => product
148
152
  )
149
153
  end
150
154
 
151
- # Returns a fully-qualified product resource name string.
155
+ # Returns a fully-qualified product_set resource name string.
152
156
  # @param project [String]
153
157
  # @param location [String]
154
- # @param product [String]
158
+ # @param product_set [String]
155
159
  # @return [String]
156
- def self.product_path project, location, product
157
- PRODUCT_PATH_TEMPLATE.render(
160
+ def self.product_set_path project, location, product_set
161
+ PRODUCT_SET_PATH_TEMPLATE.render(
158
162
  :"project" => project,
159
163
  :"location" => location,
160
- :"product" => product
164
+ :"product_set" => product_set
161
165
  )
162
166
  end
163
167
 
@@ -291,92 +295,146 @@ module Google
291
295
  @create_product_set = Google::Gax.create_api_call(
292
296
  @product_search_stub.method(:create_product_set),
293
297
  defaults["create_product_set"],
294
- exception_transformer: exception_transformer
298
+ exception_transformer: exception_transformer,
299
+ params_extractor: proc do |request|
300
+ {'parent' => request.parent}
301
+ end
295
302
  )
296
303
  @list_product_sets = Google::Gax.create_api_call(
297
304
  @product_search_stub.method(:list_product_sets),
298
305
  defaults["list_product_sets"],
299
- exception_transformer: exception_transformer
306
+ exception_transformer: exception_transformer,
307
+ params_extractor: proc do |request|
308
+ {'parent' => request.parent}
309
+ end
300
310
  )
301
311
  @get_product_set = Google::Gax.create_api_call(
302
312
  @product_search_stub.method(:get_product_set),
303
313
  defaults["get_product_set"],
304
- exception_transformer: exception_transformer
314
+ exception_transformer: exception_transformer,
315
+ params_extractor: proc do |request|
316
+ {'name' => request.name}
317
+ end
305
318
  )
306
319
  @update_product_set = Google::Gax.create_api_call(
307
320
  @product_search_stub.method(:update_product_set),
308
321
  defaults["update_product_set"],
309
- exception_transformer: exception_transformer
322
+ exception_transformer: exception_transformer,
323
+ params_extractor: proc do |request|
324
+ {'product_set.name' => request.product_set.name}
325
+ end
310
326
  )
311
327
  @delete_product_set = Google::Gax.create_api_call(
312
328
  @product_search_stub.method(:delete_product_set),
313
329
  defaults["delete_product_set"],
314
- exception_transformer: exception_transformer
330
+ exception_transformer: exception_transformer,
331
+ params_extractor: proc do |request|
332
+ {'name' => request.name}
333
+ end
315
334
  )
316
335
  @create_product = Google::Gax.create_api_call(
317
336
  @product_search_stub.method(:create_product),
318
337
  defaults["create_product"],
319
- exception_transformer: exception_transformer
338
+ exception_transformer: exception_transformer,
339
+ params_extractor: proc do |request|
340
+ {'parent' => request.parent}
341
+ end
320
342
  )
321
343
  @list_products = Google::Gax.create_api_call(
322
344
  @product_search_stub.method(:list_products),
323
345
  defaults["list_products"],
324
- exception_transformer: exception_transformer
346
+ exception_transformer: exception_transformer,
347
+ params_extractor: proc do |request|
348
+ {'parent' => request.parent}
349
+ end
325
350
  )
326
351
  @get_product = Google::Gax.create_api_call(
327
352
  @product_search_stub.method(:get_product),
328
353
  defaults["get_product"],
329
- exception_transformer: exception_transformer
354
+ exception_transformer: exception_transformer,
355
+ params_extractor: proc do |request|
356
+ {'name' => request.name}
357
+ end
330
358
  )
331
359
  @update_product = Google::Gax.create_api_call(
332
360
  @product_search_stub.method(:update_product),
333
361
  defaults["update_product"],
334
- exception_transformer: exception_transformer
362
+ exception_transformer: exception_transformer,
363
+ params_extractor: proc do |request|
364
+ {'product.name' => request.product.name}
365
+ end
335
366
  )
336
367
  @delete_product = Google::Gax.create_api_call(
337
368
  @product_search_stub.method(:delete_product),
338
369
  defaults["delete_product"],
339
- exception_transformer: exception_transformer
370
+ exception_transformer: exception_transformer,
371
+ params_extractor: proc do |request|
372
+ {'name' => request.name}
373
+ end
340
374
  )
341
375
  @create_reference_image = Google::Gax.create_api_call(
342
376
  @product_search_stub.method(:create_reference_image),
343
377
  defaults["create_reference_image"],
344
- exception_transformer: exception_transformer
378
+ exception_transformer: exception_transformer,
379
+ params_extractor: proc do |request|
380
+ {'parent' => request.parent}
381
+ end
345
382
  )
346
383
  @delete_reference_image = Google::Gax.create_api_call(
347
384
  @product_search_stub.method(:delete_reference_image),
348
385
  defaults["delete_reference_image"],
349
- exception_transformer: exception_transformer
386
+ exception_transformer: exception_transformer,
387
+ params_extractor: proc do |request|
388
+ {'name' => request.name}
389
+ end
350
390
  )
351
391
  @list_reference_images = Google::Gax.create_api_call(
352
392
  @product_search_stub.method(:list_reference_images),
353
393
  defaults["list_reference_images"],
354
- exception_transformer: exception_transformer
394
+ exception_transformer: exception_transformer,
395
+ params_extractor: proc do |request|
396
+ {'parent' => request.parent}
397
+ end
355
398
  )
356
399
  @get_reference_image = Google::Gax.create_api_call(
357
400
  @product_search_stub.method(:get_reference_image),
358
401
  defaults["get_reference_image"],
359
- exception_transformer: exception_transformer
402
+ exception_transformer: exception_transformer,
403
+ params_extractor: proc do |request|
404
+ {'name' => request.name}
405
+ end
360
406
  )
361
407
  @add_product_to_product_set = Google::Gax.create_api_call(
362
408
  @product_search_stub.method(:add_product_to_product_set),
363
409
  defaults["add_product_to_product_set"],
364
- exception_transformer: exception_transformer
410
+ exception_transformer: exception_transformer,
411
+ params_extractor: proc do |request|
412
+ {'name' => request.name}
413
+ end
365
414
  )
366
415
  @remove_product_from_product_set = Google::Gax.create_api_call(
367
416
  @product_search_stub.method(:remove_product_from_product_set),
368
417
  defaults["remove_product_from_product_set"],
369
- exception_transformer: exception_transformer
418
+ exception_transformer: exception_transformer,
419
+ params_extractor: proc do |request|
420
+ {'name' => request.name}
421
+ end
370
422
  )
371
423
  @list_products_in_product_set = Google::Gax.create_api_call(
372
424
  @product_search_stub.method(:list_products_in_product_set),
373
425
  defaults["list_products_in_product_set"],
374
- exception_transformer: exception_transformer
426
+ exception_transformer: exception_transformer,
427
+ params_extractor: proc do |request|
428
+ {'name' => request.name}
429
+ end
375
430
  )
376
431
  @import_product_sets = Google::Gax.create_api_call(
377
432
  @product_search_stub.method(:import_product_sets),
378
433
  defaults["import_product_sets"],
379
- exception_transformer: exception_transformer
434
+ exception_transformer: exception_transformer,
435
+ params_extractor: proc do |request|
436
+ {'parent' => request.parent}
437
+ end
380
438
  )
381
439
  end
382
440
 
@@ -1267,8 +1325,8 @@ module Google
1267
1325
  # Asynchronous API that imports a list of reference images to specified
1268
1326
  # product sets based on a list of image information.
1269
1327
  #
1270
- # The {Google::Longrunning::Operation} API can be used to keep track of the
1271
- # progress and results of the request.
1328
+ # The {Google::Longrunning::Operation} API can be
1329
+ # used to keep track of the progress and results of the request.
1272
1330
  # `Operation.metadata` contains `BatchOperationMetadata`. (progress)
1273
1331
  # `Operation.response` contains `ImportProductSetsResponse`. (results)
1274
1332
  #
@@ -28,16 +28,20 @@ module Google
28
28
  # Manages Products and ProductSets of reference images for use in product
29
29
  # search. It uses the following resource model:
30
30
  #
31
- # - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
31
+ # - The API has a collection of
32
+ # [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
32
33
  # `projects/*/locations/*/productSets/*`, which acts as a way to put different
33
34
  # products into groups to limit identification.
34
35
  #
35
36
  # In parallel,
36
37
  #
37
- # - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named
38
+ # - The API has a collection of
39
+ # [Product][google.cloud.vision.v1p3beta1.Product] resources, named
38
40
  # `projects/*/locations/*/products/*`
39
41
  #
40
- # - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named
42
+ # - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of
43
+ # [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources,
44
+ # named
41
45
  # `projects/*/locations/*/products/*/referenceImages/*`
42
46
  class Service
43
47
 
@@ -203,8 +207,8 @@ module Google
203
207
  # Asynchronous API that imports a list of reference images to specified
204
208
  # product sets based on a list of image information.
205
209
  #
206
- # The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
207
- # progress and results of the request.
210
+ # The [google.longrunning.Operation][google.longrunning.Operation] API can be
211
+ # used to keep track of the progress and results of the request.
208
212
  # `Operation.metadata` contains `BatchOperationMetadata`. (progress)
209
213
  # `Operation.response` contains `ImportProductSetsResponse`. (results)
210
214
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-vision
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.2
4
+ version: 0.32.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-14 00:00:00.000000000 Z
11
+ date: 2019-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.59.2
61
+ version: 0.64.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.59.2
68
+ version: 0.64.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -101,6 +101,7 @@ extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
103
103
  - ".yardopts"
104
+ - AUTHENTICATION.md
104
105
  - LICENSE
105
106
  - README.md
106
107
  - lib/google/cloud/vision.rb
@@ -185,8 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
186
  - !ruby/object:Gem::Version
186
187
  version: '0'
187
188
  requirements: []
188
- rubyforge_project:
189
- rubygems_version: 2.7.7
189
+ rubygems_version: 3.0.3
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: API Client library for Cloud Vision API