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