google-cloud-vision-v1p3beta1 0.1.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +6 -6
  3. data/README.md +48 -1
  4. data/lib/google-cloud-vision-v1p3beta1.rb +21 -1
  5. data/lib/google/cloud/vision/v1p3beta1.rb +16 -0
  6. data/lib/google/cloud/vision/v1p3beta1/image_annotator.rb +33 -2
  7. data/lib/google/cloud/vision/v1p3beta1/image_annotator/client.rb +101 -97
  8. data/lib/google/cloud/vision/v1p3beta1/image_annotator/credentials.rb +1 -1
  9. data/lib/google/cloud/vision/v1p3beta1/image_annotator/operations.rb +139 -127
  10. data/lib/google/cloud/vision/v1p3beta1/image_annotator/paths.rb +3 -3
  11. data/lib/google/cloud/vision/v1p3beta1/product_search.rb +44 -2
  12. data/lib/google/cloud/vision/v1p3beta1/product_search/client.rb +500 -508
  13. data/lib/google/cloud/vision/v1p3beta1/product_search/credentials.rb +1 -1
  14. data/lib/google/cloud/vision/v1p3beta1/product_search/operations.rb +139 -127
  15. data/lib/google/cloud/vision/v1p3beta1/product_search/paths.rb +12 -12
  16. data/lib/google/cloud/vision/v1p3beta1/version.rb +1 -1
  17. data/proto_docs/google/api/resource.rb +12 -12
  18. data/proto_docs/google/cloud/vision/v1p3beta1/geometry.rb +20 -20
  19. data/proto_docs/google/cloud/vision/v1p3beta1/image_annotator.rb +172 -172
  20. data/proto_docs/google/cloud/vision/v1p3beta1/product_search.rb +29 -29
  21. data/proto_docs/google/cloud/vision/v1p3beta1/product_search_service.rb +133 -133
  22. data/proto_docs/google/cloud/vision/v1p3beta1/text_annotation.rb +49 -49
  23. data/proto_docs/google/cloud/vision/v1p3beta1/web_detection.rb +28 -28
  24. data/proto_docs/google/longrunning/operations.rb +30 -30
  25. data/proto_docs/google/protobuf/any.rb +4 -4
  26. data/proto_docs/google/protobuf/empty.rb +2 -2
  27. data/proto_docs/google/protobuf/field_mask.rb +3 -3
  28. data/proto_docs/google/protobuf/timestamp.rb +4 -4
  29. data/proto_docs/google/protobuf/wrappers.rb +27 -27
  30. data/proto_docs/google/rpc/status.rb +6 -6
  31. data/proto_docs/google/type/color.rb +6 -6
  32. data/proto_docs/google/type/latlng.rb +4 -4
  33. metadata +32 -5
  34. 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 "google/cloud/vision/v1p3beta1/product_search/client"
20
- require "google/cloud/vision/v1p3beta1/product_search/operations"
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/vision/v1p3beta1/version"
24
+
21
25
  require "google/cloud/vision/v1p3beta1/product_search/credentials"
26
+ require "google/cloud/vision/v1p3beta1/product_search/paths"
27
+ require "google/cloud/vision/v1p3beta1/product_search/operations"
28
+ require "google/cloud/vision/v1p3beta1/product_search/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Vision
33
+ module V1p3beta1
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::V1p3beta1::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::V1p3beta1::Product Product} resources, named
45
+ # `projects/*/locations/*/products/*`
46
+ #
47
+ # - Each {::Google::Cloud::Vision::V1p3beta1::Product Product} has a collection of {::Google::Cloud::Vision::V1p3beta1::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/v1p3beta1/product_search"
53
+ # client = ::Google::Cloud::Vision::V1p3beta1::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/v1p3beta1/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/v1p3beta1/version"
25
20
  require "google/cloud/vision/v1p3beta1/product_search_service_pb"
26
- require "google/cloud/vision/v1p3beta1/product_search/credentials"
27
- require "google/cloud/vision/v1p3beta1/product_search/paths"
28
- require "google/cloud/vision/v1p3beta1/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::V1p3beta1::ProductSet ProductSet} resources, named
33
+ # - The API has a collection of {::Google::Cloud::Vision::V1p3beta1::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::V1p3beta1::Product Product} resources, named
39
+ # - The API has a collection of {::Google::Cloud::Vision::V1p3beta1::Product Product} resources, named
48
40
  # `projects/*/locations/*/products/*`
49
41
  #
50
- # - Each {Google::Cloud::Vision::V1p3beta1::Product Product} has a collection of {Google::Cloud::Vision::V1p3beta1::ReferenceImage ReferenceImage} resources, named
42
+ # - Each {::Google::Cloud::Vision::V1p3beta1::Product Product} has a collection of {::Google::Cloud::Vision::V1p3beta1::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::V1p3beta1::ProductSearch::Client::Configuration}
54
+ # See {::Google::Cloud::Vision::V1p3beta1::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::V1p3beta1::ProductSearch::Client.configure do |config|
70
- # config.timeout = 10_000
61
+ # ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.configure do |config|
62
+ # config.timeout = 10.0
71
63
  # end
72
64
  #
73
65
  # @yield [config] Configure the Client client.
@@ -243,7 +235,7 @@ module Google
243
235
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
244
236
  # should be made on {Client.configure}.
245
237
  #
246
- # See {Google::Cloud::Vision::V1p3beta1::ProductSearch::Client::Configuration}
238
+ # See {::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client::Configuration}
247
239
  # for a description of the configuration fields.
248
240
  #
249
241
  # @yield [config] Configure the Client client.
@@ -264,13 +256,13 @@ module Google
264
256
  # To create a new ProductSearch client with the default
265
257
  # configuration:
266
258
  #
267
- # client = Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
259
+ # client = ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
268
260
  #
269
261
  # To create a new ProductSearch client with a custom
270
262
  # configuration:
271
263
  #
272
- # client = Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new do |config|
273
- # config.timeout = 10_000
264
+ # client = ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new do |config|
265
+ # config.timeout = 10.0
274
266
  # end
275
267
  #
276
268
  # @yield [config] Configure the ProductSearch client.
@@ -295,14 +287,16 @@ module Google
295
287
  if credentials.is_a?(String) || credentials.is_a?(Hash)
296
288
  credentials = Credentials.new credentials, scope: @config.scope
297
289
  end
298
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
290
+ @quota_project_id = @config.quota_project
291
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
299
292
 
300
293
  @operations_client = Operations.new do |config|
301
294
  config.credentials = credentials
295
+ config.endpoint = @config.endpoint
302
296
  end
303
297
 
304
- @product_search_stub = Gapic::ServiceStub.new(
305
- Google::Cloud::Vision::V1p3beta1::ProductSearch::Stub,
298
+ @product_search_stub = ::Gapic::ServiceStub.new(
299
+ ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Stub,
306
300
  credentials: credentials,
307
301
  endpoint: @config.endpoint,
308
302
  channel_args: @config.channel_args,
@@ -310,6 +304,13 @@ module Google
310
304
  )
311
305
  end
312
306
 
307
+ ##
308
+ # Get the associated client for long-running operations.
309
+ #
310
+ # @return [::Google::Cloud::Vision::V1p3beta1::ProductSearch::Operations]
311
+ #
312
+ attr_reader :operations_client
313
+
313
314
  # Service calls
314
315
 
315
316
  ##
@@ -321,51 +322,53 @@ module Google
321
322
  # 4096 characters.
322
323
  #
323
324
  # @overload create_product_set(request, options = nil)
324
- # @param request [Google::Cloud::Vision::V1p3beta1::CreateProductSetRequest | Hash]
325
- # Creates and returns a new ProductSet resource.
325
+ # Pass arguments to `create_product_set` via a request object, either of type
326
+ # {::Google::Cloud::Vision::V1p3beta1::CreateProductSetRequest} or an equivalent Hash.
326
327
  #
327
- # Possible errors:
328
- #
329
- # * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
330
- # 4096 characters.
331
- # @param options [Gapic::CallOptions, Hash]
328
+ # @param request [::Google::Cloud::Vision::V1p3beta1::CreateProductSetRequest, ::Hash]
329
+ # A request object representing the call parameters. Required. To specify no
330
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
331
+ # @param options [::Gapic::CallOptions, ::Hash]
332
332
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
333
333
  #
334
334
  # @overload create_product_set(parent: nil, product_set: nil, product_set_id: nil)
335
- # @param parent [String]
335
+ # Pass arguments to `create_product_set` via keyword arguments. Note that at
336
+ # least one keyword argument is required. To specify no parameters, or to keep all
337
+ # the default parameter values, pass an empty Hash as a request object (see above).
338
+ #
339
+ # @param parent [::String]
336
340
  # Required. The project in which the ProductSet should be created.
337
341
  #
338
342
  # Format is `projects/PROJECT_ID/locations/LOC_ID`.
339
- # @param product_set [Google::Cloud::Vision::V1p3beta1::ProductSet | Hash]
343
+ # @param product_set [::Google::Cloud::Vision::V1p3beta1::ProductSet, ::Hash]
340
344
  # Required. The ProductSet to create.
341
- # @param product_set_id [String]
345
+ # @param product_set_id [::String]
342
346
  # A user-supplied resource id for this ProductSet. If set, the server will
343
347
  # attempt to use this value as the resource id. If it is already in use, an
344
348
  # error is returned with code ALREADY_EXISTS. Must be at most 128 characters
345
349
  # long. It cannot contain the character `/`.
346
350
  #
347
- #
348
351
  # @yield [response, operation] Access the result along with the RPC operation
349
- # @yieldparam response [Google::Cloud::Vision::V1p3beta1::ProductSet]
350
- # @yieldparam operation [GRPC::ActiveCall::Operation]
352
+ # @yieldparam response [::Google::Cloud::Vision::V1p3beta1::ProductSet]
353
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
351
354
  #
352
- # @return [Google::Cloud::Vision::V1p3beta1::ProductSet]
355
+ # @return [::Google::Cloud::Vision::V1p3beta1::ProductSet]
353
356
  #
354
- # @raise [Google::Cloud::Error] if the RPC is aborted.
357
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
355
358
  #
356
359
  def create_product_set request, options = nil
357
- raise ArgumentError, "request must be provided" if request.nil?
360
+ raise ::ArgumentError, "request must be provided" if request.nil?
358
361
 
359
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::CreateProductSetRequest
362
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::CreateProductSetRequest
360
363
 
361
364
  # Converts hash and nil to an options object
362
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
365
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
363
366
 
364
367
  # Customize the options with defaults
365
368
  metadata = @config.rpcs.create_product_set.metadata.to_h
366
369
 
367
370
  # Set x-goog-api-client and x-goog-user-project headers
368
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
371
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
369
372
  lib_name: @config.lib_name, lib_version: @config.lib_version,
370
373
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
371
374
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -386,8 +389,8 @@ module Google
386
389
  yield response, operation if block_given?
387
390
  return response
388
391
  end
389
- rescue GRPC::BadStatus => e
390
- raise Google::Cloud::Error.from_error(e)
392
+ rescue ::GRPC::BadStatus => e
393
+ raise ::Google::Cloud::Error.from_error(e)
391
394
  end
392
395
 
393
396
  ##
@@ -399,48 +402,50 @@ module Google
399
402
  # than 1.
400
403
  #
401
404
  # @overload list_product_sets(request, options = nil)
402
- # @param request [Google::Cloud::Vision::V1p3beta1::ListProductSetsRequest | Hash]
403
- # Lists ProductSets in an unspecified order.
404
- #
405
- # Possible errors:
405
+ # Pass arguments to `list_product_sets` via a request object, either of type
406
+ # {::Google::Cloud::Vision::V1p3beta1::ListProductSetsRequest} or an equivalent Hash.
406
407
  #
407
- # * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
408
- # than 1.
409
- # @param options [Gapic::CallOptions, Hash]
408
+ # @param request [::Google::Cloud::Vision::V1p3beta1::ListProductSetsRequest, ::Hash]
409
+ # A request object representing the call parameters. Required. To specify no
410
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
411
+ # @param options [::Gapic::CallOptions, ::Hash]
410
412
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
411
413
  #
412
414
  # @overload list_product_sets(parent: nil, page_size: nil, page_token: nil)
413
- # @param parent [String]
415
+ # Pass arguments to `list_product_sets` via keyword arguments. Note that at
416
+ # least one keyword argument is required. To specify no parameters, or to keep all
417
+ # the default parameter values, pass an empty Hash as a request object (see above).
418
+ #
419
+ # @param parent [::String]
414
420
  # Required. The project from which ProductSets should be listed.
415
421
  #
416
422
  # Format is `projects/PROJECT_ID/locations/LOC_ID`.
417
- # @param page_size [Integer]
423
+ # @param page_size [::Integer]
418
424
  # The maximum number of items to return. Default 10, maximum 100.
419
- # @param page_token [String]
425
+ # @param page_token [::String]
420
426
  # The next_page_token returned from a previous List request, if any.
421
427
  #
422
- #
423
428
  # @yield [response, operation] Access the result along with the RPC operation
424
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Vision::V1p3beta1::ProductSet>]
425
- # @yieldparam operation [GRPC::ActiveCall::Operation]
429
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1p3beta1::ProductSet>]
430
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
426
431
  #
