google-cloud-vision-v1 0.1.2 → 0.2.1
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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +48 -1
- data/lib/google-cloud-vision-v1.rb +21 -1
- data/lib/google/cloud/vision/v1.rb +16 -0
- data/lib/google/cloud/vision/v1/image_annotator.rb +33 -2
- data/lib/google/cloud/vision/v1/image_annotator/client.rb +154 -150
- data/lib/google/cloud/vision/v1/image_annotator/credentials.rb +1 -1
- data/lib/google/cloud/vision/v1/image_annotator/operations.rb +139 -127
- data/lib/google/cloud/vision/v1/image_annotator/paths.rb +3 -3
- data/lib/google/cloud/vision/v1/product_search.rb +44 -2
- data/lib/google/cloud/vision/v1/product_search/client.rb +530 -539
- data/lib/google/cloud/vision/v1/product_search/credentials.rb +1 -1
- data/lib/google/cloud/vision/v1/product_search/operations.rb +139 -127
- data/lib/google/cloud/vision/v1/product_search/paths.rb +12 -12
- data/lib/google/cloud/vision/v1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/vision/v1/geometry.rb +17 -17
- data/proto_docs/google/cloud/vision/v1/image_annotator.rb +204 -204
- data/proto_docs/google/cloud/vision/v1/product_search.rb +28 -28
- data/proto_docs/google/cloud/vision/v1/product_search_service.rb +144 -144
- data/proto_docs/google/cloud/vision/v1/text_annotation.rb +49 -49
- data/proto_docs/google/cloud/vision/v1/web_detection.rb +28 -28
- data/proto_docs/google/longrunning/operations.rb +30 -30
- data/proto_docs/google/protobuf/any.rb +4 -4
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/protobuf/wrappers.rb +27 -27
- data/proto_docs/google/rpc/status.rb +6 -6
- data/proto_docs/google/type/color.rb +6 -6
- data/proto_docs/google/type/latlng.rb +4 -4
- metadata +32 -5
- data/lib/google/cloud/common_resources_pb.rb +0 -15
@@ -35,10 +35,10 @@ module Google
|
|
35
35
|
# @param location [String]
|
36
36
|
# @param product_set [String]
|
37
37
|
#
|
38
|
-
# @return [String]
|
38
|
+
# @return [::String]
|
39
39
|
def product_set_path project:, location:, product_set:
|
40
|
-
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
-
raise ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
42
|
|
43
43
|
"projects/#{project}/locations/#{location}/productSets/#{product_set}"
|
44
44
|
end
|
@@ -16,6 +16,48 @@
|
|
16
16
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
|
-
require "
|
20
|
-
require "
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/vision/v1/version"
|
24
|
+
|
21
25
|
require "google/cloud/vision/v1/product_search/credentials"
|
26
|
+
require "google/cloud/vision/v1/product_search/paths"
|
27
|
+
require "google/cloud/vision/v1/product_search/operations"
|
28
|
+
require "google/cloud/vision/v1/product_search/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module Vision
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# Manages Products and ProductSets of reference images for use in product
|
36
|
+
# search. It uses the following resource model:
|
37
|
+
#
|
38
|
+
# - The API has a collection of {::Google::Cloud::Vision::V1::ProductSet ProductSet} resources, named
|
39
|
+
# `projects/*/locations/*/productSets/*`, which acts as a way to put different
|
40
|
+
# products into groups to limit identification.
|
41
|
+
#
|
42
|
+
# In parallel,
|
43
|
+
#
|
44
|
+
# - The API has a collection of {::Google::Cloud::Vision::V1::Product Product} resources, named
|
45
|
+
# `projects/*/locations/*/products/*`
|
46
|
+
#
|
47
|
+
# - Each {::Google::Cloud::Vision::V1::Product Product} has a collection of {::Google::Cloud::Vision::V1::ReferenceImage ReferenceImage} resources, named
|
48
|
+
# `projects/*/locations/*/products/*/referenceImages/*`
|
49
|
+
#
|
50
|
+
# To load this service and instantiate a client:
|
51
|
+
#
|
52
|
+
# require "google/cloud/vision/v1/product_search"
|
53
|
+
# client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new
|
54
|
+
#
|
55
|
+
module ProductSearch
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
helper_path = ::File.join __dir__, "product_search", "helpers.rb"
|
63
|
+
require "google/cloud/vision/v1/product_search/helpers" if ::File.file? helper_path
|
@@ -16,16 +16,8 @@
|
|
16
16
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
|
-
require "gapic/common"
|
20
|
-
require "gapic/config"
|
21
|
-
require "gapic/config/method"
|
22
|
-
|
23
19
|
require "google/cloud/errors"
|
24
|
-
require "google/cloud/vision/v1/version"
|
25
20
|
require "google/cloud/vision/v1/product_search_service_pb"
|
26
|
-
require "google/cloud/vision/v1/product_search/credentials"
|
27
|
-
require "google/cloud/vision/v1/product_search/paths"
|
28
|
-
require "google/cloud/vision/v1/product_search/operations"
|
29
21
|
|
30
22
|
module Google
|
31
23
|
module Cloud
|
@@ -38,16 +30,16 @@ module Google
|
|
38
30
|
# Manages Products and ProductSets of reference images for use in product
|
39
31
|
# search. It uses the following resource model:
|
40
32
|
#
|
41
|
-
# - The API has a collection of {Google::Cloud::Vision::V1::ProductSet ProductSet} resources, named
|
33
|
+
# - The API has a collection of {::Google::Cloud::Vision::V1::ProductSet ProductSet} resources, named
|
42
34
|
# `projects/*/locations/*/productSets/*`, which acts as a way to put different
|
43
35
|
# products into groups to limit identification.
|
44
36
|
#
|
45
37
|
# In parallel,
|
46
38
|
#
|
47
|
-
# - The API has a collection of {Google::Cloud::Vision::V1::Product Product} resources, named
|
39
|
+
# - The API has a collection of {::Google::Cloud::Vision::V1::Product Product} resources, named
|
48
40
|
# `projects/*/locations/*/products/*`
|
49
41
|
#
|
50
|
-
# - Each {Google::Cloud::Vision::V1::Product Product} has a collection of {Google::Cloud::Vision::V1::ReferenceImage ReferenceImage} resources, named
|
42
|
+
# - Each {::Google::Cloud::Vision::V1::Product Product} has a collection of {::Google::Cloud::Vision::V1::ReferenceImage ReferenceImage} resources, named
|
51
43
|
# `projects/*/locations/*/products/*/referenceImages/*`
|
52
44
|
#
|
53
45
|
class Client
|
@@ -59,15 +51,15 @@ module Google
|
|
59
51
|
##
|
60
52
|
# Configure the ProductSearch Client class.
|
61
53
|
#
|
62
|
-
# See {Google::Cloud::Vision::V1::ProductSearch::Client::Configuration}
|
54
|
+
# See {::Google::Cloud::Vision::V1::ProductSearch::Client::Configuration}
|
63
55
|
# for a description of the configuration fields.
|
64
56
|
#
|
65
57
|
# ## Example
|
66
58
|
#
|
67
59
|
# To modify the configuration for all ProductSearch clients:
|
68
60
|
#
|
69
|
-
# Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config|
|
70
|
-
# config.timeout =
|
61
|
+
# ::Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config|
|
62
|
+
# config.timeout = 10.0
|
71
63
|
# end
|
72
64
|
#
|
73
65
|
# @yield [config] Configure the Client client.
|
@@ -251,7 +243,7 @@ module Google
|
|
251
243
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
252
244
|
# should be made on {Client.configure}.
|
253
245
|
#
|
254
|
-
# See {Google::Cloud::Vision::V1::ProductSearch::Client::Configuration}
|
246
|
+
# See {::Google::Cloud::Vision::V1::ProductSearch::Client::Configuration}
|
255
247
|
# for a description of the configuration fields.
|
256
248
|
#
|
257
249
|
# @yield [config] Configure the Client client.
|
@@ -272,13 +264,13 @@ module Google
|
|
272
264
|
# To create a new ProductSearch client with the default
|
273
265
|
# configuration:
|
274
266
|
#
|
275
|
-
# client = Google::Cloud::Vision::V1::ProductSearch::Client.new
|
267
|
+
# client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new
|
276
268
|
#
|
277
269
|
# To create a new ProductSearch client with a custom
|
278
270
|
# configuration:
|
279
271
|
#
|
280
|
-
# client = Google::Cloud::Vision::V1::ProductSearch::Client.new do |config|
|
281
|
-
# config.timeout =
|
272
|
+
# client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config|
|
273
|
+
# config.timeout = 10.0
|
282
274
|
# end
|
283
275
|
#
|
284
276
|
# @yield [config] Configure the ProductSearch client.
|
@@ -303,14 +295,16 @@ module Google
|
|
303
295
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
304
296
|
credentials = Credentials.new credentials, scope: @config.scope
|
305
297
|
end
|
306
|
-
@quota_project_id =
|
298
|
+
@quota_project_id = @config.quota_project
|
299
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
307
300
|
|
308
301
|
@operations_client = Operations.new do |config|
|
309
302
|
config.credentials = credentials
|
303
|
+
config.endpoint = @config.endpoint
|
310
304
|
end
|
311
305
|
|
312
|
-
@product_search_stub = Gapic::ServiceStub.new(
|
313
|
-
Google::Cloud::Vision::V1::ProductSearch::Stub,
|
306
|
+
@product_search_stub = ::Gapic::ServiceStub.new(
|
307
|
+
::Google::Cloud::Vision::V1::ProductSearch::Stub,
|
314
308
|
credentials: credentials,
|
315
309
|
endpoint: @config.endpoint,
|
316
310
|
channel_args: @config.channel_args,
|
@@ -318,6 +312,13 @@ module Google
|
|
318
312
|
)
|
319
313
|
end
|
320
314
|
|
315
|
+
##
|
316
|
+
# Get the associated client for long-running operations.
|
317
|
+
#
|
318
|
+
# @return [::Google::Cloud::Vision::V1::ProductSearch::Operations]
|
319
|
+
#
|
320
|
+
attr_reader :operations_client
|
321
|
+
|
321
322
|
# Service calls
|
322
323
|
|
323
324
|
##
|
@@ -329,51 +330,53 @@ module Google
|
|
329
330
|
# 4096 characters.
|
330
331
|
#
|
331
332
|
# @overload create_product_set(request, options = nil)
|
332
|
-
#
|
333
|
-
#
|
333
|
+
# Pass arguments to `create_product_set` via a request object, either of type
|
334
|
+
# {::Google::Cloud::Vision::V1::CreateProductSetRequest} or an equivalent Hash.
|
334
335
|
#
|
335
|
-
#
|
336
|
-
#
|
337
|
-
#
|
338
|
-
#
|
339
|
-
# @param options [Gapic::CallOptions, Hash]
|
336
|
+
# @param request [::Google::Cloud::Vision::V1::CreateProductSetRequest, ::Hash]
|
337
|
+
# A request object representing the call parameters. Required. To specify no
|
338
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
339
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
340
340
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
341
341
|
#
|
342
342
|
# @overload create_product_set(parent: nil, product_set: nil, product_set_id: nil)
|
343
|
-
#
|
343
|
+
# Pass arguments to `create_product_set` via keyword arguments. Note that at
|
344
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
345
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
346
|
+
#
|
347
|
+
# @param parent [::String]
|
344
348
|
# Required. The project in which the ProductSet should be created.
|
345
349
|
#
|
346
350
|
# Format is `projects/PROJECT_ID/locations/LOC_ID`.
|
347
|
-
# @param product_set [Google::Cloud::Vision::V1::ProductSet
|
351
|
+
# @param product_set [::Google::Cloud::Vision::V1::ProductSet, ::Hash]
|
348
352
|
# Required. The ProductSet to create.
|
349
|
-
# @param product_set_id [String]
|
353
|
+
# @param product_set_id [::String]
|
350
354
|
# A user-supplied resource id for this ProductSet. If set, the server will
|
351
355
|
# attempt to use this value as the resource id. If it is already in use, an
|
352
356
|
# error is returned with code ALREADY_EXISTS. Must be at most 128 characters
|
353
357
|
# long. It cannot contain the character `/`.
|
354
358
|
#
|
355
|
-
#
|
356
359
|
# @yield [response, operation] Access the result along with the RPC operation
|
357
|
-
# @yieldparam response [Google::Cloud::Vision::V1::ProductSet]
|
358
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
360
|
+
# @yieldparam response [::Google::Cloud::Vision::V1::ProductSet]
|
361
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
359
362
|
#
|
360
|
-
# @return [Google::Cloud::Vision::V1::ProductSet]
|
363
|
+
# @return [::Google::Cloud::Vision::V1::ProductSet]
|
361
364
|
#
|
362
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
365
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
363
366
|
#
|
364
367
|
def create_product_set request, options = nil
|
365
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
368
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
366
369
|
|
367
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::CreateProductSetRequest
|
370
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateProductSetRequest
|
368
371
|
|
369
372
|
# Converts hash and nil to an options object
|
370
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
373
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
371
374
|
|
372
375
|
# Customize the options with defaults
|
373
376
|
metadata = @config.rpcs.create_product_set.metadata.to_h
|
374
377
|
|
375
378
|
# Set x-goog-api-client and x-goog-user-project headers
|
376
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
379
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
377
380
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
378
381
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
379
382
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -394,8 +397,8 @@ module Google
|
|
394
397
|
yield response, operation if block_given?
|
395
398
|
return response
|
396
399
|
end
|
397
|
-
rescue GRPC::BadStatus => e
|
398
|
-
raise Google::Cloud::Error.from_error(e)
|
400
|
+
rescue ::GRPC::BadStatus => e
|
401
|
+
raise ::Google::Cloud::Error.from_error(e)
|
399
402
|
end
|
400
403
|
|
401
404
|
##
|
@@ -407,48 +410,50 @@ module Google
|
|
407
410
|
# than 1.
|
408
411
|
#
|
409
412
|
# @overload list_product_sets(request, options = nil)
|
410
|
-
#
|
411
|
-
#
|
412
|
-
#
|
413
|
-
# Possible errors:
|
413
|
+
# Pass arguments to `list_product_sets` via a request object, either of type
|
414
|
+
# {::Google::Cloud::Vision::V1::ListProductSetsRequest} or an equivalent Hash.
|
414
415
|
#
|
415
|
-
#
|
416
|
-
#
|
417
|
-
#
|
416
|
+
# @param request [::Google::Cloud::Vision::V1::ListProductSetsRequest, ::Hash]
|
417
|
+
# A request object representing the call parameters. Required. To specify no
|
418
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
419
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
418
420
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
419
421
|
#
|
420
422
|
# @overload list_product_sets(parent: nil, page_size: nil, page_token: nil)
|
421
|
-
#
|
423
|
+
# Pass arguments to `list_product_sets` via keyword arguments. Note that at
|
424
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
425
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
426
|
+
#
|
427
|
+
# @param parent [::String]
|
422
428
|
# Required. The project from which ProductSets should be listed.
|
423
429
|
#
|
424
430
|
# Format is `projects/PROJECT_ID/locations/LOC_ID`.
|
425
|
-
# @param page_size [Integer]
|
431
|
+
# @param page_size [::Integer]
|
426
432
|
# The maximum number of items to return. Default 10, maximum 100.
|
427
|
-
# @param page_token [String]
|
433
|
+
# @param page_token [::String]
|
428
434
|
# The next_page_token returned from a previous List request, if any.
|
429
435
|
#
|
430
|
-
#
|
431
436
|
# @yield [response, operation] Access the result along with the RPC operation
|
432
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
433
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
437
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ProductSet>]
|
438
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
434
439
|
#
|
435
|
-
# @return [Gapic::PagedEnumerable
|
440
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ProductSet>]
|
436
441
|
#
|
437
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
442
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
438
443
|
#
|
439
444
|
def list_product_sets request, options = nil
|
440
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
445
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
441
446
|
|
442
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::ListProductSetsRequest
|
447
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductSetsRequest
|
443
448
|
|
444
449
|
# Converts hash and nil to an options object
|
445
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
450
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
446
451
|
|
447
452
|
# Customize the options with defaults
|
448
453
|
metadata = @config.rpcs.list_product_sets.metadata.to_h
|
449
454
|
|
450
455
|
# Set x-goog-api-client and x-goog-user-project headers
|
451
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
456
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
452
457
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
453
458
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
454
459
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -466,12 +471,12 @@ module Google
|
|
466
471
|
retry_policy: @config.retry_policy
|
467
472
|
|
468
473
|
@product_search_stub.call_rpc :list_product_sets, request, options: options do |response, operation|
|
469
|
-
response = Gapic::PagedEnumerable.new @product_search_stub, :list_product_sets, request, response, operation, options
|
474
|
+
response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_product_sets, request, response, operation, options
|
470
475
|
yield response, operation if block_given?
|
471
476
|
return response
|
472
477
|
end
|
473
|
-
rescue GRPC::BadStatus => e
|
474
|
-
raise Google::Cloud::Error.from_error(e)
|
478
|
+
rescue ::GRPC::BadStatus => e
|
479
|
+
raise ::Google::Cloud::Error.from_error(e)
|
475
480
|
end
|
476
481
|
|
477
482
|
##
|
@@ -482,44 +487,47 @@ module Google
|
|
482
487
|
# * Returns NOT_FOUND if the ProductSet does not exist.
|
483
488
|
#
|
484
489
|
# @overload get_product_set(request, options = nil)
|
485
|
-
#
|
486
|
-
#
|
490
|
+
# Pass arguments to `get_product_set` via a request object, either of type
|
491
|
+
# {::Google::Cloud::Vision::V1::GetProductSetRequest} or an equivalent Hash.
|
487
492
|
#
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
# @param options [Gapic::CallOptions, Hash]
|
493
|
+
# @param request [::Google::Cloud::Vision::V1::GetProductSetRequest, ::Hash]
|
494
|
+
# A request object representing the call parameters. Required. To specify no
|
495
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
496
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
492
497
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
493
498
|
#
|
494
499
|
# @overload get_product_set(name: nil)
|
495
|
-
#
|
500
|
+
# Pass arguments to `get_product_set` via keyword arguments. Note that at
|
501
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
502
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
503
|
+
#
|
504
|
+
# @param name [::String]
|
496
505
|
# Required. Resource name of the ProductSet to get.
|
497
506
|
#
|
498
507
|
# Format is:
|
499
508
|
# `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID`
|
500
509
|
#
|
501
|
-
#
|
502
510
|
# @yield [response, operation] Access the result along with the RPC operation
|
503
|
-
# @yieldparam response [Google::Cloud::Vision::V1::ProductSet]
|
504
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
511
|
+
# @yieldparam response [::Google::Cloud::Vision::V1::ProductSet]
|
512
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
505
513
|
#
|
506
|
-
# @return [Google::Cloud::Vision::V1::ProductSet]
|
514
|
+
# @return [::Google::Cloud::Vision::V1::ProductSet]
|
507
515
|
#
|
508
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
516
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
509
517
|
#
|
510
518
|
def get_product_set request, options = nil
|
511
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
519
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
512
520
|
|
513
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::GetProductSetRequest
|
521
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetProductSetRequest
|
514
522
|
|
515
523
|
# Converts hash and nil to an options object
|
516
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
524
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
517
525
|
|
518
526
|
# Customize the options with defaults
|
519
527
|
metadata = @config.rpcs.get_product_set.metadata.to_h
|
520
528
|
|
521
529
|
# Set x-goog-api-client and x-goog-user-project headers
|
522
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
530
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
523
531
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
524
532
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
525
533
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -540,8 +548,8 @@ module Google
|
|
540
548
|
yield response, operation if block_given?
|
541
549
|
return response
|
542
550
|
end
|
543
|
-
rescue GRPC::BadStatus => e
|
544
|
-
raise Google::Cloud::Error.from_error(e)
|
551
|
+
rescue ::GRPC::BadStatus => e
|
552
|
+
raise ::Google::Cloud::Error.from_error(e)
|
545
553
|
end
|
546
554
|
|
547
555
|
##
|
@@ -555,49 +563,49 @@ module Google
|
|
555
563
|
# missing from the request or longer than 4096 characters.
|
556
564
|
#
|
557
565
|
# @overload update_product_set(request, options = nil)
|
558
|
-
#
|
559
|
-
#
|
560
|
-
# Only display_name can be updated currently.
|
561
|
-
#
|
562
|
-
# Possible errors:
|
566
|
+
# Pass arguments to `update_product_set` via a request object, either of type
|
567
|
+
# {::Google::Cloud::Vision::V1::UpdateProductSetRequest} or an equivalent Hash.
|
563
568
|
#
|
564
|
-
#
|
565
|
-
#
|
566
|
-
#
|
567
|
-
# @param options [Gapic::CallOptions, Hash]
|
569
|
+
# @param request [::Google::Cloud::Vision::V1::UpdateProductSetRequest, ::Hash]
|
570
|
+
# A request object representing the call parameters. Required. To specify no
|
571
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
572
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
568
573
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
569
574
|
#
|
570
575
|
# @overload update_product_set(product_set: nil, update_mask: nil)
|
571
|
-
#
|
576
|
+
# Pass arguments to `update_product_set` via keyword arguments. Note that at
|
577
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
578
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
579
|
+
#
|
580
|
+
# @param product_set [::Google::Cloud::Vision::V1::ProductSet, ::Hash]
|
572
581
|
# Required. The ProductSet resource which replaces the one on the server.
|
573
|
-
# @param update_mask [Google::Protobuf::FieldMask
|
574
|
-
# The {Google::Protobuf::FieldMask FieldMask} that specifies which fields to
|
582
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
583
|
+
# The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields to
|
575
584
|
# update.
|
576
585
|
# If update_mask isn't specified, all mutable fields are to be updated.
|
577
586
|
# Valid mask path is `display_name`.
|
578
587
|
#
|
579
|
-
#
|
580
588
|
# @yield [response, operation] Access the result along with the RPC operation
|
581
|
-
# @yieldparam response [Google::Cloud::Vision::V1::ProductSet]
|
582
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
589
|
+
# @yieldparam response [::Google::Cloud::Vision::V1::ProductSet]
|
590
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
583
591
|
#
|
584
|
-
# @return [Google::Cloud::Vision::V1::ProductSet]
|
592
|
+
# @return [::Google::Cloud::Vision::V1::ProductSet]
|
585
593
|
#
|
586
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
594
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
587
595
|
#
|
588
596
|
def update_product_set request, options = nil
|
589
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
597
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
590
598
|
|
591
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::UpdateProductSetRequest
|
599
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::UpdateProductSetRequest
|
592
600
|
|
593
601
|
# Converts hash and nil to an options object
|
594
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
602
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
595
603
|
|
596
604
|
# Customize the options with defaults
|
597
605
|
metadata = @config.rpcs.update_product_set.metadata.to_h
|
598
606
|
|
599
607
|
# Set x-goog-api-client and x-goog-user-project headers
|
600
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
608
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
601
609
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
602
610
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
603
611
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -618,8 +626,8 @@ module Google
|
|
618
626
|
yield response, operation if block_given?
|
619
627
|
return response
|
620
628
|
end
|
621
|
-
rescue GRPC::BadStatus => e
|
622
|
-
raise Google::Cloud::Error.from_error(e)
|
629
|
+
rescue ::GRPC::BadStatus => e
|
630
|
+
raise ::Google::Cloud::Error.from_error(e)
|
623
631
|
end
|
624
632
|
|
625
633
|
##
|
@@ -629,43 +637,47 @@ module Google
|
|
629
637
|
# The actual image files are not deleted from Google Cloud Storage.
|
630
638
|
#
|
631
639
|
# @overload delete_product_set(request, options = nil)
|
632
|
-
#
|
633
|
-
#
|
634
|
-
# ProductSet are not deleted.
|
640
|
+
# Pass arguments to `delete_product_set` via a request object, either of type
|
641
|
+
# {::Google::Cloud::Vision::V1::DeleteProductSetRequest} or an equivalent Hash.
|
635
642
|
#
|
636
|
-
#
|
637
|
-
#
|
643
|
+
# @param request [::Google::Cloud::Vision::V1::DeleteProductSetRequest, ::Hash]
|
644
|
+
# A request object representing the call parameters. Required. To specify no
|
645
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
646
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
638
647
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
639
648
|
#
|
640
649
|
# @overload delete_product_set(name: nil)
|
641
|
-
#
|
650
|
+
# Pass arguments to `delete_product_set` via keyword arguments. Note that at
|
651
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
652
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
653
|
+
#
|
654
|
+
# @param name [::String]
|
642
655
|
# Required. Resource name of the ProductSet to delete.
|
643
656
|
#
|
644
657
|
# Format is:
|
645
658
|
# `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
|
646
659
|
#
|
647
|
-
#
|
648
660
|
# @yield [response, operation] Access the result along with the RPC operation
|
649
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
650
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
661
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
662
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
651
663
|
#
|
652
|
-
# @return [Google::Protobuf::Empty]
|
664
|
+
# @return [::Google::Protobuf::Empty]
|
653
665
|
#
|
654
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
666
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
655
667
|
#
|
656
668
|
def delete_product_set request, options = nil
|
657
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
669
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
658
670
|
|
659
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::DeleteProductSetRequest
|
671
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteProductSetRequest
|
660
672
|
|
661
673
|
# Converts hash and nil to an options object
|
662
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
674
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
663
675
|
|
664
676
|
# Customize the options with defaults
|
665
677
|
metadata = @config.rpcs.delete_product_set.metadata.to_h
|
666
678
|
|
667
679
|
# Set x-goog-api-client and x-goog-user-project headers
|
668
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
680
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
669
681
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
670
682
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
671
683
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -686,8 +698,8 @@ module Google
|
|
686
698
|
yield response, operation if block_given?
|
687
699
|
return response
|
688
700
|
end
|
689
|
-
rescue GRPC::BadStatus => e
|
690
|
-
raise Google::Cloud::Error.from_error(e)
|
701
|
+
rescue ::GRPC::BadStatus => e
|
702
|
+
raise ::Google::Cloud::Error.from_error(e)
|
691
703
|
end
|
692
704
|
|
693
705
|
##
|
@@ -701,54 +713,54 @@ module Google
|
|
701
713
|
# * Returns INVALID_ARGUMENT if product_category is missing or invalid.
|
702
714
|
#
|
703
715
|
# @overload create_product(request, options = nil)
|
704
|
-
#
|
705
|
-
#
|
716
|
+
# Pass arguments to `create_product` via a request object, either of type
|
717
|
+
# {::Google::Cloud::Vision::V1::CreateProductRequest} or an equivalent Hash.
|
706
718
|
#
|
707
|
-
#
|
708
|
-
#
|
709
|
-
#
|
710
|
-
#
|
711
|
-
# * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
|
712
|
-
# * Returns INVALID_ARGUMENT if product_category is missing or invalid.
|
713
|
-
# @param options [Gapic::CallOptions, Hash]
|
719
|
+
# @param request [::Google::Cloud::Vision::V1::CreateProductRequest, ::Hash]
|
720
|
+
# A request object representing the call parameters. Required. To specify no
|
721
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
722
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
714
723
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
715
724
|
#
|
716
725
|
# @overload create_product(parent: nil, product: nil, product_id: nil)
|
717
|
-
#
|
726
|
+
# Pass arguments to `create_product` via keyword arguments. Note that at
|
727
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
728
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
729
|
+
#
|
730
|
+
# @param parent [::String]
|
718
731
|
# Required. The project in which the Product should be created.
|
719
732
|
#
|
720
733
|
# Format is
|
721
734
|
# `projects/PROJECT_ID/locations/LOC_ID`.
|
722
|
-
# @param product [Google::Cloud::Vision::V1::Product
|
735
|
+
# @param product [::Google::Cloud::Vision::V1::Product, ::Hash]
|
723
736
|
# Required. The product to create.
|
724
|
-
# @param product_id [String]
|
737
|
+
# @param product_id [::String]
|
725
738
|
# A user-supplied resource id for this Product. If set, the server will
|
726
739
|
# attempt to use this value as the resource id. If it is already in use, an
|
727
740
|
# error is returned with code ALREADY_EXISTS. Must be at most 128 characters
|
728
741
|
# long. It cannot contain the character `/`.
|
729
742
|
#
|
730
|
-
#
|
731
743
|
# @yield [response, operation] Access the result along with the RPC operation
|
732
|
-
# @yieldparam response [Google::Cloud::Vision::V1::Product]
|
733
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
744
|
+
# @yieldparam response [::Google::Cloud::Vision::V1::Product]
|
745
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
734
746
|
#
|
735
|
-
# @return [Google::Cloud::Vision::V1::Product]
|
747
|
+
# @return [::Google::Cloud::Vision::V1::Product]
|
736
748
|
#
|
737
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
749
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
738
750
|
#
|
739
751
|
def create_product request, options = nil
|
740
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
752
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
741
753
|
|
742
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::CreateProductRequest
|
754
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateProductRequest
|
743
755
|
|
744
756
|
# Converts hash and nil to an options object
|
745
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
757
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
746
758
|
|
747
759
|
# Customize the options with defaults
|
748
760
|
metadata = @config.rpcs.create_product.metadata.to_h
|
749
761
|
|
750
762
|
# Set x-goog-api-client and x-goog-user-project headers
|
751
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
763
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
752
764
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
753
765
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
754
766
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -769,8 +781,8 @@ module Google
|
|
769
781
|
yield response, operation if block_given?
|
770
782
|
return response
|
771
783
|
end
|
772
|
-
rescue GRPC::BadStatus => e
|
773
|
-
raise Google::Cloud::Error.from_error(e)
|
784
|
+
rescue ::GRPC::BadStatus => e
|
785
|
+
raise ::Google::Cloud::Error.from_error(e)
|
774
786
|
end
|
775
787
|
|
776
788
|
##
|
@@ -781,48 +793,51 @@ module Google
|
|
781
793
|
# * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
|
782
794
|
#
|
783
795
|
# @overload list_products(request, options = nil)
|
784
|
-
#
|
785
|
-
#
|
786
|
-
#
|
787
|
-
# Possible errors:
|
796
|
+
# Pass arguments to `list_products` via a request object, either of type
|
797
|
+
# {::Google::Cloud::Vision::V1::ListProductsRequest} or an equivalent Hash.
|
788
798
|
#
|
789
|
-
#
|
790
|
-
#
|
799
|
+
# @param request [::Google::Cloud::Vision::V1::ListProductsRequest, ::Hash]
|
800
|
+
# A request object representing the call parameters. Required. To specify no
|
801
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
802
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
791
803
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
792
804
|
#
|
793
805
|
# @overload list_products(parent: nil, page_size: nil, page_token: nil)
|
794
|
-
#
|
806
|
+
# Pass arguments to `list_products` via keyword arguments. Note that at
|
807
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
808
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
809
|
+
#
|
810
|
+
# @param parent [::String]
|
795
811
|
# Required. The project OR ProductSet from which Products should be listed.
|
796
812
|
#
|
797
813
|
# Format:
|
798
814
|
# `projects/PROJECT_ID/locations/LOC_ID`
|
799
|
-
# @param page_size [Integer]
|
815
|
+
# @param page_size [::Integer]
|
800
816
|
# The maximum number of items to return. Default 10, maximum 100.
|
801
|
-
# @param page_token [String]
|
817
|
+
# @param page_token [::String]
|
802
818
|
# The next_page_token returned from a previous List request, if any.
|
803
819
|
#
|
804
|
-
#
|
805
820
|
# @yield [response, operation] Access the result along with the RPC operation
|
806
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
807
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
821
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>]
|
822
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
808
823
|
#
|
809
|
-
# @return [Gapic::PagedEnumerable
|
824
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>]
|
810
825
|
#
|
811
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
826
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
812
827
|
#
|
813
828
|
def list_products request, options = nil
|
814
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
829
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
815
830
|
|
816
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::ListProductsRequest
|
831
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductsRequest
|
817
832
|
|
818
833
|
# Converts hash and nil to an options object
|
819
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
834
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
820
835
|
|
821
836
|
# Customize the options with defaults
|
822
837
|
metadata = @config.rpcs.list_products.metadata.to_h
|
823
838
|
|
824
839
|
# Set x-goog-api-client and x-goog-user-project headers
|
825
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
840
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
826
841
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
827
842
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
828
843
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -840,12 +855,12 @@ module Google
|
|
840
855
|
retry_policy: @config.retry_policy
|
841
856
|
|
842
857
|
@product_search_stub.call_rpc :list_products, request, options: options do |response, operation|
|
843
|
-
response = Gapic::PagedEnumerable.new @product_search_stub, :list_products, request, response, operation, options
|
858
|
+
response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_products, request, response, operation, options
|
844
859
|
yield response, operation if block_given?
|
845
860
|
return response
|
846
861
|
end
|
847
|
-
rescue GRPC::BadStatus => e
|
848
|
-
raise Google::Cloud::Error.from_error(e)
|
862
|
+
rescue ::GRPC::BadStatus => e
|
863
|
+
raise ::Google::Cloud::Error.from_error(e)
|
849
864
|
end
|
850
865
|
|
851
866
|
##
|
@@ -856,44 +871,47 @@ module Google
|
|
856
871
|
# * Returns NOT_FOUND if the Product does not exist.
|
857
872
|
#
|
858
873
|
# @overload get_product(request, options = nil)
|
859
|
-
#
|
860
|
-
#
|
874
|
+
# Pass arguments to `get_product` via a request object, either of type
|
875
|
+
# {::Google::Cloud::Vision::V1::GetProductRequest} or an equivalent Hash.
|
861
876
|
#
|
862
|
-
#
|
863
|
-
#
|
864
|
-
#
|
865
|
-
# @param options [Gapic::CallOptions, Hash]
|
877
|
+
# @param request [::Google::Cloud::Vision::V1::GetProductRequest, ::Hash]
|
878
|
+
# A request object representing the call parameters. Required. To specify no
|
879
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
880
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
866
881
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
867
882
|
#
|
868
883
|
# @overload get_product(name: nil)
|
869
|
-
#
|
884
|
+
# Pass arguments to `get_product` via keyword arguments. Note that at
|
885
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
886
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
887
|
+
#
|
888
|
+
# @param name [::String]
|
870
889
|
# Required. Resource name of the Product to get.
|
871
890
|
#
|
872
891
|
# Format is:
|
873
892
|
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
|
874
893
|
#
|
875
|
-
#
|
876
894
|
# @yield [response, operation] Access the result along with the RPC operation
|
877
|
-
# @yieldparam response [Google::Cloud::Vision::V1::Product]
|
878
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
895
|
+
# @yieldparam response [::Google::Cloud::Vision::V1::Product]
|
896
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
879
897
|
#
|
880
|
-
# @return [Google::Cloud::Vision::V1::Product]
|
898
|
+
# @return [::Google::Cloud::Vision::V1::Product]
|
881
899
|
#
|
882
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
900
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
883
901
|
#
|
884
902
|
def get_product request, options = nil
|
885
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
903
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
886
904
|
|
887
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::GetProductRequest
|
905
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetProductRequest
|
888
906
|
|
889
907
|
# Converts hash and nil to an options object
|
890
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
908
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
891
909
|
|
892
910
|
# Customize the options with defaults
|
893
911
|
metadata = @config.rpcs.get_product.metadata.to_h
|
894
912
|
|
895
913
|
# Set x-goog-api-client and x-goog-user-project headers
|
896
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
914
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
897
915
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
898
916
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
899
917
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -914,8 +932,8 @@ module Google
|
|
914
932
|
yield response, operation if block_given?
|
915
933
|
return response
|
916
934
|
end
|
917
|
-
rescue GRPC::BadStatus => e
|
918
|
-
raise Google::Cloud::Error.from_error(e)
|
935
|
+
rescue ::GRPC::BadStatus => e
|
936
|
+
raise ::Google::Cloud::Error.from_error(e)
|
919
937
|
end
|
920
938
|
|
921
939
|
##
|
@@ -936,58 +954,51 @@ module Google
|
|
936
954
|
# * Returns INVALID_ARGUMENT if product_category is present in update_mask.
|
937
955
|
#
|
938
956
|
# @overload update_product(request, options = nil)
|
939
|
-
#
|
940
|
-
#
|
941
|
-
#
|
942
|
-
#
|
943
|
-
#
|
944
|
-
#
|
945
|
-
#
|
946
|
-
#
|
947
|
-
# Possible errors:
|
948
|
-
#
|
949
|
-
# * Returns NOT_FOUND if the Product does not exist.
|
950
|
-
# * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
|
951
|
-
# missing from the request or longer than 4096 characters.
|
952
|
-
# * Returns INVALID_ARGUMENT if description is present in update_mask but is
|
953
|
-
# longer than 4096 characters.
|
954
|
-
# * Returns INVALID_ARGUMENT if product_category is present in update_mask.
|
955
|
-
# @param options [Gapic::CallOptions, Hash]
|
957
|
+
# Pass arguments to `update_product` via a request object, either of type
|
958
|
+
# {::Google::Cloud::Vision::V1::UpdateProductRequest} or an equivalent Hash.
|
959
|
+
#
|
960
|
+
# @param request [::Google::Cloud::Vision::V1::UpdateProductRequest, ::Hash]
|
961
|
+
# A request object representing the call parameters. Required. To specify no
|
962
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
963
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
956
964
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
957
965
|
#
|
958
966
|
# @overload update_product(product: nil, update_mask: nil)
|
959
|
-
#
|
967
|
+
# Pass arguments to `update_product` via keyword arguments. Note that at
|
968
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
969
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
970
|
+
#
|
971
|
+
# @param product [::Google::Cloud::Vision::V1::Product, ::Hash]
|
960
972
|
# Required. The Product resource which replaces the one on the server.
|
961
973
|
# product.name is immutable.
|
962
|
-
# @param update_mask [Google::Protobuf::FieldMask
|
963
|
-
# The {Google::Protobuf::FieldMask FieldMask} that specifies which fields
|
974
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
975
|
+
# The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields
|
964
976
|
# to update.
|
965
977
|
# If update_mask isn't specified, all mutable fields are to be updated.
|
966
978
|
# Valid mask paths include `product_labels`, `display_name`, and
|
967
979
|
# `description`.
|
968
980
|
#
|
969
|
-
#
|
970
981
|
# @yield [response, operation] Access the result along with the RPC operation
|
971
|
-
# @yieldparam response [Google::Cloud::Vision::V1::Product]
|
972
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
982
|
+
# @yieldparam response [::Google::Cloud::Vision::V1::Product]
|
983
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
973
984
|
#
|
974
|
-
# @return [Google::Cloud::Vision::V1::Product]
|
985
|
+
# @return [::Google::Cloud::Vision::V1::Product]
|
975
986
|
#
|
976
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
987
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
977
988
|
#
|
978
989
|
def update_product request, options = nil
|
979
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
990
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
980
991
|
|
981
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::UpdateProductRequest
|
992
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::UpdateProductRequest
|
982
993
|
|
983
994
|
# Converts hash and nil to an options object
|
984
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
995
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
985
996
|
|
986
997
|
# Customize the options with defaults
|
987
998
|
metadata = @config.rpcs.update_product.metadata.to_h
|
988
999
|
|
989
1000
|
# Set x-goog-api-client and x-goog-user-project headers
|
990
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1001
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
991
1002
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
992
1003
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
993
1004
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1008,8 +1019,8 @@ module Google
|
|
1008
1019
|
yield response, operation if block_given?
|
1009
1020
|
return response
|
1010
1021
|
end
|
1011
|
-
rescue GRPC::BadStatus => e
|
1012
|
-
raise Google::Cloud::Error.from_error(e)
|
1022
|
+
rescue ::GRPC::BadStatus => e
|
1023
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1013
1024
|
end
|
1014
1025
|
|
1015
1026
|
##
|
@@ -1020,44 +1031,47 @@ module Google
|
|
1020
1031
|
# until all related caches are refreshed.
|
1021
1032
|
#
|
1022
1033
|
# @overload delete_product(request, options = nil)
|
1023
|
-
#
|
1024
|
-
#
|
1034
|
+
# Pass arguments to `delete_product` via a request object, either of type
|
1035
|
+
# {::Google::Cloud::Vision::V1::DeleteProductRequest} or an equivalent Hash.
|
1025
1036
|
#
|
1026
|
-
#
|
1027
|
-
#
|
1028
|
-
#
|
1029
|
-
# @param options [Gapic::CallOptions, Hash]
|
1037
|
+
# @param request [::Google::Cloud::Vision::V1::DeleteProductRequest, ::Hash]
|
1038
|
+
# A request object representing the call parameters. Required. To specify no
|
1039
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1040
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1030
1041
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1031
1042
|
#
|
1032
1043
|
# @overload delete_product(name: nil)
|
1033
|
-
#
|
1044
|
+
# Pass arguments to `delete_product` via keyword arguments. Note that at
|
1045
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1046
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1047
|
+
#
|
1048
|
+
# @param name [::String]
|
1034
1049
|
# Required. Resource name of product to delete.
|
1035
1050
|
#
|
1036
1051
|
# Format is:
|
1037
1052
|
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
|
1038
1053
|
#
|
1039
|
-
#
|
1040
1054
|
# @yield [response, operation] Access the result along with the RPC operation
|
1041
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
1042
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1055
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1056
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1043
1057
|
#
|
1044
|
-
# @return [Google::Protobuf::Empty]
|
1058
|
+
# @return [::Google::Protobuf::Empty]
|
1045
1059
|
#
|
1046
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1060
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1047
1061
|
#
|
1048
1062
|
def delete_product request, options = nil
|
1049
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1063
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1050
1064
|
|
1051
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::DeleteProductRequest
|
1065
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteProductRequest
|
1052
1066
|
|
1053
1067
|
# Converts hash and nil to an options object
|
1054
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1068
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1055
1069
|
|
1056
1070
|
# Customize the options with defaults
|
1057
1071
|
metadata = @config.rpcs.delete_product.metadata.to_h
|
1058
1072
|
|
1059
1073
|
# Set x-goog-api-client and x-goog-user-project headers
|
1060
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1074
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1061
1075
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1062
1076
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1063
1077
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1078,8 +1092,8 @@ module Google
|
|
1078
1092
|
yield response, operation if block_given?
|
1079
1093
|
return response
|
1080
1094
|
end
|
1081
|
-
rescue GRPC::BadStatus => e
|
1082
|
-
raise Google::Cloud::Error.from_error(e)
|
1095
|
+
rescue ::GRPC::BadStatus => e
|
1096
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1083
1097
|
end
|
1084
1098
|
|
1085
1099
|
##
|
@@ -1104,66 +1118,55 @@ module Google
|
|
1104
1118
|
# * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
|
1105
1119
|
#
|
1106
1120
|
# @overload create_reference_image(request, options = nil)
|
1107
|
-
#
|
1108
|
-
#
|
1109
|
-
#
|
1110
|
-
#
|
1111
|
-
#
|
1112
|
-
#
|
1113
|
-
#
|
1114
|
-
# non-rotated rectangles.
|
1115
|
-
#
|
1116
|
-
# Note that the pipeline will resize the image if the image resolution is too
|
1117
|
-
# large to process (above 50MP).
|
1118
|
-
#
|
1119
|
-
# Possible errors:
|
1120
|
-
#
|
1121
|
-
# * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
|
1122
|
-
# characters.
|
1123
|
-
# * Returns INVALID_ARGUMENT if the product does not exist.
|
1124
|
-
# * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
|
1125
|
-
# compatible with the parent product's product_category is detected.
|
1126
|
-
# * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
|
1127
|
-
# @param options [Gapic::CallOptions, Hash]
|
1121
|
+
# Pass arguments to `create_reference_image` via a request object, either of type
|
1122
|
+
# {::Google::Cloud::Vision::V1::CreateReferenceImageRequest} or an equivalent Hash.
|
1123
|
+
#
|
1124
|
+
# @param request [::Google::Cloud::Vision::V1::CreateReferenceImageRequest, ::Hash]
|
1125
|
+
# A request object representing the call parameters. Required. To specify no
|
1126
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1127
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1128
1128
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1129
1129
|
#
|
1130
1130
|
# @overload create_reference_image(parent: nil, reference_image: nil, reference_image_id: nil)
|
1131
|
-
#
|
1131
|
+
# Pass arguments to `create_reference_image` via keyword arguments. Note that at
|
1132
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1133
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1134
|
+
#
|
1135
|
+
# @param parent [::String]
|
1132
1136
|
# Required. Resource name of the product in which to create the reference image.
|
1133
1137
|
#
|
1134
1138
|
# Format is
|
1135
1139
|
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
|
1136
|
-
# @param reference_image [Google::Cloud::Vision::V1::ReferenceImage
|
1140
|
+
# @param reference_image [::Google::Cloud::Vision::V1::ReferenceImage, ::Hash]
|
1137
1141
|
# Required. The reference image to create.
|
1138
1142
|
# If an image ID is specified, it is ignored.
|
1139
|
-
# @param reference_image_id [String]
|
1143
|
+
# @param reference_image_id [::String]
|
1140
1144
|
# A user-supplied resource id for the ReferenceImage to be added. If set,
|
1141
1145
|
# the server will attempt to use this value as the resource id. If it is
|
1142
1146
|
# already in use, an error is returned with code ALREADY_EXISTS. Must be at
|
1143
1147
|
# most 128 characters long. It cannot contain the character `/`.
|
1144
1148
|
#
|
1145
|
-
#
|
1146
1149
|
# @yield [response, operation] Access the result along with the RPC operation
|
1147
|
-
# @yieldparam response [Google::Cloud::Vision::V1::ReferenceImage]
|
1148
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1150
|
+
# @yieldparam response [::Google::Cloud::Vision::V1::ReferenceImage]
|
1151
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1149
1152
|
#
|
1150
|
-
# @return [Google::Cloud::Vision::V1::ReferenceImage]
|
1153
|
+
# @return [::Google::Cloud::Vision::V1::ReferenceImage]
|
1151
1154
|
#
|
1152
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1155
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1153
1156
|
#
|
1154
1157
|
def create_reference_image request, options = nil
|
1155
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1158
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1156
1159
|
|
1157
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::CreateReferenceImageRequest
|
1160
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::CreateReferenceImageRequest
|
1158
1161
|
|
1159
1162
|
# Converts hash and nil to an options object
|
1160
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1163
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1161
1164
|
|
1162
1165
|
# Customize the options with defaults
|
1163
1166
|
metadata = @config.rpcs.create_reference_image.metadata.to_h
|
1164
1167
|
|
1165
1168
|
# Set x-goog-api-client and x-goog-user-project headers
|
1166
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1169
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1167
1170
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1168
1171
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1169
1172
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1184,8 +1187,8 @@ module Google
|
|
1184
1187
|
yield response, operation if block_given?
|
1185
1188
|
return response
|
1186
1189
|
end
|
1187
|
-
rescue GRPC::BadStatus => e
|
1188
|
-
raise Google::Cloud::Error.from_error(e)
|
1190
|
+
rescue ::GRPC::BadStatus => e
|
1191
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1189
1192
|
end
|
1190
1193
|
|
1191
1194
|
##
|
@@ -1198,47 +1201,48 @@ module Google
|
|
1198
1201
|
# The actual image files are not deleted from Google Cloud Storage.
|
1199
1202
|
#
|
1200
1203
|
# @overload delete_reference_image(request, options = nil)
|
1201
|
-
#
|
1202
|
-
#
|
1203
|
-
#
|
1204
|
-
# The image metadata will be deleted right away, but search queries
|
1205
|
-
# against ProductSets containing the image may still work until all related
|
1206
|
-
# caches are refreshed.
|
1204
|
+
# Pass arguments to `delete_reference_image` via a request object, either of type
|
1205
|
+
# {::Google::Cloud::Vision::V1::DeleteReferenceImageRequest} or an equivalent Hash.
|
1207
1206
|
#
|
1208
|
-
#
|
1209
|
-
#
|
1207
|
+
# @param request [::Google::Cloud::Vision::V1::DeleteReferenceImageRequest, ::Hash]
|
1208
|
+
# A request object representing the call parameters. Required. To specify no
|
1209
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1210
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1210
1211
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1211
1212
|
#
|
1212
1213
|
# @overload delete_reference_image(name: nil)
|
1213
|
-
#
|
1214
|
+
# Pass arguments to `delete_reference_image` via keyword arguments. Note that at
|
1215
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1216
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1217
|
+
#
|
1218
|
+
# @param name [::String]
|
1214
1219
|
# Required. The resource name of the reference image to delete.
|
1215
1220
|
#
|
1216
1221
|
# Format is:
|
1217
1222
|
#
|
1218
1223
|
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
|
1219
1224
|
#
|
1220
|
-
#
|
1221
1225
|
# @yield [response, operation] Access the result along with the RPC operation
|
1222
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
1223
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1226
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1227
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1224
1228
|
#
|
1225
|
-
# @return [Google::Protobuf::Empty]
|
1229
|
+
# @return [::Google::Protobuf::Empty]
|
1226
1230
|
#
|
1227
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1231
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1228
1232
|
#
|
1229
1233
|
def delete_reference_image request, options = nil
|
1230
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1234
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1231
1235
|
|
1232
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::DeleteReferenceImageRequest
|
1236
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::DeleteReferenceImageRequest
|
1233
1237
|
|
1234
1238
|
# Converts hash and nil to an options object
|
1235
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1239
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1236
1240
|
|
1237
1241
|
# Customize the options with defaults
|
1238
1242
|
metadata = @config.rpcs.delete_reference_image.metadata.to_h
|
1239
1243
|
|
1240
1244
|
# Set x-goog-api-client and x-goog-user-project headers
|
1241
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1245
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1242
1246
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1243
1247
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1244
1248
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1259,8 +1263,8 @@ module Google
|
|
1259
1263
|
yield response, operation if block_given?
|
1260
1264
|
return response
|
1261
1265
|
end
|
1262
|
-
rescue GRPC::BadStatus => e
|
1263
|
-
raise Google::Cloud::Error.from_error(e)
|
1266
|
+
rescue ::GRPC::BadStatus => e
|
1267
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1264
1268
|
end
|
1265
1269
|
|
1266
1270
|
##
|
@@ -1273,53 +1277,54 @@ module Google
|
|
1273
1277
|
# than 1.
|
1274
1278
|
#
|
1275
1279
|
# @overload list_reference_images(request, options = nil)
|
1276
|
-
#
|
1277
|
-
#
|
1280
|
+
# Pass arguments to `list_reference_images` via a request object, either of type
|
1281
|
+
# {::Google::Cloud::Vision::V1::ListReferenceImagesRequest} or an equivalent Hash.
|
1278
1282
|
#
|
1279
|
-
#
|
1280
|
-
#
|
1281
|
-
#
|
1282
|
-
#
|
1283
|
-
# than 1.
|
1284
|
-
# @param options [Gapic::CallOptions, Hash]
|
1283
|
+
# @param request [::Google::Cloud::Vision::V1::ListReferenceImagesRequest, ::Hash]
|
1284
|
+
# A request object representing the call parameters. Required. To specify no
|
1285
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1286
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1285
1287
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1286
1288
|
#
|
1287
1289
|
# @overload list_reference_images(parent: nil, page_size: nil, page_token: nil)
|
1288
|
-
#
|
1290
|
+
# Pass arguments to `list_reference_images` via keyword arguments. Note that at
|
1291
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1292
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1293
|
+
#
|
1294
|
+
# @param parent [::String]
|
1289
1295
|
# Required. Resource name of the product containing the reference images.
|
1290
1296
|
#
|
1291
1297
|
# Format is
|
1292
1298
|
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
|
1293
|
-
# @param page_size [Integer]
|
1299
|
+
# @param page_size [::Integer]
|
1294
1300
|
# The maximum number of items to return. Default 10, maximum 100.
|
1295
|
-
# @param page_token [String]
|
1301
|
+
# @param page_token [::String]
|
1296
1302
|
# A token identifying a page of results to be returned. This is the value
|
1297
1303
|
# of `nextPageToken` returned in a previous reference image list request.
|
1298
1304
|
#
|
1299
1305
|
# Defaults to the first page if not specified.
|
1300
1306
|
#
|
1301
|
-
#
|
1302
1307
|
# @yield [response, operation] Access the result along with the RPC operation
|
1303
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
1304
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1308
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ReferenceImage>]
|
1309
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1305
1310
|
#
|
1306
|
-
# @return [Gapic::PagedEnumerable
|
1311
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::ReferenceImage>]
|
1307
1312
|
#
|
1308
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1313
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1309
1314
|
#
|
1310
1315
|
def list_reference_images request, options = nil
|
1311
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1316
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1312
1317
|
|
1313
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::ListReferenceImagesRequest
|
1318
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListReferenceImagesRequest
|
1314
1319
|
|
1315
1320
|
# Converts hash and nil to an options object
|
1316
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1321
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1317
1322
|
|
1318
1323
|
# Customize the options with defaults
|
1319
1324
|
metadata = @config.rpcs.list_reference_images.metadata.to_h
|
1320
1325
|
|
1321
1326
|
# Set x-goog-api-client and x-goog-user-project headers
|
1322
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1327
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1323
1328
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1324
1329
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1325
1330
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1337,12 +1342,12 @@ module Google
|
|
1337
1342
|
retry_policy: @config.retry_policy
|
1338
1343
|
|
1339
1344
|
@product_search_stub.call_rpc :list_reference_images, request, options: options do |response, operation|
|
1340
|
-
response = Gapic::PagedEnumerable.new @product_search_stub, :list_reference_images, request, response, operation, options
|
1345
|
+
response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_reference_images, request, response, operation, options
|
1341
1346
|
yield response, operation if block_given?
|
1342
1347
|
return response
|
1343
1348
|
end
|
1344
|
-
rescue GRPC::BadStatus => e
|
1345
|
-
raise Google::Cloud::Error.from_error(e)
|
1349
|
+
rescue ::GRPC::BadStatus => e
|
1350
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1346
1351
|
end
|
1347
1352
|
|
1348
1353
|
##
|
@@ -1353,45 +1358,48 @@ module Google
|
|
1353
1358
|
# * Returns NOT_FOUND if the specified image does not exist.
|
1354
1359
|
#
|
1355
1360
|
# @overload get_reference_image(request, options = nil)
|
1356
|
-
#
|
1357
|
-
#
|
1358
|
-
#
|
1359
|
-
# Possible errors:
|
1361
|
+
# Pass arguments to `get_reference_image` via a request object, either of type
|
1362
|
+
# {::Google::Cloud::Vision::V1::GetReferenceImageRequest} or an equivalent Hash.
|
1360
1363
|
#
|
1361
|
-
#
|
1362
|
-
#
|
1364
|
+
# @param request [::Google::Cloud::Vision::V1::GetReferenceImageRequest, ::Hash]
|
1365
|
+
# A request object representing the call parameters. Required. To specify no
|
1366
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1367
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1363
1368
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1364
1369
|
#
|
1365
1370
|
# @overload get_reference_image(name: nil)
|
1366
|
-
#
|
1371
|
+
# Pass arguments to `get_reference_image` via keyword arguments. Note that at
|
1372
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1373
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1374
|
+
#
|
1375
|
+
# @param name [::String]
|
1367
1376
|
# Required. The resource name of the ReferenceImage to get.
|
1368
1377
|
#
|
1369
1378
|
# Format is:
|
1370
1379
|
#
|
1371
1380
|
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
|
1372
1381
|
#
|
1373
|
-
#
|
1374
1382
|
# @yield [response, operation] Access the result along with the RPC operation
|
1375
|
-
# @yieldparam response [Google::Cloud::Vision::V1::ReferenceImage]
|
1376
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1383
|
+
# @yieldparam response [::Google::Cloud::Vision::V1::ReferenceImage]
|
1384
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1377
1385
|
#
|
1378
|
-
# @return [Google::Cloud::Vision::V1::ReferenceImage]
|
1386
|
+
# @return [::Google::Cloud::Vision::V1::ReferenceImage]
|
1379
1387
|
#
|
1380
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1388
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1381
1389
|
#
|
1382
1390
|
def get_reference_image request, options = nil
|
1383
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1391
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1384
1392
|
|
1385
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::GetReferenceImageRequest
|
1393
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::GetReferenceImageRequest
|
1386
1394
|
|
1387
1395
|
# Converts hash and nil to an options object
|
1388
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1396
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1389
1397
|
|
1390
1398
|
# Customize the options with defaults
|
1391
1399
|
metadata = @config.rpcs.get_reference_image.metadata.to_h
|
1392
1400
|
|
1393
1401
|
# Set x-goog-api-client and x-goog-user-project headers
|
1394
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1402
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1395
1403
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1396
1404
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1397
1405
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1412,8 +1420,8 @@ module Google
|
|
1412
1420
|
yield response, operation if block_given?
|
1413
1421
|
return response
|
1414
1422
|
end
|
1415
|
-
rescue GRPC::BadStatus => e
|
1416
|
-
raise Google::Cloud::Error.from_error(e)
|
1423
|
+
rescue ::GRPC::BadStatus => e
|
1424
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1417
1425
|
end
|
1418
1426
|
|
1419
1427
|
##
|
@@ -1427,52 +1435,52 @@ module Google
|
|
1427
1435
|
# * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
|
1428
1436
|
#
|
1429
1437
|
# @overload add_product_to_product_set(request, options = nil)
|
1430
|
-
#
|
1431
|
-
#
|
1432
|
-
# present, no change is made.
|
1438
|
+
# Pass arguments to `add_product_to_product_set` via a request object, either of type
|
1439
|
+
# {::Google::Cloud::Vision::V1::AddProductToProductSetRequest} or an equivalent Hash.
|
1433
1440
|
#
|
1434
|
-
#
|
1435
|
-
#
|
1436
|
-
#
|
1437
|
-
#
|
1438
|
-
# * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
|
1439
|
-
# @param options [Gapic::CallOptions, Hash]
|
1441
|
+
# @param request [::Google::Cloud::Vision::V1::AddProductToProductSetRequest, ::Hash]
|
1442
|
+
# A request object representing the call parameters. Required. To specify no
|
1443
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1444
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1440
1445
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1441
1446
|
#
|
1442
1447
|
# @overload add_product_to_product_set(name: nil, product: nil)
|
1443
|
-
#
|
1448
|
+
# Pass arguments to `add_product_to_product_set` via keyword arguments. Note that at
|
1449
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1450
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1451
|
+
#
|
1452
|
+
# @param name [::String]
|
1444
1453
|
# Required. The resource name for the ProductSet to modify.
|
1445
1454
|
#
|
1446
1455
|
# Format is:
|
1447
1456
|
# `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
|
1448
|
-
# @param product [String]
|
1457
|
+
# @param product [::String]
|
1449
1458
|
# Required. The resource name for the Product to be added to this ProductSet.
|
1450
1459
|
#
|
1451
1460
|
# Format is:
|
1452
1461
|
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
|
1453
1462
|
#
|
1454
|
-
#
|
1455
1463
|
# @yield [response, operation] Access the result along with the RPC operation
|
1456
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
1457
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1464
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1465
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1458
1466
|
#
|
1459
|
-
# @return [Google::Protobuf::Empty]
|
1467
|
+
# @return [::Google::Protobuf::Empty]
|
1460
1468
|
#
|
1461
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1469
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1462
1470
|
#
|
1463
1471
|
def add_product_to_product_set request, options = nil
|
1464
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1472
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1465
1473
|
|
1466
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::AddProductToProductSetRequest
|
1474
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::AddProductToProductSetRequest
|
1467
1475
|
|
1468
1476
|
# Converts hash and nil to an options object
|
1469
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1477
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1470
1478
|
|
1471
1479
|
# Customize the options with defaults
|
1472
1480
|
metadata = @config.rpcs.add_product_to_product_set.metadata.to_h
|
1473
1481
|
|
1474
1482
|
# Set x-goog-api-client and x-goog-user-project headers
|
1475
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1483
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1476
1484
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1477
1485
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1478
1486
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1493,53 +1501,60 @@ module Google
|
|
1493
1501
|
yield response, operation if block_given?
|
1494
1502
|
return response
|
1495
1503
|
end
|
1496
|
-
rescue GRPC::BadStatus => e
|
1497
|
-
raise Google::Cloud::Error.from_error(e)
|
1504
|
+
rescue ::GRPC::BadStatus => e
|
1505
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1498
1506
|
end
|
1499
1507
|
|
1500
1508
|
##
|
1501
1509
|
# Removes a Product from the specified ProductSet.
|
1502
1510
|
#
|
1503
1511
|
# @overload remove_product_from_product_set(request, options = nil)
|
1504
|
-
#
|
1505
|
-
#
|
1506
|
-
#
|
1512
|
+
# Pass arguments to `remove_product_from_product_set` via a request object, either of type
|
1513
|
+
# {::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest} or an equivalent Hash.
|
1514
|
+
#
|
1515
|
+
# @param request [::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest, ::Hash]
|
1516
|
+
# A request object representing the call parameters. Required. To specify no
|
1517
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1518
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1507
1519
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1508
1520
|
#
|
1509
1521
|
# @overload remove_product_from_product_set(name: nil, product: nil)
|
1510
|
-
#
|
1522
|
+
# Pass arguments to `remove_product_from_product_set` via keyword arguments. Note that at
|
1523
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1524
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1525
|
+
#
|
1526
|
+
# @param name [::String]
|
1511
1527
|
# Required. The resource name for the ProductSet to modify.
|
1512
1528
|
#
|
1513
1529
|
# Format is:
|
1514
1530
|
# `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
|
1515
|
-
# @param product [String]
|
1531
|
+
# @param product [::String]
|
1516
1532
|
# Required. The resource name for the Product to be removed from this ProductSet.
|
1517
1533
|
#
|
1518
1534
|
# Format is:
|
1519
1535
|
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
|
1520
1536
|
#
|
1521
|
-
#
|
1522
1537
|
# @yield [response, operation] Access the result along with the RPC operation
|
1523
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
1524
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1538
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1539
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1525
1540
|
#
|
1526
|
-
# @return [Google::Protobuf::Empty]
|
1541
|
+
# @return [::Google::Protobuf::Empty]
|
1527
1542
|
#
|
1528
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1543
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1529
1544
|
#
|
1530
1545
|
def remove_product_from_product_set request, options = nil
|
1531
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1546
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1532
1547
|
|
1533
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest
|
1548
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest
|
1534
1549
|
|
1535
1550
|
# Converts hash and nil to an options object
|
1536
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1551
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1537
1552
|
|
1538
1553
|
# Customize the options with defaults
|
1539
1554
|
metadata = @config.rpcs.remove_product_from_product_set.metadata.to_h
|
1540
1555
|
|
1541
1556
|
# Set x-goog-api-client and x-goog-user-project headers
|
1542
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1557
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1543
1558
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1544
1559
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1545
1560
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1560,8 +1575,8 @@ module Google
|
|
1560
1575
|
yield response, operation if block_given?
|
1561
1576
|
return response
|
1562
1577
|
end
|
1563
|
-
rescue GRPC::BadStatus => e
|
1564
|
-
raise Google::Cloud::Error.from_error(e)
|
1578
|
+
rescue ::GRPC::BadStatus => e
|
1579
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1565
1580
|
end
|
1566
1581
|
|
1567
1582
|
##
|
@@ -1574,50 +1589,51 @@ module Google
|
|
1574
1589
|
# * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
|
1575
1590
|
#
|
1576
1591
|
# @overload list_products_in_product_set(request, options = nil)
|
1577
|
-
#
|
1578
|
-
#
|
1579
|
-
# ProductSet does not exist, the products field of the response will be
|
1580
|
-
# empty.
|
1581
|
-
#
|
1582
|
-
# Possible errors:
|
1592
|
+
# Pass arguments to `list_products_in_product_set` via a request object, either of type
|
1593
|
+
# {::Google::Cloud::Vision::V1::ListProductsInProductSetRequest} or an equivalent Hash.
|
1583
1594
|
#
|
1584
|
-
#
|
1585
|
-
#
|
1595
|
+
# @param request [::Google::Cloud::Vision::V1::ListProductsInProductSetRequest, ::Hash]
|
1596
|
+
# A request object representing the call parameters. Required. To specify no
|
1597
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1598
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1586
1599
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1587
1600
|
#
|
1588
1601
|
# @overload list_products_in_product_set(name: nil, page_size: nil, page_token: nil)
|
1589
|
-
#
|
1602
|
+
# Pass arguments to `list_products_in_product_set` via keyword arguments. Note that at
|
1603
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1604
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1605
|
+
#
|
1606
|
+
# @param name [::String]
|
1590
1607
|
# Required. The ProductSet resource for which to retrieve Products.
|
1591
1608
|
#
|
1592
1609
|
# Format is:
|
1593
1610
|
# `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
|
1594
|
-
# @param page_size [Integer]
|
1611
|
+
# @param page_size [::Integer]
|
1595
1612
|
# The maximum number of items to return. Default 10, maximum 100.
|
1596
|
-
# @param page_token [String]
|
1613
|
+
# @param page_token [::String]
|
1597
1614
|
# The next_page_token returned from a previous List request, if any.
|
1598
1615
|
#
|
1599
|
-
#
|
1600
1616
|
# @yield [response, operation] Access the result along with the RPC operation
|
1601
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
1602
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1617
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>]
|
1618
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1603
1619
|
#
|
1604
|
-
# @return [Gapic::PagedEnumerable
|
1620
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1::Product>]
|
1605
1621
|
#
|
1606
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1622
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1607
1623
|
#
|
1608
1624
|
def list_products_in_product_set request, options = nil
|
1609
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1625
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1610
1626
|
|
1611
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::ListProductsInProductSetRequest
|
1627
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ListProductsInProductSetRequest
|
1612
1628
|
|
1613
1629
|
# Converts hash and nil to an options object
|
1614
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1630
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1615
1631
|
|
1616
1632
|
# Customize the options with defaults
|
1617
1633
|
metadata = @config.rpcs.list_products_in_product_set.metadata.to_h
|
1618
1634
|
|
1619
1635
|
# Set x-goog-api-client and x-goog-user-project headers
|
1620
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1636
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1621
1637
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1622
1638
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1623
1639
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1635,73 +1651,70 @@ module Google
|
|
1635
1651
|
retry_policy: @config.retry_policy
|
1636
1652
|
|
1637
1653
|
@product_search_stub.call_rpc :list_products_in_product_set, request, options: options do |response, operation|
|
1638
|
-
response = Gapic::PagedEnumerable.new @product_search_stub, :list_products_in_product_set, request, response, operation, options
|
1654
|
+
response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_products_in_product_set, request, response, operation, options
|
1639
1655
|
yield response, operation if block_given?
|
1640
1656
|
return response
|
1641
1657
|
end
|
1642
|
-
rescue GRPC::BadStatus => e
|
1643
|
-
raise Google::Cloud::Error.from_error(e)
|
1658
|
+
rescue ::GRPC::BadStatus => e
|
1659
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1644
1660
|
end
|
1645
1661
|
|
1646
1662
|
##
|
1647
1663
|
# Asynchronous API that imports a list of reference images to specified
|
1648
1664
|
# product sets based on a list of image information.
|
1649
1665
|
#
|
1650
|
-
# The {Google::Longrunning::Operation google.longrunning.Operation} API can be used to keep track of the
|
1666
|
+
# The {::Google::Longrunning::Operation google.longrunning.Operation} API can be used to keep track of the
|
1651
1667
|
# progress and results of the request.
|
1652
1668
|
# `Operation.metadata` contains `BatchOperationMetadata`. (progress)
|
1653
1669
|
# `Operation.response` contains `ImportProductSetsResponse`. (results)
|
1654
1670
|
#
|
1655
1671
|
# The input source of this method is a csv file on Google Cloud Storage.
|
1656
1672
|
# For the format of the csv file please see
|
1657
|
-
# {Google::Cloud::Vision::V1::ImportProductSetsGcsSource#csv_file_uri ImportProductSetsGcsSource.csv_file_uri}.
|
1673
|
+
# {::Google::Cloud::Vision::V1::ImportProductSetsGcsSource#csv_file_uri ImportProductSetsGcsSource.csv_file_uri}.
|
1658
1674
|
#
|
1659
1675
|
# @overload import_product_sets(request, options = nil)
|
1660
|
-
#
|
1661
|
-
#
|
1662
|
-
#
|
1663
|
-
#
|
1664
|
-
#
|
1665
|
-
#
|
1666
|
-
#
|
1667
|
-
# `Operation.response` contains `ImportProductSetsResponse`. (results)
|
1668
|
-
#
|
1669
|
-
# The input source of this method is a csv file on Google Cloud Storage.
|
1670
|
-
# For the format of the csv file please see
|
1671
|
-
# {Google::Cloud::Vision::V1::ImportProductSetsGcsSource#csv_file_uri ImportProductSetsGcsSource.csv_file_uri}.
|
1672
|
-
# @param options [Gapic::CallOptions, Hash]
|
1676
|
+
# Pass arguments to `import_product_sets` via a request object, either of type
|
1677
|
+
# {::Google::Cloud::Vision::V1::ImportProductSetsRequest} or an equivalent Hash.
|
1678
|
+
#
|
1679
|
+
# @param request [::Google::Cloud::Vision::V1::ImportProductSetsRequest, ::Hash]
|
1680
|
+
# A request object representing the call parameters. Required. To specify no
|
1681
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1682
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1673
1683
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1674
1684
|
#
|
1675
1685
|
# @overload import_product_sets(parent: nil, input_config: nil)
|
1676
|
-
#
|
1686
|
+
# Pass arguments to `import_product_sets` via keyword arguments. Note that at
|
1687
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1688
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1689
|
+
#
|
1690
|
+
# @param parent [::String]
|
1677
1691
|
# Required. The project in which the ProductSets should be imported.
|
1678
1692
|
#
|
1679
1693
|
# Format is `projects/PROJECT_ID/locations/LOC_ID`.
|
1680
|
-
# @param input_config [Google::Cloud::Vision::V1::ImportProductSetsInputConfig
|
1694
|
+
# @param input_config [::Google::Cloud::Vision::V1::ImportProductSetsInputConfig, ::Hash]
|
1681
1695
|
# Required. The input content for the list of requests.
|
1682
1696
|
#
|
1683
|
-
#
|
1684
1697
|
# @yield [response, operation] Access the result along with the RPC operation
|
1685
|
-
# @yieldparam response [Gapic::Operation]
|
1686
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1698
|
+
# @yieldparam response [::Gapic::Operation]
|
1699
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1687
1700
|
#
|
1688
|
-
# @return [Gapic::Operation]
|
1701
|
+
# @return [::Gapic::Operation]
|
1689
1702
|
#
|
1690
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1703
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1691
1704
|
#
|
1692
1705
|
def import_product_sets request, options = nil
|
1693
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1706
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1694
1707
|
|
1695
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::ImportProductSetsRequest
|
1708
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::ImportProductSetsRequest
|
1696
1709
|
|
1697
1710
|
# Converts hash and nil to an options object
|
1698
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1711
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1699
1712
|
|
1700
1713
|
# Customize the options with defaults
|
1701
1714
|
metadata = @config.rpcs.import_product_sets.metadata.to_h
|
1702
1715
|
|
1703
1716
|
# Set x-goog-api-client and x-goog-user-project headers
|
1704
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1717
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1705
1718
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1706
1719
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1707
1720
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1719,12 +1732,12 @@ module Google
|
|
1719
1732
|
retry_policy: @config.retry_policy
|
1720
1733
|
|
1721
1734
|
@product_search_stub.call_rpc :import_product_sets, request, options: options do |response, operation|
|
1722
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
1735
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1723
1736
|
yield response, operation if block_given?
|
1724
1737
|
return response
|
1725
1738
|
end
|
1726
|
-
rescue GRPC::BadStatus => e
|
1727
|
-
raise Google::Cloud::Error.from_error(e)
|
1739
|
+
rescue ::GRPC::BadStatus => e
|
1740
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1728
1741
|
end
|
1729
1742
|
|
1730
1743
|
##
|
@@ -1749,75 +1762,59 @@ module Google
|
|
1749
1762
|
# ProductSet, you must wait until the PurgeProducts operation has finished
|
1750
1763
|
# for that ProductSet.
|
1751
1764
|
#
|
1752
|
-
# The {Google::Longrunning::Operation google.longrunning.Operation} API can be used to keep track of the
|
1765
|
+
# The {::Google::Longrunning::Operation google.longrunning.Operation} API can be used to keep track of the
|
1753
1766
|
# progress and results of the request.
|
1754
1767
|
# `Operation.metadata` contains `BatchOperationMetadata`. (progress)
|
1755
1768
|
#
|
1756
1769
|
# @overload purge_products(request, options = nil)
|
1757
|
-
#
|
1758
|
-
#
|
1759
|
-
#
|
1760
|
-
#
|
1761
|
-
#
|
1762
|
-
#
|
1763
|
-
#
|
1764
|
-
# It is recommended to not delete the specified ProductSet until after this
|
1765
|
-
# operation has completed. It is also recommended to not add any of the
|
1766
|
-
# Products involved in the batch delete to a new ProductSet while this
|
1767
|
-
# operation is running because those Products may still end up deleted.
|
1768
|
-
#
|
1769
|
-
# It's not possible to undo the PurgeProducts operation. Therefore, it is
|
1770
|
-
# recommended to keep the csv files used in ImportProductSets (if that was
|
1771
|
-
# how you originally built the Product Set) before starting PurgeProducts, in
|
1772
|
-
# case you need to re-import the data after deletion.
|
1773
|
-
#
|
1774
|
-
# If the plan is to purge all of the Products from a ProductSet and then
|
1775
|
-
# re-use the empty ProductSet to re-import new Products into the empty
|
1776
|
-
# ProductSet, you must wait until the PurgeProducts operation has finished
|
1777
|
-
# for that ProductSet.
|
1778
|
-
#
|
1779
|
-
# The {Google::Longrunning::Operation google.longrunning.Operation} API can be used to keep track of the
|
1780
|
-
# progress and results of the request.
|
1781
|
-
# `Operation.metadata` contains `BatchOperationMetadata`. (progress)
|
1782
|
-
# @param options [Gapic::CallOptions, Hash]
|
1770
|
+
# Pass arguments to `purge_products` via a request object, either of type
|
1771
|
+
# {::Google::Cloud::Vision::V1::PurgeProductsRequest} or an equivalent Hash.
|
1772
|
+
#
|
1773
|
+
# @param request [::Google::Cloud::Vision::V1::PurgeProductsRequest, ::Hash]
|
1774
|
+
# A request object representing the call parameters. Required. To specify no
|
1775
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1776
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1783
1777
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1784
1778
|
#
|
1785
1779
|
# @overload purge_products(product_set_purge_config: nil, delete_orphan_products: nil, parent: nil, force: nil)
|
1786
|
-
#
|
1780
|
+
# Pass arguments to `purge_products` via keyword arguments. Note that at
|
1781
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1782
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1783
|
+
#
|
1784
|
+
# @param product_set_purge_config [::Google::Cloud::Vision::V1::ProductSetPurgeConfig, ::Hash]
|
1787
1785
|
# Specify which ProductSet contains the Products to be deleted.
|
1788
|
-
# @param delete_orphan_products [Boolean]
|
1786
|
+
# @param delete_orphan_products [::Boolean]
|
1789
1787
|
# If delete_orphan_products is true, all Products that are not in any
|
1790
1788
|
# ProductSet will be deleted.
|
1791
|
-
# @param parent [String]
|
1789
|
+
# @param parent [::String]
|
1792
1790
|
# Required. The project and location in which the Products should be deleted.
|
1793
1791
|
#
|
1794
1792
|
# Format is `projects/PROJECT_ID/locations/LOC_ID`.
|
1795
|
-
# @param force [Boolean]
|
1793
|
+
# @param force [::Boolean]
|
1796
1794
|
# The default value is false. Override this value to true to actually perform
|
1797
1795
|
# the purge.
|
1798
1796
|
#
|
1799
|
-
#
|
1800
1797
|
# @yield [response, operation] Access the result along with the RPC operation
|
1801
|
-
# @yieldparam response [Gapic::Operation]
|
1802
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1798
|
+
# @yieldparam response [::Gapic::Operation]
|
1799
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1803
1800
|
#
|
1804
|
-
# @return [Gapic::Operation]
|
1801
|
+
# @return [::Gapic::Operation]
|
1805
1802
|
#
|
1806
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
1803
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1807
1804
|
#
|
1808
1805
|
def purge_products request, options = nil
|
1809
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
1806
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1810
1807
|
|
1811
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1::PurgeProductsRequest
|
1808
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1::PurgeProductsRequest
|
1812
1809
|
|
1813
1810
|
# Converts hash and nil to an options object
|
1814
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1811
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1815
1812
|
|
1816
1813
|
# Customize the options with defaults
|
1817
1814
|
metadata = @config.rpcs.purge_products.metadata.to_h
|
1818
1815
|
|
1819
1816
|
# Set x-goog-api-client and x-goog-user-project headers
|
1820
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
1817
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1821
1818
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1822
1819
|
gapic_version: ::Google::Cloud::Vision::V1::VERSION
|
1823
1820
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -1835,12 +1832,12 @@ module Google
|
|
1835
1832
|
retry_policy: @config.retry_policy
|
1836
1833
|
|
1837
1834
|
@product_search_stub.call_rpc :purge_products, request, options: options do |response, operation|
|
1838
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
1835
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1839
1836
|
yield response, operation if block_given?
|
1840
1837
|
return response
|
1841
1838
|
end
|
1842
|
-
rescue GRPC::BadStatus => e
|
1843
|
-
raise Google::Cloud::Error.from_error(e)
|
1839
|
+
rescue ::GRPC::BadStatus => e
|
1840
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1844
1841
|
end
|
1845
1842
|
|
1846
1843
|
##
|
@@ -1850,7 +1847,7 @@ module Google
|
|
1850
1847
|
# providing control over timeouts, retry behavior, logging, transport
|
1851
1848
|
# parameters, and other low-level controls. Certain parameters can also be
|
1852
1849
|
# applied individually to specific RPCs. See
|
1853
|
-
# {Google::Cloud::Vision::V1::ProductSearch::Client::Configuration::Rpcs}
|
1850
|
+
# {::Google::Cloud::Vision::V1::ProductSearch::Client::Configuration::Rpcs}
|
1854
1851
|
# for a list of RPCs that can be configured independently.
|
1855
1852
|
#
|
1856
1853
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -1861,22 +1858,22 @@ module Google
|
|
1861
1858
|
# To modify the global config, setting the timeout for create_product_set
|
1862
1859
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
1863
1860
|
#
|
1864
|
-
# Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config|
|
1865
|
-
# config.timeout =
|
1866
|
-
# config.rpcs.create_product_set.timeout =
|
1861
|
+
# ::Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config|
|
1862
|
+
# config.timeout = 10.0
|
1863
|
+
# config.rpcs.create_product_set.timeout = 20.0
|
1867
1864
|
# end
|
1868
1865
|
#
|
1869
1866
|
# To apply the above configuration only to a new client:
|
1870
1867
|
#
|
1871
|
-
# client = Google::Cloud::Vision::V1::ProductSearch::Client.new do |config|
|
1872
|
-
# config.timeout =
|
1873
|
-
# config.rpcs.create_product_set.timeout =
|
1868
|
+
# client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config|
|
1869
|
+
# config.timeout = 10.0
|
1870
|
+
# config.rpcs.create_product_set.timeout = 20.0
|
1874
1871
|
# end
|
1875
1872
|
#
|
1876
1873
|
# @!attribute [rw] endpoint
|
1877
1874
|
# The hostname or hostname:port of the service endpoint.
|
1878
1875
|
# Defaults to `"vision.googleapis.com"`.
|
1879
|
-
# @return [String]
|
1876
|
+
# @return [::String]
|
1880
1877
|
# @!attribute [rw] credentials
|
1881
1878
|
# Credentials to send with calls. You may provide any of the following types:
|
1882
1879
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1888,29 +1885,29 @@ module Google
|
|
1888
1885
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1889
1886
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1890
1887
|
# * (`nil`) indicating no credentials
|
1891
|
-
# @return [Object]
|
1888
|
+
# @return [::Object]
|
1892
1889
|
# @!attribute [rw] scope
|
1893
1890
|
# The OAuth scopes
|
1894
|
-
# @return [Array
|
1891
|
+
# @return [::Array<::String>]
|
1895
1892
|
# @!attribute [rw] lib_name
|
1896
1893
|
# The library name as recorded in instrumentation and logging
|
1897
|
-
# @return [String]
|
1894
|
+
# @return [::String]
|
1898
1895
|
# @!attribute [rw] lib_version
|
1899
1896
|
# The library version as recorded in instrumentation and logging
|
1900
|
-
# @return [String]
|
1897
|
+
# @return [::String]
|
1901
1898
|
# @!attribute [rw] channel_args
|
1902
1899
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1903
1900
|
# `GRPC::Core::Channel` object is provided as the credential.
|
1904
|
-
# @return [Hash]
|
1901
|
+
# @return [::Hash]
|
1905
1902
|
# @!attribute [rw] interceptors
|
1906
1903
|
# An array of interceptors that are run before calls are executed.
|
1907
|
-
# @return [Array
|
1904
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1908
1905
|
# @!attribute [rw] timeout
|
1909
|
-
# The call timeout in
|
1910
|
-
# @return [Numeric]
|
1906
|
+
# The call timeout in seconds.
|
1907
|
+
# @return [::Numeric]
|
1911
1908
|
# @!attribute [rw] metadata
|
1912
1909
|
# Additional gRPC headers to be sent with the call.
|
1913
|
-
# @return [Hash{Symbol
|
1910
|
+
# @return [::Hash{::Symbol=>::String}]
|
1914
1911
|
# @!attribute [rw] retry_policy
|
1915
1912
|
# The retry policy. The value is a hash with the following keys:
|
1916
1913
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -1918,25 +1915,29 @@ module Google
|
|
1918
1915
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1919
1916
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1920
1917
|
# trigger a retry.
|
1921
|
-
# @return [Hash]
|
1918
|
+
# @return [::Hash]
|
1919
|
+
# @!attribute [rw] quota_project
|
1920
|
+
# A separate project against which to charge quota.
|
1921
|
+
# @return [::String]
|
1922
1922
|
#
|
1923
1923
|
class Configuration
|
1924
|
-
extend Gapic::Config
|
1924
|
+
extend ::Gapic::Config
|
1925
1925
|
|
1926
|
-
config_attr :endpoint,
|
1927
|
-
config_attr :credentials,
|
1926
|
+
config_attr :endpoint, "vision.googleapis.com", ::String
|
1927
|
+
config_attr :credentials, nil do |value|
|
1928
1928
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1929
1929
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1930
1930
|
allowed.any? { |klass| klass === value }
|
1931
1931
|
end
|
1932
|
-
config_attr :scope,
|
1933
|
-
config_attr :lib_name,
|
1934
|
-
config_attr :lib_version,
|
1935
|
-
config_attr(:channel_args,
|
1936
|
-
config_attr :interceptors,
|
1937
|
-
config_attr :timeout,
|
1938
|
-
config_attr :metadata,
|
1939
|
-
config_attr :retry_policy,
|
1932
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1933
|
+
config_attr :lib_name, nil, ::String, nil
|
1934
|
+
config_attr :lib_version, nil, ::String, nil
|
1935
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
1936
|
+
config_attr :interceptors, nil, ::Array, nil
|
1937
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1938
|
+
config_attr :metadata, nil, ::Hash, nil
|
1939
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1940
|
+
config_attr :quota_project, nil, ::String, nil
|
1940
1941
|
|
1941
1942
|
# @private
|
1942
1943
|
def initialize parent_config = nil
|
@@ -1977,140 +1978,140 @@ module Google
|
|
1977
1978
|
class Rpcs
|
1978
1979
|
##
|
1979
1980
|
# RPC-specific configuration for `create_product_set`
|
1980
|
-
# @return [Gapic::Config::Method]
|
1981
|
+
# @return [::Gapic::Config::Method]
|
1981
1982
|
#
|
1982
1983
|
attr_reader :create_product_set
|
1983
1984
|
##
|
1984
1985
|
# RPC-specific configuration for `list_product_sets`
|
1985
|
-
# @return [Gapic::Config::Method]
|
1986
|
+
# @return [::Gapic::Config::Method]
|
1986
1987
|
#
|
1987
1988
|
attr_reader :list_product_sets
|
1988
1989
|
##
|
1989
1990
|
# RPC-specific configuration for `get_product_set`
|
1990
|
-
# @return [Gapic::Config::Method]
|
1991
|
+
# @return [::Gapic::Config::Method]
|
1991
1992
|
#
|
1992
1993
|
attr_reader :get_product_set
|
1993
1994
|
##
|
1994
1995
|
# RPC-specific configuration for `update_product_set`
|
1995
|
-
# @return [Gapic::Config::Method]
|
1996
|
+
# @return [::Gapic::Config::Method]
|
1996
1997
|
#
|
1997
1998
|
attr_reader :update_product_set
|
1998
1999
|
##
|
1999
2000
|
# RPC-specific configuration for `delete_product_set`
|
2000
|
-
# @return [Gapic::Config::Method]
|
2001
|
+
# @return [::Gapic::Config::Method]
|
2001
2002
|
#
|
2002
2003
|
attr_reader :delete_product_set
|
2003
2004
|
##
|
2004
2005
|
# RPC-specific configuration for `create_product`
|
2005
|
-
# @return [Gapic::Config::Method]
|
2006
|
+
# @return [::Gapic::Config::Method]
|
2006
2007
|
#
|
2007
2008
|
attr_reader :create_product
|
2008
2009
|
##
|
2009
2010
|
# RPC-specific configuration for `list_products`
|
2010
|
-
# @return [Gapic::Config::Method]
|
2011
|
+
# @return [::Gapic::Config::Method]
|
2011
2012
|
#
|
2012
2013
|
attr_reader :list_products
|
2013
2014
|
##
|
2014
2015
|
# RPC-specific configuration for `get_product`
|
2015
|
-
# @return [Gapic::Config::Method]
|
2016
|
+
# @return [::Gapic::Config::Method]
|
2016
2017
|
#
|
2017
2018
|
attr_reader :get_product
|
2018
2019
|
##
|
2019
2020
|
# RPC-specific configuration for `update_product`
|
2020
|
-
# @return [Gapic::Config::Method]
|
2021
|
+
# @return [::Gapic::Config::Method]
|
2021
2022
|
#
|
2022
2023
|
attr_reader :update_product
|
2023
2024
|
##
|
2024
2025
|
# RPC-specific configuration for `delete_product`
|
2025
|
-
# @return [Gapic::Config::Method]
|
2026
|
+
# @return [::Gapic::Config::Method]
|
2026
2027
|
#
|
2027
2028
|
attr_reader :delete_product
|
2028
2029
|
##
|
2029
2030
|
# RPC-specific configuration for `create_reference_image`
|
2030
|
-
# @return [Gapic::Config::Method]
|
2031
|
+
# @return [::Gapic::Config::Method]
|
2031
2032
|
#
|
2032
2033
|
attr_reader :create_reference_image
|
2033
2034
|
##
|
2034
2035
|
# RPC-specific configuration for `delete_reference_image`
|
2035
|
-
# @return [Gapic::Config::Method]
|
2036
|
+
# @return [::Gapic::Config::Method]
|
2036
2037
|
#
|
2037
2038
|
attr_reader :delete_reference_image
|
2038
2039
|
##
|
2039
2040
|
# RPC-specific configuration for `list_reference_images`
|
2040
|
-
# @return [Gapic::Config::Method]
|
2041
|
+
# @return [::Gapic::Config::Method]
|
2041
2042
|
#
|
2042
2043
|
attr_reader :list_reference_images
|
2043
2044
|
##
|
2044
2045
|
# RPC-specific configuration for `get_reference_image`
|
2045
|
-
# @return [Gapic::Config::Method]
|
2046
|
+
# @return [::Gapic::Config::Method]
|
2046
2047
|
#
|
2047
2048
|
attr_reader :get_reference_image
|
2048
2049
|
##
|
2049
2050
|
# RPC-specific configuration for `add_product_to_product_set`
|
2050
|
-
# @return [Gapic::Config::Method]
|
2051
|
+
# @return [::Gapic::Config::Method]
|
2051
2052
|
#
|
2052
2053
|
attr_reader :add_product_to_product_set
|
2053
2054
|
##
|
2054
2055
|
# RPC-specific configuration for `remove_product_from_product_set`
|
2055
|
-
# @return [Gapic::Config::Method]
|
2056
|
+
# @return [::Gapic::Config::Method]
|
2056
2057
|
#
|
2057
2058
|
attr_reader :remove_product_from_product_set
|
2058
2059
|
##
|
2059
2060
|
# RPC-specific configuration for `list_products_in_product_set`
|
2060
|
-
# @return [Gapic::Config::Method]
|
2061
|
+
# @return [::Gapic::Config::Method]
|
2061
2062
|
#
|
2062
2063
|
attr_reader :list_products_in_product_set
|
2063
2064
|
##
|
2064
2065
|
# RPC-specific configuration for `import_product_sets`
|
2065
|
-
# @return [Gapic::Config::Method]
|
2066
|
+
# @return [::Gapic::Config::Method]
|
2066
2067
|
#
|
2067
2068
|
attr_reader :import_product_sets
|
2068
2069
|
##
|
2069
2070
|
# RPC-specific configuration for `purge_products`
|
2070
|
-
# @return [Gapic::Config::Method]
|
2071
|
+
# @return [::Gapic::Config::Method]
|
2071
2072
|
#
|
2072
2073
|
attr_reader :purge_products
|
2073
2074
|
|
2074
2075
|
# @private
|
2075
2076
|
def initialize parent_rpcs = nil
|
2076
2077
|
create_product_set_config = parent_rpcs&.create_product_set if parent_rpcs&.respond_to? :create_product_set
|
2077
|
-
@create_product_set = Gapic::Config::Method.new create_product_set_config
|
2078
|
+
@create_product_set = ::Gapic::Config::Method.new create_product_set_config
|
2078
2079
|
list_product_sets_config = parent_rpcs&.list_product_sets if parent_rpcs&.respond_to? :list_product_sets
|
2079
|
-
@list_product_sets = Gapic::Config::Method.new list_product_sets_config
|
2080
|
+
@list_product_sets = ::Gapic::Config::Method.new list_product_sets_config
|
2080
2081
|
get_product_set_config = parent_rpcs&.get_product_set if parent_rpcs&.respond_to? :get_product_set
|
2081
|
-
@get_product_set = Gapic::Config::Method.new get_product_set_config
|
2082
|
+
@get_product_set = ::Gapic::Config::Method.new get_product_set_config
|
2082
2083
|
update_product_set_config = parent_rpcs&.update_product_set if parent_rpcs&.respond_to? :update_product_set
|
2083
|
-
@update_product_set = Gapic::Config::Method.new update_product_set_config
|
2084
|
+
@update_product_set = ::Gapic::Config::Method.new update_product_set_config
|
2084
2085
|
delete_product_set_config = parent_rpcs&.delete_product_set if parent_rpcs&.respond_to? :delete_product_set
|
2085
|
-
@delete_product_set = Gapic::Config::Method.new delete_product_set_config
|
2086
|
+
@delete_product_set = ::Gapic::Config::Method.new delete_product_set_config
|
2086
2087
|
create_product_config = parent_rpcs&.create_product if parent_rpcs&.respond_to? :create_product
|
2087
|
-
@create_product = Gapic::Config::Method.new create_product_config
|
2088
|
+
@create_product = ::Gapic::Config::Method.new create_product_config
|
2088
2089
|
list_products_config = parent_rpcs&.list_products if parent_rpcs&.respond_to? :list_products
|
2089
|
-
@list_products = Gapic::Config::Method.new list_products_config
|
2090
|
+
@list_products = ::Gapic::Config::Method.new list_products_config
|
2090
2091
|
get_product_config = parent_rpcs&.get_product if parent_rpcs&.respond_to? :get_product
|
2091
|
-
@get_product = Gapic::Config::Method.new get_product_config
|
2092
|
+
@get_product = ::Gapic::Config::Method.new get_product_config
|
2092
2093
|
update_product_config = parent_rpcs&.update_product if parent_rpcs&.respond_to? :update_product
|
2093
|
-
@update_product = Gapic::Config::Method.new update_product_config
|
2094
|
+
@update_product = ::Gapic::Config::Method.new update_product_config
|
2094
2095
|
delete_product_config = parent_rpcs&.delete_product if parent_rpcs&.respond_to? :delete_product
|
2095
|
-
@delete_product = Gapic::Config::Method.new delete_product_config
|
2096
|
+
@delete_product = ::Gapic::Config::Method.new delete_product_config
|
2096
2097
|
create_reference_image_config = parent_rpcs&.create_reference_image if parent_rpcs&.respond_to? :create_reference_image
|
2097
|
-
@create_reference_image = Gapic::Config::Method.new create_reference_image_config
|
2098
|
+
@create_reference_image = ::Gapic::Config::Method.new create_reference_image_config
|
2098
2099
|
delete_reference_image_config = parent_rpcs&.delete_reference_image if parent_rpcs&.respond_to? :delete_reference_image
|
2099
|
-
@delete_reference_image = Gapic::Config::Method.new delete_reference_image_config
|
2100
|
+
@delete_reference_image = ::Gapic::Config::Method.new delete_reference_image_config
|
2100
2101
|
list_reference_images_config = parent_rpcs&.list_reference_images if parent_rpcs&.respond_to? :list_reference_images
|
2101
|
-
@list_reference_images = Gapic::Config::Method.new list_reference_images_config
|
2102
|
+
@list_reference_images = ::Gapic::Config::Method.new list_reference_images_config
|
2102
2103
|
get_reference_image_config = parent_rpcs&.get_reference_image if parent_rpcs&.respond_to? :get_reference_image
|
2103
|
-
@get_reference_image = Gapic::Config::Method.new get_reference_image_config
|
2104
|
+
@get_reference_image = ::Gapic::Config::Method.new get_reference_image_config
|
2104
2105
|
add_product_to_product_set_config = parent_rpcs&.add_product_to_product_set if parent_rpcs&.respond_to? :add_product_to_product_set
|
2105
|
-
@add_product_to_product_set = Gapic::Config::Method.new add_product_to_product_set_config
|
2106
|
+
@add_product_to_product_set = ::Gapic::Config::Method.new add_product_to_product_set_config
|
2106
2107
|
remove_product_from_product_set_config = parent_rpcs&.remove_product_from_product_set if parent_rpcs&.respond_to? :remove_product_from_product_set
|
2107
|
-
@remove_product_from_product_set = Gapic::Config::Method.new remove_product_from_product_set_config
|
2108
|
+
@remove_product_from_product_set = ::Gapic::Config::Method.new remove_product_from_product_set_config
|
2108
2109
|
list_products_in_product_set_config = parent_rpcs&.list_products_in_product_set if parent_rpcs&.respond_to? :list_products_in_product_set
|
2109
|
-
@list_products_in_product_set = Gapic::Config::Method.new list_products_in_product_set_config
|
2110
|
+
@list_products_in_product_set = ::Gapic::Config::Method.new list_products_in_product_set_config
|
2110
2111
|
import_product_sets_config = parent_rpcs&.import_product_sets if parent_rpcs&.respond_to? :import_product_sets
|
2111
|
-
@import_product_sets = Gapic::Config::Method.new import_product_sets_config
|
2112
|
+
@import_product_sets = ::Gapic::Config::Method.new import_product_sets_config
|
2112
2113
|
purge_products_config = parent_rpcs&.purge_products if parent_rpcs&.respond_to? :purge_products
|
2113
|
-
@purge_products = Gapic::Config::Method.new purge_products_config
|
2114
|
+
@purge_products = ::Gapic::Config::Method.new purge_products_config
|
2114
2115
|
|
2115
2116
|
yield self if block_given?
|
2116
2117
|
end
|
@@ -2122,13 +2123,3 @@ module Google
|
|
2122
2123
|
end
|
2123
2124
|
end
|
2124
2125
|
end
|
2125
|
-
|
2126
|
-
# rubocop:disable Lint/HandleExceptions
|
2127
|
-
|
2128
|
-
# Once client is loaded, load helpers.rb if it exists.
|
2129
|
-
begin
|
2130
|
-
require "google/cloud/vision/v1/product_search/helpers"
|
2131
|
-
rescue LoadError
|
2132
|
-
end
|
2133
|
-
|
2134
|
-
# rubocop:enable Lint/HandleExceptions
|