google-cloud-vision-v1p4beta1 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +1 -1
- data/lib/google/cloud/vision/v1p4beta1/face_pb.rb +0 -1
- data/lib/google/cloud/vision/v1p4beta1/geometry_pb.rb +0 -2
- data/lib/google/cloud/vision/v1p4beta1/image_annotator/client.rb +8 -8
- data/lib/google/cloud/vision/v1p4beta1/image_annotator/operations.rb +12 -14
- data/lib/google/cloud/vision/v1p4beta1/image_annotator/rest/client.rb +610 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator/rest/operations.rb +793 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator/rest/service_stub.rb +280 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator/rest.rb +55 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator.rb +7 -1
- data/lib/google/cloud/vision/v1p4beta1/image_annotator_pb.rb +0 -1
- data/lib/google/cloud/vision/v1p4beta1/product_search/client.rb +24 -32
- data/lib/google/cloud/vision/v1p4beta1/product_search/operations.rb +12 -14
- data/lib/google/cloud/vision/v1p4beta1/product_search/rest/client.rb +1973 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search/rest/operations.rb +793 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search/rest/service_stub.rb +1178 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search/rest.rb +70 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search.rb +7 -1
- data/lib/google/cloud/vision/v1p4beta1/product_search_pb.rb +0 -1
- data/lib/google/cloud/vision/v1p4beta1/rest.rb +38 -0
- data/lib/google/cloud/vision/v1p4beta1/text_annotation_pb.rb +0 -1
- data/lib/google/cloud/vision/v1p4beta1/version.rb +1 -1
- data/lib/google/cloud/vision/v1p4beta1/web_detection_pb.rb +0 -2
- data/lib/google/cloud/vision/v1p4beta1.rb +7 -2
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/vision/v1p4beta1/image_annotator.rb +2 -1
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +18 -7
@@ -0,0 +1,1973 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/vision/v1p4beta1/product_search_service_pb"
|
21
|
+
require "google/cloud/vision/v1p4beta1/product_search/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module Vision
|
26
|
+
module V1p4beta1
|
27
|
+
module ProductSearch
|
28
|
+
module Rest
|
29
|
+
##
|
30
|
+
# REST client for the ProductSearch service.
|
31
|
+
#
|
32
|
+
# Manages Products and ProductSets of reference images for use in product
|
33
|
+
# search. It uses the following resource model:
|
34
|
+
#
|
35
|
+
# - The API has a collection of
|
36
|
+
# {::Google::Cloud::Vision::V1p4beta1::ProductSet ProductSet} resources, named
|
37
|
+
# `projects/*/locations/*/productSets/*`, which acts as a way to put different
|
38
|
+
# products into groups to limit identification.
|
39
|
+
#
|
40
|
+
# In parallel,
|
41
|
+
#
|
42
|
+
# - The API has a collection of
|
43
|
+
# {::Google::Cloud::Vision::V1p4beta1::Product Product} resources, named
|
44
|
+
# `projects/*/locations/*/products/*`
|
45
|
+
#
|
46
|
+
# - Each {::Google::Cloud::Vision::V1p4beta1::Product Product} has a collection of
|
47
|
+
# {::Google::Cloud::Vision::V1p4beta1::ReferenceImage ReferenceImage} resources,
|
48
|
+
# named
|
49
|
+
# `projects/*/locations/*/products/*/referenceImages/*`
|
50
|
+
#
|
51
|
+
class Client
|
52
|
+
include Paths
|
53
|
+
|
54
|
+
# @private
|
55
|
+
attr_reader :product_search_stub
|
56
|
+
|
57
|
+
##
|
58
|
+
# Configure the ProductSearch Client class.
|
59
|
+
#
|
60
|
+
# See {::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client::Configuration}
|
61
|
+
# for a description of the configuration fields.
|
62
|
+
#
|
63
|
+
# @example
|
64
|
+
#
|
65
|
+
# # Modify the configuration for all ProductSearch clients
|
66
|
+
# ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.configure do |config|
|
67
|
+
# config.timeout = 10.0
|
68
|
+
# end
|
69
|
+
#
|
70
|
+
# @yield [config] Configure the Client client.
|
71
|
+
# @yieldparam config [Client::Configuration]
|
72
|
+
#
|
73
|
+
# @return [Client::Configuration]
|
74
|
+
#
|
75
|
+
def self.configure
|
76
|
+
@configure ||= begin
|
77
|
+
namespace = ["Google", "Cloud", "Vision", "V1p4beta1"]
|
78
|
+
parent_config = while namespace.any?
|
79
|
+
parent_name = namespace.join "::"
|
80
|
+
parent_const = const_get parent_name
|
81
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
82
|
+
namespace.pop
|
83
|
+
end
|
84
|
+
default_config = Client::Configuration.new parent_config
|
85
|
+
|
86
|
+
default_config.rpcs.create_product_set.timeout = 600.0
|
87
|
+
default_config.rpcs.create_product_set.retry_policy = {
|
88
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
|
89
|
+
}
|
90
|
+
|
91
|
+
default_config.rpcs.list_product_sets.timeout = 600.0
|
92
|
+
default_config.rpcs.list_product_sets.retry_policy = {
|
93
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
94
|
+
}
|
95
|
+
|
96
|
+
default_config.rpcs.get_product_set.timeout = 600.0
|
97
|
+
default_config.rpcs.get_product_set.retry_policy = {
|
98
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
99
|
+
}
|
100
|
+
|
101
|
+
default_config.rpcs.update_product_set.timeout = 600.0
|
102
|
+
default_config.rpcs.update_product_set.retry_policy = {
|
103
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
|
104
|
+
}
|
105
|
+
|
106
|
+
default_config.rpcs.delete_product_set.timeout = 600.0
|
107
|
+
default_config.rpcs.delete_product_set.retry_policy = {
|
108
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
109
|
+
}
|
110
|
+
|
111
|
+
default_config.rpcs.create_product.timeout = 600.0
|
112
|
+
default_config.rpcs.create_product.retry_policy = {
|
113
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
|
114
|
+
}
|
115
|
+
|
116
|
+
default_config.rpcs.list_products.timeout = 600.0
|
117
|
+
default_config.rpcs.list_products.retry_policy = {
|
118
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
119
|
+
}
|
120
|
+
|
121
|
+
default_config.rpcs.get_product.timeout = 600.0
|
122
|
+
default_config.rpcs.get_product.retry_policy = {
|
123
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
124
|
+
}
|
125
|
+
|
126
|
+
default_config.rpcs.update_product.timeout = 600.0
|
127
|
+
default_config.rpcs.update_product.retry_policy = {
|
128
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
|
129
|
+
}
|
130
|
+
|
131
|
+
default_config.rpcs.delete_product.timeout = 600.0
|
132
|
+
default_config.rpcs.delete_product.retry_policy = {
|
133
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
134
|
+
}
|
135
|
+
|
136
|
+
default_config.rpcs.create_reference_image.timeout = 600.0
|
137
|
+
default_config.rpcs.create_reference_image.retry_policy = {
|
138
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
|
139
|
+
}
|
140
|
+
|
141
|
+
default_config.rpcs.delete_reference_image.timeout = 600.0
|
142
|
+
default_config.rpcs.delete_reference_image.retry_policy = {
|
143
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
144
|
+
}
|
145
|
+
|
146
|
+
default_config.rpcs.list_reference_images.timeout = 600.0
|
147
|
+
default_config.rpcs.list_reference_images.retry_policy = {
|
148
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
149
|
+
}
|
150
|
+
|
151
|
+
default_config.rpcs.get_reference_image.timeout = 600.0
|
152
|
+
default_config.rpcs.get_reference_image.retry_policy = {
|
153
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
154
|
+
}
|
155
|
+
|
156
|
+
default_config.rpcs.add_product_to_product_set.timeout = 600.0
|
157
|
+
default_config.rpcs.add_product_to_product_set.retry_policy = {
|
158
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
|
159
|
+
}
|
160
|
+
|
161
|
+
default_config.rpcs.remove_product_from_product_set.timeout = 600.0
|
162
|
+
default_config.rpcs.remove_product_from_product_set.retry_policy = {
|
163
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
|
164
|
+
}
|
165
|
+
|
166
|
+
default_config.rpcs.list_products_in_product_set.timeout = 600.0
|
167
|
+
default_config.rpcs.list_products_in_product_set.retry_policy = {
|
168
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
169
|
+
}
|
170
|
+
|
171
|
+
default_config.rpcs.import_product_sets.timeout = 600.0
|
172
|
+
default_config.rpcs.import_product_sets.retry_policy = {
|
173
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
|
174
|
+
}
|
175
|
+
|
176
|
+
default_config
|
177
|
+
end
|
178
|
+
yield @configure if block_given?
|
179
|
+
@configure
|
180
|
+
end
|
181
|
+
|
182
|
+
##
|
183
|
+
# Configure the ProductSearch Client instance.
|
184
|
+
#
|
185
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
186
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
187
|
+
# should be made on {Client.configure}.
|
188
|
+
#
|
189
|
+
# See {::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client::Configuration}
|
190
|
+
# for a description of the configuration fields.
|
191
|
+
#
|
192
|
+
# @yield [config] Configure the Client client.
|
193
|
+
# @yieldparam config [Client::Configuration]
|
194
|
+
#
|
195
|
+
# @return [Client::Configuration]
|
196
|
+
#
|
197
|
+
def configure
|
198
|
+
yield @config if block_given?
|
199
|
+
@config
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# Create a new ProductSearch REST client object.
|
204
|
+
#
|
205
|
+
# @example
|
206
|
+
#
|
207
|
+
# # Create a client using the default configuration
|
208
|
+
# client = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
|
209
|
+
#
|
210
|
+
# # Create a client using a custom configuration
|
211
|
+
# client = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new do |config|
|
212
|
+
# config.timeout = 10.0
|
213
|
+
# end
|
214
|
+
#
|
215
|
+
# @yield [config] Configure the ProductSearch client.
|
216
|
+
# @yieldparam config [Client::Configuration]
|
217
|
+
#
|
218
|
+
def initialize
|
219
|
+
# Create the configuration object
|
220
|
+
@config = Configuration.new Client.configure
|
221
|
+
|
222
|
+
# Yield the configuration if needed
|
223
|
+
yield @config if block_given?
|
224
|
+
|
225
|
+
# Create credentials
|
226
|
+
credentials = @config.credentials
|
227
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
228
|
+
# but only if the default endpoint does not have a region prefix.
|
229
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
230
|
+
!@config.endpoint.split(".").first.include?("-")
|
231
|
+
credentials ||= Credentials.default scope: @config.scope,
|
232
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
233
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
234
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
235
|
+
end
|
236
|
+
|
237
|
+
@quota_project_id = @config.quota_project
|
238
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
239
|
+
|
240
|
+
@operations_client = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Operations.new do |config|
|
241
|
+
config.credentials = credentials
|
242
|
+
config.quota_project = @quota_project_id
|
243
|
+
config.endpoint = @config.endpoint
|
244
|
+
end
|
245
|
+
|
246
|
+
@product_search_stub = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
247
|
+
end
|
248
|
+
|
249
|
+
##
|
250
|
+
# Get the associated client for long-running operations.
|
251
|
+
#
|
252
|
+
# @return [::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Operations]
|
253
|
+
#
|
254
|
+
attr_reader :operations_client
|
255
|
+
|
256
|
+
# Service calls
|
257
|
+
|
258
|
+
##
|
259
|
+
# Creates and returns a new ProductSet resource.
|
260
|
+
#
|
261
|
+
# Possible errors:
|
262
|
+
#
|
263
|
+
# * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
|
264
|
+
# 4096 characters.
|
265
|
+
#
|
266
|
+
# @overload create_product_set(request, options = nil)
|
267
|
+
# Pass arguments to `create_product_set` via a request object, either of type
|
268
|
+
# {::Google::Cloud::Vision::V1p4beta1::CreateProductSetRequest} or an equivalent Hash.
|
269
|
+
#
|
270
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::CreateProductSetRequest, ::Hash]
|
271
|
+
# A request object representing the call parameters. Required. To specify no
|
272
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
273
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
274
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
275
|
+
#
|
276
|
+
# @overload create_product_set(parent: nil, product_set: nil, product_set_id: nil)
|
277
|
+
# Pass arguments to `create_product_set` via keyword arguments. Note that at
|
278
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
279
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
280
|
+
#
|
281
|
+
# @param parent [::String]
|
282
|
+
# Required. The project in which the ProductSet should be created.
|
283
|
+
#
|
284
|
+
# Format is `projects/PROJECT_ID/locations/LOC_ID`.
|
285
|
+
# @param product_set [::Google::Cloud::Vision::V1p4beta1::ProductSet, ::Hash]
|
286
|
+
# Required. The ProductSet to create.
|
287
|
+
# @param product_set_id [::String]
|
288
|
+
# A user-supplied resource id for this ProductSet. If set, the server will
|
289
|
+
# attempt to use this value as the resource id. If it is already in use, an
|
290
|
+
# error is returned with code ALREADY_EXISTS. Must be at most 128 characters
|
291
|
+
# long. It cannot contain the character `/`.
|
292
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
293
|
+
# @yieldparam result [::Google::Cloud::Vision::V1p4beta1::ProductSet]
|
294
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
295
|
+
#
|
296
|
+
# @return [::Google::Cloud::Vision::V1p4beta1::ProductSet]
|
297
|
+
#
|
298
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
299
|
+
def create_product_set request, options = nil
|
300
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
301
|
+
|
302
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::CreateProductSetRequest
|
303
|
+
|
304
|
+
# Converts hash and nil to an options object
|
305
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
306
|
+
|
307
|
+
# Customize the options with defaults
|
308
|
+
call_metadata = @config.rpcs.create_product_set.metadata.to_h
|
309
|
+
|
310
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
311
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
312
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
313
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
314
|
+
transports_version_send: [:rest]
|
315
|
+
|
316
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
317
|
+
|
318
|
+
options.apply_defaults timeout: @config.rpcs.create_product_set.timeout,
|
319
|
+
metadata: call_metadata,
|
320
|
+
retry_policy: @config.rpcs.create_product_set.retry_policy
|
321
|
+
|
322
|
+
options.apply_defaults timeout: @config.timeout,
|
323
|
+
metadata: @config.metadata,
|
324
|
+
retry_policy: @config.retry_policy
|
325
|
+
|
326
|
+
@product_search_stub.create_product_set request, options do |result, operation|
|
327
|
+
yield result, operation if block_given?
|
328
|
+
return result
|
329
|
+
end
|
330
|
+
rescue ::Gapic::Rest::Error => e
|
331
|
+
raise ::Google::Cloud::Error.from_error(e)
|
332
|
+
end
|
333
|
+
|
334
|
+
##
|
335
|
+
# Lists ProductSets in an unspecified order.
|
336
|
+
#
|
337
|
+
# Possible errors:
|
338
|
+
#
|
339
|
+
# * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
|
340
|
+
# than 1.
|
341
|
+
#
|
342
|
+
# @overload list_product_sets(request, options = nil)
|
343
|
+
# Pass arguments to `list_product_sets` via a request object, either of type
|
344
|
+
# {::Google::Cloud::Vision::V1p4beta1::ListProductSetsRequest} or an equivalent Hash.
|
345
|
+
#
|
346
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::ListProductSetsRequest, ::Hash]
|
347
|
+
# A request object representing the call parameters. Required. To specify no
|
348
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
349
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
350
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
351
|
+
#
|
352
|
+
# @overload list_product_sets(parent: nil, page_size: nil, page_token: nil)
|
353
|
+
# Pass arguments to `list_product_sets` via keyword arguments. Note that at
|
354
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
355
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
356
|
+
#
|
357
|
+
# @param parent [::String]
|
358
|
+
# Required. The project from which ProductSets should be listed.
|
359
|
+
#
|
360
|
+
# Format is `projects/PROJECT_ID/locations/LOC_ID`.
|
361
|
+
# @param page_size [::Integer]
|
362
|
+
# The maximum number of items to return. Default 10, maximum 100.
|
363
|
+
# @param page_token [::String]
|
364
|
+
# The next_page_token returned from a previous List request, if any.
|
365
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
366
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::ProductSet>]
|
367
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
368
|
+
#
|
369
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::ProductSet>]
|
370
|
+
#
|
371
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
372
|
+
def list_product_sets request, options = nil
|
373
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
374
|
+
|
375
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::ListProductSetsRequest
|
376
|
+
|
377
|
+
# Converts hash and nil to an options object
|
378
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
379
|
+
|
380
|
+
# Customize the options with defaults
|
381
|
+
call_metadata = @config.rpcs.list_product_sets.metadata.to_h
|
382
|
+
|
383
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
384
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
385
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
386
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
387
|
+
transports_version_send: [:rest]
|
388
|
+
|
389
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
390
|
+
|
391
|
+
options.apply_defaults timeout: @config.rpcs.list_product_sets.timeout,
|
392
|
+
metadata: call_metadata,
|
393
|
+
retry_policy: @config.rpcs.list_product_sets.retry_policy
|
394
|
+
|
395
|
+
options.apply_defaults timeout: @config.timeout,
|
396
|
+
metadata: @config.metadata,
|
397
|
+
retry_policy: @config.retry_policy
|
398
|
+
|
399
|
+
@product_search_stub.list_product_sets request, options do |result, operation|
|
400
|
+
result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_product_sets, "product_sets", request, result, options
|
401
|
+
yield result, operation if block_given?
|
402
|
+
return result
|
403
|
+
end
|
404
|
+
rescue ::Gapic::Rest::Error => e
|
405
|
+
raise ::Google::Cloud::Error.from_error(e)
|
406
|
+
end
|
407
|
+
|
408
|
+
##
|
409
|
+
# Gets information associated with a ProductSet.
|
410
|
+
#
|
411
|
+
# Possible errors:
|
412
|
+
#
|
413
|
+
# * Returns NOT_FOUND if the ProductSet does not exist.
|
414
|
+
#
|
415
|
+
# @overload get_product_set(request, options = nil)
|
416
|
+
# Pass arguments to `get_product_set` via a request object, either of type
|
417
|
+
# {::Google::Cloud::Vision::V1p4beta1::GetProductSetRequest} or an equivalent Hash.
|
418
|
+
#
|
419
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::GetProductSetRequest, ::Hash]
|
420
|
+
# A request object representing the call parameters. Required. To specify no
|
421
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
422
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
423
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
424
|
+
#
|
425
|
+
# @overload get_product_set(name: nil)
|
426
|
+
# Pass arguments to `get_product_set` via keyword arguments. Note that at
|
427
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
428
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
429
|
+
#
|
430
|
+
# @param name [::String]
|
431
|
+
# Required. Resource name of the ProductSet to get.
|
432
|
+
#
|
433
|
+
# Format is:
|
434
|
+
# `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
|
435
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
436
|
+
# @yieldparam result [::Google::Cloud::Vision::V1p4beta1::ProductSet]
|
437
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
438
|
+
#
|
439
|
+
# @return [::Google::Cloud::Vision::V1p4beta1::ProductSet]
|
440
|
+
#
|
441
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
442
|
+
def get_product_set request, options = nil
|
443
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
444
|
+
|
445
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::GetProductSetRequest
|
446
|
+
|
447
|
+
# Converts hash and nil to an options object
|
448
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
449
|
+
|
450
|
+
# Customize the options with defaults
|
451
|
+
call_metadata = @config.rpcs.get_product_set.metadata.to_h
|
452
|
+
|
453
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
454
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
455
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
456
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
457
|
+
transports_version_send: [:rest]
|
458
|
+
|
459
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
460
|
+
|
461
|
+
options.apply_defaults timeout: @config.rpcs.get_product_set.timeout,
|
462
|
+
metadata: call_metadata,
|
463
|
+
retry_policy: @config.rpcs.get_product_set.retry_policy
|
464
|
+
|
465
|
+
options.apply_defaults timeout: @config.timeout,
|
466
|
+
metadata: @config.metadata,
|
467
|
+
retry_policy: @config.retry_policy
|
468
|
+
|
469
|
+
@product_search_stub.get_product_set request, options do |result, operation|
|
470
|
+
yield result, operation if block_given?
|
471
|
+
return result
|
472
|
+
end
|
473
|
+
rescue ::Gapic::Rest::Error => e
|
474
|
+
raise ::Google::Cloud::Error.from_error(e)
|
475
|
+
end
|
476
|
+
|
477
|
+
##
|
478
|
+
# Makes changes to a ProductSet resource.
|
479
|
+
# Only display_name can be updated currently.
|
480
|
+
#
|
481
|
+
# Possible errors:
|
482
|
+
#
|
483
|
+
# * Returns NOT_FOUND if the ProductSet does not exist.
|
484
|
+
# * Returns INVALID_ARGUMENT if display_name is present in update_mask but
|
485
|
+
# missing from the request or longer than 4096 characters.
|
486
|
+
#
|
487
|
+
# @overload update_product_set(request, options = nil)
|
488
|
+
# Pass arguments to `update_product_set` via a request object, either of type
|
489
|
+
# {::Google::Cloud::Vision::V1p4beta1::UpdateProductSetRequest} or an equivalent Hash.
|
490
|
+
#
|
491
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::UpdateProductSetRequest, ::Hash]
|
492
|
+
# A request object representing the call parameters. Required. To specify no
|
493
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
494
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
495
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
496
|
+
#
|
497
|
+
# @overload update_product_set(product_set: nil, update_mask: nil)
|
498
|
+
# Pass arguments to `update_product_set` via keyword arguments. Note that at
|
499
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
500
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
501
|
+
#
|
502
|
+
# @param product_set [::Google::Cloud::Vision::V1p4beta1::ProductSet, ::Hash]
|
503
|
+
# Required. The ProductSet resource which replaces the one on the server.
|
504
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
505
|
+
# The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields to
|
506
|
+
# update.
|
507
|
+
# If update_mask isn't specified, all mutable fields are to be updated.
|
508
|
+
# Valid mask path is `display_name`.
|
509
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
510
|
+
# @yieldparam result [::Google::Cloud::Vision::V1p4beta1::ProductSet]
|
511
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
512
|
+
#
|
513
|
+
# @return [::Google::Cloud::Vision::V1p4beta1::ProductSet]
|
514
|
+
#
|
515
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
516
|
+
def update_product_set request, options = nil
|
517
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
518
|
+
|
519
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::UpdateProductSetRequest
|
520
|
+
|
521
|
+
# Converts hash and nil to an options object
|
522
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
523
|
+
|
524
|
+
# Customize the options with defaults
|
525
|
+
call_metadata = @config.rpcs.update_product_set.metadata.to_h
|
526
|
+
|
527
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
528
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
529
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
530
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
531
|
+
transports_version_send: [:rest]
|
532
|
+
|
533
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
534
|
+
|
535
|
+
options.apply_defaults timeout: @config.rpcs.update_product_set.timeout,
|
536
|
+
metadata: call_metadata,
|
537
|
+
retry_policy: @config.rpcs.update_product_set.retry_policy
|
538
|
+
|
539
|
+
options.apply_defaults timeout: @config.timeout,
|
540
|
+
metadata: @config.metadata,
|
541
|
+
retry_policy: @config.retry_policy
|
542
|
+
|
543
|
+
@product_search_stub.update_product_set request, options do |result, operation|
|
544
|
+
yield result, operation if block_given?
|
545
|
+
return result
|
546
|
+
end
|
547
|
+
rescue ::Gapic::Rest::Error => e
|
548
|
+
raise ::Google::Cloud::Error.from_error(e)
|
549
|
+
end
|
550
|
+
|
551
|
+
##
|
552
|
+
# Permanently deletes a ProductSet. Products and ReferenceImages in the
|
553
|
+
# ProductSet are not deleted.
|
554
|
+
#
|
555
|
+
# The actual image files are not deleted from Google Cloud Storage.
|
556
|
+
#
|
557
|
+
# @overload delete_product_set(request, options = nil)
|
558
|
+
# Pass arguments to `delete_product_set` via a request object, either of type
|
559
|
+
# {::Google::Cloud::Vision::V1p4beta1::DeleteProductSetRequest} or an equivalent Hash.
|
560
|
+
#
|
561
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::DeleteProductSetRequest, ::Hash]
|
562
|
+
# A request object representing the call parameters. Required. To specify no
|
563
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
564
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
565
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
566
|
+
#
|
567
|
+
# @overload delete_product_set(name: nil)
|
568
|
+
# Pass arguments to `delete_product_set` via keyword arguments. Note that at
|
569
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
570
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
571
|
+
#
|
572
|
+
# @param name [::String]
|
573
|
+
# Required. Resource name of the ProductSet to delete.
|
574
|
+
#
|
575
|
+
# Format is:
|
576
|
+
# `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
|
577
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
578
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
579
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
580
|
+
#
|
581
|
+
# @return [::Google::Protobuf::Empty]
|
582
|
+
#
|
583
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
584
|
+
def delete_product_set request, options = nil
|
585
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
586
|
+
|
587
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::DeleteProductSetRequest
|
588
|
+
|
589
|
+
# Converts hash and nil to an options object
|
590
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
591
|
+
|
592
|
+
# Customize the options with defaults
|
593
|
+
call_metadata = @config.rpcs.delete_product_set.metadata.to_h
|
594
|
+
|
595
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
596
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
597
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
598
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
599
|
+
transports_version_send: [:rest]
|
600
|
+
|
601
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
602
|
+
|
603
|
+
options.apply_defaults timeout: @config.rpcs.delete_product_set.timeout,
|
604
|
+
metadata: call_metadata,
|
605
|
+
retry_policy: @config.rpcs.delete_product_set.retry_policy
|
606
|
+
|
607
|
+
options.apply_defaults timeout: @config.timeout,
|
608
|
+
metadata: @config.metadata,
|
609
|
+
retry_policy: @config.retry_policy
|
610
|
+
|
611
|
+
@product_search_stub.delete_product_set request, options do |result, operation|
|
612
|
+
yield result, operation if block_given?
|
613
|
+
return result
|
614
|
+
end
|
615
|
+
rescue ::Gapic::Rest::Error => e
|
616
|
+
raise ::Google::Cloud::Error.from_error(e)
|
617
|
+
end
|
618
|
+
|
619
|
+
##
|
620
|
+
# Creates and returns a new product resource.
|
621
|
+
#
|
622
|
+
# Possible errors:
|
623
|
+
#
|
624
|
+
# * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
|
625
|
+
# characters.
|
626
|
+
# * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
|
627
|
+
# * Returns INVALID_ARGUMENT if product_category is missing or invalid.
|
628
|
+
#
|
629
|
+
# @overload create_product(request, options = nil)
|
630
|
+
# Pass arguments to `create_product` via a request object, either of type
|
631
|
+
# {::Google::Cloud::Vision::V1p4beta1::CreateProductRequest} or an equivalent Hash.
|
632
|
+
#
|
633
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::CreateProductRequest, ::Hash]
|
634
|
+
# A request object representing the call parameters. Required. To specify no
|
635
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
636
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
637
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
638
|
+
#
|
639
|
+
# @overload create_product(parent: nil, product: nil, product_id: nil)
|
640
|
+
# Pass arguments to `create_product` via keyword arguments. Note that at
|
641
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
642
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
643
|
+
#
|
644
|
+
# @param parent [::String]
|
645
|
+
# Required. The project in which the Product should be created.
|
646
|
+
#
|
647
|
+
# Format is
|
648
|
+
# `projects/PROJECT_ID/locations/LOC_ID`.
|
649
|
+
# @param product [::Google::Cloud::Vision::V1p4beta1::Product, ::Hash]
|
650
|
+
# Required. The product to create.
|
651
|
+
# @param product_id [::String]
|
652
|
+
# A user-supplied resource id for this Product. If set, the server will
|
653
|
+
# attempt to use this value as the resource id. If it is already in use, an
|
654
|
+
# error is returned with code ALREADY_EXISTS. Must be at most 128 characters
|
655
|
+
# long. It cannot contain the character `/`.
|
656
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
657
|
+
# @yieldparam result [::Google::Cloud::Vision::V1p4beta1::Product]
|
658
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
659
|
+
#
|
660
|
+
# @return [::Google::Cloud::Vision::V1p4beta1::Product]
|
661
|
+
#
|
662
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
663
|
+
def create_product request, options = nil
|
664
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
665
|
+
|
666
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::CreateProductRequest
|
667
|
+
|
668
|
+
# Converts hash and nil to an options object
|
669
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
670
|
+
|
671
|
+
# Customize the options with defaults
|
672
|
+
call_metadata = @config.rpcs.create_product.metadata.to_h
|
673
|
+
|
674
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
675
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
676
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
677
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
678
|
+
transports_version_send: [:rest]
|
679
|
+
|
680
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
681
|
+
|
682
|
+
options.apply_defaults timeout: @config.rpcs.create_product.timeout,
|
683
|
+
metadata: call_metadata,
|
684
|
+
retry_policy: @config.rpcs.create_product.retry_policy
|
685
|
+
|
686
|
+
options.apply_defaults timeout: @config.timeout,
|
687
|
+
metadata: @config.metadata,
|
688
|
+
retry_policy: @config.retry_policy
|
689
|
+
|
690
|
+
@product_search_stub.create_product request, options do |result, operation|
|
691
|
+
yield result, operation if block_given?
|
692
|
+
return result
|
693
|
+
end
|
694
|
+
rescue ::Gapic::Rest::Error => e
|
695
|
+
raise ::Google::Cloud::Error.from_error(e)
|
696
|
+
end
|
697
|
+
|
698
|
+
##
|
699
|
+
# Lists products in an unspecified order.
|
700
|
+
#
|
701
|
+
# Possible errors:
|
702
|
+
#
|
703
|
+
# * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
|
704
|
+
#
|
705
|
+
# @overload list_products(request, options = nil)
|
706
|
+
# Pass arguments to `list_products` via a request object, either of type
|
707
|
+
# {::Google::Cloud::Vision::V1p4beta1::ListProductsRequest} or an equivalent Hash.
|
708
|
+
#
|
709
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::ListProductsRequest, ::Hash]
|
710
|
+
# A request object representing the call parameters. Required. To specify no
|
711
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
712
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
713
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
714
|
+
#
|
715
|
+
# @overload list_products(parent: nil, page_size: nil, page_token: nil)
|
716
|
+
# Pass arguments to `list_products` via keyword arguments. Note that at
|
717
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
718
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
719
|
+
#
|
720
|
+
# @param parent [::String]
|
721
|
+
# Required. The project OR ProductSet from which Products should be listed.
|
722
|
+
#
|
723
|
+
# Format:
|
724
|
+
# `projects/PROJECT_ID/locations/LOC_ID`
|
725
|
+
# @param page_size [::Integer]
|
726
|
+
# The maximum number of items to return. Default 10, maximum 100.
|
727
|
+
# @param page_token [::String]
|
728
|
+
# The next_page_token returned from a previous List request, if any.
|
729
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
730
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::Product>]
|
731
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
732
|
+
#
|
733
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::Product>]
|
734
|
+
#
|
735
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
736
|
+
def list_products request, options = nil
|
737
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
738
|
+
|
739
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::ListProductsRequest
|
740
|
+
|
741
|
+
# Converts hash and nil to an options object
|
742
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
743
|
+
|
744
|
+
# Customize the options with defaults
|
745
|
+
call_metadata = @config.rpcs.list_products.metadata.to_h
|
746
|
+
|
747
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
748
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
749
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
750
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
751
|
+
transports_version_send: [:rest]
|
752
|
+
|
753
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
754
|
+
|
755
|
+
options.apply_defaults timeout: @config.rpcs.list_products.timeout,
|
756
|
+
metadata: call_metadata,
|
757
|
+
retry_policy: @config.rpcs.list_products.retry_policy
|
758
|
+
|
759
|
+
options.apply_defaults timeout: @config.timeout,
|
760
|
+
metadata: @config.metadata,
|
761
|
+
retry_policy: @config.retry_policy
|
762
|
+
|
763
|
+
@product_search_stub.list_products request, options do |result, operation|
|
764
|
+
result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_products, "products", request, result, options
|
765
|
+
yield result, operation if block_given?
|
766
|
+
return result
|
767
|
+
end
|
768
|
+
rescue ::Gapic::Rest::Error => e
|
769
|
+
raise ::Google::Cloud::Error.from_error(e)
|
770
|
+
end
|
771
|
+
|
772
|
+
##
|
773
|
+
# Gets information associated with a Product.
|
774
|
+
#
|
775
|
+
# Possible errors:
|
776
|
+
#
|
777
|
+
# * Returns NOT_FOUND if the Product does not exist.
|
778
|
+
#
|
779
|
+
# @overload get_product(request, options = nil)
|
780
|
+
# Pass arguments to `get_product` via a request object, either of type
|
781
|
+
# {::Google::Cloud::Vision::V1p4beta1::GetProductRequest} or an equivalent Hash.
|
782
|
+
#
|
783
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::GetProductRequest, ::Hash]
|
784
|
+
# A request object representing the call parameters. Required. To specify no
|
785
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
786
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
787
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
788
|
+
#
|
789
|
+
# @overload get_product(name: nil)
|
790
|
+
# Pass arguments to `get_product` via keyword arguments. Note that at
|
791
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
792
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
793
|
+
#
|
794
|
+
# @param name [::String]
|
795
|
+
# Required. Resource name of the Product to get.
|
796
|
+
#
|
797
|
+
# Format is:
|
798
|
+
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
|
799
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
800
|
+
# @yieldparam result [::Google::Cloud::Vision::V1p4beta1::Product]
|
801
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
802
|
+
#
|
803
|
+
# @return [::Google::Cloud::Vision::V1p4beta1::Product]
|
804
|
+
#
|
805
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
806
|
+
def get_product request, options = nil
|
807
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
808
|
+
|
809
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::GetProductRequest
|
810
|
+
|
811
|
+
# Converts hash and nil to an options object
|
812
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
813
|
+
|
814
|
+
# Customize the options with defaults
|
815
|
+
call_metadata = @config.rpcs.get_product.metadata.to_h
|
816
|
+
|
817
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
818
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
819
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
820
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
821
|
+
transports_version_send: [:rest]
|
822
|
+
|
823
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
824
|
+
|
825
|
+
options.apply_defaults timeout: @config.rpcs.get_product.timeout,
|
826
|
+
metadata: call_metadata,
|
827
|
+
retry_policy: @config.rpcs.get_product.retry_policy
|
828
|
+
|
829
|
+
options.apply_defaults timeout: @config.timeout,
|
830
|
+
metadata: @config.metadata,
|
831
|
+
retry_policy: @config.retry_policy
|
832
|
+
|
833
|
+
@product_search_stub.get_product request, options do |result, operation|
|
834
|
+
yield result, operation if block_given?
|
835
|
+
return result
|
836
|
+
end
|
837
|
+
rescue ::Gapic::Rest::Error => e
|
838
|
+
raise ::Google::Cloud::Error.from_error(e)
|
839
|
+
end
|
840
|
+
|
841
|
+
##
|
842
|
+
# Makes changes to a Product resource.
|
843
|
+
# Only the `display_name`, `description`, and `labels` fields can be updated
|
844
|
+
# right now.
|
845
|
+
#
|
846
|
+
# If labels are updated, the change will not be reflected in queries until
|
847
|
+
# the next index time.
|
848
|
+
#
|
849
|
+
# Possible errors:
|
850
|
+
#
|
851
|
+
# * Returns NOT_FOUND if the Product does not exist.
|
852
|
+
# * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
|
853
|
+
# missing from the request or longer than 4096 characters.
|
854
|
+
# * Returns INVALID_ARGUMENT if description is present in update_mask but is
|
855
|
+
# longer than 4096 characters.
|
856
|
+
# * Returns INVALID_ARGUMENT if product_category is present in update_mask.
|
857
|
+
#
|
858
|
+
# @overload update_product(request, options = nil)
|
859
|
+
# Pass arguments to `update_product` via a request object, either of type
|
860
|
+
# {::Google::Cloud::Vision::V1p4beta1::UpdateProductRequest} or an equivalent Hash.
|
861
|
+
#
|
862
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::UpdateProductRequest, ::Hash]
|
863
|
+
# A request object representing the call parameters. Required. To specify no
|
864
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
865
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
866
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
867
|
+
#
|
868
|
+
# @overload update_product(product: nil, update_mask: nil)
|
869
|
+
# Pass arguments to `update_product` via keyword arguments. Note that at
|
870
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
871
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
872
|
+
#
|
873
|
+
# @param product [::Google::Cloud::Vision::V1p4beta1::Product, ::Hash]
|
874
|
+
# Required. The Product resource which replaces the one on the server.
|
875
|
+
# product.name is immutable.
|
876
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
877
|
+
# The {::Google::Protobuf::FieldMask FieldMask} that specifies which fields
|
878
|
+
# to update.
|
879
|
+
# If update_mask isn't specified, all mutable fields are to be updated.
|
880
|
+
# Valid mask paths include `product_labels`, `display_name`, and
|
881
|
+
# `description`.
|
882
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
883
|
+
# @yieldparam result [::Google::Cloud::Vision::V1p4beta1::Product]
|
884
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
885
|
+
#
|
886
|
+
# @return [::Google::Cloud::Vision::V1p4beta1::Product]
|
887
|
+
#
|
888
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
889
|
+
def update_product request, options = nil
|
890
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
891
|
+
|
892
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::UpdateProductRequest
|
893
|
+
|
894
|
+
# Converts hash and nil to an options object
|
895
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
896
|
+
|
897
|
+
# Customize the options with defaults
|
898
|
+
call_metadata = @config.rpcs.update_product.metadata.to_h
|
899
|
+
|
900
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
901
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
902
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
903
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
904
|
+
transports_version_send: [:rest]
|
905
|
+
|
906
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
907
|
+
|
908
|
+
options.apply_defaults timeout: @config.rpcs.update_product.timeout,
|
909
|
+
metadata: call_metadata,
|
910
|
+
retry_policy: @config.rpcs.update_product.retry_policy
|
911
|
+
|
912
|
+
options.apply_defaults timeout: @config.timeout,
|
913
|
+
metadata: @config.metadata,
|
914
|
+
retry_policy: @config.retry_policy
|
915
|
+
|
916
|
+
@product_search_stub.update_product request, options do |result, operation|
|
917
|
+
yield result, operation if block_given?
|
918
|
+
return result
|
919
|
+
end
|
920
|
+
rescue ::Gapic::Rest::Error => e
|
921
|
+
raise ::Google::Cloud::Error.from_error(e)
|
922
|
+
end
|
923
|
+
|
924
|
+
##
|
925
|
+
# Permanently deletes a product and its reference images.
|
926
|
+
#
|
927
|
+
# Metadata of the product and all its images will be deleted right away, but
|
928
|
+
# search queries against ProductSets containing the product may still work
|
929
|
+
# until all related caches are refreshed.
|
930
|
+
#
|
931
|
+
# @overload delete_product(request, options = nil)
|
932
|
+
# Pass arguments to `delete_product` via a request object, either of type
|
933
|
+
# {::Google::Cloud::Vision::V1p4beta1::DeleteProductRequest} or an equivalent Hash.
|
934
|
+
#
|
935
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::DeleteProductRequest, ::Hash]
|
936
|
+
# A request object representing the call parameters. Required. To specify no
|
937
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
938
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
939
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
940
|
+
#
|
941
|
+
# @overload delete_product(name: nil)
|
942
|
+
# Pass arguments to `delete_product` via keyword arguments. Note that at
|
943
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
944
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
945
|
+
#
|
946
|
+
# @param name [::String]
|
947
|
+
# Required. Resource name of product to delete.
|
948
|
+
#
|
949
|
+
# Format is:
|
950
|
+
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
|
951
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
952
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
953
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
954
|
+
#
|
955
|
+
# @return [::Google::Protobuf::Empty]
|
956
|
+
#
|
957
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
958
|
+
def delete_product request, options = nil
|
959
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
960
|
+
|
961
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::DeleteProductRequest
|
962
|
+
|
963
|
+
# Converts hash and nil to an options object
|
964
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
965
|
+
|
966
|
+
# Customize the options with defaults
|
967
|
+
call_metadata = @config.rpcs.delete_product.metadata.to_h
|
968
|
+
|
969
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
970
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
971
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
972
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
973
|
+
transports_version_send: [:rest]
|
974
|
+
|
975
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
976
|
+
|
977
|
+
options.apply_defaults timeout: @config.rpcs.delete_product.timeout,
|
978
|
+
metadata: call_metadata,
|
979
|
+
retry_policy: @config.rpcs.delete_product.retry_policy
|
980
|
+
|
981
|
+
options.apply_defaults timeout: @config.timeout,
|
982
|
+
metadata: @config.metadata,
|
983
|
+
retry_policy: @config.retry_policy
|
984
|
+
|
985
|
+
@product_search_stub.delete_product request, options do |result, operation|
|
986
|
+
yield result, operation if block_given?
|
987
|
+
return result
|
988
|
+
end
|
989
|
+
rescue ::Gapic::Rest::Error => e
|
990
|
+
raise ::Google::Cloud::Error.from_error(e)
|
991
|
+
end
|
992
|
+
|
993
|
+
##
|
994
|
+
# Creates and returns a new ReferenceImage resource.
|
995
|
+
#
|
996
|
+
# The `bounding_poly` field is optional. If `bounding_poly` is not specified,
|
997
|
+
# the system will try to detect regions of interest in the image that are
|
998
|
+
# compatible with the product_category on the parent product. If it is
|
999
|
+
# specified, detection is ALWAYS skipped. The system converts polygons into
|
1000
|
+
# non-rotated rectangles.
|
1001
|
+
#
|
1002
|
+
# Note that the pipeline will resize the image if the image resolution is too
|
1003
|
+
# large to process (above 50MP).
|
1004
|
+
#
|
1005
|
+
# Possible errors:
|
1006
|
+
#
|
1007
|
+
# * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
|
1008
|
+
# characters.
|
1009
|
+
# * Returns INVALID_ARGUMENT if the product does not exist.
|
1010
|
+
# * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
|
1011
|
+
# compatible with the parent product's product_category is detected.
|
1012
|
+
# * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
|
1013
|
+
#
|
1014
|
+
# @overload create_reference_image(request, options = nil)
|
1015
|
+
# Pass arguments to `create_reference_image` via a request object, either of type
|
1016
|
+
# {::Google::Cloud::Vision::V1p4beta1::CreateReferenceImageRequest} or an equivalent Hash.
|
1017
|
+
#
|
1018
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::CreateReferenceImageRequest, ::Hash]
|
1019
|
+
# A request object representing the call parameters. Required. To specify no
|
1020
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1021
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1022
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1023
|
+
#
|
1024
|
+
# @overload create_reference_image(parent: nil, reference_image: nil, reference_image_id: nil)
|
1025
|
+
# Pass arguments to `create_reference_image` via keyword arguments. Note that at
|
1026
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1027
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1028
|
+
#
|
1029
|
+
# @param parent [::String]
|
1030
|
+
# Required. Resource name of the product in which to create the reference
|
1031
|
+
# image.
|
1032
|
+
#
|
1033
|
+
# Format is
|
1034
|
+
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
|
1035
|
+
# @param reference_image [::Google::Cloud::Vision::V1p4beta1::ReferenceImage, ::Hash]
|
1036
|
+
# Required. The reference image to create.
|
1037
|
+
# If an image ID is specified, it is ignored.
|
1038
|
+
# @param reference_image_id [::String]
|
1039
|
+
# A user-supplied resource id for the ReferenceImage to be added. If set,
|
1040
|
+
# the server will attempt to use this value as the resource id. If it is
|
1041
|
+
# already in use, an error is returned with code ALREADY_EXISTS. Must be at
|
1042
|
+
# most 128 characters long. It cannot contain the character `/`.
|
1043
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1044
|
+
# @yieldparam result [::Google::Cloud::Vision::V1p4beta1::ReferenceImage]
|
1045
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1046
|
+
#
|
1047
|
+
# @return [::Google::Cloud::Vision::V1p4beta1::ReferenceImage]
|
1048
|
+
#
|
1049
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1050
|
+
def create_reference_image request, options = nil
|
1051
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1052
|
+
|
1053
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::CreateReferenceImageRequest
|
1054
|
+
|
1055
|
+
# Converts hash and nil to an options object
|
1056
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1057
|
+
|
1058
|
+
# Customize the options with defaults
|
1059
|
+
call_metadata = @config.rpcs.create_reference_image.metadata.to_h
|
1060
|
+
|
1061
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1062
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1063
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1064
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
1065
|
+
transports_version_send: [:rest]
|
1066
|
+
|
1067
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1068
|
+
|
1069
|
+
options.apply_defaults timeout: @config.rpcs.create_reference_image.timeout,
|
1070
|
+
metadata: call_metadata,
|
1071
|
+
retry_policy: @config.rpcs.create_reference_image.retry_policy
|
1072
|
+
|
1073
|
+
options.apply_defaults timeout: @config.timeout,
|
1074
|
+
metadata: @config.metadata,
|
1075
|
+
retry_policy: @config.retry_policy
|
1076
|
+
|
1077
|
+
@product_search_stub.create_reference_image request, options do |result, operation|
|
1078
|
+
yield result, operation if block_given?
|
1079
|
+
return result
|
1080
|
+
end
|
1081
|
+
rescue ::Gapic::Rest::Error => e
|
1082
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1083
|
+
end
|
1084
|
+
|
1085
|
+
##
|
1086
|
+
# Permanently deletes a reference image.
|
1087
|
+
#
|
1088
|
+
# The image metadata will be deleted right away, but search queries
|
1089
|
+
# against ProductSets containing the image may still work until all related
|
1090
|
+
# caches are refreshed.
|
1091
|
+
#
|
1092
|
+
# The actual image files are not deleted from Google Cloud Storage.
|
1093
|
+
#
|
1094
|
+
# @overload delete_reference_image(request, options = nil)
|
1095
|
+
# Pass arguments to `delete_reference_image` via a request object, either of type
|
1096
|
+
# {::Google::Cloud::Vision::V1p4beta1::DeleteReferenceImageRequest} or an equivalent Hash.
|
1097
|
+
#
|
1098
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::DeleteReferenceImageRequest, ::Hash]
|
1099
|
+
# A request object representing the call parameters. Required. To specify no
|
1100
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1101
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1102
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1103
|
+
#
|
1104
|
+
# @overload delete_reference_image(name: nil)
|
1105
|
+
# Pass arguments to `delete_reference_image` via keyword arguments. Note that at
|
1106
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1107
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1108
|
+
#
|
1109
|
+
# @param name [::String]
|
1110
|
+
# Required. The resource name of the reference image to delete.
|
1111
|
+
#
|
1112
|
+
# Format is:
|
1113
|
+
#
|
1114
|
+
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
|
1115
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1116
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
1117
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1118
|
+
#
|
1119
|
+
# @return [::Google::Protobuf::Empty]
|
1120
|
+
#
|
1121
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1122
|
+
def delete_reference_image request, options = nil
|
1123
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1124
|
+
|
1125
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::DeleteReferenceImageRequest
|
1126
|
+
|
1127
|
+
# Converts hash and nil to an options object
|
1128
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1129
|
+
|
1130
|
+
# Customize the options with defaults
|
1131
|
+
call_metadata = @config.rpcs.delete_reference_image.metadata.to_h
|
1132
|
+
|
1133
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1134
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1135
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1136
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
1137
|
+
transports_version_send: [:rest]
|
1138
|
+
|
1139
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1140
|
+
|
1141
|
+
options.apply_defaults timeout: @config.rpcs.delete_reference_image.timeout,
|
1142
|
+
metadata: call_metadata,
|
1143
|
+
retry_policy: @config.rpcs.delete_reference_image.retry_policy
|
1144
|
+
|
1145
|
+
options.apply_defaults timeout: @config.timeout,
|
1146
|
+
metadata: @config.metadata,
|
1147
|
+
retry_policy: @config.retry_policy
|
1148
|
+
|
1149
|
+
@product_search_stub.delete_reference_image request, options do |result, operation|
|
1150
|
+
yield result, operation if block_given?
|
1151
|
+
return result
|
1152
|
+
end
|
1153
|
+
rescue ::Gapic::Rest::Error => e
|
1154
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
##
|
1158
|
+
# Lists reference images.
|
1159
|
+
#
|
1160
|
+
# Possible errors:
|
1161
|
+
#
|
1162
|
+
# * Returns NOT_FOUND if the parent product does not exist.
|
1163
|
+
# * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
|
1164
|
+
# than 1.
|
1165
|
+
#
|
1166
|
+
# @overload list_reference_images(request, options = nil)
|
1167
|
+
# Pass arguments to `list_reference_images` via a request object, either of type
|
1168
|
+
# {::Google::Cloud::Vision::V1p4beta1::ListReferenceImagesRequest} or an equivalent Hash.
|
1169
|
+
#
|
1170
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::ListReferenceImagesRequest, ::Hash]
|
1171
|
+
# A request object representing the call parameters. Required. To specify no
|
1172
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1173
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1174
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1175
|
+
#
|
1176
|
+
# @overload list_reference_images(parent: nil, page_size: nil, page_token: nil)
|
1177
|
+
# Pass arguments to `list_reference_images` via keyword arguments. Note that at
|
1178
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1179
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1180
|
+
#
|
1181
|
+
# @param parent [::String]
|
1182
|
+
# Required. Resource name of the product containing the reference images.
|
1183
|
+
#
|
1184
|
+
# Format is
|
1185
|
+
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
|
1186
|
+
# @param page_size [::Integer]
|
1187
|
+
# The maximum number of items to return. Default 10, maximum 100.
|
1188
|
+
# @param page_token [::String]
|
1189
|
+
# A token identifying a page of results to be returned. This is the value
|
1190
|
+
# of `nextPageToken` returned in a previous reference image list request.
|
1191
|
+
#
|
1192
|
+
# Defaults to the first page if not specified.
|
1193
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1194
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::ReferenceImage>]
|
1195
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1196
|
+
#
|
1197
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::ReferenceImage>]
|
1198
|
+
#
|
1199
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1200
|
+
def list_reference_images request, options = nil
|
1201
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1202
|
+
|
1203
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::ListReferenceImagesRequest
|
1204
|
+
|
1205
|
+
# Converts hash and nil to an options object
|
1206
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1207
|
+
|
1208
|
+
# Customize the options with defaults
|
1209
|
+
call_metadata = @config.rpcs.list_reference_images.metadata.to_h
|
1210
|
+
|
1211
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1212
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1213
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1214
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
1215
|
+
transports_version_send: [:rest]
|
1216
|
+
|
1217
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1218
|
+
|
1219
|
+
options.apply_defaults timeout: @config.rpcs.list_reference_images.timeout,
|
1220
|
+
metadata: call_metadata,
|
1221
|
+
retry_policy: @config.rpcs.list_reference_images.retry_policy
|
1222
|
+
|
1223
|
+
options.apply_defaults timeout: @config.timeout,
|
1224
|
+
metadata: @config.metadata,
|
1225
|
+
retry_policy: @config.retry_policy
|
1226
|
+
|
1227
|
+
@product_search_stub.list_reference_images request, options do |result, operation|
|
1228
|
+
result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_reference_images, "reference_images", request, result, options
|
1229
|
+
yield result, operation if block_given?
|
1230
|
+
return result
|
1231
|
+
end
|
1232
|
+
rescue ::Gapic::Rest::Error => e
|
1233
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1234
|
+
end
|
1235
|
+
|
1236
|
+
##
|
1237
|
+
# Gets information associated with a ReferenceImage.
|
1238
|
+
#
|
1239
|
+
# Possible errors:
|
1240
|
+
#
|
1241
|
+
# * Returns NOT_FOUND if the specified image does not exist.
|
1242
|
+
#
|
1243
|
+
# @overload get_reference_image(request, options = nil)
|
1244
|
+
# Pass arguments to `get_reference_image` via a request object, either of type
|
1245
|
+
# {::Google::Cloud::Vision::V1p4beta1::GetReferenceImageRequest} or an equivalent Hash.
|
1246
|
+
#
|
1247
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::GetReferenceImageRequest, ::Hash]
|
1248
|
+
# A request object representing the call parameters. Required. To specify no
|
1249
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1250
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1251
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1252
|
+
#
|
1253
|
+
# @overload get_reference_image(name: nil)
|
1254
|
+
# Pass arguments to `get_reference_image` via keyword arguments. Note that at
|
1255
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1256
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1257
|
+
#
|
1258
|
+
# @param name [::String]
|
1259
|
+
# Required. The resource name of the ReferenceImage to get.
|
1260
|
+
#
|
1261
|
+
# Format is:
|
1262
|
+
#
|
1263
|
+
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
|
1264
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1265
|
+
# @yieldparam result [::Google::Cloud::Vision::V1p4beta1::ReferenceImage]
|
1266
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1267
|
+
#
|
1268
|
+
# @return [::Google::Cloud::Vision::V1p4beta1::ReferenceImage]
|
1269
|
+
#
|
1270
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1271
|
+
def get_reference_image request, options = nil
|
1272
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1273
|
+
|
1274
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::GetReferenceImageRequest
|
1275
|
+
|
1276
|
+
# Converts hash and nil to an options object
|
1277
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1278
|
+
|
1279
|
+
# Customize the options with defaults
|
1280
|
+
call_metadata = @config.rpcs.get_reference_image.metadata.to_h
|
1281
|
+
|
1282
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1283
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1284
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1285
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
1286
|
+
transports_version_send: [:rest]
|
1287
|
+
|
1288
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1289
|
+
|
1290
|
+
options.apply_defaults timeout: @config.rpcs.get_reference_image.timeout,
|
1291
|
+
metadata: call_metadata,
|
1292
|
+
retry_policy: @config.rpcs.get_reference_image.retry_policy
|
1293
|
+
|
1294
|
+
options.apply_defaults timeout: @config.timeout,
|
1295
|
+
metadata: @config.metadata,
|
1296
|
+
retry_policy: @config.retry_policy
|
1297
|
+
|
1298
|
+
@product_search_stub.get_reference_image request, options do |result, operation|
|
1299
|
+
yield result, operation if block_given?
|
1300
|
+
return result
|
1301
|
+
end
|
1302
|
+
rescue ::Gapic::Rest::Error => e
|
1303
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1304
|
+
end
|
1305
|
+
|
1306
|
+
##
|
1307
|
+
# Adds a Product to the specified ProductSet. If the Product is already
|
1308
|
+
# present, no change is made.
|
1309
|
+
#
|
1310
|
+
# One Product can be added to at most 100 ProductSets.
|
1311
|
+
#
|
1312
|
+
# Possible errors:
|
1313
|
+
#
|
1314
|
+
# * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
|
1315
|
+
#
|
1316
|
+
# @overload add_product_to_product_set(request, options = nil)
|
1317
|
+
# Pass arguments to `add_product_to_product_set` via a request object, either of type
|
1318
|
+
# {::Google::Cloud::Vision::V1p4beta1::AddProductToProductSetRequest} or an equivalent Hash.
|
1319
|
+
#
|
1320
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::AddProductToProductSetRequest, ::Hash]
|
1321
|
+
# A request object representing the call parameters. Required. To specify no
|
1322
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1323
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1324
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1325
|
+
#
|
1326
|
+
# @overload add_product_to_product_set(name: nil, product: nil)
|
1327
|
+
# Pass arguments to `add_product_to_product_set` via keyword arguments. Note that at
|
1328
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1329
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1330
|
+
#
|
1331
|
+
# @param name [::String]
|
1332
|
+
# Required. The resource name for the ProductSet to modify.
|
1333
|
+
#
|
1334
|
+
# Format is:
|
1335
|
+
# `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
|
1336
|
+
# @param product [::String]
|
1337
|
+
# Required. The resource name for the Product to be added to this ProductSet.
|
1338
|
+
#
|
1339
|
+
# Format is:
|
1340
|
+
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
|
1341
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1342
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
1343
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1344
|
+
#
|
1345
|
+
# @return [::Google::Protobuf::Empty]
|
1346
|
+
#
|
1347
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1348
|
+
def add_product_to_product_set request, options = nil
|
1349
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1350
|
+
|
1351
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::AddProductToProductSetRequest
|
1352
|
+
|
1353
|
+
# Converts hash and nil to an options object
|
1354
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1355
|
+
|
1356
|
+
# Customize the options with defaults
|
1357
|
+
call_metadata = @config.rpcs.add_product_to_product_set.metadata.to_h
|
1358
|
+
|
1359
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1360
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1361
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1362
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
1363
|
+
transports_version_send: [:rest]
|
1364
|
+
|
1365
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1366
|
+
|
1367
|
+
options.apply_defaults timeout: @config.rpcs.add_product_to_product_set.timeout,
|
1368
|
+
metadata: call_metadata,
|
1369
|
+
retry_policy: @config.rpcs.add_product_to_product_set.retry_policy
|
1370
|
+
|
1371
|
+
options.apply_defaults timeout: @config.timeout,
|
1372
|
+
metadata: @config.metadata,
|
1373
|
+
retry_policy: @config.retry_policy
|
1374
|
+
|
1375
|
+
@product_search_stub.add_product_to_product_set request, options do |result, operation|
|
1376
|
+
yield result, operation if block_given?
|
1377
|
+
return result
|
1378
|
+
end
|
1379
|
+
rescue ::Gapic::Rest::Error => e
|
1380
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1381
|
+
end
|
1382
|
+
|
1383
|
+
##
|
1384
|
+
# Removes a Product from the specified ProductSet.
|
1385
|
+
#
|
1386
|
+
# @overload remove_product_from_product_set(request, options = nil)
|
1387
|
+
# Pass arguments to `remove_product_from_product_set` via a request object, either of type
|
1388
|
+
# {::Google::Cloud::Vision::V1p4beta1::RemoveProductFromProductSetRequest} or an equivalent Hash.
|
1389
|
+
#
|
1390
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::RemoveProductFromProductSetRequest, ::Hash]
|
1391
|
+
# A request object representing the call parameters. Required. To specify no
|
1392
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1393
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1394
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1395
|
+
#
|
1396
|
+
# @overload remove_product_from_product_set(name: nil, product: nil)
|
1397
|
+
# Pass arguments to `remove_product_from_product_set` via keyword arguments. Note that at
|
1398
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1399
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1400
|
+
#
|
1401
|
+
# @param name [::String]
|
1402
|
+
# Required. The resource name for the ProductSet to modify.
|
1403
|
+
#
|
1404
|
+
# Format is:
|
1405
|
+
# `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
|
1406
|
+
# @param product [::String]
|
1407
|
+
# Required. The resource name for the Product to be removed from this
|
1408
|
+
# ProductSet.
|
1409
|
+
#
|
1410
|
+
# Format is:
|
1411
|
+
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
|
1412
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1413
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
1414
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1415
|
+
#
|
1416
|
+
# @return [::Google::Protobuf::Empty]
|
1417
|
+
#
|
1418
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1419
|
+
def remove_product_from_product_set request, options = nil
|
1420
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1421
|
+
|
1422
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::RemoveProductFromProductSetRequest
|
1423
|
+
|
1424
|
+
# Converts hash and nil to an options object
|
1425
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1426
|
+
|
1427
|
+
# Customize the options with defaults
|
1428
|
+
call_metadata = @config.rpcs.remove_product_from_product_set.metadata.to_h
|
1429
|
+
|
1430
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1431
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1432
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1433
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
1434
|
+
transports_version_send: [:rest]
|
1435
|
+
|
1436
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1437
|
+
|
1438
|
+
options.apply_defaults timeout: @config.rpcs.remove_product_from_product_set.timeout,
|
1439
|
+
metadata: call_metadata,
|
1440
|
+
retry_policy: @config.rpcs.remove_product_from_product_set.retry_policy
|
1441
|
+
|
1442
|
+
options.apply_defaults timeout: @config.timeout,
|
1443
|
+
metadata: @config.metadata,
|
1444
|
+
retry_policy: @config.retry_policy
|
1445
|
+
|
1446
|
+
@product_search_stub.remove_product_from_product_set request, options do |result, operation|
|
1447
|
+
yield result, operation if block_given?
|
1448
|
+
return result
|
1449
|
+
end
|
1450
|
+
rescue ::Gapic::Rest::Error => e
|
1451
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1452
|
+
end
|
1453
|
+
|
1454
|
+
##
|
1455
|
+
# Lists the Products in a ProductSet, in an unspecified order. If the
|
1456
|
+
# ProductSet does not exist, the products field of the response will be
|
1457
|
+
# empty.
|
1458
|
+
#
|
1459
|
+
# Possible errors:
|
1460
|
+
#
|
1461
|
+
# * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
|
1462
|
+
#
|
1463
|
+
# @overload list_products_in_product_set(request, options = nil)
|
1464
|
+
# Pass arguments to `list_products_in_product_set` via a request object, either of type
|
1465
|
+
# {::Google::Cloud::Vision::V1p4beta1::ListProductsInProductSetRequest} or an equivalent Hash.
|
1466
|
+
#
|
1467
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::ListProductsInProductSetRequest, ::Hash]
|
1468
|
+
# A request object representing the call parameters. Required. To specify no
|
1469
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1470
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1471
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1472
|
+
#
|
1473
|
+
# @overload list_products_in_product_set(name: nil, page_size: nil, page_token: nil)
|
1474
|
+
# Pass arguments to `list_products_in_product_set` via keyword arguments. Note that at
|
1475
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1476
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1477
|
+
#
|
1478
|
+
# @param name [::String]
|
1479
|
+
# Required. The ProductSet resource for which to retrieve Products.
|
1480
|
+
#
|
1481
|
+
# Format is:
|
1482
|
+
# `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
|
1483
|
+
# @param page_size [::Integer]
|
1484
|
+
# The maximum number of items to return. Default 10, maximum 100.
|
1485
|
+
# @param page_token [::String]
|
1486
|
+
# The next_page_token returned from a previous List request, if any.
|
1487
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1488
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::Product>]
|
1489
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1490
|
+
#
|
1491
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::Product>]
|
1492
|
+
#
|
1493
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1494
|
+
def list_products_in_product_set request, options = nil
|
1495
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1496
|
+
|
1497
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::ListProductsInProductSetRequest
|
1498
|
+
|
1499
|
+
# Converts hash and nil to an options object
|
1500
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1501
|
+
|
1502
|
+
# Customize the options with defaults
|
1503
|
+
call_metadata = @config.rpcs.list_products_in_product_set.metadata.to_h
|
1504
|
+
|
1505
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1506
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1507
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1508
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
1509
|
+
transports_version_send: [:rest]
|
1510
|
+
|
1511
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1512
|
+
|
1513
|
+
options.apply_defaults timeout: @config.rpcs.list_products_in_product_set.timeout,
|
1514
|
+
metadata: call_metadata,
|
1515
|
+
retry_policy: @config.rpcs.list_products_in_product_set.retry_policy
|
1516
|
+
|
1517
|
+
options.apply_defaults timeout: @config.timeout,
|
1518
|
+
metadata: @config.metadata,
|
1519
|
+
retry_policy: @config.retry_policy
|
1520
|
+
|
1521
|
+
@product_search_stub.list_products_in_product_set request, options do |result, operation|
|
1522
|
+
result = ::Gapic::Rest::PagedEnumerable.new @product_search_stub, :list_products_in_product_set, "products", request, result, options
|
1523
|
+
yield result, operation if block_given?
|
1524
|
+
return result
|
1525
|
+
end
|
1526
|
+
rescue ::Gapic::Rest::Error => e
|
1527
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1528
|
+
end
|
1529
|
+
|
1530
|
+
##
|
1531
|
+
# Asynchronous API that imports a list of reference images to specified
|
1532
|
+
# product sets based on a list of image information.
|
1533
|
+
#
|
1534
|
+
# The {::Google::Longrunning::Operation google.longrunning.Operation} API can be
|
1535
|
+
# used to keep track of the progress and results of the request.
|
1536
|
+
# `Operation.metadata` contains `BatchOperationMetadata`. (progress)
|
1537
|
+
# `Operation.response` contains `ImportProductSetsResponse`. (results)
|
1538
|
+
#
|
1539
|
+
# The input source of this method is a csv file on Google Cloud Storage.
|
1540
|
+
# For the format of the csv file please see
|
1541
|
+
# {::Google::Cloud::Vision::V1p4beta1::ImportProductSetsGcsSource#csv_file_uri ImportProductSetsGcsSource.csv_file_uri}.
|
1542
|
+
#
|
1543
|
+
# @overload import_product_sets(request, options = nil)
|
1544
|
+
# Pass arguments to `import_product_sets` via a request object, either of type
|
1545
|
+
# {::Google::Cloud::Vision::V1p4beta1::ImportProductSetsRequest} or an equivalent Hash.
|
1546
|
+
#
|
1547
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::ImportProductSetsRequest, ::Hash]
|
1548
|
+
# A request object representing the call parameters. Required. To specify no
|
1549
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1550
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1551
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1552
|
+
#
|
1553
|
+
# @overload import_product_sets(parent: nil, input_config: nil)
|
1554
|
+
# Pass arguments to `import_product_sets` via keyword arguments. Note that at
|
1555
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1556
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1557
|
+
#
|
1558
|
+
# @param parent [::String]
|
1559
|
+
# Required. The project in which the ProductSets should be imported.
|
1560
|
+
#
|
1561
|
+
# Format is `projects/PROJECT_ID/locations/LOC_ID`.
|
1562
|
+
# @param input_config [::Google::Cloud::Vision::V1p4beta1::ImportProductSetsInputConfig, ::Hash]
|
1563
|
+
# Required. The input content for the list of requests.
|
1564
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1565
|
+
# @yieldparam result [::Gapic::Operation]
|
1566
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1567
|
+
#
|
1568
|
+
# @return [::Gapic::Operation]
|
1569
|
+
#
|
1570
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1571
|
+
def import_product_sets request, options = nil
|
1572
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1573
|
+
|
1574
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::ImportProductSetsRequest
|
1575
|
+
|
1576
|
+
# Converts hash and nil to an options object
|
1577
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1578
|
+
|
1579
|
+
# Customize the options with defaults
|
1580
|
+
call_metadata = @config.rpcs.import_product_sets.metadata.to_h
|
1581
|
+
|
1582
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1583
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1584
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1585
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
1586
|
+
transports_version_send: [:rest]
|
1587
|
+
|
1588
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1589
|
+
|
1590
|
+
options.apply_defaults timeout: @config.rpcs.import_product_sets.timeout,
|
1591
|
+
metadata: call_metadata,
|
1592
|
+
retry_policy: @config.rpcs.import_product_sets.retry_policy
|
1593
|
+
|
1594
|
+
options.apply_defaults timeout: @config.timeout,
|
1595
|
+
metadata: @config.metadata,
|
1596
|
+
retry_policy: @config.retry_policy
|
1597
|
+
|
1598
|
+
@product_search_stub.import_product_sets request, options do |result, operation|
|
1599
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1600
|
+
yield result, operation if block_given?
|
1601
|
+
return result
|
1602
|
+
end
|
1603
|
+
rescue ::Gapic::Rest::Error => e
|
1604
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1605
|
+
end
|
1606
|
+
|
1607
|
+
##
|
1608
|
+
# Asynchronous API to delete all Products in a ProductSet or all Products
|
1609
|
+
# that are in no ProductSet.
|
1610
|
+
#
|
1611
|
+
# If a Product is a member of the specified ProductSet in addition to other
|
1612
|
+
# ProductSets, the Product will still be deleted.
|
1613
|
+
#
|
1614
|
+
# It is recommended to not delete the specified ProductSet until after this
|
1615
|
+
# operation has completed. It is also recommended to not add any of the
|
1616
|
+
# Products involved in the batch delete to a new ProductSet while this
|
1617
|
+
# operation is running because those Products may still end up deleted.
|
1618
|
+
#
|
1619
|
+
# It's not possible to undo the PurgeProducts operation. Therefore, it is
|
1620
|
+
# recommended to keep the csv files used in ImportProductSets (if that was
|
1621
|
+
# how you originally built the Product Set) before starting PurgeProducts, in
|
1622
|
+
# case you need to re-import the data after deletion.
|
1623
|
+
#
|
1624
|
+
# If the plan is to purge all of the Products from a ProductSet and then
|
1625
|
+
# re-use the empty ProductSet to re-import new Products into the empty
|
1626
|
+
# ProductSet, you must wait until the PurgeProducts operation has finished
|
1627
|
+
# for that ProductSet.
|
1628
|
+
#
|
1629
|
+
# The {::Google::Longrunning::Operation google.longrunning.Operation} API can be
|
1630
|
+
# used to keep track of the progress and results of the request.
|
1631
|
+
# `Operation.metadata` contains `BatchOperationMetadata`. (progress)
|
1632
|
+
#
|
1633
|
+
# @overload purge_products(request, options = nil)
|
1634
|
+
# Pass arguments to `purge_products` via a request object, either of type
|
1635
|
+
# {::Google::Cloud::Vision::V1p4beta1::PurgeProductsRequest} or an equivalent Hash.
|
1636
|
+
#
|
1637
|
+
# @param request [::Google::Cloud::Vision::V1p4beta1::PurgeProductsRequest, ::Hash]
|
1638
|
+
# A request object representing the call parameters. Required. To specify no
|
1639
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1640
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1641
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1642
|
+
#
|
1643
|
+
# @overload purge_products(product_set_purge_config: nil, delete_orphan_products: nil, parent: nil, force: nil)
|
1644
|
+
# Pass arguments to `purge_products` via keyword arguments. Note that at
|
1645
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1646
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1647
|
+
#
|
1648
|
+
# @param product_set_purge_config [::Google::Cloud::Vision::V1p4beta1::ProductSetPurgeConfig, ::Hash]
|
1649
|
+
# Specify which ProductSet contains the Products to be deleted.
|
1650
|
+
# @param delete_orphan_products [::Boolean]
|
1651
|
+
# If delete_orphan_products is true, all Products that are not in any
|
1652
|
+
# ProductSet will be deleted.
|
1653
|
+
# @param parent [::String]
|
1654
|
+
# Required. The project and location in which the Products should be deleted.
|
1655
|
+
#
|
1656
|
+
# Format is `projects/PROJECT_ID/locations/LOC_ID`.
|
1657
|
+
# @param force [::Boolean]
|
1658
|
+
# The default value is false. Override this value to true to actually perform
|
1659
|
+
# the purge.
|
1660
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1661
|
+
# @yieldparam result [::Gapic::Operation]
|
1662
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1663
|
+
#
|
1664
|
+
# @return [::Gapic::Operation]
|
1665
|
+
#
|
1666
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1667
|
+
def purge_products request, options = nil
|
1668
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1669
|
+
|
1670
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p4beta1::PurgeProductsRequest
|
1671
|
+
|
1672
|
+
# Converts hash and nil to an options object
|
1673
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1674
|
+
|
1675
|
+
# Customize the options with defaults
|
1676
|
+
call_metadata = @config.rpcs.purge_products.metadata.to_h
|
1677
|
+
|
1678
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1679
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1680
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1681
|
+
gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION,
|
1682
|
+
transports_version_send: [:rest]
|
1683
|
+
|
1684
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1685
|
+
|
1686
|
+
options.apply_defaults timeout: @config.rpcs.purge_products.timeout,
|
1687
|
+
metadata: call_metadata,
|
1688
|
+
retry_policy: @config.rpcs.purge_products.retry_policy
|
1689
|
+
|
1690
|
+
options.apply_defaults timeout: @config.timeout,
|
1691
|
+
metadata: @config.metadata,
|
1692
|
+
retry_policy: @config.retry_policy
|
1693
|
+
|
1694
|
+
@product_search_stub.purge_products request, options do |result, operation|
|
1695
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1696
|
+
yield result, operation if block_given?
|
1697
|
+
return result
|
1698
|
+
end
|
1699
|
+
rescue ::Gapic::Rest::Error => e
|
1700
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1701
|
+
end
|
1702
|
+
|
1703
|
+
##
|
1704
|
+
# Configuration class for the ProductSearch REST API.
|
1705
|
+
#
|
1706
|
+
# This class represents the configuration for ProductSearch REST,
|
1707
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1708
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1709
|
+
# applied individually to specific RPCs. See
|
1710
|
+
# {::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client::Configuration::Rpcs}
|
1711
|
+
# for a list of RPCs that can be configured independently.
|
1712
|
+
#
|
1713
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1714
|
+
# on construction.
|
1715
|
+
#
|
1716
|
+
# @example
|
1717
|
+
#
|
1718
|
+
# # Modify the global config, setting the timeout for
|
1719
|
+
# # create_product_set to 20 seconds,
|
1720
|
+
# # and all remaining timeouts to 10 seconds.
|
1721
|
+
# ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.configure do |config|
|
1722
|
+
# config.timeout = 10.0
|
1723
|
+
# config.rpcs.create_product_set.timeout = 20.0
|
1724
|
+
# end
|
1725
|
+
#
|
1726
|
+
# # Apply the above configuration only to a new client.
|
1727
|
+
# client = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new do |config|
|
1728
|
+
# config.timeout = 10.0
|
1729
|
+
# config.rpcs.create_product_set.timeout = 20.0
|
1730
|
+
# end
|
1731
|
+
#
|
1732
|
+
# @!attribute [rw] endpoint
|
1733
|
+
# The hostname or hostname:port of the service endpoint.
|
1734
|
+
# Defaults to `"vision.googleapis.com"`.
|
1735
|
+
# @return [::String]
|
1736
|
+
# @!attribute [rw] credentials
|
1737
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1738
|
+
# * (`String`) The path to a service account key file in JSON format
|
1739
|
+
# * (`Hash`) A service account key as a Hash
|
1740
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1741
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1742
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1743
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1744
|
+
# * (`nil`) indicating no credentials
|
1745
|
+
# @return [::Object]
|
1746
|
+
# @!attribute [rw] scope
|
1747
|
+
# The OAuth scopes
|
1748
|
+
# @return [::Array<::String>]
|
1749
|
+
# @!attribute [rw] lib_name
|
1750
|
+
# The library name as recorded in instrumentation and logging
|
1751
|
+
# @return [::String]
|
1752
|
+
# @!attribute [rw] lib_version
|
1753
|
+
# The library version as recorded in instrumentation and logging
|
1754
|
+
# @return [::String]
|
1755
|
+
# @!attribute [rw] timeout
|
1756
|
+
# The call timeout in seconds.
|
1757
|
+
# @return [::Numeric]
|
1758
|
+
# @!attribute [rw] metadata
|
1759
|
+
# Additional headers to be sent with the call.
|
1760
|
+
# @return [::Hash{::Symbol=>::String}]
|
1761
|
+
# @!attribute [rw] retry_policy
|
1762
|
+
# The retry policy. The value is a hash with the following keys:
|
1763
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1764
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1765
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1766
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1767
|
+
# trigger a retry.
|
1768
|
+
# @return [::Hash]
|
1769
|
+
# @!attribute [rw] quota_project
|
1770
|
+
# A separate project against which to charge quota.
|
1771
|
+
# @return [::String]
|
1772
|
+
#
|
1773
|
+
class Configuration
|
1774
|
+
extend ::Gapic::Config
|
1775
|
+
|
1776
|
+
config_attr :endpoint, "vision.googleapis.com", ::String
|
1777
|
+
config_attr :credentials, nil do |value|
|
1778
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1779
|
+
allowed.any? { |klass| klass === value }
|
1780
|
+
end
|
1781
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1782
|
+
config_attr :lib_name, nil, ::String, nil
|
1783
|
+
config_attr :lib_version, nil, ::String, nil
|
1784
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1785
|
+
config_attr :metadata, nil, ::Hash, nil
|
1786
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1787
|
+
config_attr :quota_project, nil, ::String, nil
|
1788
|
+
|
1789
|
+
# @private
|
1790
|
+
def initialize parent_config = nil
|
1791
|
+
@parent_config = parent_config unless parent_config.nil?
|
1792
|
+
|
1793
|
+
yield self if block_given?
|
1794
|
+
end
|
1795
|
+
|
1796
|
+
##
|
1797
|
+
# Configurations for individual RPCs
|
1798
|
+
# @return [Rpcs]
|
1799
|
+
#
|
1800
|
+
def rpcs
|
1801
|
+
@rpcs ||= begin
|
1802
|
+
parent_rpcs = nil
|
1803
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1804
|
+
Rpcs.new parent_rpcs
|
1805
|
+
end
|
1806
|
+
end
|
1807
|
+
|
1808
|
+
##
|
1809
|
+
# Configuration RPC class for the ProductSearch API.
|
1810
|
+
#
|
1811
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1812
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1813
|
+
# the following configuration fields:
|
1814
|
+
#
|
1815
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1816
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
1817
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1818
|
+
# include the following keys:
|
1819
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1820
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1821
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1822
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1823
|
+
# trigger a retry.
|
1824
|
+
#
|
1825
|
+
class Rpcs
|
1826
|
+
##
|
1827
|
+
# RPC-specific configuration for `create_product_set`
|
1828
|
+
# @return [::Gapic::Config::Method]
|
1829
|
+
#
|
1830
|
+
attr_reader :create_product_set
|
1831
|
+
##
|
1832
|
+
# RPC-specific configuration for `list_product_sets`
|
1833
|
+
# @return [::Gapic::Config::Method]
|
1834
|
+
#
|
1835
|
+
attr_reader :list_product_sets
|
1836
|
+
##
|
1837
|
+
# RPC-specific configuration for `get_product_set`
|
1838
|
+
# @return [::Gapic::Config::Method]
|
1839
|
+
#
|
1840
|
+
attr_reader :get_product_set
|
1841
|
+
##
|
1842
|
+
# RPC-specific configuration for `update_product_set`
|
1843
|
+
# @return [::Gapic::Config::Method]
|
1844
|
+
#
|
1845
|
+
attr_reader :update_product_set
|
1846
|
+
##
|
1847
|
+
# RPC-specific configuration for `delete_product_set`
|
1848
|
+
# @return [::Gapic::Config::Method]
|
1849
|
+
#
|
1850
|
+
attr_reader :delete_product_set
|
1851
|
+
##
|
1852
|
+
# RPC-specific configuration for `create_product`
|
1853
|
+
# @return [::Gapic::Config::Method]
|
1854
|
+
#
|
1855
|
+
attr_reader :create_product
|
1856
|
+
##
|
1857
|
+
# RPC-specific configuration for `list_products`
|
1858
|
+
# @return [::Gapic::Config::Method]
|
1859
|
+
#
|
1860
|
+
attr_reader :list_products
|
1861
|
+
##
|
1862
|
+
# RPC-specific configuration for `get_product`
|
1863
|
+
# @return [::Gapic::Config::Method]
|
1864
|
+
#
|
1865
|
+
attr_reader :get_product
|
1866
|
+
##
|
1867
|
+
# RPC-specific configuration for `update_product`
|
1868
|
+
# @return [::Gapic::Config::Method]
|
1869
|
+
#
|
1870
|
+
attr_reader :update_product
|
1871
|
+
##
|
1872
|
+
# RPC-specific configuration for `delete_product`
|
1873
|
+
# @return [::Gapic::Config::Method]
|
1874
|
+
#
|
1875
|
+
attr_reader :delete_product
|
1876
|
+
##
|
1877
|
+
# RPC-specific configuration for `create_reference_image`
|
1878
|
+
# @return [::Gapic::Config::Method]
|
1879
|
+
#
|
1880
|
+
attr_reader :create_reference_image
|
1881
|
+
##
|
1882
|
+
# RPC-specific configuration for `delete_reference_image`
|
1883
|
+
# @return [::Gapic::Config::Method]
|
1884
|
+
#
|
1885
|
+
attr_reader :delete_reference_image
|
1886
|
+
##
|
1887
|
+
# RPC-specific configuration for `list_reference_images`
|
1888
|
+
# @return [::Gapic::Config::Method]
|
1889
|
+
#
|
1890
|
+
attr_reader :list_reference_images
|
1891
|
+
##
|
1892
|
+
# RPC-specific configuration for `get_reference_image`
|
1893
|
+
# @return [::Gapic::Config::Method]
|
1894
|
+
#
|
1895
|
+
attr_reader :get_reference_image
|
1896
|
+
##
|
1897
|
+
# RPC-specific configuration for `add_product_to_product_set`
|
1898
|
+
# @return [::Gapic::Config::Method]
|
1899
|
+
#
|
1900
|
+
attr_reader :add_product_to_product_set
|
1901
|
+
##
|
1902
|
+
# RPC-specific configuration for `remove_product_from_product_set`
|
1903
|
+
# @return [::Gapic::Config::Method]
|
1904
|
+
#
|
1905
|
+
attr_reader :remove_product_from_product_set
|
1906
|
+
##
|
1907
|
+
# RPC-specific configuration for `list_products_in_product_set`
|
1908
|
+
# @return [::Gapic::Config::Method]
|
1909
|
+
#
|
1910
|
+
attr_reader :list_products_in_product_set
|
1911
|
+
##
|
1912
|
+
# RPC-specific configuration for `import_product_sets`
|
1913
|
+
# @return [::Gapic::Config::Method]
|
1914
|
+
#
|
1915
|
+
attr_reader :import_product_sets
|
1916
|
+
##
|
1917
|
+
# RPC-specific configuration for `purge_products`
|
1918
|
+
# @return [::Gapic::Config::Method]
|
1919
|
+
#
|
1920
|
+
attr_reader :purge_products
|
1921
|
+
|
1922
|
+
# @private
|
1923
|
+
def initialize parent_rpcs = nil
|
1924
|
+
create_product_set_config = parent_rpcs.create_product_set if parent_rpcs.respond_to? :create_product_set
|
1925
|
+
@create_product_set = ::Gapic::Config::Method.new create_product_set_config
|
1926
|
+
list_product_sets_config = parent_rpcs.list_product_sets if parent_rpcs.respond_to? :list_product_sets
|
1927
|
+
@list_product_sets = ::Gapic::Config::Method.new list_product_sets_config
|
1928
|
+
get_product_set_config = parent_rpcs.get_product_set if parent_rpcs.respond_to? :get_product_set
|
1929
|
+
@get_product_set = ::Gapic::Config::Method.new get_product_set_config
|
1930
|
+
update_product_set_config = parent_rpcs.update_product_set if parent_rpcs.respond_to? :update_product_set
|
1931
|
+
@update_product_set = ::Gapic::Config::Method.new update_product_set_config
|
1932
|
+
delete_product_set_config = parent_rpcs.delete_product_set if parent_rpcs.respond_to? :delete_product_set
|
1933
|
+
@delete_product_set = ::Gapic::Config::Method.new delete_product_set_config
|
1934
|
+
create_product_config = parent_rpcs.create_product if parent_rpcs.respond_to? :create_product
|
1935
|
+
@create_product = ::Gapic::Config::Method.new create_product_config
|
1936
|
+
list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products
|
1937
|
+
@list_products = ::Gapic::Config::Method.new list_products_config
|
1938
|
+
get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product
|
1939
|
+
@get_product = ::Gapic::Config::Method.new get_product_config
|
1940
|
+
update_product_config = parent_rpcs.update_product if parent_rpcs.respond_to? :update_product
|
1941
|
+
@update_product = ::Gapic::Config::Method.new update_product_config
|
1942
|
+
delete_product_config = parent_rpcs.delete_product if parent_rpcs.respond_to? :delete_product
|
1943
|
+
@delete_product = ::Gapic::Config::Method.new delete_product_config
|
1944
|
+
create_reference_image_config = parent_rpcs.create_reference_image if parent_rpcs.respond_to? :create_reference_image
|
1945
|
+
@create_reference_image = ::Gapic::Config::Method.new create_reference_image_config
|
1946
|
+
delete_reference_image_config = parent_rpcs.delete_reference_image if parent_rpcs.respond_to? :delete_reference_image
|
1947
|
+
@delete_reference_image = ::Gapic::Config::Method.new delete_reference_image_config
|
1948
|
+
list_reference_images_config = parent_rpcs.list_reference_images if parent_rpcs.respond_to? :list_reference_images
|
1949
|
+
@list_reference_images = ::Gapic::Config::Method.new list_reference_images_config
|
1950
|
+
get_reference_image_config = parent_rpcs.get_reference_image if parent_rpcs.respond_to? :get_reference_image
|
1951
|
+
@get_reference_image = ::Gapic::Config::Method.new get_reference_image_config
|
1952
|
+
add_product_to_product_set_config = parent_rpcs.add_product_to_product_set if parent_rpcs.respond_to? :add_product_to_product_set
|
1953
|
+
@add_product_to_product_set = ::Gapic::Config::Method.new add_product_to_product_set_config
|
1954
|
+
remove_product_from_product_set_config = parent_rpcs.remove_product_from_product_set if parent_rpcs.respond_to? :remove_product_from_product_set
|
1955
|
+
@remove_product_from_product_set = ::Gapic::Config::Method.new remove_product_from_product_set_config
|
1956
|
+
list_products_in_product_set_config = parent_rpcs.list_products_in_product_set if parent_rpcs.respond_to? :list_products_in_product_set
|
1957
|
+
@list_products_in_product_set = ::Gapic::Config::Method.new list_products_in_product_set_config
|
1958
|
+
import_product_sets_config = parent_rpcs.import_product_sets if parent_rpcs.respond_to? :import_product_sets
|
1959
|
+
@import_product_sets = ::Gapic::Config::Method.new import_product_sets_config
|
1960
|
+
purge_products_config = parent_rpcs.purge_products if parent_rpcs.respond_to? :purge_products
|
1961
|
+
@purge_products = ::Gapic::Config::Method.new purge_products_config
|
1962
|
+
|
1963
|
+
yield self if block_given?
|
1964
|
+
end
|
1965
|
+
end
|
1966
|
+
end
|
1967
|
+
end
|
1968
|
+
end
|
1969
|
+
end
|
1970
|
+
end
|
1971
|
+
end
|
1972
|
+
end
|
1973
|
+
end
|