427
- # @return [Gapic::PagedEnumerable<Google::Cloud::Vision::V1p3beta1::ProductSet>]
432
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1p3beta1::ProductSet>]
428
433
  #
429
- # @raise [Google::Cloud::Error] if the RPC is aborted.
434
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
430
435
  #
431
436
  def list_product_sets request, options = nil
432
- raise ArgumentError, "request must be provided" if request.nil?
437
+ raise ::ArgumentError, "request must be provided" if request.nil?
433
438
 
434
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::ListProductSetsRequest
439
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::ListProductSetsRequest
435
440
 
436
441
  # Converts hash and nil to an options object
437
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
442
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
438
443
 
439
444
  # Customize the options with defaults
440
445
  metadata = @config.rpcs.list_product_sets.metadata.to_h
441
446
 
442
447
  # Set x-goog-api-client and x-goog-user-project headers
443
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
448
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
444
449
  lib_name: @config.lib_name, lib_version: @config.lib_version,
445
450
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
446
451
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -458,12 +463,12 @@ module Google
458
463
  retry_policy: @config.retry_policy
459
464
 
460
465
  @product_search_stub.call_rpc :list_product_sets, request, options: options do |response, operation|
461
- response = Gapic::PagedEnumerable.new @product_search_stub, :list_product_sets, request, response, operation, options
466
+ response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_product_sets, request, response, operation, options
462
467
  yield response, operation if block_given?
463
468
  return response
464
469
  end
465
- rescue GRPC::BadStatus => e
466
- raise Google::Cloud::Error.from_error(e)
470
+ rescue ::GRPC::BadStatus => e
471
+ raise ::Google::Cloud::Error.from_error(e)
467
472
  end
468
473
 
469
474
  ##
@@ -474,44 +479,47 @@ module Google
474
479
  # * Returns NOT_FOUND if the ProductSet does not exist.
475
480
  #
476
481
  # @overload get_product_set(request, options = nil)
477
- # @param request [Google::Cloud::Vision::V1p3beta1::GetProductSetRequest | Hash]
478
- # Gets information associated with a ProductSet.
482
+ # Pass arguments to `get_product_set` via a request object, either of type
483
+ # {::Google::Cloud::Vision::V1p3beta1::GetProductSetRequest} or an equivalent Hash.
479
484
  #
480
- # Possible errors:
481
- #
482
- # * Returns NOT_FOUND if the ProductSet does not exist.
483
- # @param options [Gapic::CallOptions, Hash]
485
+ # @param request [::Google::Cloud::Vision::V1p3beta1::GetProductSetRequest, ::Hash]
486
+ # A request object representing the call parameters. Required. To specify no
487
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
488
+ # @param options [::Gapic::CallOptions, ::Hash]
484
489
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
485
490
  #
486
491
  # @overload get_product_set(name: nil)
487
- # @param name [String]
492
+ # Pass arguments to `get_product_set` via keyword arguments. Note that at
493
+ # least one keyword argument is required. To specify no parameters, or to keep all
494
+ # the default parameter values, pass an empty Hash as a request object (see above).
495
+ #
496
+ # @param name [::String]
488
497
  # Required. Resource name of the ProductSet to get.
489
498
  #
490
499
  # Format is:
491
500
  # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
492
501
  #
493
- #
494
502
  # @yield [response, operation] Access the result along with the RPC operation
495
- # @yieldparam response [Google::Cloud::Vision::V1p3beta1::ProductSet]
496
- # @yieldparam operation [GRPC::ActiveCall::Operation]
503
+ # @yieldparam response [::Google::Cloud::Vision::V1p3beta1::ProductSet]
504
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
497
505
  #
498
- # @return [Google::Cloud::Vision::V1p3beta1::ProductSet]
506
+ # @return [::Google::Cloud::Vision::V1p3beta1::ProductSet]
499
507
  #
500
- # @raise [Google::Cloud::Error] if the RPC is aborted.
508
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
501
509
  #
502
510
  def get_product_set request, options = nil
503
- raise ArgumentError, "request must be provided" if request.nil?
511
+ raise ::ArgumentError, "request must be provided" if request.nil?
504
512
 
505
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::GetProductSetRequest
513
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::GetProductSetRequest
506
514
 
507
515
  # Converts hash and nil to an options object
508
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
516
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
509
517
 
510
518
  # Customize the options with defaults
511
519
  metadata = @config.rpcs.get_product_set.metadata.to_h
512
520
 
513
521
  # Set x-goog-api-client and x-goog-user-project headers
514
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
522
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
515
523
  lib_name: @config.lib_name, lib_version: @config.lib_version,
516
524
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
517
525
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -532,8 +540,8 @@ module Google
532
540
  yield response, operation if block_given?
533
541
  return response
534
542
  end
535
- rescue GRPC::BadStatus => e
536
- raise Google::Cloud::Error.from_error(e)
543
+ rescue ::GRPC::BadStatus => e
544
+ raise ::Google::Cloud::Error.from_error(e)
537
545
  end
538
546
 
539
547
  ##
@@ -547,49 +555,49 @@ module Google
547
555
  # missing from the request or longer than 4096 characters.
548
556
  #
549
557
  # @overload update_product_set(request, options = nil)
550
- # @param request [Google::Cloud::Vision::V1p3beta1::UpdateProductSetRequest | Hash]
551
- # Makes changes to a ProductSet resource.
552
- # Only display_name can be updated currently.
553
- #
554
- # Possible errors:
558
+ # Pass arguments to `update_product_set` via a request object, either of type
559
+ # {::Google::Cloud::Vision::V1p3beta1::UpdateProductSetRequest} or an equivalent Hash.
555
560
  #
556
- # * Returns NOT_FOUND if the ProductSet does not exist.
557
- # * Returns INVALID_ARGUMENT if display_name is present in update_mask but
558
- # missing from the request or longer than 4096 characters.
559
- # @param options [Gapic::CallOptions, Hash]
561
+ # @param request [::Google::Cloud::Vision::V1p3beta1::UpdateProductSetRequest, ::Hash]
562
+ # A request object representing the call parameters. Required. To specify no
563
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
564
+ # @param options [::Gapic::CallOptions, ::Hash]
560
565
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
561
566
  #
562
567
  # @overload update_product_set(product_set: nil, update_mask: nil)
563
- # @param product_set [Google::Cloud::Vision::V1p3beta1::ProductSet | Hash]
568
+ # Pass arguments to `update_product_set` via keyword arguments. Note that at
569
+ # least one keyword argument is required. To specify no parameters, or to keep all
570
+ # the default parameter values, pass an empty Hash as a request object (see above).
571
+ #
572
+ # @param product_set [::Google::Cloud::Vision::V1p3beta1::ProductSet, ::Hash]
564
573
  # Required. The ProductSet resource which replaces the one on the server.
565
- # @param update_mask [Google::Protobuf::FieldMask | Hash]
566
- # The {Google::Protobuf::FieldMask FieldMask} that specifies which fields to
574
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
575
+ # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields to
567
576
  # update.
568
577
  # If update_mask isn't specified, all mutable fields are to be updated.
569
578
  # Valid mask path is `display_name`.
570
579
  #
571
- #
572
580
  # @yield [response, operation] Access the result along with the RPC operation
573
- # @yieldparam response [Google::Cloud::Vision::V1p3beta1::ProductSet]
574
- # @yieldparam operation [GRPC::ActiveCall::Operation]
581
+ # @yieldparam response [::Google::Cloud::Vision::V1p3beta1::ProductSet]
582
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
575
583
  #
576
- # @return [Google::Cloud::Vision::V1p3beta1::ProductSet]
584
+ # @return [::Google::Cloud::Vision::V1p3beta1::ProductSet]
577
585
  #
578
- # @raise [Google::Cloud::Error] if the RPC is aborted.
586
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
579
587
  #
580
588
  def update_product_set request, options = nil
581
- raise ArgumentError, "request must be provided" if request.nil?
589
+ raise ::ArgumentError, "request must be provided" if request.nil?
582
590
 
583
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::UpdateProductSetRequest
591
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::UpdateProductSetRequest
584
592
 
585
593
  # Converts hash and nil to an options object
586
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
594
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
587
595
 
588
596
  # Customize the options with defaults
589
597
  metadata = @config.rpcs.update_product_set.metadata.to_h
590
598
 
591
599
  # Set x-goog-api-client and x-goog-user-project headers
592
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
600
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
593
601
  lib_name: @config.lib_name, lib_version: @config.lib_version,
594
602
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
595
603
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -610,8 +618,8 @@ module Google
610
618
  yield response, operation if block_given?
611
619
  return response
612
620
  end
613
- rescue GRPC::BadStatus => e
614
- raise Google::Cloud::Error.from_error(e)
621
+ rescue ::GRPC::BadStatus => e
622
+ raise ::Google::Cloud::Error.from_error(e)
615
623
  end
616
624
 
617
625
  ##
@@ -625,47 +633,47 @@ module Google
625
633
  # * Returns NOT_FOUND if the ProductSet does not exist.
626
634
  #
627
635
  # @overload delete_product_set(request, options = nil)
628
- # @param request [Google::Cloud::Vision::V1p3beta1::DeleteProductSetRequest | Hash]
629
- # Permanently deletes a ProductSet. All Products and ReferenceImages in the
630
- # ProductSet will be deleted.
636
+ # Pass arguments to `delete_product_set` via a request object, either of type
637
+ # {::Google::Cloud::Vision::V1p3beta1::DeleteProductSetRequest} or an equivalent Hash.
631
638
  #
632
- # The actual image files are not deleted from Google Cloud Storage.
633
- #
634
- # Possible errors:
635
- #
636
- # * Returns NOT_FOUND if the ProductSet does not exist.
637
- # @param options [Gapic::CallOptions, Hash]
639
+ # @param request [::Google::Cloud::Vision::V1p3beta1::DeleteProductSetRequest, ::Hash]
640
+ # A request object representing the call parameters. Required. To specify no
641
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
642
+ # @param options [::Gapic::CallOptions, ::Hash]
638
643
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
639
644
  #
640
645
  # @overload delete_product_set(name: nil)
641
- # @param name [String]
646
+ # Pass arguments to `delete_product_set` via keyword arguments. Note that at
647
+ # least one keyword argument is required. To specify no parameters, or to keep all
648
+ # the default parameter values, pass an empty Hash as a request object (see above).
649
+ #
650
+ # @param name [::String]
642
651
  # Required. Resource name of the ProductSet to delete.
643
652
  #
644
653
  # Format is:
645
654
  # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
646
655
  #
647
- #
648
656
  # @yield [response, operation] Access the result along with the RPC operation
649
- # @yieldparam response [Google::Protobuf::Empty]
650
- # @yieldparam operation [GRPC::ActiveCall::Operation]
657
+ # @yieldparam response [::Google::Protobuf::Empty]
658
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
651
659
  #
652
- # @return [Google::Protobuf::Empty]
660
+ # @return [::Google::Protobuf::Empty]
653
661
  #
654
- # @raise [Google::Cloud::Error] if the RPC is aborted.
662
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
655
663
  #
656
664
  def delete_product_set request, options = nil
657
- raise ArgumentError, "request must be provided" if request.nil?
665
+ raise ::ArgumentError, "request must be provided" if request.nil?
658
666
 
659
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::DeleteProductSetRequest
667
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::DeleteProductSetRequest
660
668
 
661
669
  # Converts hash and nil to an options object
662
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
670
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
663
671
 
664
672
  # Customize the options with defaults
665
673
  metadata = @config.rpcs.delete_product_set.metadata.to_h
666
674
 
667
675
  # Set x-goog-api-client and x-goog-user-project headers
668
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
676
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
669
677
  lib_name: @config.lib_name, lib_version: @config.lib_version,
670
678
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
671
679
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -686,8 +694,8 @@ module Google
686
694
  yield response, operation if block_given?
687
695
  return response
688
696
  end
689
- rescue GRPC::BadStatus => e
690
- raise Google::Cloud::Error.from_error(e)
697
+ rescue ::GRPC::BadStatus => e
698
+ raise ::Google::Cloud::Error.from_error(e)
691
699
  end
692
700
 
693
701
  ##
@@ -701,54 +709,54 @@ module Google
701
709
  # * Returns INVALID_ARGUMENT if product_category is missing or invalid.
702
710
  #
703
711
  # @overload create_product(request, options = nil)
704
- # @param request [Google::Cloud::Vision::V1p3beta1::CreateProductRequest | Hash]
705
- # Creates and returns a new product resource.
706
- #
707
- # Possible errors:
712
+ # Pass arguments to `create_product` via a request object, either of type
713
+ # {::Google::Cloud::Vision::V1p3beta1::CreateProductRequest} or an equivalent Hash.
708
714
  #
709
- # * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
710
- # characters.
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]
715
+ # @param request [::Google::Cloud::Vision::V1p3beta1::CreateProductRequest, ::Hash]
716
+ # A request object representing the call parameters. Required. To specify no
717
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
718
+ # @param options [::Gapic::CallOptions, ::Hash]
714
719
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
715
720
  #
716
721
  # @overload create_product(parent: nil, product: nil, product_id: nil)
717
- # @param parent [String]
722
+ # Pass arguments to `create_product` via keyword arguments. Note that at
723
+ # least one keyword argument is required. To specify no parameters, or to keep all
724
+ # the default parameter values, pass an empty Hash as a request object (see above).
725
+ #
726
+ # @param parent [::String]
718
727
  # Required. The project in which the Product should be created.
719
728
  #
720
729
  # Format is
721
730
  # `projects/PROJECT_ID/locations/LOC_ID`.
722
- # @param product [Google::Cloud::Vision::V1p3beta1::Product | Hash]
731
+ # @param product [::Google::Cloud::Vision::V1p3beta1::Product, ::Hash]
723
732
  # Required. The product to create.
724
- # @param product_id [String]
733
+ # @param product_id [::String]
725
734
  # A user-supplied resource id for this Product. If set, the server will
726
735
  # attempt to use this value as the resource id. If it is already in use, an
727
736
  # error is returned with code ALREADY_EXISTS. Must be at most 128 characters
728
737
  # long. It cannot contain the character `/`.
729
738
  #
730
- #
731
739
  # @yield [response, operation] Access the result along with the RPC operation
732
- # @yieldparam response [Google::Cloud::Vision::V1p3beta1::Product]
733
- # @yieldparam operation [GRPC::ActiveCall::Operation]
740
+ # @yieldparam response [::Google::Cloud::Vision::V1p3beta1::Product]
741
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
734
742
  #
735
- # @return [Google::Cloud::Vision::V1p3beta1::Product]
743
+ # @return [::Google::Cloud::Vision::V1p3beta1::Product]
736
744
  #
737
- # @raise [Google::Cloud::Error] if the RPC is aborted.
745
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
738
746
  #
739
747
  def create_product request, options = nil
740
- raise ArgumentError, "request must be provided" if request.nil?
748
+ raise ::ArgumentError, "request must be provided" if request.nil?
741
749
 
742
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::CreateProductRequest
750
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::CreateProductRequest
743
751
 
744
752
  # Converts hash and nil to an options object
745
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
753
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
746
754
 
747
755
  # Customize the options with defaults
748
756
  metadata = @config.rpcs.create_product.metadata.to_h
749
757
 
750
758
  # Set x-goog-api-client and x-goog-user-project headers
751
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
759
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
752
760
  lib_name: @config.lib_name, lib_version: @config.lib_version,
753
761
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
754
762
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -769,8 +777,8 @@ module Google
769
777
  yield response, operation if block_given?
770
778
  return response
771
779
  end
772
- rescue GRPC::BadStatus => e
773
- raise Google::Cloud::Error.from_error(e)
780
+ rescue ::GRPC::BadStatus => e
781
+ raise ::Google::Cloud::Error.from_error(e)
774
782
  end
775
783
 
776
784
  ##
@@ -781,48 +789,51 @@ module Google
781
789
  # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
782
790
  #
783
791
  # @overload list_products(request, options = nil)
784
- # @param request [Google::Cloud::Vision::V1p3beta1::ListProductsRequest | Hash]
785
- # Lists products in an unspecified order.
792
+ # Pass arguments to `list_products` via a request object, either of type
793
+ # {::Google::Cloud::Vision::V1p3beta1::ListProductsRequest} or an equivalent Hash.
786
794
  #
787
- # Possible errors:
788
- #
789
- # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
790
- # @param options [Gapic::CallOptions, Hash]
795
+ # @param request [::Google::Cloud::Vision::V1p3beta1::ListProductsRequest, ::Hash]
796
+ # A request object representing the call parameters. Required. To specify no
797
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
798
+ # @param options [::Gapic::CallOptions, ::Hash]
791
799
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
792
800
  #
793
801
  # @overload list_products(parent: nil, page_size: nil, page_token: nil)
794
- # @param parent [String]
802
+ # Pass arguments to `list_products` via keyword arguments. Note that at
803
+ # least one keyword argument is required. To specify no parameters, or to keep all
804
+ # the default parameter values, pass an empty Hash as a request object (see above).
805
+ #
806
+ # @param parent [::String]
795
807
  # Required. The project OR ProductSet from which Products should be listed.
796
808
  #
797
809
  # Format:
798
810
  # `projects/PROJECT_ID/locations/LOC_ID`
799
- # @param page_size [Integer]
811
+ # @param page_size [::Integer]
800
812
  # The maximum number of items to return. Default 10, maximum 100.
801
- # @param page_token [String]
813
+ # @param page_token [::String]
802
814
  # The next_page_token returned from a previous List request, if any.
803
815
  #
804
- #
805
816
  # @yield [response, operation] Access the result along with the RPC operation
806
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Vision::V1p3beta1::Product>]
807
- # @yieldparam operation [GRPC::ActiveCall::Operation]
817
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1p3beta1::Product>]
818
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
808
819
  #
809
- # @return [Gapic::PagedEnumerable<Google::Cloud::Vision::V1p3beta1::Product>]
820
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1p3beta1::Product>]
810
821
  #
811
- # @raise [Google::Cloud::Error] if the RPC is aborted.
822
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
812
823
  #
813
824
  def list_products request, options = nil
814
- raise ArgumentError, "request must be provided" if request.nil?
825
+ raise ::ArgumentError, "request must be provided" if request.nil?
815
826
 
816
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::ListProductsRequest
827
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::ListProductsRequest
817
828
 
818
829
  # Converts hash and nil to an options object
819
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
830
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
820
831
 
821
832
  # Customize the options with defaults
822
833
  metadata = @config.rpcs.list_products.metadata.to_h
823
834
 
824
835
  # Set x-goog-api-client and x-goog-user-project headers
825
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
836
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
826
837
  lib_name: @config.lib_name, lib_version: @config.lib_version,
827
838
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
828
839
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -840,12 +851,12 @@ module Google
840
851
  retry_policy: @config.retry_policy
841
852
 
842
853
  @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
854
+ response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_products, request, response, operation, options
844
855
  yield response, operation if block_given?
845
856
  return response
846
857
  end
847
- rescue GRPC::BadStatus => e
848
- raise Google::Cloud::Error.from_error(e)
858
+ rescue ::GRPC::BadStatus => e
859
+ raise ::Google::Cloud::Error.from_error(e)
849
860
  end
850
861
 
851
862
  ##
@@ -856,44 +867,47 @@ module Google
856
867
  # * Returns NOT_FOUND if the Product does not exist.
857
868
  #
858
869
  # @overload get_product(request, options = nil)
859
- # @param request [Google::Cloud::Vision::V1p3beta1::GetProductRequest | Hash]
860
- # Gets information associated with a Product.
861
- #
862
- # Possible errors:
870
+ # Pass arguments to `get_product` via a request object, either of type
871
+ # {::Google::Cloud::Vision::V1p3beta1::GetProductRequest} or an equivalent Hash.
863
872
  #
864
- # * Returns NOT_FOUND if the Product does not exist.
865
- # @param options [Gapic::CallOptions, Hash]
873
+ # @param request [::Google::Cloud::Vision::V1p3beta1::GetProductRequest, ::Hash]
874
+ # A request object representing the call parameters. Required. To specify no
875
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
876
+ # @param options [::Gapic::CallOptions, ::Hash]
866
877
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
867
878
  #
868
879
  # @overload get_product(name: nil)
869
- # @param name [String]
880
+ # Pass arguments to `get_product` via keyword arguments. Note that at
881
+ # least one keyword argument is required. To specify no parameters, or to keep all
882
+ # the default parameter values, pass an empty Hash as a request object (see above).
883
+ #
884
+ # @param name [::String]
870
885
  # Required. Resource name of the Product to get.
871
886
  #
872
887
  # Format is:
873
888
  # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
874
889
  #
875
- #
876
890
  # @yield [response, operation] Access the result along with the RPC operation
877
- # @yieldparam response [Google::Cloud::Vision::V1p3beta1::Product]
878
- # @yieldparam operation [GRPC::ActiveCall::Operation]
891
+ # @yieldparam response [::Google::Cloud::Vision::V1p3beta1::Product]
892
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
879
893
  #
880
- # @return [Google::Cloud::Vision::V1p3beta1::Product]
894
+ # @return [::Google::Cloud::Vision::V1p3beta1::Product]
881
895
  #
882
- # @raise [Google::Cloud::Error] if the RPC is aborted.
896
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
883
897
  #
884
898
  def get_product request, options = nil
885
- raise ArgumentError, "request must be provided" if request.nil?
899
+ raise ::ArgumentError, "request must be provided" if request.nil?
886
900
 
887
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::GetProductRequest
901
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::GetProductRequest
888
902
 
889
903
  # Converts hash and nil to an options object
890
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
904
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
891
905
 
892
906
  # Customize the options with defaults
893
907
  metadata = @config.rpcs.get_product.metadata.to_h
894
908
 
895
909
  # Set x-goog-api-client and x-goog-user-project headers
896
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
910
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
897
911
  lib_name: @config.lib_name, lib_version: @config.lib_version,
898
912
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
899
913
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -914,8 +928,8 @@ module Google
914
928
  yield response, operation if block_given?
915
929
  return response
916
930
  end
917
- rescue GRPC::BadStatus => e
918
- raise Google::Cloud::Error.from_error(e)
931
+ rescue ::GRPC::BadStatus => e
932
+ raise ::Google::Cloud::Error.from_error(e)
919
933
  end
920
934
 
921
935
  ##
@@ -935,57 +949,51 @@ module Google
935
949
  # * Returns INVALID_ARGUMENT if product_category is present in update_mask.
936
950
  #
937
951
  # @overload update_product(request, options = nil)
938
- # @param request [Google::Cloud::Vision::V1p3beta1::UpdateProductRequest | Hash]
939
- # Makes changes to a Product resource.
940
- # Only display_name, description and labels can be updated right now.
941
- #
942
- # If labels are updated, the change will not be reflected in queries until
943
- # the next index time.
944
- #
945
- # Possible errors:
946
- #
947
- # * Returns NOT_FOUND if the Product does not exist.
948
- # * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
949
- # missing from the request or longer than 4096 characters.
950
- # * Returns INVALID_ARGUMENT if description is present in update_mask but is
951
- # longer than 4096 characters.
952
- # * Returns INVALID_ARGUMENT if product_category is present in update_mask.
953
- # @param options [Gapic::CallOptions, Hash]
952
+ # Pass arguments to `update_product` via a request object, either of type
953
+ # {::Google::Cloud::Vision::V1p3beta1::UpdateProductRequest} or an equivalent Hash.
954
+ #
955
+ # @param request [::Google::Cloud::Vision::V1p3beta1::UpdateProductRequest, ::Hash]
956
+ # A request object representing the call parameters. Required. To specify no
957
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
958
+ # @param options [::Gapic::CallOptions, ::Hash]
954
959
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
955
960
  #
956
961
  # @overload update_product(product: nil, update_mask: nil)
957
- # @param product [Google::Cloud::Vision::V1p3beta1::Product | Hash]
962
+ # Pass arguments to `update_product` via keyword arguments. Note that at
963
+ # least one keyword argument is required. To specify no parameters, or to keep all
964
+ # the default parameter values, pass an empty Hash as a request object (see above).
965
+ #
966
+ # @param product [::Google::Cloud::Vision::V1p3beta1::Product, ::Hash]
958
967
  # Required. The Product resource which replaces the one on the server.
959
968
  # product.name is immutable.
960
- # @param update_mask [Google::Protobuf::FieldMask | Hash]
961
- # The {Google::Protobuf::FieldMask FieldMask} that specifies which fields
969
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
970
+ # The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields
962
971
  # to update.
963
972
  # If update_mask isn't specified, all mutable fields are to be updated.
964
973
  # Valid mask paths include `product_labels`, `display_name`, and
965
974
  # `description`.
966
975
  #
967
- #
968
976
  # @yield [response, operation] Access the result along with the RPC operation
969
- # @yieldparam response [Google::Cloud::Vision::V1p3beta1::Product]
970
- # @yieldparam operation [GRPC::ActiveCall::Operation]
977
+ # @yieldparam response [::Google::Cloud::Vision::V1p3beta1::Product]
978
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
971
979
  #
972
- # @return [Google::Cloud::Vision::V1p3beta1::Product]
980
+ # @return [::Google::Cloud::Vision::V1p3beta1::Product]
973
981
  #
974
- # @raise [Google::Cloud::Error] if the RPC is aborted.
982
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
975
983
  #
976
984
  def update_product request, options = nil
977
- raise ArgumentError, "request must be provided" if request.nil?
985
+ raise ::ArgumentError, "request must be provided" if request.nil?
978
986
 
979
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::UpdateProductRequest
987
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::UpdateProductRequest
980
988
 
981
989
  # Converts hash and nil to an options object
982
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
990
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
983
991
 
984
992
  # Customize the options with defaults
985
993
  metadata = @config.rpcs.update_product.metadata.to_h
986
994
 
987
995
  # Set x-goog-api-client and x-goog-user-project headers
988
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
996
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
989
997
  lib_name: @config.lib_name, lib_version: @config.lib_version,
990
998
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
991
999
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1006,8 +1014,8 @@ module Google
1006
1014
  yield response, operation if block_given?
1007
1015
  return response
1008
1016
  end
1009
- rescue GRPC::BadStatus => e
1010
- raise Google::Cloud::Error.from_error(e)
1017
+ rescue ::GRPC::BadStatus => e
1018
+ raise ::Google::Cloud::Error.from_error(e)
1011
1019
  end
1012
1020
 
1013
1021
  ##
@@ -1022,48 +1030,47 @@ module Google
1022
1030
  # * Returns NOT_FOUND if the product does not exist.
1023
1031
  #
1024
1032
  # @overload delete_product(request, options = nil)
1025
- # @param request [Google::Cloud::Vision::V1p3beta1::DeleteProductRequest | Hash]
1026
- # Permanently deletes a product and its reference images.
1027
- #
1028
- # Metadata of the product and all its images will be deleted right away, but
1029
- # search queries against ProductSets containing the product may still work
1030
- # until all related caches are refreshed.
1033
+ # Pass arguments to `delete_product` via a request object, either of type
1034
+ # {::Google::Cloud::Vision::V1p3beta1::DeleteProductRequest} or an equivalent Hash.
1031
1035
  #
1032
- # Possible errors:
1033
- #
1034
- # * Returns NOT_FOUND if the product does not exist.
1035
- # @param options [Gapic::CallOptions, Hash]
1036
+ # @param request [::Google::Cloud::Vision::V1p3beta1::DeleteProductRequest, ::Hash]
1037
+ # A request object representing the call parameters. Required. To specify no
1038
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1039
+ # @param options [::Gapic::CallOptions, ::Hash]
1036
1040
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1037
1041
  #
1038
1042
  # @overload delete_product(name: nil)
1039
- # @param name [String]
1043
+ # Pass arguments to `delete_product` via keyword arguments. Note that at
1044
+ # least one keyword argument is required. To specify no parameters, or to keep all
1045
+ # the default parameter values, pass an empty Hash as a request object (see above).
1046
+ #
1047
+ # @param name [::String]
1040
1048
  # Required. Resource name of product to delete.
1041
1049
  #
1042
1050
  # Format is:
1043
1051
  # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
1044
1052
  #
1045
- #
1046
1053
  # @yield [response, operation] Access the result along with the RPC operation
1047
- # @yieldparam response [Google::Protobuf::Empty]
1048
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1054
+ # @yieldparam response [::Google::Protobuf::Empty]
1055
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1049
1056
  #
1050
- # @return [Google::Protobuf::Empty]
1057
+ # @return [::Google::Protobuf::Empty]
1051
1058
  #
1052
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1059
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1053
1060
  #
1054
1061
  def delete_product request, options = nil
1055
- raise ArgumentError, "request must be provided" if request.nil?
1062
+ raise ::ArgumentError, "request must be provided" if request.nil?
1056
1063
 
1057
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::DeleteProductRequest
1064
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::DeleteProductRequest
1058
1065
 
1059
1066
  # Converts hash and nil to an options object
1060
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1067
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1061
1068
 
1062
1069
  # Customize the options with defaults
1063
1070
  metadata = @config.rpcs.delete_product.metadata.to_h
1064
1071
 
1065
1072
  # Set x-goog-api-client and x-goog-user-project headers
1066
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1073
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1067
1074
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1068
1075
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
1069
1076
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1084,8 +1091,8 @@ module Google
1084
1091
  yield response, operation if block_given?
1085
1092
  return response
1086
1093
  end
1087
- rescue GRPC::BadStatus => e
1088
- raise Google::Cloud::Error.from_error(e)
1094
+ rescue ::GRPC::BadStatus => e
1095
+ raise ::Google::Cloud::Error.from_error(e)
1089
1096
  end
1090
1097
 
1091
1098
  ##
@@ -1110,66 +1117,55 @@ module Google
1110
1117
  # * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
1111
1118
  #
1112
1119
  # @overload create_reference_image(request, options = nil)
1113
- # @param request [Google::Cloud::Vision::V1p3beta1::CreateReferenceImageRequest | Hash]
1114
- # Creates and returns a new ReferenceImage resource.
1115
- #
1116
- # The `bounding_poly` field is optional. If `bounding_poly` is not specified,
1117
- # the system will try to detect regions of interest in the image that are
1118
- # compatible with the product_category on the parent product. If it is
1119
- # specified, detection is ALWAYS skipped. The system converts polygons into
1120
- # non-rotated rectangles.
1121
- #
1122
- # Note that the pipeline will resize the image if the image resolution is too
1123
- # large to process (above 50MP).
1124
- #
1125
- # Possible errors:
1126
- #
1127
- # * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
1128
- # characters.
1129
- # * Returns INVALID_ARGUMENT if the product does not exist.
1130
- # * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
1131
- # compatible with the parent product's product_category is detected.
1132
- # * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
1133
- # @param options [Gapic::CallOptions, Hash]
1120
+ # Pass arguments to `create_reference_image` via a request object, either of type
1121
+ # {::Google::Cloud::Vision::V1p3beta1::CreateReferenceImageRequest} or an equivalent Hash.
1122
+ #
1123
+ # @param request [::Google::Cloud::Vision::V1p3beta1::CreateReferenceImageRequest, ::Hash]
1124
+ # A request object representing the call parameters. Required. To specify no
1125
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1126
+ # @param options [::Gapic::CallOptions, ::Hash]
1134
1127
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1135
1128
  #
1136
1129
  # @overload create_reference_image(parent: nil, reference_image: nil, reference_image_id: nil)
1137
- # @param parent [String]
1130
+ # Pass arguments to `create_reference_image` via keyword arguments. Note that at
1131
+ # least one keyword argument is required. To specify no parameters, or to keep all
1132
+ # the default parameter values, pass an empty Hash as a request object (see above).
1133
+ #
1134
+ # @param parent [::String]
1138
1135
  # Required. Resource name of the product in which to create the reference image.
1139
1136
  #
1140
1137
  # Format is
1141
1138
  # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
1142
- # @param reference_image [Google::Cloud::Vision::V1p3beta1::ReferenceImage | Hash]
1139
+ # @param reference_image [::Google::Cloud::Vision::V1p3beta1::ReferenceImage, ::Hash]
1143
1140
  # Required. The reference image to create.
1144
1141
  # If an image ID is specified, it is ignored.
1145
- # @param reference_image_id [String]
1142
+ # @param reference_image_id [::String]
1146
1143
  # A user-supplied resource id for the ReferenceImage to be added. If set,
1147
1144
  # the server will attempt to use this value as the resource id. If it is
1148
1145
  # already in use, an error is returned with code ALREADY_EXISTS. Must be at
1149
1146
  # most 128 characters long. It cannot contain the character `/`.
1150
1147
  #
1151
- #
1152
1148
  # @yield [response, operation] Access the result along with the RPC operation
1153
- # @yieldparam response [Google::Cloud::Vision::V1p3beta1::ReferenceImage]
1154
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1149
+ # @yieldparam response [::Google::Cloud::Vision::V1p3beta1::ReferenceImage]
1150
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1155
1151
  #
1156
- # @return [Google::Cloud::Vision::V1p3beta1::ReferenceImage]
1152
+ # @return [::Google::Cloud::Vision::V1p3beta1::ReferenceImage]
1157
1153
  #
1158
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1154
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1159
1155
  #
1160
1156
  def create_reference_image request, options = nil
1161
- raise ArgumentError, "request must be provided" if request.nil?
1157
+ raise ::ArgumentError, "request must be provided" if request.nil?
1162
1158
 
1163
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::CreateReferenceImageRequest
1159
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::CreateReferenceImageRequest
1164
1160
 
1165
1161
  # Converts hash and nil to an options object
1166
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1162
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1167
1163
 
1168
1164
  # Customize the options with defaults
1169
1165
  metadata = @config.rpcs.create_reference_image.metadata.to_h
1170
1166
 
1171
1167
  # Set x-goog-api-client and x-goog-user-project headers
1172
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1168
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1173
1169
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1174
1170
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
1175
1171
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1190,8 +1186,8 @@ module Google
1190
1186
  yield response, operation if block_given?
1191
1187
  return response
1192
1188
  end
1193
- rescue GRPC::BadStatus => e
1194
- raise Google::Cloud::Error.from_error(e)
1189
+ rescue ::GRPC::BadStatus => e
1190
+ raise ::Google::Cloud::Error.from_error(e)
1195
1191
  end
1196
1192
 
1197
1193
  ##
@@ -1208,51 +1204,48 @@ module Google
1208
1204
  # * Returns NOT_FOUND if the reference image does not exist.
1209
1205
  #
1210
1206
  # @overload delete_reference_image(request, options = nil)
1211
- # @param request [Google::Cloud::Vision::V1p3beta1::DeleteReferenceImageRequest | Hash]
1212
- # Permanently deletes a reference image.
1213
- #
1214
- # The image metadata will be deleted right away, but search queries
1215
- # against ProductSets containing the image may still work until all related
1216
- # caches are refreshed.
1217
- #
1218
- # The actual image files are not deleted from Google Cloud Storage.
1219
- #
1220
- # Possible errors:
1207
+ # Pass arguments to `delete_reference_image` via a request object, either of type
1208
+ # {::Google::Cloud::Vision::V1p3beta1::DeleteReferenceImageRequest} or an equivalent Hash.
1221
1209
  #
1222
- # * Returns NOT_FOUND if the reference image does not exist.
1223
- # @param options [Gapic::CallOptions, Hash]
1210
+ # @param request [::Google::Cloud::Vision::V1p3beta1::DeleteReferenceImageRequest, ::Hash]
1211
+ # A request object representing the call parameters. Required. To specify no
1212
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1213
+ # @param options [::Gapic::CallOptions, ::Hash]
1224
1214
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1225
1215
  #
1226
1216
  # @overload delete_reference_image(name: nil)
1227
- # @param name [String]
1217
+ # Pass arguments to `delete_reference_image` via keyword arguments. Note that at
1218
+ # least one keyword argument is required. To specify no parameters, or to keep all
1219
+ # the default parameter values, pass an empty Hash as a request object (see above).
1220
+ #
1221
+ # @param name [::String]
1228
1222
  # Required. The resource name of the reference image to delete.
1229
1223
  #
1230
1224
  # Format is:
1231
1225
  #
1232
1226
  # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
1233
1227
  #
1234
- #
1235
1228
  # @yield [response, operation] Access the result along with the RPC operation
1236
- # @yieldparam response [Google::Protobuf::Empty]
1237
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1229
+ # @yieldparam response [::Google::Protobuf::Empty]
1230
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1238
1231
  #
1239
- # @return [Google::Protobuf::Empty]
1232
+ # @return [::Google::Protobuf::Empty]
1240
1233
  #
1241
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1234
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1242
1235
  #
1243
1236
  def delete_reference_image request, options = nil
1244
- raise ArgumentError, "request must be provided" if request.nil?
1237
+ raise ::ArgumentError, "request must be provided" if request.nil?
1245
1238
 
1246
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::DeleteReferenceImageRequest
1239
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::DeleteReferenceImageRequest
1247
1240
 
1248
1241
  # Converts hash and nil to an options object
1249
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1242
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1250
1243
 
1251
1244
  # Customize the options with defaults
1252
1245
  metadata = @config.rpcs.delete_reference_image.metadata.to_h
1253
1246
 
1254
1247
  # Set x-goog-api-client and x-goog-user-project headers
1255
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1248
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1256
1249
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1257
1250
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
1258
1251
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1273,8 +1266,8 @@ module Google
1273
1266
  yield response, operation if block_given?
1274
1267
  return response
1275
1268
  end
1276
- rescue GRPC::BadStatus => e
1277
- raise Google::Cloud::Error.from_error(e)
1269
+ rescue ::GRPC::BadStatus => e
1270
+ raise ::Google::Cloud::Error.from_error(e)
1278
1271
  end
1279
1272
 
1280
1273
  ##
@@ -1287,53 +1280,54 @@ module Google
1287
1280
  # than 1.
1288
1281
  #
1289
1282
  # @overload list_reference_images(request, options = nil)
1290
- # @param request [Google::Cloud::Vision::V1p3beta1::ListReferenceImagesRequest | Hash]
1291
- # Lists reference images.
1283
+ # Pass arguments to `list_reference_images` via a request object, either of type
1284
+ # {::Google::Cloud::Vision::V1p3beta1::ListReferenceImagesRequest} or an equivalent Hash.
1292
1285
  #
1293
- # Possible errors:
1294
- #
1295
- # * Returns NOT_FOUND if the parent product does not exist.
1296
- # * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
1297
- # than 1.
1298
- # @param options [Gapic::CallOptions, Hash]
1286
+ # @param request [::Google::Cloud::Vision::V1p3beta1::ListReferenceImagesRequest, ::Hash]
1287
+ # A request object representing the call parameters. Required. To specify no
1288
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1289
+ # @param options [::Gapic::CallOptions, ::Hash]
1299
1290
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1300
1291
  #
1301
1292
  # @overload list_reference_images(parent: nil, page_size: nil, page_token: nil)
1302
- # @param parent [String]
1293
+ # Pass arguments to `list_reference_images` via keyword arguments. Note that at
1294
+ # least one keyword argument is required. To specify no parameters, or to keep all
1295
+ # the default parameter values, pass an empty Hash as a request object (see above).
1296
+ #
1297
+ # @param parent [::String]
1303
1298
  # Required. Resource name of the product containing the reference images.
1304
1299
  #
1305
1300
  # Format is
1306
1301
  # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
1307
- # @param page_size [Integer]
1302
+ # @param page_size [::Integer]
1308
1303
  # The maximum number of items to return. Default 10, maximum 100.
1309
- # @param page_token [String]
1304
+ # @param page_token [::String]
1310
1305
  # A token identifying a page of results to be returned. This is the value
1311
1306
  # of `nextPageToken` returned in a previous reference image list request.
1312
1307
  #
1313
1308
  # Defaults to the first page if not specified.
1314
1309
  #
1315
- #
1316
1310
  # @yield [response, operation] Access the result along with the RPC operation
1317
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Vision::V1p3beta1::ReferenceImage>]
1318
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1311
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1p3beta1::ReferenceImage>]
1312
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1319
1313
  #
1320
- # @return [Gapic::PagedEnumerable<Google::Cloud::Vision::V1p3beta1::ReferenceImage>]
1314
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1p3beta1::ReferenceImage>]
1321
1315
  #
1322
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1316
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1323
1317
  #
1324
1318
  def list_reference_images request, options = nil
1325
- raise ArgumentError, "request must be provided" if request.nil?
1319
+ raise ::ArgumentError, "request must be provided" if request.nil?
1326
1320
 
1327
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::ListReferenceImagesRequest
1321
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::ListReferenceImagesRequest
1328
1322
 
1329
1323
  # Converts hash and nil to an options object
1330
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1324
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1331
1325
 
1332
1326
  # Customize the options with defaults
1333
1327
  metadata = @config.rpcs.list_reference_images.metadata.to_h
1334
1328
 
1335
1329
  # Set x-goog-api-client and x-goog-user-project headers
1336
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1330
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1337
1331
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1338
1332
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
1339
1333
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1351,12 +1345,12 @@ module Google
1351
1345
  retry_policy: @config.retry_policy
1352
1346
 
1353
1347
  @product_search_stub.call_rpc :list_reference_images, request, options: options do |response, operation|
1354
- response = Gapic::PagedEnumerable.new @product_search_stub, :list_reference_images, request, response, operation, options
1348
+ response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_reference_images, request, response, operation, options
1355
1349
  yield response, operation if block_given?
1356
1350
  return response
1357
1351
  end
1358
- rescue GRPC::BadStatus => e
1359
- raise Google::Cloud::Error.from_error(e)
1352
+ rescue ::GRPC::BadStatus => e
1353
+ raise ::Google::Cloud::Error.from_error(e)
1360
1354
  end
1361
1355
 
1362
1356
  ##
@@ -1367,45 +1361,48 @@ module Google
1367
1361
  # * Returns NOT_FOUND if the specified image does not exist.
1368
1362
  #
1369
1363
  # @overload get_reference_image(request, options = nil)
1370
- # @param request [Google::Cloud::Vision::V1p3beta1::GetReferenceImageRequest | Hash]
1371
- # Gets information associated with a ReferenceImage.
1372
- #
1373
- # Possible errors:
1364
+ # Pass arguments to `get_reference_image` via a request object, either of type
1365
+ # {::Google::Cloud::Vision::V1p3beta1::GetReferenceImageRequest} or an equivalent Hash.
1374
1366
  #
1375
- # * Returns NOT_FOUND if the specified image does not exist.
1376
- # @param options [Gapic::CallOptions, Hash]
1367
+ # @param request [::Google::Cloud::Vision::V1p3beta1::GetReferenceImageRequest, ::Hash]
1368
+ # A request object representing the call parameters. Required. To specify no
1369
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1370
+ # @param options [::Gapic::CallOptions, ::Hash]
1377
1371
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1378
1372
  #
1379
1373
  # @overload get_reference_image(name: nil)
1380
- # @param name [String]
1374
+ # Pass arguments to `get_reference_image` via keyword arguments. Note that at
1375
+ # least one keyword argument is required. To specify no parameters, or to keep all
1376
+ # the default parameter values, pass an empty Hash as a request object (see above).
1377
+ #
1378
+ # @param name [::String]
1381
1379
  # Required. The resource name of the ReferenceImage to get.
1382
1380
  #
1383
1381
  # Format is:
1384
1382
  #
1385
1383
  # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
1386
1384
  #
1387
- #
1388
1385
  # @yield [response, operation] Access the result along with the RPC operation
1389
- # @yieldparam response [Google::Cloud::Vision::V1p3beta1::ReferenceImage]
1390
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1386
+ # @yieldparam response [::Google::Cloud::Vision::V1p3beta1::ReferenceImage]
1387
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1391
1388
  #
1392
- # @return [Google::Cloud::Vision::V1p3beta1::ReferenceImage]
1389
+ # @return [::Google::Cloud::Vision::V1p3beta1::ReferenceImage]
1393
1390
  #
1394
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1391
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1395
1392
  #
1396
1393
  def get_reference_image request, options = nil
1397
- raise ArgumentError, "request must be provided" if request.nil?
1394
+ raise ::ArgumentError, "request must be provided" if request.nil?
1398
1395
 
1399
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::GetReferenceImageRequest
1396
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::GetReferenceImageRequest
1400
1397
 
1401
1398
  # Converts hash and nil to an options object
1402
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1399
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1403
1400
 
1404
1401
  # Customize the options with defaults
1405
1402
  metadata = @config.rpcs.get_reference_image.metadata.to_h
1406
1403
 
1407
1404
  # Set x-goog-api-client and x-goog-user-project headers
1408
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1405
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1409
1406
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1410
1407
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
1411
1408
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1426,8 +1423,8 @@ module Google
1426
1423
  yield response, operation if block_given?
1427
1424
  return response
1428
1425
  end
1429
- rescue GRPC::BadStatus => e
1430
- raise Google::Cloud::Error.from_error(e)
1426
+ rescue ::GRPC::BadStatus => e
1427
+ raise ::Google::Cloud::Error.from_error(e)
1431
1428
  end
1432
1429
 
1433
1430
  ##
@@ -1441,52 +1438,52 @@ module Google
1441
1438
  # * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
1442
1439
  #
1443
1440
  # @overload add_product_to_product_set(request, options = nil)
1444
- # @param request [Google::Cloud::Vision::V1p3beta1::AddProductToProductSetRequest | Hash]
1445
- # Adds a Product to the specified ProductSet. If the Product is already
1446
- # present, no change is made.
1441
+ # Pass arguments to `add_product_to_product_set` via a request object, either of type
1442
+ # {::Google::Cloud::Vision::V1p3beta1::AddProductToProductSetRequest} or an equivalent Hash.
1447
1443
  #
1448
- # One Product can be added to at most 100 ProductSets.
1449
- #
1450
- # Possible errors:
1451
- #
1452
- # * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
1453
- # @param options [Gapic::CallOptions, Hash]
1444
+ # @param request [::Google::Cloud::Vision::V1p3beta1::AddProductToProductSetRequest, ::Hash]
1445
+ # A request object representing the call parameters. Required. To specify no
1446
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1447
+ # @param options [::Gapic::CallOptions, ::Hash]
1454
1448
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1455
1449
  #
1456
1450
  # @overload add_product_to_product_set(name: nil, product: nil)
1457
- # @param name [String]
1451
+ # Pass arguments to `add_product_to_product_set` via keyword arguments. Note that at
1452
+ # least one keyword argument is required. To specify no parameters, or to keep all
1453
+ # the default parameter values, pass an empty Hash as a request object (see above).
1454
+ #
1455
+ # @param name [::String]
1458
1456
  # Required. The resource name for the ProductSet to modify.
1459
1457
  #
1460
1458
  # Format is:
1461
1459
  # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
1462
- # @param product [String]
1460
+ # @param product [::String]
1463
1461
  # Required. The resource name for the Product to be added to this ProductSet.
1464
1462
  #
1465
1463
  # Format is:
1466
1464
  # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
1467
1465
  #
1468
- #
1469
1466
  # @yield [response, operation] Access the result along with the RPC operation
1470
- # @yieldparam response [Google::Protobuf::Empty]
1471
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1467
+ # @yieldparam response [::Google::Protobuf::Empty]
1468
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1472
1469
  #
1473
- # @return [Google::Protobuf::Empty]
1470
+ # @return [::Google::Protobuf::Empty]
1474
1471
  #
1475
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1472
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1476
1473
  #
1477
1474
  def add_product_to_product_set request, options = nil
1478
- raise ArgumentError, "request must be provided" if request.nil?
1475
+ raise ::ArgumentError, "request must be provided" if request.nil?
1479
1476
 
1480
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::AddProductToProductSetRequest
1477
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::AddProductToProductSetRequest
1481
1478
 
1482
1479
  # Converts hash and nil to an options object
1483
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1480
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1484
1481
 
1485
1482
  # Customize the options with defaults
1486
1483
  metadata = @config.rpcs.add_product_to_product_set.metadata.to_h
1487
1484
 
1488
1485
  # Set x-goog-api-client and x-goog-user-project headers
1489
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1486
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1490
1487
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1491
1488
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
1492
1489
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1507,8 +1504,8 @@ module Google
1507
1504
  yield response, operation if block_given?
1508
1505
  return response
1509
1506
  end
1510
- rescue GRPC::BadStatus => e
1511
- raise Google::Cloud::Error.from_error(e)
1507
+ rescue ::GRPC::BadStatus => e
1508
+ raise ::Google::Cloud::Error.from_error(e)
1512
1509
  end
1513
1510
 
1514
1511
  ##
@@ -1519,49 +1516,52 @@ module Google
1519
1516
  # * Returns NOT_FOUND If the Product is not found under the ProductSet.
1520
1517
  #
1521
1518
  # @overload remove_product_from_product_set(request, options = nil)
1522
- # @param request [Google::Cloud::Vision::V1p3beta1::RemoveProductFromProductSetRequest | Hash]
1523
- # Removes a Product from the specified ProductSet.
1524
- #
1525
- # Possible errors:
1519
+ # Pass arguments to `remove_product_from_product_set` via a request object, either of type
1520
+ # {::Google::Cloud::Vision::V1p3beta1::RemoveProductFromProductSetRequest} or an equivalent Hash.
1526
1521
  #
1527
- # * Returns NOT_FOUND If the Product is not found under the ProductSet.
1528
- # @param options [Gapic::CallOptions, Hash]
1522
+ # @param request [::Google::Cloud::Vision::V1p3beta1::RemoveProductFromProductSetRequest, ::Hash]
1523
+ # A request object representing the call parameters. Required. To specify no
1524
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1525
+ # @param options [::Gapic::CallOptions, ::Hash]
1529
1526
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1530
1527
  #
1531
1528
  # @overload remove_product_from_product_set(name: nil, product: nil)
1532
- # @param name [String]
1529
+ # Pass arguments to `remove_product_from_product_set` via keyword arguments. Note that at
1530
+ # least one keyword argument is required. To specify no parameters, or to keep all
1531
+ # the default parameter values, pass an empty Hash as a request object (see above).
1532
+ #
1533
+ # @param name [::String]
1533
1534
  # Required. The resource name for the ProductSet to modify.
1534
1535
  #
1535
1536
  # Format is:
1536
1537
  # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
1537
- # @param product [String]
1538
+ # @param product [::String]
1538
1539
  # Required. The resource name for the Product to be removed from this ProductSet.
1539
1540
  #
1540
1541
  # Format is:
1541
1542
  # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
1542
1543
  #
1543
- #
1544
1544
  # @yield [response, operation] Access the result along with the RPC operation
1545
- # @yieldparam response [Google::Protobuf::Empty]
1546
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1545
+ # @yieldparam response [::Google::Protobuf::Empty]
1546
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1547
1547
  #
1548
- # @return [Google::Protobuf::Empty]
1548
+ # @return [::Google::Protobuf::Empty]
1549
1549
  #
1550
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1550
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1551
1551
  #
1552
1552
  def remove_product_from_product_set request, options = nil
1553
- raise ArgumentError, "request must be provided" if request.nil?
1553
+ raise ::ArgumentError, "request must be provided" if request.nil?
1554
1554
 
1555
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::RemoveProductFromProductSetRequest
1555
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::RemoveProductFromProductSetRequest
1556
1556
 
1557
1557
  # Converts hash and nil to an options object
1558
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1558
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1559
1559
 
1560
1560
  # Customize the options with defaults
1561
1561
  metadata = @config.rpcs.remove_product_from_product_set.metadata.to_h
1562
1562
 
1563
1563
  # Set x-goog-api-client and x-goog-user-project headers
1564
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1564
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1565
1565
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1566
1566
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
1567
1567
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1582,8 +1582,8 @@ module Google
1582
1582
  yield response, operation if block_given?
1583
1583
  return response
1584
1584
  end
1585
- rescue GRPC::BadStatus => e
1586
- raise Google::Cloud::Error.from_error(e)
1585
+ rescue ::GRPC::BadStatus => e
1586
+ raise ::Google::Cloud::Error.from_error(e)
1587
1587
  end
1588
1588
 
1589
1589
  ##
@@ -1596,50 +1596,51 @@ module Google
1596
1596
  # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
1597
1597
  #
1598
1598
  # @overload list_products_in_product_set(request, options = nil)
1599
- # @param request [Google::Cloud::Vision::V1p3beta1::ListProductsInProductSetRequest | Hash]
1600
- # Lists the Products in a ProductSet, in an unspecified order. If the
1601
- # ProductSet does not exist, the products field of the response will be
1602
- # empty.
1599
+ # Pass arguments to `list_products_in_product_set` via a request object, either of type
1600
+ # {::Google::Cloud::Vision::V1p3beta1::ListProductsInProductSetRequest} or an equivalent Hash.
1603
1601
  #
1604
- # Possible errors:
1605
- #
1606
- # * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
1607
- # @param options [Gapic::CallOptions, Hash]
1602
+ # @param request [::Google::Cloud::Vision::V1p3beta1::ListProductsInProductSetRequest, ::Hash]
1603
+ # A request object representing the call parameters. Required. To specify no
1604
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1605
+ # @param options [::Gapic::CallOptions, ::Hash]
1608
1606
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1609
1607
  #
1610
1608
  # @overload list_products_in_product_set(name: nil, page_size: nil, page_token: nil)
1611
- # @param name [String]
1609
+ # Pass arguments to `list_products_in_product_set` via keyword arguments. Note that at
1610
+ # least one keyword argument is required. To specify no parameters, or to keep all
1611
+ # the default parameter values, pass an empty Hash as a request object (see above).
1612
+ #
1613
+ # @param name [::String]
1612
1614
  # Required. The ProductSet resource for which to retrieve Products.
1613
1615
  #
1614
1616
  # Format is:
1615
1617
  # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
1616
- # @param page_size [Integer]
1618
+ # @param page_size [::Integer]
1617
1619
  # The maximum number of items to return. Default 10, maximum 100.
1618
- # @param page_token [String]
1620
+ # @param page_token [::String]
1619
1621
  # The next_page_token returned from a previous List request, if any.
1620
1622
  #
1621
- #
1622
1623
  # @yield [response, operation] Access the result along with the RPC operation
1623
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Vision::V1p3beta1::Product>]
1624
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1624
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1p3beta1::Product>]
1625
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1625
1626
  #
1626
- # @return [Gapic::PagedEnumerable<Google::Cloud::Vision::V1p3beta1::Product>]
1627
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Vision::V1p3beta1::Product>]
1627
1628
  #
1628
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1629
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1629
1630
  #
1630
1631
  def list_products_in_product_set request, options = nil
1631
- raise ArgumentError, "request must be provided" if request.nil?
1632
+ raise ::ArgumentError, "request must be provided" if request.nil?
1632
1633
 
1633
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::ListProductsInProductSetRequest
1634
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::ListProductsInProductSetRequest
1634
1635
 
1635
1636
  # Converts hash and nil to an options object
1636
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1637
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1637
1638
 
1638
1639
  # Customize the options with defaults
1639
1640
  metadata = @config.rpcs.list_products_in_product_set.metadata.to_h
1640
1641
 
1641
1642
  # Set x-goog-api-client and x-goog-user-project headers
1642
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1643
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1643
1644
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1644
1645
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
1645
1646
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1657,73 +1658,70 @@ module Google
1657
1658
  retry_policy: @config.retry_policy
1658
1659
 
1659
1660
  @product_search_stub.call_rpc :list_products_in_product_set, request, options: options do |response, operation|
1660
- response = Gapic::PagedEnumerable.new @product_search_stub, :list_products_in_product_set, request, response, operation, options
1661
+ response = ::Gapic::PagedEnumerable.new @product_search_stub, :list_products_in_product_set, request, response, operation, options
1661
1662
  yield response, operation if block_given?
1662
1663
  return response
1663
1664
  end
1664
- rescue GRPC::BadStatus => e
1665
- raise Google::Cloud::Error.from_error(e)
1665
+ rescue ::GRPC::BadStatus => e
1666
+ raise ::Google::Cloud::Error.from_error(e)
1666
1667
  end
1667
1668
 
1668
1669
  ##
1669
1670
  # Asynchronous API that imports a list of reference images to specified
1670
1671
  # product sets based on a list of image information.
1671
1672
  #
1672
- # The {Google::Longrunning::Operation google.longrunning.Operation} API can be
1673
+ # The {::Google::Longrunning::Operation google.longrunning.Operation} API can be
1673
1674
  # used to keep track of the progress and results of the request.
1674
1675
  # `Operation.metadata` contains `BatchOperationMetadata`. (progress)
1675
1676
  # `Operation.response` contains `ImportProductSetsResponse`. (results)
1676
1677
  #
1677
1678
  # The input source of this method is a csv file on Google Cloud Storage.
1678
1679
  # For the format of the csv file please see
1679
- # {Google::Cloud::Vision::V1p3beta1::ImportProductSetsGcsSource#csv_file_uri ImportProductSetsGcsSource.csv_file_uri}.
1680
+ # {::Google::Cloud::Vision::V1p3beta1::ImportProductSetsGcsSource#csv_file_uri ImportProductSetsGcsSource.csv_file_uri}.
1680
1681
  #
1681
1682
  # @overload import_product_sets(request, options = nil)
1682
- # @param request [Google::Cloud::Vision::V1p3beta1::ImportProductSetsRequest | Hash]
1683
- # Asynchronous API that imports a list of reference images to specified
1684
- # product sets based on a list of image information.
1685
- #
1686
- # The {Google::Longrunning::Operation google.longrunning.Operation} API can be
1687
- # used to keep track of the progress and results of the request.
1688
- # `Operation.metadata` contains `BatchOperationMetadata`. (progress)
1689
- # `Operation.response` contains `ImportProductSetsResponse`. (results)
1690
- #
1691
- # The input source of this method is a csv file on Google Cloud Storage.
1692
- # For the format of the csv file please see
1693
- # {Google::Cloud::Vision::V1p3beta1::ImportProductSetsGcsSource#csv_file_uri ImportProductSetsGcsSource.csv_file_uri}.
1694
- # @param options [Gapic::CallOptions, Hash]
1683
+ # Pass arguments to `import_product_sets` via a request object, either of type
1684
+ # {::Google::Cloud::Vision::V1p3beta1::ImportProductSetsRequest} or an equivalent Hash.
1685
+ #
1686
+ # @param request [::Google::Cloud::Vision::V1p3beta1::ImportProductSetsRequest, ::Hash]
1687
+ # A request object representing the call parameters. Required. To specify no
1688
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1689
+ # @param options [::Gapic::CallOptions, ::Hash]
1695
1690
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1696
1691
  #
1697
1692
  # @overload import_product_sets(parent: nil, input_config: nil)
1698
- # @param parent [String]
1693
+ # Pass arguments to `import_product_sets` via keyword arguments. Note that at
1694
+ # least one keyword argument is required. To specify no parameters, or to keep all
1695
+ # the default parameter values, pass an empty Hash as a request object (see above).
1696
+ #
1697
+ # @param parent [::String]
1699
1698
  # Required. The project in which the ProductSets should be imported.
1700
1699
  #
1701
1700
  # Format is `projects/PROJECT_ID/locations/LOC_ID`.
1702
- # @param input_config [Google::Cloud::Vision::V1p3beta1::ImportProductSetsInputConfig | Hash]
1701
+ # @param input_config [::Google::Cloud::Vision::V1p3beta1::ImportProductSetsInputConfig, ::Hash]
1703
1702
  # Required. The input content for the list of requests.
1704
1703
  #
1705
- #
1706
1704
  # @yield [response, operation] Access the result along with the RPC operation
1707
- # @yieldparam response [Gapic::Operation]
1708
- # @yieldparam operation [GRPC::ActiveCall::Operation]
1705
+ # @yieldparam response [::Gapic::Operation]
1706
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1709
1707
  #
1710
- # @return [Gapic::Operation]
1708
+ # @return [::Gapic::Operation]
1711
1709
  #
1712
- # @raise [Google::Cloud::Error] if the RPC is aborted.
1710
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1713
1711
  #
1714
1712
  def import_product_sets request, options = nil
1715
- raise ArgumentError, "request must be provided" if request.nil?
1713
+ raise ::ArgumentError, "request must be provided" if request.nil?
1716
1714
 
1717
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::ImportProductSetsRequest
1715
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::ImportProductSetsRequest
1718
1716
 
1719
1717
  # Converts hash and nil to an options object
1720
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1718
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1721
1719
 
1722
1720
  # Customize the options with defaults
1723
1721
  metadata = @config.rpcs.import_product_sets.metadata.to_h
1724
1722
 
1725
1723
  # Set x-goog-api-client and x-goog-user-project headers
1726
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
1724
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1727
1725
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1728
1726
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
1729
1727
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -1741,12 +1739,12 @@ module Google
1741
1739
  retry_policy: @config.retry_policy
1742
1740
 
1743
1741
  @product_search_stub.call_rpc :import_product_sets, request, options: options do |response, operation|
1744
- response = Gapic::Operation.new response, @operations_client, options: options
1742
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1745
1743
  yield response, operation if block_given?
1746
1744
  return response
1747
1745
  end
1748
- rescue GRPC::BadStatus => e
1749
- raise Google::Cloud::Error.from_error(e)
1746
+ rescue ::GRPC::BadStatus => e
1747
+ raise ::Google::Cloud::Error.from_error(e)
1750
1748
  end
1751
1749
 
1752
1750
  ##
@@ -1756,7 +1754,7 @@ module Google
1756
1754
  # providing control over timeouts, retry behavior, logging, transport
1757
1755
  # parameters, and other low-level controls. Certain parameters can also be
1758
1756
  # applied individually to specific RPCs. See
1759
- # {Google::Cloud::Vision::V1p3beta1::ProductSearch::Client::Configuration::Rpcs}
1757
+ # {::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client::Configuration::Rpcs}
1760
1758
  # for a list of RPCs that can be configured independently.
1761
1759
  #
1762
1760
  # Configuration can be applied globally to all clients, or to a single client
@@ -1767,22 +1765,22 @@ module Google
1767
1765
  # To modify the global config, setting the timeout for create_product_set
1768
1766
  # to 20 seconds, and all remaining timeouts to 10 seconds:
1769
1767
  #
1770
- # Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.configure do |config|
1771
- # config.timeout = 10_000
1772
- # config.rpcs.create_product_set.timeout = 20_000
1768
+ # ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.configure do |config|
1769
+ # config.timeout = 10.0
1770
+ # config.rpcs.create_product_set.timeout = 20.0
1773
1771
  # end
1774
1772
  #
1775
1773
  # To apply the above configuration only to a new client:
1776
1774
  #
1777
- # client = Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new do |config|
1778
- # config.timeout = 10_000
1779
- # config.rpcs.create_product_set.timeout = 20_000
1775
+ # client = ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new do |config|
1776
+ # config.timeout = 10.0
1777
+ # config.rpcs.create_product_set.timeout = 20.0
1780
1778
  # end
1781
1779
  #
1782
1780
  # @!attribute [rw] endpoint
1783
1781
  # The hostname or hostname:port of the service endpoint.
1784
1782
  # Defaults to `"vision.googleapis.com"`.
1785
- # @return [String]
1783
+ # @return [::String]
1786
1784
  # @!attribute [rw] credentials
1787
1785
  # Credentials to send with calls. You may provide any of the following types:
1788
1786
  # * (`String`) The path to a service account key file in JSON format
@@ -1794,29 +1792,29 @@ module Google
1794
1792
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1795
1793
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1796
1794
  # * (`nil`) indicating no credentials
1797
- # @return [Object]
1795
+ # @return [::Object]
1798
1796
  # @!attribute [rw] scope
1799
1797
  # The OAuth scopes
1800
- # @return [Array<String>]
1798
+ # @return [::Array<::String>]
1801
1799
  # @!attribute [rw] lib_name
1802
1800
  # The library name as recorded in instrumentation and logging
1803
- # @return [String]
1801
+ # @return [::String]
1804
1802
  # @!attribute [rw] lib_version
1805
1803
  # The library version as recorded in instrumentation and logging
1806
- # @return [String]
1804
+ # @return [::String]
1807
1805
  # @!attribute [rw] channel_args
1808
1806
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1809
1807
  # `GRPC::Core::Channel` object is provided as the credential.
1810
- # @return [Hash]
1808
+ # @return [::Hash]
1811
1809
  # @!attribute [rw] interceptors
1812
1810
  # An array of interceptors that are run before calls are executed.
1813
- # @return [Array<GRPC::ClientInterceptor>]
1811
+ # @return [::Array<::GRPC::ClientInterceptor>]
1814
1812
  # @!attribute [rw] timeout
1815
- # The call timeout in milliseconds.
1816
- # @return [Numeric]
1813
+ # The call timeout in seconds.
1814
+ # @return [::Numeric]
1817
1815
  # @!attribute [rw] metadata
1818
1816
  # Additional gRPC headers to be sent with the call.
1819
- # @return [Hash{Symbol=>String}]
1817
+ # @return [::Hash{::Symbol=>::String}]
1820
1818
  # @!attribute [rw] retry_policy
1821
1819
  # The retry policy. The value is a hash with the following keys:
1822
1820
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -1824,25 +1822,29 @@ module Google
1824
1822
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1825
1823
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1826
1824
  # trigger a retry.
1827
- # @return [Hash]
1825
+ # @return [::Hash]
1826
+ # @!attribute [rw] quota_project
1827
+ # A separate project against which to charge quota.
1828
+ # @return [::String]
1828
1829
  #
1829
1830
  class Configuration
1830
- extend Gapic::Config
1831
+ extend ::Gapic::Config
1831
1832
 
1832
- config_attr :endpoint, "vision.googleapis.com", String
1833
- config_attr :credentials, nil do |value|
1833
+ config_attr :endpoint, "vision.googleapis.com", ::String
1834
+ config_attr :credentials, nil do |value|
1834
1835
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1835
1836
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1836
1837
  allowed.any? { |klass| klass === value }
1837
1838
  end
1838
- config_attr :scope, nil, String, Array, nil
1839
- config_attr :lib_name, nil, String, nil
1840
- config_attr :lib_version, nil, String, nil
1841
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
1842
- config_attr :interceptors, nil, Array, nil
1843
- config_attr :timeout, nil, Numeric, nil
1844
- config_attr :metadata, nil, Hash, nil
1845
- config_attr :retry_policy, nil, Hash, Proc, nil
1839
+ config_attr :scope, nil, ::String, ::Array, nil
1840
+ config_attr :lib_name, nil, ::String, nil
1841
+ config_attr :lib_version, nil, ::String, nil
1842
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
1843
+ config_attr :interceptors, nil, ::Array, nil
1844
+ config_attr :timeout, nil, ::Numeric, nil
1845
+ config_attr :metadata, nil, ::Hash, nil
1846
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1847
+ config_attr :quota_project, nil, ::String, nil
1846
1848
 
1847
1849
  # @private
1848
1850
  def initialize parent_config = nil
@@ -1883,133 +1885,133 @@ module Google
1883
1885
  class Rpcs
1884
1886
  ##
1885
1887
  # RPC-specific configuration for `create_product_set`
1886
- # @return [Gapic::Config::Method]
1888
+ # @return [::Gapic::Config::Method]
1887
1889
  #
1888
1890
  attr_reader :create_product_set
1889
1891
  ##
1890
1892
  # RPC-specific configuration for `list_product_sets`
1891
- # @return [Gapic::Config::Method]
1893
+ # @return [::Gapic::Config::Method]
1892
1894
  #
1893
1895
  attr_reader :list_product_sets
1894
1896
  ##
1895
1897
  # RPC-specific configuration for `get_product_set`
1896
- # @return [Gapic::Config::Method]
1898
+ # @return [::Gapic::Config::Method]
1897
1899
  #
1898
1900
  attr_reader :get_product_set
1899
1901
  ##
1900
1902
  # RPC-specific configuration for `update_product_set`
1901
- # @return [Gapic::Config::Method]
1903
+ # @return [::Gapic::Config::Method]
1902
1904
  #
1903
1905
  attr_reader :update_product_set
1904
1906
  ##
1905
1907
  # RPC-specific configuration for `delete_product_set`
1906
- # @return [Gapic::Config::Method]
1908
+ # @return [::Gapic::Config::Method]
1907
1909
  #
1908
1910
  attr_reader :delete_product_set
1909
1911
  ##
1910
1912
  # RPC-specific configuration for `create_product`
1911
- # @return [Gapic::Config::Method]
1913
+ # @return [::Gapic::Config::Method]
1912
1914
  #
1913
1915
  attr_reader :create_product
1914
1916
  ##
1915
1917
  # RPC-specific configuration for `list_products`
1916
- # @return [Gapic::Config::Method]
1918
+ # @return [::Gapic::Config::Method]
1917
1919
  #
1918
1920
  attr_reader :list_products
1919
1921
  ##
1920
1922
  # RPC-specific configuration for `get_product`
1921
- # @return [Gapic::Config::Method]
1923
+ # @return [::Gapic::Config::Method]
1922
1924
  #
1923
1925
  attr_reader :get_product
1924
1926
  ##
1925
1927
  # RPC-specific configuration for `update_product`
1926
- # @return [Gapic::Config::Method]
1928
+ # @return [::Gapic::Config::Method]
1927
1929
  #
1928
1930
  attr_reader :update_product
1929
1931
  ##
1930
1932
  # RPC-specific configuration for `delete_product`
1931
- # @return [Gapic::Config::Method]
1933
+ # @return [::Gapic::Config::Method]
1932
1934
  #
1933
1935
  attr_reader :delete_product
1934
1936
  ##
1935
1937
  # RPC-specific configuration for `create_reference_image`
1936
- # @return [Gapic::Config::Method]
1938
+ # @return [::Gapic::Config::Method]
1937
1939
  #
1938
1940
  attr_reader :create_reference_image
1939
1941
  ##
1940
1942
  # RPC-specific configuration for `delete_reference_image`
1941
- # @return [Gapic::Config::Method]
1943
+ # @return [::Gapic::Config::Method]
1942
1944
  #
1943
1945
  attr_reader :delete_reference_image
1944
1946
  ##
1945
1947
  # RPC-specific configuration for `list_reference_images`
1946
- # @return [Gapic::Config::Method]
1948
+ # @return [::Gapic::Config::Method]
1947
1949
  #
1948
1950
  attr_reader :list_reference_images
1949
1951
  ##
1950
1952
  # RPC-specific configuration for `get_reference_image`
1951
- # @return [Gapic::Config::Method]
1953
+ # @return [::Gapic::Config::Method]
1952
1954
  #
1953
1955
  attr_reader :get_reference_image
1954
1956
  ##
1955
1957
  # RPC-specific configuration for `add_product_to_product_set`
1956
- # @return [Gapic::Config::Method]
1958
+ # @return [::Gapic::Config::Method]
1957
1959
  #
1958
1960
  attr_reader :add_product_to_product_set
1959
1961
  ##
1960
1962
  # RPC-specific configuration for `remove_product_from_product_set`
1961
- # @return [Gapic::Config::Method]
1963
+ # @return [::Gapic::Config::Method]
1962
1964
  #
1963
1965
  attr_reader :remove_product_from_product_set
1964
1966
  ##
1965
1967
  # RPC-specific configuration for `list_products_in_product_set`
1966
- # @return [Gapic::Config::Method]
1968
+ # @return [::Gapic::Config::Method]
1967
1969
  #
1968
1970
  attr_reader :list_products_in_product_set
1969
1971
  ##
1970
1972
  # RPC-specific configuration for `import_product_sets`
1971
- # @return [Gapic::Config::Method]
1973
+ # @return [::Gapic::Config::Method]
1972
1974
  #
1973
1975
  attr_reader :import_product_sets
1974
1976
 
1975
1977
  # @private
1976
1978
  def initialize parent_rpcs = nil
1977
1979
  create_product_set_config = parent_rpcs&.create_product_set if parent_rpcs&.respond_to? :create_product_set
1978
- @create_product_set = Gapic::Config::Method.new create_product_set_config
1980
+ @create_product_set = ::Gapic::Config::Method.new create_product_set_config
1979
1981
  list_product_sets_config = parent_rpcs&.list_product_sets if parent_rpcs&.respond_to? :list_product_sets
1980
- @list_product_sets = Gapic::Config::Method.new list_product_sets_config
1982
+ @list_product_sets = ::Gapic::Config::Method.new list_product_sets_config
1981
1983
  get_product_set_config = parent_rpcs&.get_product_set if parent_rpcs&.respond_to? :get_product_set
1982
- @get_product_set = Gapic::Config::Method.new get_product_set_config
1984
+ @get_product_set = ::Gapic::Config::Method.new get_product_set_config
1983
1985
  update_product_set_config = parent_rpcs&.update_product_set if parent_rpcs&.respond_to? :update_product_set
1984
- @update_product_set = Gapic::Config::Method.new update_product_set_config
1986
+ @update_product_set = ::Gapic::Config::Method.new update_product_set_config
1985
1987
  delete_product_set_config = parent_rpcs&.delete_product_set if parent_rpcs&.respond_to? :delete_product_set
1986
- @delete_product_set = Gapic::Config::Method.new delete_product_set_config
1988
+ @delete_product_set = ::Gapic::Config::Method.new delete_product_set_config
1987
1989
  create_product_config = parent_rpcs&.create_product if parent_rpcs&.respond_to? :create_product
1988
- @create_product = Gapic::Config::Method.new create_product_config
1990
+ @create_product = ::Gapic::Config::Method.new create_product_config
1989
1991
  list_products_config = parent_rpcs&.list_products if parent_rpcs&.respond_to? :list_products
1990
- @list_products = Gapic::Config::Method.new list_products_config
1992
+ @list_products = ::Gapic::Config::Method.new list_products_config
1991
1993
  get_product_config = parent_rpcs&.get_product if parent_rpcs&.respond_to? :get_product
1992
- @get_product = Gapic::Config::Method.new get_product_config
1994
+ @get_product = ::Gapic::Config::Method.new get_product_config
1993
1995
  update_product_config = parent_rpcs&.update_product if parent_rpcs&.respond_to? :update_product
1994
- @update_product = Gapic::Config::Method.new update_product_config
1996
+ @update_product = ::Gapic::Config::Method.new update_product_config
1995
1997
  delete_product_config = parent_rpcs&.delete_product if parent_rpcs&.respond_to? :delete_product
1996
- @delete_product = Gapic::Config::Method.new delete_product_config
1998
+ @delete_product = ::Gapic::Config::Method.new delete_product_config
1997
1999
  create_reference_image_config = parent_rpcs&.create_reference_image if parent_rpcs&.respond_to? :create_reference_image
1998
- @create_reference_image = Gapic::Config::Method.new create_reference_image_config
2000
+ @create_reference_image = ::Gapic::Config::Method.new create_reference_image_config
1999
2001
  delete_reference_image_config = parent_rpcs&.delete_reference_image if parent_rpcs&.respond_to? :delete_reference_image
2000
- @delete_reference_image = Gapic::Config::Method.new delete_reference_image_config
2002
+ @delete_reference_image = ::Gapic::Config::Method.new delete_reference_image_config
2001
2003
  list_reference_images_config = parent_rpcs&.list_reference_images if parent_rpcs&.respond_to? :list_reference_images
2002
- @list_reference_images = Gapic::Config::Method.new list_reference_images_config
2004
+ @list_reference_images = ::Gapic::Config::Method.new list_reference_images_config
2003
2005
  get_reference_image_config = parent_rpcs&.get_reference_image if parent_rpcs&.respond_to? :get_reference_image
2004
- @get_reference_image = Gapic::Config::Method.new get_reference_image_config
2006
+ @get_reference_image = ::Gapic::Config::Method.new get_reference_image_config
2005
2007
  add_product_to_product_set_config = parent_rpcs&.add_product_to_product_set if parent_rpcs&.respond_to? :add_product_to_product_set
2006
- @add_product_to_product_set = Gapic::Config::Method.new add_product_to_product_set_config
2008
+ @add_product_to_product_set = ::Gapic::Config::Method.new add_product_to_product_set_config
2007
2009
  remove_product_from_product_set_config = parent_rpcs&.remove_product_from_product_set if parent_rpcs&.respond_to? :remove_product_from_product_set
2008
- @remove_product_from_product_set = Gapic::Config::Method.new remove_product_from_product_set_config
2010
+ @remove_product_from_product_set = ::Gapic::Config::Method.new remove_product_from_product_set_config
2009
2011
  list_products_in_product_set_config = parent_rpcs&.list_products_in_product_set if parent_rpcs&.respond_to? :list_products_in_product_set
2010
- @list_products_in_product_set = Gapic::Config::Method.new list_products_in_product_set_config
2012
+ @list_products_in_product_set = ::Gapic::Config::Method.new list_products_in_product_set_config
2011
2013
  import_product_sets_config = parent_rpcs&.import_product_sets if parent_rpcs&.respond_to? :import_product_sets
2012
- @import_product_sets = Gapic::Config::Method.new import_product_sets_config
2014
+ @import_product_sets = ::Gapic::Config::Method.new import_product_sets_config
2013
2015
 
2014
2016
  yield self if block_given?
2015
2017
  end
@@ -2021,13 +2023,3 @@ module Google
2021
2023
  end
2022
2024
  end
2023
2025
  end
2024
-
2025
- # rubocop:disable Lint/HandleExceptions
2026
-
2027
- # Once client is loaded, load helpers.rb if it exists.
2028
- begin
2029
- require "google/cloud/vision/v1p3beta1/product_search/helpers"
2030
- rescue LoadError
2031
- end
2032
-
2033
- # rubocop:enable Lint/HandleExceptions