google-cloud-vision_ai-v1 0.a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/vision_ai/v1/app_platform/client.rb +3318 -0
  6. data/lib/google/cloud/vision_ai/v1/app_platform/credentials.rb +47 -0
  7. data/lib/google/cloud/vision_ai/v1/app_platform/operations.rb +809 -0
  8. data/lib/google/cloud/vision_ai/v1/app_platform/paths.rb +151 -0
  9. data/lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb +3106 -0
  10. data/lib/google/cloud/vision_ai/v1/app_platform/rest/operations.rb +951 -0
  11. data/lib/google/cloud/vision_ai/v1/app_platform/rest/service_stub.rb +1618 -0
  12. data/lib/google/cloud/vision_ai/v1/app_platform/rest.rb +53 -0
  13. data/lib/google/cloud/vision_ai/v1/app_platform.rb +56 -0
  14. data/lib/google/cloud/vision_ai/v1/health_check_service/client.rb +456 -0
  15. data/lib/google/cloud/vision_ai/v1/health_check_service/credentials.rb +47 -0
  16. data/lib/google/cloud/vision_ai/v1/health_check_service/paths.rb +52 -0
  17. data/lib/google/cloud/vision_ai/v1/health_check_service/rest/client.rb +423 -0
  18. data/lib/google/cloud/vision_ai/v1/health_check_service/rest/service_stub.rb +128 -0
  19. data/lib/google/cloud/vision_ai/v1/health_check_service/rest.rb +53 -0
  20. data/lib/google/cloud/vision_ai/v1/health_check_service.rb +56 -0
  21. data/lib/google/cloud/vision_ai/v1/live_video_analytics/client.rb +2375 -0
  22. data/lib/google/cloud/vision_ai/v1/live_video_analytics/credentials.rb +47 -0
  23. data/lib/google/cloud/vision_ai/v1/live_video_analytics/operations.rb +809 -0
  24. data/lib/google/cloud/vision_ai/v1/live_video_analytics/paths.rb +130 -0
  25. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/client.rb +2220 -0
  26. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/operations.rb +951 -0
  27. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/service_stub.rb +1139 -0
  28. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest.rb +54 -0
  29. data/lib/google/cloud/vision_ai/v1/live_video_analytics.rb +57 -0
  30. data/lib/google/cloud/vision_ai/v1/rest.rb +42 -0
  31. data/lib/google/cloud/vision_ai/v1/streaming_service/client.rb +915 -0
  32. data/lib/google/cloud/vision_ai/v1/streaming_service/credentials.rb +47 -0
  33. data/lib/google/cloud/vision_ai/v1/streaming_service/paths.rb +54 -0
  34. data/lib/google/cloud/vision_ai/v1/streaming_service/rest/client.rb +610 -0
  35. data/lib/google/cloud/vision_ai/v1/streaming_service/rest/service_stub.rb +249 -0
  36. data/lib/google/cloud/vision_ai/v1/streaming_service/rest.rb +52 -0
  37. data/lib/google/cloud/vision_ai/v1/streaming_service.rb +55 -0
  38. data/lib/google/cloud/vision_ai/v1/streams_service/client.rb +2931 -0
  39. data/lib/google/cloud/vision_ai/v1/streams_service/credentials.rb +47 -0
  40. data/lib/google/cloud/vision_ai/v1/streams_service/operations.rb +809 -0
  41. data/lib/google/cloud/vision_ai/v1/streams_service/paths.rb +153 -0
  42. data/lib/google/cloud/vision_ai/v1/streams_service/rest/client.rb +2740 -0
  43. data/lib/google/cloud/vision_ai/v1/streams_service/rest/operations.rb +951 -0
  44. data/lib/google/cloud/vision_ai/v1/streams_service/rest/service_stub.rb +1437 -0
  45. data/lib/google/cloud/vision_ai/v1/streams_service/rest.rb +56 -0
  46. data/lib/google/cloud/vision_ai/v1/streams_service.rb +59 -0
  47. data/lib/google/cloud/vision_ai/v1/version.rb +8 -3
  48. data/lib/google/cloud/vision_ai/v1/warehouse/client.rb +6957 -0
  49. data/lib/google/cloud/vision_ai/v1/warehouse/credentials.rb +47 -0
  50. data/lib/google/cloud/vision_ai/v1/warehouse/operations.rb +809 -0
  51. data/lib/google/cloud/vision_ai/v1/warehouse/paths.rb +237 -0
  52. data/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb +6402 -0
  53. data/lib/google/cloud/vision_ai/v1/warehouse/rest/operations.rb +951 -0
  54. data/lib/google/cloud/vision_ai/v1/warehouse/rest/service_stub.rb +3760 -0
  55. data/lib/google/cloud/vision_ai/v1/warehouse/rest.rb +53 -0
  56. data/lib/google/cloud/vision_ai/v1/warehouse.rb +56 -0
  57. data/lib/google/cloud/vision_ai/v1.rb +50 -0
  58. data/lib/google/cloud/visionai/v1/annotations_pb.rb +90 -0
  59. data/lib/google/cloud/visionai/v1/common_pb.rb +50 -0
  60. data/lib/google/cloud/visionai/v1/health_service_pb.rb +48 -0
  61. data/lib/google/cloud/visionai/v1/health_service_services_pb.rb +46 -0
  62. data/lib/google/cloud/visionai/v1/lva_pb.rb +54 -0
  63. data/lib/google/cloud/visionai/v1/lva_resources_pb.rb +51 -0
  64. data/lib/google/cloud/visionai/v1/lva_service_pb.rb +80 -0
  65. data/lib/google/cloud/visionai/v1/lva_service_services_pb.rb +81 -0
  66. data/lib/google/cloud/visionai/v1/platform_pb.rb +162 -0
  67. data/lib/google/cloud/visionai/v1/platform_services_pb.rb +111 -0
  68. data/lib/google/cloud/visionai/v1/streaming_resources_pb.rb +58 -0
  69. data/lib/google/cloud/visionai/v1/streaming_service_pb.rb +71 -0
  70. data/lib/google/cloud/visionai/v1/streaming_service_services_pb.rb +55 -0
  71. data/lib/google/cloud/visionai/v1/streams_resources_pb.rb +53 -0
  72. data/lib/google/cloud/visionai/v1/streams_service_pb.rb +85 -0
  73. data/lib/google/cloud/visionai/v1/streams_service_services_pb.rb +92 -0
  74. data/lib/google/cloud/visionai/v1/warehouse_pb.rb +250 -0
  75. data/lib/google/cloud/visionai/v1/warehouse_services_pb.rb +227 -0
  76. data/lib/google-cloud-vision_ai-v1.rb +21 -0
  77. data/proto_docs/README.md +4 -0
  78. data/proto_docs/google/api/client.rb +403 -0
  79. data/proto_docs/google/api/field_behavior.rb +85 -0
  80. data/proto_docs/google/api/launch_stage.rb +71 -0
  81. data/proto_docs/google/api/resource.rb +227 -0
  82. data/proto_docs/google/cloud/visionai/v1/annotations.rb +787 -0
  83. data/proto_docs/google/cloud/visionai/v1/common.rb +134 -0
  84. data/proto_docs/google/cloud/visionai/v1/health_service.rb +61 -0
  85. data/proto_docs/google/cloud/visionai/v1/lva.rb +345 -0
  86. data/proto_docs/google/cloud/visionai/v1/lva_resources.rb +167 -0
  87. data/proto_docs/google/cloud/visionai/v1/lva_service.rb +543 -0
  88. data/proto_docs/google/cloud/visionai/v1/platform.rb +2228 -0
  89. data/proto_docs/google/cloud/visionai/v1/streaming_resources.rb +178 -0
  90. data/proto_docs/google/cloud/visionai/v1/streaming_service.rb +393 -0
  91. data/proto_docs/google/cloud/visionai/v1/streams_resources.rb +229 -0
  92. data/proto_docs/google/cloud/visionai/v1/streams_service.rb +644 -0
  93. data/proto_docs/google/cloud/visionai/v1/warehouse.rb +3002 -0
  94. data/proto_docs/google/longrunning/operations.rb +164 -0
  95. data/proto_docs/google/protobuf/any.rb +145 -0
  96. data/proto_docs/google/protobuf/duration.rb +98 -0
  97. data/proto_docs/google/protobuf/empty.rb +34 -0
  98. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  99. data/proto_docs/google/protobuf/struct.rb +96 -0
  100. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  101. data/proto_docs/google/rpc/status.rb +48 -0
  102. data/proto_docs/google/type/datetime.rb +99 -0
  103. data/proto_docs/google/type/expr.rb +75 -0
  104. metadata +183 -10
@@ -0,0 +1,3760 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/visionai/v1/warehouse_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module VisionAI
24
+ module V1
25
+ module Warehouse
26
+ module Rest
27
+ ##
28
+ # REST service stub for the Warehouse service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
42
+ numeric_enums: true,
43
+ raise_faraday_errors: false
44
+ end
45
+
46
+ ##
47
+ # The effective universe domain
48
+ #
49
+ # @return [String]
50
+ #
51
+ def universe_domain
52
+ @client_stub.universe_domain
53
+ end
54
+
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
64
+ ##
65
+ # Baseline implementation for the create_asset REST call
66
+ #
67
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateAssetRequest]
68
+ # A request object representing the call parameters. Required.
69
+ # @param options [::Gapic::CallOptions]
70
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
71
+ #
72
+ # @yield [result, operation] Access the result along with the TransportOperation object
73
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::Asset]
74
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
75
+ #
76
+ # @return [::Google::Cloud::VisionAI::V1::Asset]
77
+ # A result object deserialized from the server's reply
78
+ def create_asset request_pb, options = nil
79
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
80
+
81
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_asset_request request_pb
82
+ query_string_params = if query_string_params.any?
83
+ query_string_params.to_h { |p| p.split "=", 2 }
84
+ else
85
+ {}
86
+ end
87
+
88
+ response = @client_stub.make_http_request(
89
+ verb,
90
+ uri: uri,
91
+ body: body || "",
92
+ params: query_string_params,
93
+ options: options
94
+ )
95
+ operation = ::Gapic::Rest::TransportOperation.new response
96
+ result = ::Google::Cloud::VisionAI::V1::Asset.decode_json response.body, ignore_unknown_fields: true
97
+
98
+ yield result, operation if block_given?
99
+ result
100
+ end
101
+
102
+ ##
103
+ # Baseline implementation for the update_asset REST call
104
+ #
105
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateAssetRequest]
106
+ # A request object representing the call parameters. Required.
107
+ # @param options [::Gapic::CallOptions]
108
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
109
+ #
110
+ # @yield [result, operation] Access the result along with the TransportOperation object
111
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::Asset]
112
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
113
+ #
114
+ # @return [::Google::Cloud::VisionAI::V1::Asset]
115
+ # A result object deserialized from the server's reply
116
+ def update_asset request_pb, options = nil
117
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
118
+
119
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_asset_request request_pb
120
+ query_string_params = if query_string_params.any?
121
+ query_string_params.to_h { |p| p.split "=", 2 }
122
+ else
123
+ {}
124
+ end
125
+
126
+ response = @client_stub.make_http_request(
127
+ verb,
128
+ uri: uri,
129
+ body: body || "",
130
+ params: query_string_params,
131
+ options: options
132
+ )
133
+ operation = ::Gapic::Rest::TransportOperation.new response
134
+ result = ::Google::Cloud::VisionAI::V1::Asset.decode_json response.body, ignore_unknown_fields: true
135
+
136
+ yield result, operation if block_given?
137
+ result
138
+ end
139
+
140
+ ##
141
+ # Baseline implementation for the get_asset REST call
142
+ #
143
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetAssetRequest]
144
+ # A request object representing the call parameters. Required.
145
+ # @param options [::Gapic::CallOptions]
146
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
147
+ #
148
+ # @yield [result, operation] Access the result along with the TransportOperation object
149
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::Asset]
150
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
151
+ #
152
+ # @return [::Google::Cloud::VisionAI::V1::Asset]
153
+ # A result object deserialized from the server's reply
154
+ def get_asset request_pb, options = nil
155
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
156
+
157
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_asset_request request_pb
158
+ query_string_params = if query_string_params.any?
159
+ query_string_params.to_h { |p| p.split "=", 2 }
160
+ else
161
+ {}
162
+ end
163
+
164
+ response = @client_stub.make_http_request(
165
+ verb,
166
+ uri: uri,
167
+ body: body || "",
168
+ params: query_string_params,
169
+ options: options
170
+ )
171
+ operation = ::Gapic::Rest::TransportOperation.new response
172
+ result = ::Google::Cloud::VisionAI::V1::Asset.decode_json response.body, ignore_unknown_fields: true
173
+
174
+ yield result, operation if block_given?
175
+ result
176
+ end
177
+
178
+ ##
179
+ # Baseline implementation for the list_assets REST call
180
+ #
181
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListAssetsRequest]
182
+ # A request object representing the call parameters. Required.
183
+ # @param options [::Gapic::CallOptions]
184
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
185
+ #
186
+ # @yield [result, operation] Access the result along with the TransportOperation object
187
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ListAssetsResponse]
188
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
189
+ #
190
+ # @return [::Google::Cloud::VisionAI::V1::ListAssetsResponse]
191
+ # A result object deserialized from the server's reply
192
+ def list_assets request_pb, options = nil
193
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
194
+
195
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb
196
+ query_string_params = if query_string_params.any?
197
+ query_string_params.to_h { |p| p.split "=", 2 }
198
+ else
199
+ {}
200
+ end
201
+
202
+ response = @client_stub.make_http_request(
203
+ verb,
204
+ uri: uri,
205
+ body: body || "",
206
+ params: query_string_params,
207
+ options: options
208
+ )
209
+ operation = ::Gapic::Rest::TransportOperation.new response
210
+ result = ::Google::Cloud::VisionAI::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true
211
+
212
+ yield result, operation if block_given?
213
+ result
214
+ end
215
+
216
+ ##
217
+ # Baseline implementation for the delete_asset REST call
218
+ #
219
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteAssetRequest]
220
+ # A request object representing the call parameters. Required.
221
+ # @param options [::Gapic::CallOptions]
222
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
223
+ #
224
+ # @yield [result, operation] Access the result along with the TransportOperation object
225
+ # @yieldparam result [::Google::Longrunning::Operation]
226
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
227
+ #
228
+ # @return [::Google::Longrunning::Operation]
229
+ # A result object deserialized from the server's reply
230
+ def delete_asset request_pb, options = nil
231
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
232
+
233
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_asset_request request_pb
234
+ query_string_params = if query_string_params.any?
235
+ query_string_params.to_h { |p| p.split "=", 2 }
236
+ else
237
+ {}
238
+ end
239
+
240
+ response = @client_stub.make_http_request(
241
+ verb,
242
+ uri: uri,
243
+ body: body || "",
244
+ params: query_string_params,
245
+ options: options
246
+ )
247
+ operation = ::Gapic::Rest::TransportOperation.new response
248
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
249
+
250
+ yield result, operation if block_given?
251
+ result
252
+ end
253
+
254
+ ##
255
+ # Baseline implementation for the upload_asset REST call
256
+ #
257
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UploadAssetRequest]
258
+ # A request object representing the call parameters. Required.
259
+ # @param options [::Gapic::CallOptions]
260
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
261
+ #
262
+ # @yield [result, operation] Access the result along with the TransportOperation object
263
+ # @yieldparam result [::Google::Longrunning::Operation]
264
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
265
+ #
266
+ # @return [::Google::Longrunning::Operation]
267
+ # A result object deserialized from the server's reply
268
+ def upload_asset request_pb, options = nil
269
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
270
+
271
+ verb, uri, query_string_params, body = ServiceStub.transcode_upload_asset_request request_pb
272
+ query_string_params = if query_string_params.any?
273
+ query_string_params.to_h { |p| p.split "=", 2 }
274
+ else
275
+ {}
276
+ end
277
+
278
+ response = @client_stub.make_http_request(
279
+ verb,
280
+ uri: uri,
281
+ body: body || "",
282
+ params: query_string_params,
283
+ options: options
284
+ )
285
+ operation = ::Gapic::Rest::TransportOperation.new response
286
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
287
+
288
+ yield result, operation if block_given?
289
+ result
290
+ end
291
+
292
+ ##
293
+ # Baseline implementation for the generate_retrieval_url REST call
294
+ #
295
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GenerateRetrievalUrlRequest]
296
+ # A request object representing the call parameters. Required.
297
+ # @param options [::Gapic::CallOptions]
298
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
299
+ #
300
+ # @yield [result, operation] Access the result along with the TransportOperation object
301
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::GenerateRetrievalUrlResponse]
302
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
303
+ #
304
+ # @return [::Google::Cloud::VisionAI::V1::GenerateRetrievalUrlResponse]
305
+ # A result object deserialized from the server's reply
306
+ def generate_retrieval_url request_pb, options = nil
307
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
308
+
309
+ verb, uri, query_string_params, body = ServiceStub.transcode_generate_retrieval_url_request request_pb
310
+ query_string_params = if query_string_params.any?
311
+ query_string_params.to_h { |p| p.split "=", 2 }
312
+ else
313
+ {}
314
+ end
315
+
316
+ response = @client_stub.make_http_request(
317
+ verb,
318
+ uri: uri,
319
+ body: body || "",
320
+ params: query_string_params,
321
+ options: options
322
+ )
323
+ operation = ::Gapic::Rest::TransportOperation.new response
324
+ result = ::Google::Cloud::VisionAI::V1::GenerateRetrievalUrlResponse.decode_json response.body, ignore_unknown_fields: true
325
+
326
+ yield result, operation if block_given?
327
+ result
328
+ end
329
+
330
+ ##
331
+ # Baseline implementation for the analyze_asset REST call
332
+ #
333
+ # @param request_pb [::Google::Cloud::VisionAI::V1::AnalyzeAssetRequest]
334
+ # A request object representing the call parameters. Required.
335
+ # @param options [::Gapic::CallOptions]
336
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
337
+ #
338
+ # @yield [result, operation] Access the result along with the TransportOperation object
339
+ # @yieldparam result [::Google::Longrunning::Operation]
340
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
341
+ #
342
+ # @return [::Google::Longrunning::Operation]
343
+ # A result object deserialized from the server's reply
344
+ def analyze_asset request_pb, options = nil
345
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
346
+
347
+ verb, uri, query_string_params, body = ServiceStub.transcode_analyze_asset_request request_pb
348
+ query_string_params = if query_string_params.any?
349
+ query_string_params.to_h { |p| p.split "=", 2 }
350
+ else
351
+ {}
352
+ end
353
+
354
+ response = @client_stub.make_http_request(
355
+ verb,
356
+ uri: uri,
357
+ body: body || "",
358
+ params: query_string_params,
359
+ options: options
360
+ )
361
+ operation = ::Gapic::Rest::TransportOperation.new response
362
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
363
+
364
+ yield result, operation if block_given?
365
+ result
366
+ end
367
+
368
+ ##
369
+ # Baseline implementation for the index_asset REST call
370
+ #
371
+ # @param request_pb [::Google::Cloud::VisionAI::V1::IndexAssetRequest]
372
+ # A request object representing the call parameters. Required.
373
+ # @param options [::Gapic::CallOptions]
374
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
375
+ #
376
+ # @yield [result, operation] Access the result along with the TransportOperation object
377
+ # @yieldparam result [::Google::Longrunning::Operation]
378
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
379
+ #
380
+ # @return [::Google::Longrunning::Operation]
381
+ # A result object deserialized from the server's reply
382
+ def index_asset request_pb, options = nil
383
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
384
+
385
+ verb, uri, query_string_params, body = ServiceStub.transcode_index_asset_request request_pb
386
+ query_string_params = if query_string_params.any?
387
+ query_string_params.to_h { |p| p.split "=", 2 }
388
+ else
389
+ {}
390
+ end
391
+
392
+ response = @client_stub.make_http_request(
393
+ verb,
394
+ uri: uri,
395
+ body: body || "",
396
+ params: query_string_params,
397
+ options: options
398
+ )
399
+ operation = ::Gapic::Rest::TransportOperation.new response
400
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
401
+
402
+ yield result, operation if block_given?
403
+ result
404
+ end
405
+
406
+ ##
407
+ # Baseline implementation for the remove_index_asset REST call
408
+ #
409
+ # @param request_pb [::Google::Cloud::VisionAI::V1::RemoveIndexAssetRequest]
410
+ # A request object representing the call parameters. Required.
411
+ # @param options [::Gapic::CallOptions]
412
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
413
+ #
414
+ # @yield [result, operation] Access the result along with the TransportOperation object
415
+ # @yieldparam result [::Google::Longrunning::Operation]
416
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
417
+ #
418
+ # @return [::Google::Longrunning::Operation]
419
+ # A result object deserialized from the server's reply
420
+ def remove_index_asset request_pb, options = nil
421
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
422
+
423
+ verb, uri, query_string_params, body = ServiceStub.transcode_remove_index_asset_request request_pb
424
+ query_string_params = if query_string_params.any?
425
+ query_string_params.to_h { |p| p.split "=", 2 }
426
+ else
427
+ {}
428
+ end
429
+
430
+ response = @client_stub.make_http_request(
431
+ verb,
432
+ uri: uri,
433
+ body: body || "",
434
+ params: query_string_params,
435
+ options: options
436
+ )
437
+ operation = ::Gapic::Rest::TransportOperation.new response
438
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
439
+
440
+ yield result, operation if block_given?
441
+ result
442
+ end
443
+
444
+ ##
445
+ # Baseline implementation for the view_indexed_assets REST call
446
+ #
447
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ViewIndexedAssetsRequest]
448
+ # A request object representing the call parameters. Required.
449
+ # @param options [::Gapic::CallOptions]
450
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
451
+ #
452
+ # @yield [result, operation] Access the result along with the TransportOperation object
453
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ViewIndexedAssetsResponse]
454
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
455
+ #
456
+ # @return [::Google::Cloud::VisionAI::V1::ViewIndexedAssetsResponse]
457
+ # A result object deserialized from the server's reply
458
+ def view_indexed_assets request_pb, options = nil
459
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
460
+
461
+ verb, uri, query_string_params, body = ServiceStub.transcode_view_indexed_assets_request request_pb
462
+ query_string_params = if query_string_params.any?
463
+ query_string_params.to_h { |p| p.split "=", 2 }
464
+ else
465
+ {}
466
+ end
467
+
468
+ response = @client_stub.make_http_request(
469
+ verb,
470
+ uri: uri,
471
+ body: body || "",
472
+ params: query_string_params,
473
+ options: options
474
+ )
475
+ operation = ::Gapic::Rest::TransportOperation.new response
476
+ result = ::Google::Cloud::VisionAI::V1::ViewIndexedAssetsResponse.decode_json response.body, ignore_unknown_fields: true
477
+
478
+ yield result, operation if block_given?
479
+ result
480
+ end
481
+
482
+ ##
483
+ # Baseline implementation for the create_index REST call
484
+ #
485
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateIndexRequest]
486
+ # A request object representing the call parameters. Required.
487
+ # @param options [::Gapic::CallOptions]
488
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
489
+ #
490
+ # @yield [result, operation] Access the result along with the TransportOperation object
491
+ # @yieldparam result [::Google::Longrunning::Operation]
492
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
493
+ #
494
+ # @return [::Google::Longrunning::Operation]
495
+ # A result object deserialized from the server's reply
496
+ def create_index request_pb, options = nil
497
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
498
+
499
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_index_request request_pb
500
+ query_string_params = if query_string_params.any?
501
+ query_string_params.to_h { |p| p.split "=", 2 }
502
+ else
503
+ {}
504
+ end
505
+
506
+ response = @client_stub.make_http_request(
507
+ verb,
508
+ uri: uri,
509
+ body: body || "",
510
+ params: query_string_params,
511
+ options: options
512
+ )
513
+ operation = ::Gapic::Rest::TransportOperation.new response
514
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
515
+
516
+ yield result, operation if block_given?
517
+ result
518
+ end
519
+
520
+ ##
521
+ # Baseline implementation for the update_index REST call
522
+ #
523
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateIndexRequest]
524
+ # A request object representing the call parameters. Required.
525
+ # @param options [::Gapic::CallOptions]
526
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
527
+ #
528
+ # @yield [result, operation] Access the result along with the TransportOperation object
529
+ # @yieldparam result [::Google::Longrunning::Operation]
530
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
531
+ #
532
+ # @return [::Google::Longrunning::Operation]
533
+ # A result object deserialized from the server's reply
534
+ def update_index request_pb, options = nil
535
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
536
+
537
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_index_request request_pb
538
+ query_string_params = if query_string_params.any?
539
+ query_string_params.to_h { |p| p.split "=", 2 }
540
+ else
541
+ {}
542
+ end
543
+
544
+ response = @client_stub.make_http_request(
545
+ verb,
546
+ uri: uri,
547
+ body: body || "",
548
+ params: query_string_params,
549
+ options: options
550
+ )
551
+ operation = ::Gapic::Rest::TransportOperation.new response
552
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
553
+
554
+ yield result, operation if block_given?
555
+ result
556
+ end
557
+
558
+ ##
559
+ # Baseline implementation for the get_index REST call
560
+ #
561
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetIndexRequest]
562
+ # A request object representing the call parameters. Required.
563
+ # @param options [::Gapic::CallOptions]
564
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
565
+ #
566
+ # @yield [result, operation] Access the result along with the TransportOperation object
567
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::Index]
568
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
569
+ #
570
+ # @return [::Google::Cloud::VisionAI::V1::Index]
571
+ # A result object deserialized from the server's reply
572
+ def get_index request_pb, options = nil
573
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
574
+
575
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_index_request request_pb
576
+ query_string_params = if query_string_params.any?
577
+ query_string_params.to_h { |p| p.split "=", 2 }
578
+ else
579
+ {}
580
+ end
581
+
582
+ response = @client_stub.make_http_request(
583
+ verb,
584
+ uri: uri,
585
+ body: body || "",
586
+ params: query_string_params,
587
+ options: options
588
+ )
589
+ operation = ::Gapic::Rest::TransportOperation.new response
590
+ result = ::Google::Cloud::VisionAI::V1::Index.decode_json response.body, ignore_unknown_fields: true
591
+
592
+ yield result, operation if block_given?
593
+ result
594
+ end
595
+
596
+ ##
597
+ # Baseline implementation for the list_indexes REST call
598
+ #
599
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListIndexesRequest]
600
+ # A request object representing the call parameters. Required.
601
+ # @param options [::Gapic::CallOptions]
602
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
603
+ #
604
+ # @yield [result, operation] Access the result along with the TransportOperation object
605
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ListIndexesResponse]
606
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
607
+ #
608
+ # @return [::Google::Cloud::VisionAI::V1::ListIndexesResponse]
609
+ # A result object deserialized from the server's reply
610
+ def list_indexes request_pb, options = nil
611
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
612
+
613
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_indexes_request request_pb
614
+ query_string_params = if query_string_params.any?
615
+ query_string_params.to_h { |p| p.split "=", 2 }
616
+ else
617
+ {}
618
+ end
619
+
620
+ response = @client_stub.make_http_request(
621
+ verb,
622
+ uri: uri,
623
+ body: body || "",
624
+ params: query_string_params,
625
+ options: options
626
+ )
627
+ operation = ::Gapic::Rest::TransportOperation.new response
628
+ result = ::Google::Cloud::VisionAI::V1::ListIndexesResponse.decode_json response.body, ignore_unknown_fields: true
629
+
630
+ yield result, operation if block_given?
631
+ result
632
+ end
633
+
634
+ ##
635
+ # Baseline implementation for the delete_index REST call
636
+ #
637
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteIndexRequest]
638
+ # A request object representing the call parameters. Required.
639
+ # @param options [::Gapic::CallOptions]
640
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
641
+ #
642
+ # @yield [result, operation] Access the result along with the TransportOperation object
643
+ # @yieldparam result [::Google::Longrunning::Operation]
644
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
645
+ #
646
+ # @return [::Google::Longrunning::Operation]
647
+ # A result object deserialized from the server's reply
648
+ def delete_index request_pb, options = nil
649
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
650
+
651
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_index_request request_pb
652
+ query_string_params = if query_string_params.any?
653
+ query_string_params.to_h { |p| p.split "=", 2 }
654
+ else
655
+ {}
656
+ end
657
+
658
+ response = @client_stub.make_http_request(
659
+ verb,
660
+ uri: uri,
661
+ body: body || "",
662
+ params: query_string_params,
663
+ options: options
664
+ )
665
+ operation = ::Gapic::Rest::TransportOperation.new response
666
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
667
+
668
+ yield result, operation if block_given?
669
+ result
670
+ end
671
+
672
+ ##
673
+ # Baseline implementation for the create_corpus REST call
674
+ #
675
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateCorpusRequest]
676
+ # A request object representing the call parameters. Required.
677
+ # @param options [::Gapic::CallOptions]
678
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
679
+ #
680
+ # @yield [result, operation] Access the result along with the TransportOperation object
681
+ # @yieldparam result [::Google::Longrunning::Operation]
682
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
683
+ #
684
+ # @return [::Google::Longrunning::Operation]
685
+ # A result object deserialized from the server's reply
686
+ def create_corpus request_pb, options = nil
687
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
688
+
689
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_corpus_request request_pb
690
+ query_string_params = if query_string_params.any?
691
+ query_string_params.to_h { |p| p.split "=", 2 }
692
+ else
693
+ {}
694
+ end
695
+
696
+ response = @client_stub.make_http_request(
697
+ verb,
698
+ uri: uri,
699
+ body: body || "",
700
+ params: query_string_params,
701
+ options: options
702
+ )
703
+ operation = ::Gapic::Rest::TransportOperation.new response
704
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
705
+
706
+ yield result, operation if block_given?
707
+ result
708
+ end
709
+
710
+ ##
711
+ # Baseline implementation for the get_corpus REST call
712
+ #
713
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetCorpusRequest]
714
+ # A request object representing the call parameters. Required.
715
+ # @param options [::Gapic::CallOptions]
716
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
717
+ #
718
+ # @yield [result, operation] Access the result along with the TransportOperation object
719
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::Corpus]
720
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
721
+ #
722
+ # @return [::Google::Cloud::VisionAI::V1::Corpus]
723
+ # A result object deserialized from the server's reply
724
+ def get_corpus request_pb, options = nil
725
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
726
+
727
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_corpus_request request_pb
728
+ query_string_params = if query_string_params.any?
729
+ query_string_params.to_h { |p| p.split "=", 2 }
730
+ else
731
+ {}
732
+ end
733
+
734
+ response = @client_stub.make_http_request(
735
+ verb,
736
+ uri: uri,
737
+ body: body || "",
738
+ params: query_string_params,
739
+ options: options
740
+ )
741
+ operation = ::Gapic::Rest::TransportOperation.new response
742
+ result = ::Google::Cloud::VisionAI::V1::Corpus.decode_json response.body, ignore_unknown_fields: true
743
+
744
+ yield result, operation if block_given?
745
+ result
746
+ end
747
+
748
+ ##
749
+ # Baseline implementation for the update_corpus REST call
750
+ #
751
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateCorpusRequest]
752
+ # A request object representing the call parameters. Required.
753
+ # @param options [::Gapic::CallOptions]
754
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
755
+ #
756
+ # @yield [result, operation] Access the result along with the TransportOperation object
757
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::Corpus]
758
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
759
+ #
760
+ # @return [::Google::Cloud::VisionAI::V1::Corpus]
761
+ # A result object deserialized from the server's reply
762
+ def update_corpus request_pb, options = nil
763
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
764
+
765
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_corpus_request request_pb
766
+ query_string_params = if query_string_params.any?
767
+ query_string_params.to_h { |p| p.split "=", 2 }
768
+ else
769
+ {}
770
+ end
771
+
772
+ response = @client_stub.make_http_request(
773
+ verb,
774
+ uri: uri,
775
+ body: body || "",
776
+ params: query_string_params,
777
+ options: options
778
+ )
779
+ operation = ::Gapic::Rest::TransportOperation.new response
780
+ result = ::Google::Cloud::VisionAI::V1::Corpus.decode_json response.body, ignore_unknown_fields: true
781
+
782
+ yield result, operation if block_given?
783
+ result
784
+ end
785
+
786
+ ##
787
+ # Baseline implementation for the list_corpora REST call
788
+ #
789
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListCorporaRequest]
790
+ # A request object representing the call parameters. Required.
791
+ # @param options [::Gapic::CallOptions]
792
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
793
+ #
794
+ # @yield [result, operation] Access the result along with the TransportOperation object
795
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ListCorporaResponse]
796
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
797
+ #
798
+ # @return [::Google::Cloud::VisionAI::V1::ListCorporaResponse]
799
+ # A result object deserialized from the server's reply
800
+ def list_corpora request_pb, options = nil
801
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
802
+
803
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_corpora_request request_pb
804
+ query_string_params = if query_string_params.any?
805
+ query_string_params.to_h { |p| p.split "=", 2 }
806
+ else
807
+ {}
808
+ end
809
+
810
+ response = @client_stub.make_http_request(
811
+ verb,
812
+ uri: uri,
813
+ body: body || "",
814
+ params: query_string_params,
815
+ options: options
816
+ )
817
+ operation = ::Gapic::Rest::TransportOperation.new response
818
+ result = ::Google::Cloud::VisionAI::V1::ListCorporaResponse.decode_json response.body, ignore_unknown_fields: true
819
+
820
+ yield result, operation if block_given?
821
+ result
822
+ end
823
+
824
+ ##
825
+ # Baseline implementation for the delete_corpus REST call
826
+ #
827
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteCorpusRequest]
828
+ # A request object representing the call parameters. Required.
829
+ # @param options [::Gapic::CallOptions]
830
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
831
+ #
832
+ # @yield [result, operation] Access the result along with the TransportOperation object
833
+ # @yieldparam result [::Google::Protobuf::Empty]
834
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
835
+ #
836
+ # @return [::Google::Protobuf::Empty]
837
+ # A result object deserialized from the server's reply
838
+ def delete_corpus request_pb, options = nil
839
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
840
+
841
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_corpus_request request_pb
842
+ query_string_params = if query_string_params.any?
843
+ query_string_params.to_h { |p| p.split "=", 2 }
844
+ else
845
+ {}
846
+ end
847
+
848
+ response = @client_stub.make_http_request(
849
+ verb,
850
+ uri: uri,
851
+ body: body || "",
852
+ params: query_string_params,
853
+ options: options
854
+ )
855
+ operation = ::Gapic::Rest::TransportOperation.new response
856
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
857
+
858
+ yield result, operation if block_given?
859
+ result
860
+ end
861
+
862
+ ##
863
+ # Baseline implementation for the analyze_corpus REST call
864
+ #
865
+ # @param request_pb [::Google::Cloud::VisionAI::V1::AnalyzeCorpusRequest]
866
+ # A request object representing the call parameters. Required.
867
+ # @param options [::Gapic::CallOptions]
868
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
869
+ #
870
+ # @yield [result, operation] Access the result along with the TransportOperation object
871
+ # @yieldparam result [::Google::Longrunning::Operation]
872
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
873
+ #
874
+ # @return [::Google::Longrunning::Operation]
875
+ # A result object deserialized from the server's reply
876
+ def analyze_corpus request_pb, options = nil
877
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
878
+
879
+ verb, uri, query_string_params, body = ServiceStub.transcode_analyze_corpus_request request_pb
880
+ query_string_params = if query_string_params.any?
881
+ query_string_params.to_h { |p| p.split "=", 2 }
882
+ else
883
+ {}
884
+ end
885
+
886
+ response = @client_stub.make_http_request(
887
+ verb,
888
+ uri: uri,
889
+ body: body || "",
890
+ params: query_string_params,
891
+ options: options
892
+ )
893
+ operation = ::Gapic::Rest::TransportOperation.new response
894
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
895
+
896
+ yield result, operation if block_given?
897
+ result
898
+ end
899
+
900
+ ##
901
+ # Baseline implementation for the create_data_schema REST call
902
+ #
903
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateDataSchemaRequest]
904
+ # A request object representing the call parameters. Required.
905
+ # @param options [::Gapic::CallOptions]
906
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
907
+ #
908
+ # @yield [result, operation] Access the result along with the TransportOperation object
909
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::DataSchema]
910
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
911
+ #
912
+ # @return [::Google::Cloud::VisionAI::V1::DataSchema]
913
+ # A result object deserialized from the server's reply
914
+ def create_data_schema request_pb, options = nil
915
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
916
+
917
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_data_schema_request request_pb
918
+ query_string_params = if query_string_params.any?
919
+ query_string_params.to_h { |p| p.split "=", 2 }
920
+ else
921
+ {}
922
+ end
923
+
924
+ response = @client_stub.make_http_request(
925
+ verb,
926
+ uri: uri,
927
+ body: body || "",
928
+ params: query_string_params,
929
+ options: options
930
+ )
931
+ operation = ::Gapic::Rest::TransportOperation.new response
932
+ result = ::Google::Cloud::VisionAI::V1::DataSchema.decode_json response.body, ignore_unknown_fields: true
933
+
934
+ yield result, operation if block_given?
935
+ result
936
+ end
937
+
938
+ ##
939
+ # Baseline implementation for the update_data_schema REST call
940
+ #
941
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateDataSchemaRequest]
942
+ # A request object representing the call parameters. Required.
943
+ # @param options [::Gapic::CallOptions]
944
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
945
+ #
946
+ # @yield [result, operation] Access the result along with the TransportOperation object
947
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::DataSchema]
948
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
949
+ #
950
+ # @return [::Google::Cloud::VisionAI::V1::DataSchema]
951
+ # A result object deserialized from the server's reply
952
+ def update_data_schema request_pb, options = nil
953
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
954
+
955
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_data_schema_request request_pb
956
+ query_string_params = if query_string_params.any?
957
+ query_string_params.to_h { |p| p.split "=", 2 }
958
+ else
959
+ {}
960
+ end
961
+
962
+ response = @client_stub.make_http_request(
963
+ verb,
964
+ uri: uri,
965
+ body: body || "",
966
+ params: query_string_params,
967
+ options: options
968
+ )
969
+ operation = ::Gapic::Rest::TransportOperation.new response
970
+ result = ::Google::Cloud::VisionAI::V1::DataSchema.decode_json response.body, ignore_unknown_fields: true
971
+
972
+ yield result, operation if block_given?
973
+ result
974
+ end
975
+
976
+ ##
977
+ # Baseline implementation for the get_data_schema REST call
978
+ #
979
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetDataSchemaRequest]
980
+ # A request object representing the call parameters. Required.
981
+ # @param options [::Gapic::CallOptions]
982
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
983
+ #
984
+ # @yield [result, operation] Access the result along with the TransportOperation object
985
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::DataSchema]
986
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
987
+ #
988
+ # @return [::Google::Cloud::VisionAI::V1::DataSchema]
989
+ # A result object deserialized from the server's reply
990
+ def get_data_schema request_pb, options = nil
991
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
992
+
993
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_data_schema_request request_pb
994
+ query_string_params = if query_string_params.any?
995
+ query_string_params.to_h { |p| p.split "=", 2 }
996
+ else
997
+ {}
998
+ end
999
+
1000
+ response = @client_stub.make_http_request(
1001
+ verb,
1002
+ uri: uri,
1003
+ body: body || "",
1004
+ params: query_string_params,
1005
+ options: options
1006
+ )
1007
+ operation = ::Gapic::Rest::TransportOperation.new response
1008
+ result = ::Google::Cloud::VisionAI::V1::DataSchema.decode_json response.body, ignore_unknown_fields: true
1009
+
1010
+ yield result, operation if block_given?
1011
+ result
1012
+ end
1013
+
1014
+ ##
1015
+ # Baseline implementation for the delete_data_schema REST call
1016
+ #
1017
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteDataSchemaRequest]
1018
+ # A request object representing the call parameters. Required.
1019
+ # @param options [::Gapic::CallOptions]
1020
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1021
+ #
1022
+ # @yield [result, operation] Access the result along with the TransportOperation object
1023
+ # @yieldparam result [::Google::Protobuf::Empty]
1024
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1025
+ #
1026
+ # @return [::Google::Protobuf::Empty]
1027
+ # A result object deserialized from the server's reply
1028
+ def delete_data_schema request_pb, options = nil
1029
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1030
+
1031
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_schema_request request_pb
1032
+ query_string_params = if query_string_params.any?
1033
+ query_string_params.to_h { |p| p.split "=", 2 }
1034
+ else
1035
+ {}
1036
+ end
1037
+
1038
+ response = @client_stub.make_http_request(
1039
+ verb,
1040
+ uri: uri,
1041
+ body: body || "",
1042
+ params: query_string_params,
1043
+ options: options
1044
+ )
1045
+ operation = ::Gapic::Rest::TransportOperation.new response
1046
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
1047
+
1048
+ yield result, operation if block_given?
1049
+ result
1050
+ end
1051
+
1052
+ ##
1053
+ # Baseline implementation for the list_data_schemas REST call
1054
+ #
1055
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListDataSchemasRequest]
1056
+ # A request object representing the call parameters. Required.
1057
+ # @param options [::Gapic::CallOptions]
1058
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1059
+ #
1060
+ # @yield [result, operation] Access the result along with the TransportOperation object
1061
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ListDataSchemasResponse]
1062
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1063
+ #
1064
+ # @return [::Google::Cloud::VisionAI::V1::ListDataSchemasResponse]
1065
+ # A result object deserialized from the server's reply
1066
+ def list_data_schemas request_pb, options = nil
1067
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1068
+
1069
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_data_schemas_request request_pb
1070
+ query_string_params = if query_string_params.any?
1071
+ query_string_params.to_h { |p| p.split "=", 2 }
1072
+ else
1073
+ {}
1074
+ end
1075
+
1076
+ response = @client_stub.make_http_request(
1077
+ verb,
1078
+ uri: uri,
1079
+ body: body || "",
1080
+ params: query_string_params,
1081
+ options: options
1082
+ )
1083
+ operation = ::Gapic::Rest::TransportOperation.new response
1084
+ result = ::Google::Cloud::VisionAI::V1::ListDataSchemasResponse.decode_json response.body, ignore_unknown_fields: true
1085
+
1086
+ yield result, operation if block_given?
1087
+ result
1088
+ end
1089
+
1090
+ ##
1091
+ # Baseline implementation for the create_annotation REST call
1092
+ #
1093
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateAnnotationRequest]
1094
+ # A request object representing the call parameters. Required.
1095
+ # @param options [::Gapic::CallOptions]
1096
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1097
+ #
1098
+ # @yield [result, operation] Access the result along with the TransportOperation object
1099
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::Annotation]
1100
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1101
+ #
1102
+ # @return [::Google::Cloud::VisionAI::V1::Annotation]
1103
+ # A result object deserialized from the server's reply
1104
+ def create_annotation request_pb, options = nil
1105
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1106
+
1107
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_annotation_request request_pb
1108
+ query_string_params = if query_string_params.any?
1109
+ query_string_params.to_h { |p| p.split "=", 2 }
1110
+ else
1111
+ {}
1112
+ end
1113
+
1114
+ response = @client_stub.make_http_request(
1115
+ verb,
1116
+ uri: uri,
1117
+ body: body || "",
1118
+ params: query_string_params,
1119
+ options: options
1120
+ )
1121
+ operation = ::Gapic::Rest::TransportOperation.new response
1122
+ result = ::Google::Cloud::VisionAI::V1::Annotation.decode_json response.body, ignore_unknown_fields: true
1123
+
1124
+ yield result, operation if block_given?
1125
+ result
1126
+ end
1127
+
1128
+ ##
1129
+ # Baseline implementation for the get_annotation REST call
1130
+ #
1131
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetAnnotationRequest]
1132
+ # A request object representing the call parameters. Required.
1133
+ # @param options [::Gapic::CallOptions]
1134
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1135
+ #
1136
+ # @yield [result, operation] Access the result along with the TransportOperation object
1137
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::Annotation]
1138
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1139
+ #
1140
+ # @return [::Google::Cloud::VisionAI::V1::Annotation]
1141
+ # A result object deserialized from the server's reply
1142
+ def get_annotation request_pb, options = nil
1143
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1144
+
1145
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_request request_pb
1146
+ query_string_params = if query_string_params.any?
1147
+ query_string_params.to_h { |p| p.split "=", 2 }
1148
+ else
1149
+ {}
1150
+ end
1151
+
1152
+ response = @client_stub.make_http_request(
1153
+ verb,
1154
+ uri: uri,
1155
+ body: body || "",
1156
+ params: query_string_params,
1157
+ options: options
1158
+ )
1159
+ operation = ::Gapic::Rest::TransportOperation.new response
1160
+ result = ::Google::Cloud::VisionAI::V1::Annotation.decode_json response.body, ignore_unknown_fields: true
1161
+
1162
+ yield result, operation if block_given?
1163
+ result
1164
+ end
1165
+
1166
+ ##
1167
+ # Baseline implementation for the list_annotations REST call
1168
+ #
1169
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListAnnotationsRequest]
1170
+ # A request object representing the call parameters. Required.
1171
+ # @param options [::Gapic::CallOptions]
1172
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1173
+ #
1174
+ # @yield [result, operation] Access the result along with the TransportOperation object
1175
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ListAnnotationsResponse]
1176
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1177
+ #
1178
+ # @return [::Google::Cloud::VisionAI::V1::ListAnnotationsResponse]
1179
+ # A result object deserialized from the server's reply
1180
+ def list_annotations request_pb, options = nil
1181
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1182
+
1183
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_annotations_request request_pb
1184
+ query_string_params = if query_string_params.any?
1185
+ query_string_params.to_h { |p| p.split "=", 2 }
1186
+ else
1187
+ {}
1188
+ end
1189
+
1190
+ response = @client_stub.make_http_request(
1191
+ verb,
1192
+ uri: uri,
1193
+ body: body || "",
1194
+ params: query_string_params,
1195
+ options: options
1196
+ )
1197
+ operation = ::Gapic::Rest::TransportOperation.new response
1198
+ result = ::Google::Cloud::VisionAI::V1::ListAnnotationsResponse.decode_json response.body, ignore_unknown_fields: true
1199
+
1200
+ yield result, operation if block_given?
1201
+ result
1202
+ end
1203
+
1204
+ ##
1205
+ # Baseline implementation for the update_annotation REST call
1206
+ #
1207
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateAnnotationRequest]
1208
+ # A request object representing the call parameters. Required.
1209
+ # @param options [::Gapic::CallOptions]
1210
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1211
+ #
1212
+ # @yield [result, operation] Access the result along with the TransportOperation object
1213
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::Annotation]
1214
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1215
+ #
1216
+ # @return [::Google::Cloud::VisionAI::V1::Annotation]
1217
+ # A result object deserialized from the server's reply
1218
+ def update_annotation request_pb, options = nil
1219
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1220
+
1221
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_annotation_request request_pb
1222
+ query_string_params = if query_string_params.any?
1223
+ query_string_params.to_h { |p| p.split "=", 2 }
1224
+ else
1225
+ {}
1226
+ end
1227
+
1228
+ response = @client_stub.make_http_request(
1229
+ verb,
1230
+ uri: uri,
1231
+ body: body || "",
1232
+ params: query_string_params,
1233
+ options: options
1234
+ )
1235
+ operation = ::Gapic::Rest::TransportOperation.new response
1236
+ result = ::Google::Cloud::VisionAI::V1::Annotation.decode_json response.body, ignore_unknown_fields: true
1237
+
1238
+ yield result, operation if block_given?
1239
+ result
1240
+ end
1241
+
1242
+ ##
1243
+ # Baseline implementation for the delete_annotation REST call
1244
+ #
1245
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteAnnotationRequest]
1246
+ # A request object representing the call parameters. Required.
1247
+ # @param options [::Gapic::CallOptions]
1248
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1249
+ #
1250
+ # @yield [result, operation] Access the result along with the TransportOperation object
1251
+ # @yieldparam result [::Google::Protobuf::Empty]
1252
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1253
+ #
1254
+ # @return [::Google::Protobuf::Empty]
1255
+ # A result object deserialized from the server's reply
1256
+ def delete_annotation request_pb, options = nil
1257
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1258
+
1259
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_annotation_request request_pb
1260
+ query_string_params = if query_string_params.any?
1261
+ query_string_params.to_h { |p| p.split "=", 2 }
1262
+ else
1263
+ {}
1264
+ end
1265
+
1266
+ response = @client_stub.make_http_request(
1267
+ verb,
1268
+ uri: uri,
1269
+ body: body || "",
1270
+ params: query_string_params,
1271
+ options: options
1272
+ )
1273
+ operation = ::Gapic::Rest::TransportOperation.new response
1274
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
1275
+
1276
+ yield result, operation if block_given?
1277
+ result
1278
+ end
1279
+
1280
+ ##
1281
+ # Baseline implementation for the clip_asset REST call
1282
+ #
1283
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ClipAssetRequest]
1284
+ # A request object representing the call parameters. Required.
1285
+ # @param options [::Gapic::CallOptions]
1286
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1287
+ #
1288
+ # @yield [result, operation] Access the result along with the TransportOperation object
1289
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ClipAssetResponse]
1290
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1291
+ #
1292
+ # @return [::Google::Cloud::VisionAI::V1::ClipAssetResponse]
1293
+ # A result object deserialized from the server's reply
1294
+ def clip_asset request_pb, options = nil
1295
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1296
+
1297
+ verb, uri, query_string_params, body = ServiceStub.transcode_clip_asset_request request_pb
1298
+ query_string_params = if query_string_params.any?
1299
+ query_string_params.to_h { |p| p.split "=", 2 }
1300
+ else
1301
+ {}
1302
+ end
1303
+
1304
+ response = @client_stub.make_http_request(
1305
+ verb,
1306
+ uri: uri,
1307
+ body: body || "",
1308
+ params: query_string_params,
1309
+ options: options
1310
+ )
1311
+ operation = ::Gapic::Rest::TransportOperation.new response
1312
+ result = ::Google::Cloud::VisionAI::V1::ClipAssetResponse.decode_json response.body, ignore_unknown_fields: true
1313
+
1314
+ yield result, operation if block_given?
1315
+ result
1316
+ end
1317
+
1318
+ ##
1319
+ # Baseline implementation for the generate_hls_uri REST call
1320
+ #
1321
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GenerateHlsUriRequest]
1322
+ # A request object representing the call parameters. Required.
1323
+ # @param options [::Gapic::CallOptions]
1324
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1325
+ #
1326
+ # @yield [result, operation] Access the result along with the TransportOperation object
1327
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::GenerateHlsUriResponse]
1328
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1329
+ #
1330
+ # @return [::Google::Cloud::VisionAI::V1::GenerateHlsUriResponse]
1331
+ # A result object deserialized from the server's reply
1332
+ def generate_hls_uri request_pb, options = nil
1333
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1334
+
1335
+ verb, uri, query_string_params, body = ServiceStub.transcode_generate_hls_uri_request request_pb
1336
+ query_string_params = if query_string_params.any?
1337
+ query_string_params.to_h { |p| p.split "=", 2 }
1338
+ else
1339
+ {}
1340
+ end
1341
+
1342
+ response = @client_stub.make_http_request(
1343
+ verb,
1344
+ uri: uri,
1345
+ body: body || "",
1346
+ params: query_string_params,
1347
+ options: options
1348
+ )
1349
+ operation = ::Gapic::Rest::TransportOperation.new response
1350
+ result = ::Google::Cloud::VisionAI::V1::GenerateHlsUriResponse.decode_json response.body, ignore_unknown_fields: true
1351
+
1352
+ yield result, operation if block_given?
1353
+ result
1354
+ end
1355
+
1356
+ ##
1357
+ # Baseline implementation for the import_assets REST call
1358
+ #
1359
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ImportAssetsRequest]
1360
+ # A request object representing the call parameters. Required.
1361
+ # @param options [::Gapic::CallOptions]
1362
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1363
+ #
1364
+ # @yield [result, operation] Access the result along with the TransportOperation object
1365
+ # @yieldparam result [::Google::Longrunning::Operation]
1366
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1367
+ #
1368
+ # @return [::Google::Longrunning::Operation]
1369
+ # A result object deserialized from the server's reply
1370
+ def import_assets request_pb, options = nil
1371
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1372
+
1373
+ verb, uri, query_string_params, body = ServiceStub.transcode_import_assets_request request_pb
1374
+ query_string_params = if query_string_params.any?
1375
+ query_string_params.to_h { |p| p.split "=", 2 }
1376
+ else
1377
+ {}
1378
+ end
1379
+
1380
+ response = @client_stub.make_http_request(
1381
+ verb,
1382
+ uri: uri,
1383
+ body: body || "",
1384
+ params: query_string_params,
1385
+ options: options
1386
+ )
1387
+ operation = ::Gapic::Rest::TransportOperation.new response
1388
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1389
+
1390
+ yield result, operation if block_given?
1391
+ result
1392
+ end
1393
+
1394
+ ##
1395
+ # Baseline implementation for the create_search_config REST call
1396
+ #
1397
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateSearchConfigRequest]
1398
+ # A request object representing the call parameters. Required.
1399
+ # @param options [::Gapic::CallOptions]
1400
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1401
+ #
1402
+ # @yield [result, operation] Access the result along with the TransportOperation object
1403
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::SearchConfig]
1404
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1405
+ #
1406
+ # @return [::Google::Cloud::VisionAI::V1::SearchConfig]
1407
+ # A result object deserialized from the server's reply
1408
+ def create_search_config request_pb, options = nil
1409
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1410
+
1411
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_search_config_request request_pb
1412
+ query_string_params = if query_string_params.any?
1413
+ query_string_params.to_h { |p| p.split "=", 2 }
1414
+ else
1415
+ {}
1416
+ end
1417
+
1418
+ response = @client_stub.make_http_request(
1419
+ verb,
1420
+ uri: uri,
1421
+ body: body || "",
1422
+ params: query_string_params,
1423
+ options: options
1424
+ )
1425
+ operation = ::Gapic::Rest::TransportOperation.new response
1426
+ result = ::Google::Cloud::VisionAI::V1::SearchConfig.decode_json response.body, ignore_unknown_fields: true
1427
+
1428
+ yield result, operation if block_given?
1429
+ result
1430
+ end
1431
+
1432
+ ##
1433
+ # Baseline implementation for the update_search_config REST call
1434
+ #
1435
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateSearchConfigRequest]
1436
+ # A request object representing the call parameters. Required.
1437
+ # @param options [::Gapic::CallOptions]
1438
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1439
+ #
1440
+ # @yield [result, operation] Access the result along with the TransportOperation object
1441
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::SearchConfig]
1442
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1443
+ #
1444
+ # @return [::Google::Cloud::VisionAI::V1::SearchConfig]
1445
+ # A result object deserialized from the server's reply
1446
+ def update_search_config request_pb, options = nil
1447
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1448
+
1449
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_search_config_request request_pb
1450
+ query_string_params = if query_string_params.any?
1451
+ query_string_params.to_h { |p| p.split "=", 2 }
1452
+ else
1453
+ {}
1454
+ end
1455
+
1456
+ response = @client_stub.make_http_request(
1457
+ verb,
1458
+ uri: uri,
1459
+ body: body || "",
1460
+ params: query_string_params,
1461
+ options: options
1462
+ )
1463
+ operation = ::Gapic::Rest::TransportOperation.new response
1464
+ result = ::Google::Cloud::VisionAI::V1::SearchConfig.decode_json response.body, ignore_unknown_fields: true
1465
+
1466
+ yield result, operation if block_given?
1467
+ result
1468
+ end
1469
+
1470
+ ##
1471
+ # Baseline implementation for the get_search_config REST call
1472
+ #
1473
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetSearchConfigRequest]
1474
+ # A request object representing the call parameters. Required.
1475
+ # @param options [::Gapic::CallOptions]
1476
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1477
+ #
1478
+ # @yield [result, operation] Access the result along with the TransportOperation object
1479
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::SearchConfig]
1480
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1481
+ #
1482
+ # @return [::Google::Cloud::VisionAI::V1::SearchConfig]
1483
+ # A result object deserialized from the server's reply
1484
+ def get_search_config request_pb, options = nil
1485
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1486
+
1487
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_search_config_request request_pb
1488
+ query_string_params = if query_string_params.any?
1489
+ query_string_params.to_h { |p| p.split "=", 2 }
1490
+ else
1491
+ {}
1492
+ end
1493
+
1494
+ response = @client_stub.make_http_request(
1495
+ verb,
1496
+ uri: uri,
1497
+ body: body || "",
1498
+ params: query_string_params,
1499
+ options: options
1500
+ )
1501
+ operation = ::Gapic::Rest::TransportOperation.new response
1502
+ result = ::Google::Cloud::VisionAI::V1::SearchConfig.decode_json response.body, ignore_unknown_fields: true
1503
+
1504
+ yield result, operation if block_given?
1505
+ result
1506
+ end
1507
+
1508
+ ##
1509
+ # Baseline implementation for the delete_search_config REST call
1510
+ #
1511
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteSearchConfigRequest]
1512
+ # A request object representing the call parameters. Required.
1513
+ # @param options [::Gapic::CallOptions]
1514
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1515
+ #
1516
+ # @yield [result, operation] Access the result along with the TransportOperation object
1517
+ # @yieldparam result [::Google::Protobuf::Empty]
1518
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1519
+ #
1520
+ # @return [::Google::Protobuf::Empty]
1521
+ # A result object deserialized from the server's reply
1522
+ def delete_search_config request_pb, options = nil
1523
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1524
+
1525
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_search_config_request request_pb
1526
+ query_string_params = if query_string_params.any?
1527
+ query_string_params.to_h { |p| p.split "=", 2 }
1528
+ else
1529
+ {}
1530
+ end
1531
+
1532
+ response = @client_stub.make_http_request(
1533
+ verb,
1534
+ uri: uri,
1535
+ body: body || "",
1536
+ params: query_string_params,
1537
+ options: options
1538
+ )
1539
+ operation = ::Gapic::Rest::TransportOperation.new response
1540
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
1541
+
1542
+ yield result, operation if block_given?
1543
+ result
1544
+ end
1545
+
1546
+ ##
1547
+ # Baseline implementation for the list_search_configs REST call
1548
+ #
1549
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListSearchConfigsRequest]
1550
+ # A request object representing the call parameters. Required.
1551
+ # @param options [::Gapic::CallOptions]
1552
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1553
+ #
1554
+ # @yield [result, operation] Access the result along with the TransportOperation object
1555
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ListSearchConfigsResponse]
1556
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1557
+ #
1558
+ # @return [::Google::Cloud::VisionAI::V1::ListSearchConfigsResponse]
1559
+ # A result object deserialized from the server's reply
1560
+ def list_search_configs request_pb, options = nil
1561
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1562
+
1563
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_search_configs_request request_pb
1564
+ query_string_params = if query_string_params.any?
1565
+ query_string_params.to_h { |p| p.split "=", 2 }
1566
+ else
1567
+ {}
1568
+ end
1569
+
1570
+ response = @client_stub.make_http_request(
1571
+ verb,
1572
+ uri: uri,
1573
+ body: body || "",
1574
+ params: query_string_params,
1575
+ options: options
1576
+ )
1577
+ operation = ::Gapic::Rest::TransportOperation.new response
1578
+ result = ::Google::Cloud::VisionAI::V1::ListSearchConfigsResponse.decode_json response.body, ignore_unknown_fields: true
1579
+
1580
+ yield result, operation if block_given?
1581
+ result
1582
+ end
1583
+
1584
+ ##
1585
+ # Baseline implementation for the create_search_hypernym REST call
1586
+ #
1587
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateSearchHypernymRequest]
1588
+ # A request object representing the call parameters. Required.
1589
+ # @param options [::Gapic::CallOptions]
1590
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1591
+ #
1592
+ # @yield [result, operation] Access the result along with the TransportOperation object
1593
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::SearchHypernym]
1594
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1595
+ #
1596
+ # @return [::Google::Cloud::VisionAI::V1::SearchHypernym]
1597
+ # A result object deserialized from the server's reply
1598
+ def create_search_hypernym request_pb, options = nil
1599
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1600
+
1601
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_search_hypernym_request request_pb
1602
+ query_string_params = if query_string_params.any?
1603
+ query_string_params.to_h { |p| p.split "=", 2 }
1604
+ else
1605
+ {}
1606
+ end
1607
+
1608
+ response = @client_stub.make_http_request(
1609
+ verb,
1610
+ uri: uri,
1611
+ body: body || "",
1612
+ params: query_string_params,
1613
+ options: options
1614
+ )
1615
+ operation = ::Gapic::Rest::TransportOperation.new response
1616
+ result = ::Google::Cloud::VisionAI::V1::SearchHypernym.decode_json response.body, ignore_unknown_fields: true
1617
+
1618
+ yield result, operation if block_given?
1619
+ result
1620
+ end
1621
+
1622
+ ##
1623
+ # Baseline implementation for the update_search_hypernym REST call
1624
+ #
1625
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateSearchHypernymRequest]
1626
+ # A request object representing the call parameters. Required.
1627
+ # @param options [::Gapic::CallOptions]
1628
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1629
+ #
1630
+ # @yield [result, operation] Access the result along with the TransportOperation object
1631
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::SearchHypernym]
1632
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1633
+ #
1634
+ # @return [::Google::Cloud::VisionAI::V1::SearchHypernym]
1635
+ # A result object deserialized from the server's reply
1636
+ def update_search_hypernym request_pb, options = nil
1637
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1638
+
1639
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_search_hypernym_request request_pb
1640
+ query_string_params = if query_string_params.any?
1641
+ query_string_params.to_h { |p| p.split "=", 2 }
1642
+ else
1643
+ {}
1644
+ end
1645
+
1646
+ response = @client_stub.make_http_request(
1647
+ verb,
1648
+ uri: uri,
1649
+ body: body || "",
1650
+ params: query_string_params,
1651
+ options: options
1652
+ )
1653
+ operation = ::Gapic::Rest::TransportOperation.new response
1654
+ result = ::Google::Cloud::VisionAI::V1::SearchHypernym.decode_json response.body, ignore_unknown_fields: true
1655
+
1656
+ yield result, operation if block_given?
1657
+ result
1658
+ end
1659
+
1660
+ ##
1661
+ # Baseline implementation for the get_search_hypernym REST call
1662
+ #
1663
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetSearchHypernymRequest]
1664
+ # A request object representing the call parameters. Required.
1665
+ # @param options [::Gapic::CallOptions]
1666
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1667
+ #
1668
+ # @yield [result, operation] Access the result along with the TransportOperation object
1669
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::SearchHypernym]
1670
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1671
+ #
1672
+ # @return [::Google::Cloud::VisionAI::V1::SearchHypernym]
1673
+ # A result object deserialized from the server's reply
1674
+ def get_search_hypernym request_pb, options = nil
1675
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1676
+
1677
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_search_hypernym_request request_pb
1678
+ query_string_params = if query_string_params.any?
1679
+ query_string_params.to_h { |p| p.split "=", 2 }
1680
+ else
1681
+ {}
1682
+ end
1683
+
1684
+ response = @client_stub.make_http_request(
1685
+ verb,
1686
+ uri: uri,
1687
+ body: body || "",
1688
+ params: query_string_params,
1689
+ options: options
1690
+ )
1691
+ operation = ::Gapic::Rest::TransportOperation.new response
1692
+ result = ::Google::Cloud::VisionAI::V1::SearchHypernym.decode_json response.body, ignore_unknown_fields: true
1693
+
1694
+ yield result, operation if block_given?
1695
+ result
1696
+ end
1697
+
1698
+ ##
1699
+ # Baseline implementation for the delete_search_hypernym REST call
1700
+ #
1701
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteSearchHypernymRequest]
1702
+ # A request object representing the call parameters. Required.
1703
+ # @param options [::Gapic::CallOptions]
1704
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1705
+ #
1706
+ # @yield [result, operation] Access the result along with the TransportOperation object
1707
+ # @yieldparam result [::Google::Protobuf::Empty]
1708
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1709
+ #
1710
+ # @return [::Google::Protobuf::Empty]
1711
+ # A result object deserialized from the server's reply
1712
+ def delete_search_hypernym request_pb, options = nil
1713
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1714
+
1715
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_search_hypernym_request request_pb
1716
+ query_string_params = if query_string_params.any?
1717
+ query_string_params.to_h { |p| p.split "=", 2 }
1718
+ else
1719
+ {}
1720
+ end
1721
+
1722
+ response = @client_stub.make_http_request(
1723
+ verb,
1724
+ uri: uri,
1725
+ body: body || "",
1726
+ params: query_string_params,
1727
+ options: options
1728
+ )
1729
+ operation = ::Gapic::Rest::TransportOperation.new response
1730
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
1731
+
1732
+ yield result, operation if block_given?
1733
+ result
1734
+ end
1735
+
1736
+ ##
1737
+ # Baseline implementation for the list_search_hypernyms REST call
1738
+ #
1739
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListSearchHypernymsRequest]
1740
+ # A request object representing the call parameters. Required.
1741
+ # @param options [::Gapic::CallOptions]
1742
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1743
+ #
1744
+ # @yield [result, operation] Access the result along with the TransportOperation object
1745
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ListSearchHypernymsResponse]
1746
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1747
+ #
1748
+ # @return [::Google::Cloud::VisionAI::V1::ListSearchHypernymsResponse]
1749
+ # A result object deserialized from the server's reply
1750
+ def list_search_hypernyms request_pb, options = nil
1751
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1752
+
1753
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_search_hypernyms_request request_pb
1754
+ query_string_params = if query_string_params.any?
1755
+ query_string_params.to_h { |p| p.split "=", 2 }
1756
+ else
1757
+ {}
1758
+ end
1759
+
1760
+ response = @client_stub.make_http_request(
1761
+ verb,
1762
+ uri: uri,
1763
+ body: body || "",
1764
+ params: query_string_params,
1765
+ options: options
1766
+ )
1767
+ operation = ::Gapic::Rest::TransportOperation.new response
1768
+ result = ::Google::Cloud::VisionAI::V1::ListSearchHypernymsResponse.decode_json response.body, ignore_unknown_fields: true
1769
+
1770
+ yield result, operation if block_given?
1771
+ result
1772
+ end
1773
+
1774
+ ##
1775
+ # Baseline implementation for the search_assets REST call
1776
+ #
1777
+ # @param request_pb [::Google::Cloud::VisionAI::V1::SearchAssetsRequest]
1778
+ # A request object representing the call parameters. Required.
1779
+ # @param options [::Gapic::CallOptions]
1780
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1781
+ #
1782
+ # @yield [result, operation] Access the result along with the TransportOperation object
1783
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::SearchAssetsResponse]
1784
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1785
+ #
1786
+ # @return [::Google::Cloud::VisionAI::V1::SearchAssetsResponse]
1787
+ # A result object deserialized from the server's reply
1788
+ def search_assets request_pb, options = nil
1789
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1790
+
1791
+ verb, uri, query_string_params, body = ServiceStub.transcode_search_assets_request request_pb
1792
+ query_string_params = if query_string_params.any?
1793
+ query_string_params.to_h { |p| p.split "=", 2 }
1794
+ else
1795
+ {}
1796
+ end
1797
+
1798
+ response = @client_stub.make_http_request(
1799
+ verb,
1800
+ uri: uri,
1801
+ body: body || "",
1802
+ params: query_string_params,
1803
+ options: options
1804
+ )
1805
+ operation = ::Gapic::Rest::TransportOperation.new response
1806
+ result = ::Google::Cloud::VisionAI::V1::SearchAssetsResponse.decode_json response.body, ignore_unknown_fields: true
1807
+
1808
+ yield result, operation if block_given?
1809
+ result
1810
+ end
1811
+
1812
+ ##
1813
+ # Baseline implementation for the search_index_endpoint REST call
1814
+ #
1815
+ # @param request_pb [::Google::Cloud::VisionAI::V1::SearchIndexEndpointRequest]
1816
+ # A request object representing the call parameters. Required.
1817
+ # @param options [::Gapic::CallOptions]
1818
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1819
+ #
1820
+ # @yield [result, operation] Access the result along with the TransportOperation object
1821
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::SearchIndexEndpointResponse]
1822
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1823
+ #
1824
+ # @return [::Google::Cloud::VisionAI::V1::SearchIndexEndpointResponse]
1825
+ # A result object deserialized from the server's reply
1826
+ def search_index_endpoint request_pb, options = nil
1827
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1828
+
1829
+ verb, uri, query_string_params, body = ServiceStub.transcode_search_index_endpoint_request request_pb
1830
+ query_string_params = if query_string_params.any?
1831
+ query_string_params.to_h { |p| p.split "=", 2 }
1832
+ else
1833
+ {}
1834
+ end
1835
+
1836
+ response = @client_stub.make_http_request(
1837
+ verb,
1838
+ uri: uri,
1839
+ body: body || "",
1840
+ params: query_string_params,
1841
+ options: options
1842
+ )
1843
+ operation = ::Gapic::Rest::TransportOperation.new response
1844
+ result = ::Google::Cloud::VisionAI::V1::SearchIndexEndpointResponse.decode_json response.body, ignore_unknown_fields: true
1845
+
1846
+ yield result, operation if block_given?
1847
+ result
1848
+ end
1849
+
1850
+ ##
1851
+ # Baseline implementation for the create_index_endpoint REST call
1852
+ #
1853
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateIndexEndpointRequest]
1854
+ # A request object representing the call parameters. Required.
1855
+ # @param options [::Gapic::CallOptions]
1856
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1857
+ #
1858
+ # @yield [result, operation] Access the result along with the TransportOperation object
1859
+ # @yieldparam result [::Google::Longrunning::Operation]
1860
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1861
+ #
1862
+ # @return [::Google::Longrunning::Operation]
1863
+ # A result object deserialized from the server's reply
1864
+ def create_index_endpoint request_pb, options = nil
1865
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1866
+
1867
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_index_endpoint_request request_pb
1868
+ query_string_params = if query_string_params.any?
1869
+ query_string_params.to_h { |p| p.split "=", 2 }
1870
+ else
1871
+ {}
1872
+ end
1873
+
1874
+ response = @client_stub.make_http_request(
1875
+ verb,
1876
+ uri: uri,
1877
+ body: body || "",
1878
+ params: query_string_params,
1879
+ options: options
1880
+ )
1881
+ operation = ::Gapic::Rest::TransportOperation.new response
1882
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1883
+
1884
+ yield result, operation if block_given?
1885
+ result
1886
+ end
1887
+
1888
+ ##
1889
+ # Baseline implementation for the get_index_endpoint REST call
1890
+ #
1891
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetIndexEndpointRequest]
1892
+ # A request object representing the call parameters. Required.
1893
+ # @param options [::Gapic::CallOptions]
1894
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1895
+ #
1896
+ # @yield [result, operation] Access the result along with the TransportOperation object
1897
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::IndexEndpoint]
1898
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1899
+ #
1900
+ # @return [::Google::Cloud::VisionAI::V1::IndexEndpoint]
1901
+ # A result object deserialized from the server's reply
1902
+ def get_index_endpoint request_pb, options = nil
1903
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1904
+
1905
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_index_endpoint_request request_pb
1906
+ query_string_params = if query_string_params.any?
1907
+ query_string_params.to_h { |p| p.split "=", 2 }
1908
+ else
1909
+ {}
1910
+ end
1911
+
1912
+ response = @client_stub.make_http_request(
1913
+ verb,
1914
+ uri: uri,
1915
+ body: body || "",
1916
+ params: query_string_params,
1917
+ options: options
1918
+ )
1919
+ operation = ::Gapic::Rest::TransportOperation.new response
1920
+ result = ::Google::Cloud::VisionAI::V1::IndexEndpoint.decode_json response.body, ignore_unknown_fields: true
1921
+
1922
+ yield result, operation if block_given?
1923
+ result
1924
+ end
1925
+
1926
+ ##
1927
+ # Baseline implementation for the list_index_endpoints REST call
1928
+ #
1929
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListIndexEndpointsRequest]
1930
+ # A request object representing the call parameters. Required.
1931
+ # @param options [::Gapic::CallOptions]
1932
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1933
+ #
1934
+ # @yield [result, operation] Access the result along with the TransportOperation object
1935
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ListIndexEndpointsResponse]
1936
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1937
+ #
1938
+ # @return [::Google::Cloud::VisionAI::V1::ListIndexEndpointsResponse]
1939
+ # A result object deserialized from the server's reply
1940
+ def list_index_endpoints request_pb, options = nil
1941
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1942
+
1943
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_index_endpoints_request request_pb
1944
+ query_string_params = if query_string_params.any?
1945
+ query_string_params.to_h { |p| p.split "=", 2 }
1946
+ else
1947
+ {}
1948
+ end
1949
+
1950
+ response = @client_stub.make_http_request(
1951
+ verb,
1952
+ uri: uri,
1953
+ body: body || "",
1954
+ params: query_string_params,
1955
+ options: options
1956
+ )
1957
+ operation = ::Gapic::Rest::TransportOperation.new response
1958
+ result = ::Google::Cloud::VisionAI::V1::ListIndexEndpointsResponse.decode_json response.body, ignore_unknown_fields: true
1959
+
1960
+ yield result, operation if block_given?
1961
+ result
1962
+ end
1963
+
1964
+ ##
1965
+ # Baseline implementation for the update_index_endpoint REST call
1966
+ #
1967
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateIndexEndpointRequest]
1968
+ # A request object representing the call parameters. Required.
1969
+ # @param options [::Gapic::CallOptions]
1970
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1971
+ #
1972
+ # @yield [result, operation] Access the result along with the TransportOperation object
1973
+ # @yieldparam result [::Google::Longrunning::Operation]
1974
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1975
+ #
1976
+ # @return [::Google::Longrunning::Operation]
1977
+ # A result object deserialized from the server's reply
1978
+ def update_index_endpoint request_pb, options = nil
1979
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1980
+
1981
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_index_endpoint_request request_pb
1982
+ query_string_params = if query_string_params.any?
1983
+ query_string_params.to_h { |p| p.split "=", 2 }
1984
+ else
1985
+ {}
1986
+ end
1987
+
1988
+ response = @client_stub.make_http_request(
1989
+ verb,
1990
+ uri: uri,
1991
+ body: body || "",
1992
+ params: query_string_params,
1993
+ options: options
1994
+ )
1995
+ operation = ::Gapic::Rest::TransportOperation.new response
1996
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1997
+
1998
+ yield result, operation if block_given?
1999
+ result
2000
+ end
2001
+
2002
+ ##
2003
+ # Baseline implementation for the delete_index_endpoint REST call
2004
+ #
2005
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteIndexEndpointRequest]
2006
+ # A request object representing the call parameters. Required.
2007
+ # @param options [::Gapic::CallOptions]
2008
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2009
+ #
2010
+ # @yield [result, operation] Access the result along with the TransportOperation object
2011
+ # @yieldparam result [::Google::Longrunning::Operation]
2012
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2013
+ #
2014
+ # @return [::Google::Longrunning::Operation]
2015
+ # A result object deserialized from the server's reply
2016
+ def delete_index_endpoint request_pb, options = nil
2017
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2018
+
2019
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_index_endpoint_request request_pb
2020
+ query_string_params = if query_string_params.any?
2021
+ query_string_params.to_h { |p| p.split "=", 2 }
2022
+ else
2023
+ {}
2024
+ end
2025
+
2026
+ response = @client_stub.make_http_request(
2027
+ verb,
2028
+ uri: uri,
2029
+ body: body || "",
2030
+ params: query_string_params,
2031
+ options: options
2032
+ )
2033
+ operation = ::Gapic::Rest::TransportOperation.new response
2034
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
2035
+
2036
+ yield result, operation if block_given?
2037
+ result
2038
+ end
2039
+
2040
+ ##
2041
+ # Baseline implementation for the deploy_index REST call
2042
+ #
2043
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeployIndexRequest]
2044
+ # A request object representing the call parameters. Required.
2045
+ # @param options [::Gapic::CallOptions]
2046
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2047
+ #
2048
+ # @yield [result, operation] Access the result along with the TransportOperation object
2049
+ # @yieldparam result [::Google::Longrunning::Operation]
2050
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2051
+ #
2052
+ # @return [::Google::Longrunning::Operation]
2053
+ # A result object deserialized from the server's reply
2054
+ def deploy_index request_pb, options = nil
2055
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2056
+
2057
+ verb, uri, query_string_params, body = ServiceStub.transcode_deploy_index_request request_pb
2058
+ query_string_params = if query_string_params.any?
2059
+ query_string_params.to_h { |p| p.split "=", 2 }
2060
+ else
2061
+ {}
2062
+ end
2063
+
2064
+ response = @client_stub.make_http_request(
2065
+ verb,
2066
+ uri: uri,
2067
+ body: body || "",
2068
+ params: query_string_params,
2069
+ options: options
2070
+ )
2071
+ operation = ::Gapic::Rest::TransportOperation.new response
2072
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
2073
+
2074
+ yield result, operation if block_given?
2075
+ result
2076
+ end
2077
+
2078
+ ##
2079
+ # Baseline implementation for the undeploy_index REST call
2080
+ #
2081
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UndeployIndexRequest]
2082
+ # A request object representing the call parameters. Required.
2083
+ # @param options [::Gapic::CallOptions]
2084
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2085
+ #
2086
+ # @yield [result, operation] Access the result along with the TransportOperation object
2087
+ # @yieldparam result [::Google::Longrunning::Operation]
2088
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2089
+ #
2090
+ # @return [::Google::Longrunning::Operation]
2091
+ # A result object deserialized from the server's reply
2092
+ def undeploy_index request_pb, options = nil
2093
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2094
+
2095
+ verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_index_request request_pb
2096
+ query_string_params = if query_string_params.any?
2097
+ query_string_params.to_h { |p| p.split "=", 2 }
2098
+ else
2099
+ {}
2100
+ end
2101
+
2102
+ response = @client_stub.make_http_request(
2103
+ verb,
2104
+ uri: uri,
2105
+ body: body || "",
2106
+ params: query_string_params,
2107
+ options: options
2108
+ )
2109
+ operation = ::Gapic::Rest::TransportOperation.new response
2110
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
2111
+
2112
+ yield result, operation if block_given?
2113
+ result
2114
+ end
2115
+
2116
+ ##
2117
+ # Baseline implementation for the create_collection REST call
2118
+ #
2119
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateCollectionRequest]
2120
+ # A request object representing the call parameters. Required.
2121
+ # @param options [::Gapic::CallOptions]
2122
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2123
+ #
2124
+ # @yield [result, operation] Access the result along with the TransportOperation object
2125
+ # @yieldparam result [::Google::Longrunning::Operation]
2126
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2127
+ #
2128
+ # @return [::Google::Longrunning::Operation]
2129
+ # A result object deserialized from the server's reply
2130
+ def create_collection request_pb, options = nil
2131
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2132
+
2133
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_collection_request request_pb
2134
+ query_string_params = if query_string_params.any?
2135
+ query_string_params.to_h { |p| p.split "=", 2 }
2136
+ else
2137
+ {}
2138
+ end
2139
+
2140
+ response = @client_stub.make_http_request(
2141
+ verb,
2142
+ uri: uri,
2143
+ body: body || "",
2144
+ params: query_string_params,
2145
+ options: options
2146
+ )
2147
+ operation = ::Gapic::Rest::TransportOperation.new response
2148
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
2149
+
2150
+ yield result, operation if block_given?
2151
+ result
2152
+ end
2153
+
2154
+ ##
2155
+ # Baseline implementation for the delete_collection REST call
2156
+ #
2157
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteCollectionRequest]
2158
+ # A request object representing the call parameters. Required.
2159
+ # @param options [::Gapic::CallOptions]
2160
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2161
+ #
2162
+ # @yield [result, operation] Access the result along with the TransportOperation object
2163
+ # @yieldparam result [::Google::Longrunning::Operation]
2164
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2165
+ #
2166
+ # @return [::Google::Longrunning::Operation]
2167
+ # A result object deserialized from the server's reply
2168
+ def delete_collection request_pb, options = nil
2169
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2170
+
2171
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_collection_request request_pb
2172
+ query_string_params = if query_string_params.any?
2173
+ query_string_params.to_h { |p| p.split "=", 2 }
2174
+ else
2175
+ {}
2176
+ end
2177
+
2178
+ response = @client_stub.make_http_request(
2179
+ verb,
2180
+ uri: uri,
2181
+ body: body || "",
2182
+ params: query_string_params,
2183
+ options: options
2184
+ )
2185
+ operation = ::Gapic::Rest::TransportOperation.new response
2186
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
2187
+
2188
+ yield result, operation if block_given?
2189
+ result
2190
+ end
2191
+
2192
+ ##
2193
+ # Baseline implementation for the get_collection REST call
2194
+ #
2195
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetCollectionRequest]
2196
+ # A request object representing the call parameters. Required.
2197
+ # @param options [::Gapic::CallOptions]
2198
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2199
+ #
2200
+ # @yield [result, operation] Access the result along with the TransportOperation object
2201
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::Collection]
2202
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2203
+ #
2204
+ # @return [::Google::Cloud::VisionAI::V1::Collection]
2205
+ # A result object deserialized from the server's reply
2206
+ def get_collection request_pb, options = nil
2207
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2208
+
2209
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_collection_request request_pb
2210
+ query_string_params = if query_string_params.any?
2211
+ query_string_params.to_h { |p| p.split "=", 2 }
2212
+ else
2213
+ {}
2214
+ end
2215
+
2216
+ response = @client_stub.make_http_request(
2217
+ verb,
2218
+ uri: uri,
2219
+ body: body || "",
2220
+ params: query_string_params,
2221
+ options: options
2222
+ )
2223
+ operation = ::Gapic::Rest::TransportOperation.new response
2224
+ result = ::Google::Cloud::VisionAI::V1::Collection.decode_json response.body, ignore_unknown_fields: true
2225
+
2226
+ yield result, operation if block_given?
2227
+ result
2228
+ end
2229
+
2230
+ ##
2231
+ # Baseline implementation for the update_collection REST call
2232
+ #
2233
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateCollectionRequest]
2234
+ # A request object representing the call parameters. Required.
2235
+ # @param options [::Gapic::CallOptions]
2236
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2237
+ #
2238
+ # @yield [result, operation] Access the result along with the TransportOperation object
2239
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::Collection]
2240
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2241
+ #
2242
+ # @return [::Google::Cloud::VisionAI::V1::Collection]
2243
+ # A result object deserialized from the server's reply
2244
+ def update_collection request_pb, options = nil
2245
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2246
+
2247
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_collection_request request_pb
2248
+ query_string_params = if query_string_params.any?
2249
+ query_string_params.to_h { |p| p.split "=", 2 }
2250
+ else
2251
+ {}
2252
+ end
2253
+
2254
+ response = @client_stub.make_http_request(
2255
+ verb,
2256
+ uri: uri,
2257
+ body: body || "",
2258
+ params: query_string_params,
2259
+ options: options
2260
+ )
2261
+ operation = ::Gapic::Rest::TransportOperation.new response
2262
+ result = ::Google::Cloud::VisionAI::V1::Collection.decode_json response.body, ignore_unknown_fields: true
2263
+
2264
+ yield result, operation if block_given?
2265
+ result
2266
+ end
2267
+
2268
+ ##
2269
+ # Baseline implementation for the list_collections REST call
2270
+ #
2271
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListCollectionsRequest]
2272
+ # A request object representing the call parameters. Required.
2273
+ # @param options [::Gapic::CallOptions]
2274
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2275
+ #
2276
+ # @yield [result, operation] Access the result along with the TransportOperation object
2277
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ListCollectionsResponse]
2278
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2279
+ #
2280
+ # @return [::Google::Cloud::VisionAI::V1::ListCollectionsResponse]
2281
+ # A result object deserialized from the server's reply
2282
+ def list_collections request_pb, options = nil
2283
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2284
+
2285
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_collections_request request_pb
2286
+ query_string_params = if query_string_params.any?
2287
+ query_string_params.to_h { |p| p.split "=", 2 }
2288
+ else
2289
+ {}
2290
+ end
2291
+
2292
+ response = @client_stub.make_http_request(
2293
+ verb,
2294
+ uri: uri,
2295
+ body: body || "",
2296
+ params: query_string_params,
2297
+ options: options
2298
+ )
2299
+ operation = ::Gapic::Rest::TransportOperation.new response
2300
+ result = ::Google::Cloud::VisionAI::V1::ListCollectionsResponse.decode_json response.body, ignore_unknown_fields: true
2301
+
2302
+ yield result, operation if block_given?
2303
+ result
2304
+ end
2305
+
2306
+ ##
2307
+ # Baseline implementation for the add_collection_item REST call
2308
+ #
2309
+ # @param request_pb [::Google::Cloud::VisionAI::V1::AddCollectionItemRequest]
2310
+ # A request object representing the call parameters. Required.
2311
+ # @param options [::Gapic::CallOptions]
2312
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2313
+ #
2314
+ # @yield [result, operation] Access the result along with the TransportOperation object
2315
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::AddCollectionItemResponse]
2316
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2317
+ #
2318
+ # @return [::Google::Cloud::VisionAI::V1::AddCollectionItemResponse]
2319
+ # A result object deserialized from the server's reply
2320
+ def add_collection_item request_pb, options = nil
2321
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2322
+
2323
+ verb, uri, query_string_params, body = ServiceStub.transcode_add_collection_item_request request_pb
2324
+ query_string_params = if query_string_params.any?
2325
+ query_string_params.to_h { |p| p.split "=", 2 }
2326
+ else
2327
+ {}
2328
+ end
2329
+
2330
+ response = @client_stub.make_http_request(
2331
+ verb,
2332
+ uri: uri,
2333
+ body: body || "",
2334
+ params: query_string_params,
2335
+ options: options
2336
+ )
2337
+ operation = ::Gapic::Rest::TransportOperation.new response
2338
+ result = ::Google::Cloud::VisionAI::V1::AddCollectionItemResponse.decode_json response.body, ignore_unknown_fields: true
2339
+
2340
+ yield result, operation if block_given?
2341
+ result
2342
+ end
2343
+
2344
+ ##
2345
+ # Baseline implementation for the remove_collection_item REST call
2346
+ #
2347
+ # @param request_pb [::Google::Cloud::VisionAI::V1::RemoveCollectionItemRequest]
2348
+ # A request object representing the call parameters. Required.
2349
+ # @param options [::Gapic::CallOptions]
2350
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2351
+ #
2352
+ # @yield [result, operation] Access the result along with the TransportOperation object
2353
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::RemoveCollectionItemResponse]
2354
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2355
+ #
2356
+ # @return [::Google::Cloud::VisionAI::V1::RemoveCollectionItemResponse]
2357
+ # A result object deserialized from the server's reply
2358
+ def remove_collection_item request_pb, options = nil
2359
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2360
+
2361
+ verb, uri, query_string_params, body = ServiceStub.transcode_remove_collection_item_request request_pb
2362
+ query_string_params = if query_string_params.any?
2363
+ query_string_params.to_h { |p| p.split "=", 2 }
2364
+ else
2365
+ {}
2366
+ end
2367
+
2368
+ response = @client_stub.make_http_request(
2369
+ verb,
2370
+ uri: uri,
2371
+ body: body || "",
2372
+ params: query_string_params,
2373
+ options: options
2374
+ )
2375
+ operation = ::Gapic::Rest::TransportOperation.new response
2376
+ result = ::Google::Cloud::VisionAI::V1::RemoveCollectionItemResponse.decode_json response.body, ignore_unknown_fields: true
2377
+
2378
+ yield result, operation if block_given?
2379
+ result
2380
+ end
2381
+
2382
+ ##
2383
+ # Baseline implementation for the view_collection_items REST call
2384
+ #
2385
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ViewCollectionItemsRequest]
2386
+ # A request object representing the call parameters. Required.
2387
+ # @param options [::Gapic::CallOptions]
2388
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2389
+ #
2390
+ # @yield [result, operation] Access the result along with the TransportOperation object
2391
+ # @yieldparam result [::Google::Cloud::VisionAI::V1::ViewCollectionItemsResponse]
2392
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2393
+ #
2394
+ # @return [::Google::Cloud::VisionAI::V1::ViewCollectionItemsResponse]
2395
+ # A result object deserialized from the server's reply
2396
+ def view_collection_items request_pb, options = nil
2397
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2398
+
2399
+ verb, uri, query_string_params, body = ServiceStub.transcode_view_collection_items_request request_pb
2400
+ query_string_params = if query_string_params.any?
2401
+ query_string_params.to_h { |p| p.split "=", 2 }
2402
+ else
2403
+ {}
2404
+ end
2405
+
2406
+ response = @client_stub.make_http_request(
2407
+ verb,
2408
+ uri: uri,
2409
+ body: body || "",
2410
+ params: query_string_params,
2411
+ options: options
2412
+ )
2413
+ operation = ::Gapic::Rest::TransportOperation.new response
2414
+ result = ::Google::Cloud::VisionAI::V1::ViewCollectionItemsResponse.decode_json response.body, ignore_unknown_fields: true
2415
+
2416
+ yield result, operation if block_given?
2417
+ result
2418
+ end
2419
+
2420
+ ##
2421
+ # @private
2422
+ #
2423
+ # GRPC transcoding helper method for the create_asset REST call
2424
+ #
2425
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateAssetRequest]
2426
+ # A request object representing the call parameters. Required.
2427
+ # @return [Array(String, [String, nil], Hash{String => String})]
2428
+ # Uri, Body, Query string parameters
2429
+ def self.transcode_create_asset_request request_pb
2430
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2431
+ .with_bindings(
2432
+ uri_method: :post,
2433
+ uri_template: "/v1/{parent}/assets",
2434
+ body: "asset",
2435
+ matches: [
2436
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
2437
+ ]
2438
+ )
2439
+ transcoder.transcode request_pb
2440
+ end
2441
+
2442
+ ##
2443
+ # @private
2444
+ #
2445
+ # GRPC transcoding helper method for the update_asset REST call
2446
+ #
2447
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateAssetRequest]
2448
+ # A request object representing the call parameters. Required.
2449
+ # @return [Array(String, [String, nil], Hash{String => String})]
2450
+ # Uri, Body, Query string parameters
2451
+ def self.transcode_update_asset_request request_pb
2452
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2453
+ .with_bindings(
2454
+ uri_method: :patch,
2455
+ uri_template: "/v1/{asset.name}",
2456
+ body: "asset",
2457
+ matches: [
2458
+ ["asset.name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
2459
+ ]
2460
+ )
2461
+ transcoder.transcode request_pb
2462
+ end
2463
+
2464
+ ##
2465
+ # @private
2466
+ #
2467
+ # GRPC transcoding helper method for the get_asset REST call
2468
+ #
2469
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetAssetRequest]
2470
+ # A request object representing the call parameters. Required.
2471
+ # @return [Array(String, [String, nil], Hash{String => String})]
2472
+ # Uri, Body, Query string parameters
2473
+ def self.transcode_get_asset_request request_pb
2474
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2475
+ .with_bindings(
2476
+ uri_method: :get,
2477
+ uri_template: "/v1/{name}",
2478
+ matches: [
2479
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
2480
+ ]
2481
+ )
2482
+ transcoder.transcode request_pb
2483
+ end
2484
+
2485
+ ##
2486
+ # @private
2487
+ #
2488
+ # GRPC transcoding helper method for the list_assets REST call
2489
+ #
2490
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListAssetsRequest]
2491
+ # A request object representing the call parameters. Required.
2492
+ # @return [Array(String, [String, nil], Hash{String => String})]
2493
+ # Uri, Body, Query string parameters
2494
+ def self.transcode_list_assets_request request_pb
2495
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2496
+ .with_bindings(
2497
+ uri_method: :get,
2498
+ uri_template: "/v1/{parent}/assets",
2499
+ matches: [
2500
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
2501
+ ]
2502
+ )
2503
+ transcoder.transcode request_pb
2504
+ end
2505
+
2506
+ ##
2507
+ # @private
2508
+ #
2509
+ # GRPC transcoding helper method for the delete_asset REST call
2510
+ #
2511
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteAssetRequest]
2512
+ # A request object representing the call parameters. Required.
2513
+ # @return [Array(String, [String, nil], Hash{String => String})]
2514
+ # Uri, Body, Query string parameters
2515
+ def self.transcode_delete_asset_request request_pb
2516
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2517
+ .with_bindings(
2518
+ uri_method: :delete,
2519
+ uri_template: "/v1/{name}",
2520
+ matches: [
2521
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
2522
+ ]
2523
+ )
2524
+ transcoder.transcode request_pb
2525
+ end
2526
+
2527
+ ##
2528
+ # @private
2529
+ #
2530
+ # GRPC transcoding helper method for the upload_asset REST call
2531
+ #
2532
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UploadAssetRequest]
2533
+ # A request object representing the call parameters. Required.
2534
+ # @return [Array(String, [String, nil], Hash{String => String})]
2535
+ # Uri, Body, Query string parameters
2536
+ def self.transcode_upload_asset_request request_pb
2537
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2538
+ .with_bindings(
2539
+ uri_method: :post,
2540
+ uri_template: "/v1/{name}:upload",
2541
+ body: "*",
2542
+ matches: [
2543
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
2544
+ ]
2545
+ )
2546
+ transcoder.transcode request_pb
2547
+ end
2548
+
2549
+ ##
2550
+ # @private
2551
+ #
2552
+ # GRPC transcoding helper method for the generate_retrieval_url REST call
2553
+ #
2554
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GenerateRetrievalUrlRequest]
2555
+ # A request object representing the call parameters. Required.
2556
+ # @return [Array(String, [String, nil], Hash{String => String})]
2557
+ # Uri, Body, Query string parameters
2558
+ def self.transcode_generate_retrieval_url_request request_pb
2559
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2560
+ .with_bindings(
2561
+ uri_method: :post,
2562
+ uri_template: "/v1/{name}:generateRetrievalUrl",
2563
+ body: "*",
2564
+ matches: [
2565
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
2566
+ ]
2567
+ )
2568
+ transcoder.transcode request_pb
2569
+ end
2570
+
2571
+ ##
2572
+ # @private
2573
+ #
2574
+ # GRPC transcoding helper method for the analyze_asset REST call
2575
+ #
2576
+ # @param request_pb [::Google::Cloud::VisionAI::V1::AnalyzeAssetRequest]
2577
+ # A request object representing the call parameters. Required.
2578
+ # @return [Array(String, [String, nil], Hash{String => String})]
2579
+ # Uri, Body, Query string parameters
2580
+ def self.transcode_analyze_asset_request request_pb
2581
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2582
+ .with_bindings(
2583
+ uri_method: :post,
2584
+ uri_template: "/v1/{name}:analyze",
2585
+ body: "*",
2586
+ matches: [
2587
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
2588
+ ]
2589
+ )
2590
+ transcoder.transcode request_pb
2591
+ end
2592
+
2593
+ ##
2594
+ # @private
2595
+ #
2596
+ # GRPC transcoding helper method for the index_asset REST call
2597
+ #
2598
+ # @param request_pb [::Google::Cloud::VisionAI::V1::IndexAssetRequest]
2599
+ # A request object representing the call parameters. Required.
2600
+ # @return [Array(String, [String, nil], Hash{String => String})]
2601
+ # Uri, Body, Query string parameters
2602
+ def self.transcode_index_asset_request request_pb
2603
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2604
+ .with_bindings(
2605
+ uri_method: :post,
2606
+ uri_template: "/v1/{name}:index",
2607
+ body: "*",
2608
+ matches: [
2609
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
2610
+ ]
2611
+ )
2612
+ transcoder.transcode request_pb
2613
+ end
2614
+
2615
+ ##
2616
+ # @private
2617
+ #
2618
+ # GRPC transcoding helper method for the remove_index_asset REST call
2619
+ #
2620
+ # @param request_pb [::Google::Cloud::VisionAI::V1::RemoveIndexAssetRequest]
2621
+ # A request object representing the call parameters. Required.
2622
+ # @return [Array(String, [String, nil], Hash{String => String})]
2623
+ # Uri, Body, Query string parameters
2624
+ def self.transcode_remove_index_asset_request request_pb
2625
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2626
+ .with_bindings(
2627
+ uri_method: :post,
2628
+ uri_template: "/v1/{name}:removeIndex",
2629
+ body: "*",
2630
+ matches: [
2631
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
2632
+ ]
2633
+ )
2634
+ transcoder.transcode request_pb
2635
+ end
2636
+
2637
+ ##
2638
+ # @private
2639
+ #
2640
+ # GRPC transcoding helper method for the view_indexed_assets REST call
2641
+ #
2642
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ViewIndexedAssetsRequest]
2643
+ # A request object representing the call parameters. Required.
2644
+ # @return [Array(String, [String, nil], Hash{String => String})]
2645
+ # Uri, Body, Query string parameters
2646
+ def self.transcode_view_indexed_assets_request request_pb
2647
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2648
+ .with_bindings(
2649
+ uri_method: :get,
2650
+ uri_template: "/v1/{index}:viewAssets",
2651
+ matches: [
2652
+ ["index", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/indexes/[^/]+/?$}, false]
2653
+ ]
2654
+ )
2655
+ transcoder.transcode request_pb
2656
+ end
2657
+
2658
+ ##
2659
+ # @private
2660
+ #
2661
+ # GRPC transcoding helper method for the create_index REST call
2662
+ #
2663
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateIndexRequest]
2664
+ # A request object representing the call parameters. Required.
2665
+ # @return [Array(String, [String, nil], Hash{String => String})]
2666
+ # Uri, Body, Query string parameters
2667
+ def self.transcode_create_index_request request_pb
2668
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2669
+ .with_bindings(
2670
+ uri_method: :post,
2671
+ uri_template: "/v1/{parent}/indexes",
2672
+ body: "index",
2673
+ matches: [
2674
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
2675
+ ]
2676
+ )
2677
+ transcoder.transcode request_pb
2678
+ end
2679
+
2680
+ ##
2681
+ # @private
2682
+ #
2683
+ # GRPC transcoding helper method for the update_index REST call
2684
+ #
2685
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateIndexRequest]
2686
+ # A request object representing the call parameters. Required.
2687
+ # @return [Array(String, [String, nil], Hash{String => String})]
2688
+ # Uri, Body, Query string parameters
2689
+ def self.transcode_update_index_request request_pb
2690
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2691
+ .with_bindings(
2692
+ uri_method: :patch,
2693
+ uri_template: "/v1/{index.name}",
2694
+ body: "index",
2695
+ matches: [
2696
+ ["index.name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/indexes/[^/]+/?$}, false]
2697
+ ]
2698
+ )
2699
+ transcoder.transcode request_pb
2700
+ end
2701
+
2702
+ ##
2703
+ # @private
2704
+ #
2705
+ # GRPC transcoding helper method for the get_index REST call
2706
+ #
2707
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetIndexRequest]
2708
+ # A request object representing the call parameters. Required.
2709
+ # @return [Array(String, [String, nil], Hash{String => String})]
2710
+ # Uri, Body, Query string parameters
2711
+ def self.transcode_get_index_request request_pb
2712
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2713
+ .with_bindings(
2714
+ uri_method: :get,
2715
+ uri_template: "/v1/{name}",
2716
+ matches: [
2717
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/indexes/[^/]+/?$}, false]
2718
+ ]
2719
+ )
2720
+ transcoder.transcode request_pb
2721
+ end
2722
+
2723
+ ##
2724
+ # @private
2725
+ #
2726
+ # GRPC transcoding helper method for the list_indexes REST call
2727
+ #
2728
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListIndexesRequest]
2729
+ # A request object representing the call parameters. Required.
2730
+ # @return [Array(String, [String, nil], Hash{String => String})]
2731
+ # Uri, Body, Query string parameters
2732
+ def self.transcode_list_indexes_request request_pb
2733
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2734
+ .with_bindings(
2735
+ uri_method: :get,
2736
+ uri_template: "/v1/{parent}/indexes",
2737
+ matches: [
2738
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
2739
+ ]
2740
+ )
2741
+ transcoder.transcode request_pb
2742
+ end
2743
+
2744
+ ##
2745
+ # @private
2746
+ #
2747
+ # GRPC transcoding helper method for the delete_index REST call
2748
+ #
2749
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteIndexRequest]
2750
+ # A request object representing the call parameters. Required.
2751
+ # @return [Array(String, [String, nil], Hash{String => String})]
2752
+ # Uri, Body, Query string parameters
2753
+ def self.transcode_delete_index_request request_pb
2754
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2755
+ .with_bindings(
2756
+ uri_method: :delete,
2757
+ uri_template: "/v1/{name}",
2758
+ matches: [
2759
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/indexes/[^/]+/?$}, false]
2760
+ ]
2761
+ )
2762
+ transcoder.transcode request_pb
2763
+ end
2764
+
2765
+ ##
2766
+ # @private
2767
+ #
2768
+ # GRPC transcoding helper method for the create_corpus REST call
2769
+ #
2770
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateCorpusRequest]
2771
+ # A request object representing the call parameters. Required.
2772
+ # @return [Array(String, [String, nil], Hash{String => String})]
2773
+ # Uri, Body, Query string parameters
2774
+ def self.transcode_create_corpus_request request_pb
2775
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2776
+ .with_bindings(
2777
+ uri_method: :post,
2778
+ uri_template: "/v1/{parent}/corpora",
2779
+ body: "corpus",
2780
+ matches: [
2781
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2782
+ ]
2783
+ )
2784
+ transcoder.transcode request_pb
2785
+ end
2786
+
2787
+ ##
2788
+ # @private
2789
+ #
2790
+ # GRPC transcoding helper method for the get_corpus REST call
2791
+ #
2792
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetCorpusRequest]
2793
+ # A request object representing the call parameters. Required.
2794
+ # @return [Array(String, [String, nil], Hash{String => String})]
2795
+ # Uri, Body, Query string parameters
2796
+ def self.transcode_get_corpus_request request_pb
2797
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2798
+ .with_bindings(
2799
+ uri_method: :get,
2800
+ uri_template: "/v1/{name}",
2801
+ matches: [
2802
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
2803
+ ]
2804
+ )
2805
+ transcoder.transcode request_pb
2806
+ end
2807
+
2808
+ ##
2809
+ # @private
2810
+ #
2811
+ # GRPC transcoding helper method for the update_corpus REST call
2812
+ #
2813
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateCorpusRequest]
2814
+ # A request object representing the call parameters. Required.
2815
+ # @return [Array(String, [String, nil], Hash{String => String})]
2816
+ # Uri, Body, Query string parameters
2817
+ def self.transcode_update_corpus_request request_pb
2818
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2819
+ .with_bindings(
2820
+ uri_method: :patch,
2821
+ uri_template: "/v1/{corpus.name}",
2822
+ body: "corpus",
2823
+ matches: [
2824
+ ["corpus.name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
2825
+ ]
2826
+ )
2827
+ transcoder.transcode request_pb
2828
+ end
2829
+
2830
+ ##
2831
+ # @private
2832
+ #
2833
+ # GRPC transcoding helper method for the list_corpora REST call
2834
+ #
2835
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListCorporaRequest]
2836
+ # A request object representing the call parameters. Required.
2837
+ # @return [Array(String, [String, nil], Hash{String => String})]
2838
+ # Uri, Body, Query string parameters
2839
+ def self.transcode_list_corpora_request request_pb
2840
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2841
+ .with_bindings(
2842
+ uri_method: :get,
2843
+ uri_template: "/v1/{parent}/corpora",
2844
+ matches: [
2845
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
2846
+ ]
2847
+ )
2848
+ transcoder.transcode request_pb
2849
+ end
2850
+
2851
+ ##
2852
+ # @private
2853
+ #
2854
+ # GRPC transcoding helper method for the delete_corpus REST call
2855
+ #
2856
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteCorpusRequest]
2857
+ # A request object representing the call parameters. Required.
2858
+ # @return [Array(String, [String, nil], Hash{String => String})]
2859
+ # Uri, Body, Query string parameters
2860
+ def self.transcode_delete_corpus_request request_pb
2861
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2862
+ .with_bindings(
2863
+ uri_method: :delete,
2864
+ uri_template: "/v1/{name}",
2865
+ matches: [
2866
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
2867
+ ]
2868
+ )
2869
+ transcoder.transcode request_pb
2870
+ end
2871
+
2872
+ ##
2873
+ # @private
2874
+ #
2875
+ # GRPC transcoding helper method for the analyze_corpus REST call
2876
+ #
2877
+ # @param request_pb [::Google::Cloud::VisionAI::V1::AnalyzeCorpusRequest]
2878
+ # A request object representing the call parameters. Required.
2879
+ # @return [Array(String, [String, nil], Hash{String => String})]
2880
+ # Uri, Body, Query string parameters
2881
+ def self.transcode_analyze_corpus_request request_pb
2882
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2883
+ .with_bindings(
2884
+ uri_method: :post,
2885
+ uri_template: "/v1/{name}:analyze",
2886
+ body: "*",
2887
+ matches: [
2888
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
2889
+ ]
2890
+ )
2891
+ transcoder.transcode request_pb
2892
+ end
2893
+
2894
+ ##
2895
+ # @private
2896
+ #
2897
+ # GRPC transcoding helper method for the create_data_schema REST call
2898
+ #
2899
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateDataSchemaRequest]
2900
+ # A request object representing the call parameters. Required.
2901
+ # @return [Array(String, [String, nil], Hash{String => String})]
2902
+ # Uri, Body, Query string parameters
2903
+ def self.transcode_create_data_schema_request request_pb
2904
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2905
+ .with_bindings(
2906
+ uri_method: :post,
2907
+ uri_template: "/v1/{parent}/dataSchemas",
2908
+ body: "data_schema",
2909
+ matches: [
2910
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
2911
+ ]
2912
+ )
2913
+ transcoder.transcode request_pb
2914
+ end
2915
+
2916
+ ##
2917
+ # @private
2918
+ #
2919
+ # GRPC transcoding helper method for the update_data_schema REST call
2920
+ #
2921
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateDataSchemaRequest]
2922
+ # A request object representing the call parameters. Required.
2923
+ # @return [Array(String, [String, nil], Hash{String => String})]
2924
+ # Uri, Body, Query string parameters
2925
+ def self.transcode_update_data_schema_request request_pb
2926
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2927
+ .with_bindings(
2928
+ uri_method: :patch,
2929
+ uri_template: "/v1/{data_schema.name}",
2930
+ body: "data_schema",
2931
+ matches: [
2932
+ ["data_schema.name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/dataSchemas/[^/]+/?$}, false]
2933
+ ]
2934
+ )
2935
+ transcoder.transcode request_pb
2936
+ end
2937
+
2938
+ ##
2939
+ # @private
2940
+ #
2941
+ # GRPC transcoding helper method for the get_data_schema REST call
2942
+ #
2943
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetDataSchemaRequest]
2944
+ # A request object representing the call parameters. Required.
2945
+ # @return [Array(String, [String, nil], Hash{String => String})]
2946
+ # Uri, Body, Query string parameters
2947
+ def self.transcode_get_data_schema_request request_pb
2948
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2949
+ .with_bindings(
2950
+ uri_method: :get,
2951
+ uri_template: "/v1/{name}",
2952
+ matches: [
2953
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/dataSchemas/[^/]+/?$}, false]
2954
+ ]
2955
+ )
2956
+ transcoder.transcode request_pb
2957
+ end
2958
+
2959
+ ##
2960
+ # @private
2961
+ #
2962
+ # GRPC transcoding helper method for the delete_data_schema REST call
2963
+ #
2964
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteDataSchemaRequest]
2965
+ # A request object representing the call parameters. Required.
2966
+ # @return [Array(String, [String, nil], Hash{String => String})]
2967
+ # Uri, Body, Query string parameters
2968
+ def self.transcode_delete_data_schema_request request_pb
2969
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2970
+ .with_bindings(
2971
+ uri_method: :delete,
2972
+ uri_template: "/v1/{name}",
2973
+ matches: [
2974
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/dataSchemas/[^/]+/?$}, false]
2975
+ ]
2976
+ )
2977
+ transcoder.transcode request_pb
2978
+ end
2979
+
2980
+ ##
2981
+ # @private
2982
+ #
2983
+ # GRPC transcoding helper method for the list_data_schemas REST call
2984
+ #
2985
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListDataSchemasRequest]
2986
+ # A request object representing the call parameters. Required.
2987
+ # @return [Array(String, [String, nil], Hash{String => String})]
2988
+ # Uri, Body, Query string parameters
2989
+ def self.transcode_list_data_schemas_request request_pb
2990
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2991
+ .with_bindings(
2992
+ uri_method: :get,
2993
+ uri_template: "/v1/{parent}/dataSchemas",
2994
+ matches: [
2995
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
2996
+ ]
2997
+ )
2998
+ transcoder.transcode request_pb
2999
+ end
3000
+
3001
+ ##
3002
+ # @private
3003
+ #
3004
+ # GRPC transcoding helper method for the create_annotation REST call
3005
+ #
3006
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateAnnotationRequest]
3007
+ # A request object representing the call parameters. Required.
3008
+ # @return [Array(String, [String, nil], Hash{String => String})]
3009
+ # Uri, Body, Query string parameters
3010
+ def self.transcode_create_annotation_request request_pb
3011
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3012
+ .with_bindings(
3013
+ uri_method: :post,
3014
+ uri_template: "/v1/{parent}/annotations",
3015
+ body: "annotation",
3016
+ matches: [
3017
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
3018
+ ]
3019
+ )
3020
+ transcoder.transcode request_pb
3021
+ end
3022
+
3023
+ ##
3024
+ # @private
3025
+ #
3026
+ # GRPC transcoding helper method for the get_annotation REST call
3027
+ #
3028
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetAnnotationRequest]
3029
+ # A request object representing the call parameters. Required.
3030
+ # @return [Array(String, [String, nil], Hash{String => String})]
3031
+ # Uri, Body, Query string parameters
3032
+ def self.transcode_get_annotation_request request_pb
3033
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3034
+ .with_bindings(
3035
+ uri_method: :get,
3036
+ uri_template: "/v1/{name}",
3037
+ matches: [
3038
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/annotations/[^/]+/?$}, false]
3039
+ ]
3040
+ )
3041
+ transcoder.transcode request_pb
3042
+ end
3043
+
3044
+ ##
3045
+ # @private
3046
+ #
3047
+ # GRPC transcoding helper method for the list_annotations REST call
3048
+ #
3049
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListAnnotationsRequest]
3050
+ # A request object representing the call parameters. Required.
3051
+ # @return [Array(String, [String, nil], Hash{String => String})]
3052
+ # Uri, Body, Query string parameters
3053
+ def self.transcode_list_annotations_request request_pb
3054
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3055
+ .with_bindings(
3056
+ uri_method: :get,
3057
+ uri_template: "/v1/{parent}/annotations",
3058
+ matches: [
3059
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
3060
+ ]
3061
+ )
3062
+ transcoder.transcode request_pb
3063
+ end
3064
+
3065
+ ##
3066
+ # @private
3067
+ #
3068
+ # GRPC transcoding helper method for the update_annotation REST call
3069
+ #
3070
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateAnnotationRequest]
3071
+ # A request object representing the call parameters. Required.
3072
+ # @return [Array(String, [String, nil], Hash{String => String})]
3073
+ # Uri, Body, Query string parameters
3074
+ def self.transcode_update_annotation_request request_pb
3075
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3076
+ .with_bindings(
3077
+ uri_method: :patch,
3078
+ uri_template: "/v1/{annotation.name}",
3079
+ body: "annotation",
3080
+ matches: [
3081
+ ["annotation.name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/annotations/[^/]+/?$}, false]
3082
+ ]
3083
+ )
3084
+ transcoder.transcode request_pb
3085
+ end
3086
+
3087
+ ##
3088
+ # @private
3089
+ #
3090
+ # GRPC transcoding helper method for the delete_annotation REST call
3091
+ #
3092
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteAnnotationRequest]
3093
+ # A request object representing the call parameters. Required.
3094
+ # @return [Array(String, [String, nil], Hash{String => String})]
3095
+ # Uri, Body, Query string parameters
3096
+ def self.transcode_delete_annotation_request request_pb
3097
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3098
+ .with_bindings(
3099
+ uri_method: :delete,
3100
+ uri_template: "/v1/{name}",
3101
+ matches: [
3102
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/annotations/[^/]+/?$}, false]
3103
+ ]
3104
+ )
3105
+ transcoder.transcode request_pb
3106
+ end
3107
+
3108
+ ##
3109
+ # @private
3110
+ #
3111
+ # GRPC transcoding helper method for the clip_asset REST call
3112
+ #
3113
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ClipAssetRequest]
3114
+ # A request object representing the call parameters. Required.
3115
+ # @return [Array(String, [String, nil], Hash{String => String})]
3116
+ # Uri, Body, Query string parameters
3117
+ def self.transcode_clip_asset_request request_pb
3118
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3119
+ .with_bindings(
3120
+ uri_method: :post,
3121
+ uri_template: "/v1/{name}:clip",
3122
+ body: "*",
3123
+ matches: [
3124
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
3125
+ ]
3126
+ )
3127
+ transcoder.transcode request_pb
3128
+ end
3129
+
3130
+ ##
3131
+ # @private
3132
+ #
3133
+ # GRPC transcoding helper method for the generate_hls_uri REST call
3134
+ #
3135
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GenerateHlsUriRequest]
3136
+ # A request object representing the call parameters. Required.
3137
+ # @return [Array(String, [String, nil], Hash{String => String})]
3138
+ # Uri, Body, Query string parameters
3139
+ def self.transcode_generate_hls_uri_request request_pb
3140
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3141
+ .with_bindings(
3142
+ uri_method: :post,
3143
+ uri_template: "/v1/{name}:generateHlsUri",
3144
+ body: "*",
3145
+ matches: [
3146
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/assets/[^/]+/?$}, false]
3147
+ ]
3148
+ )
3149
+ transcoder.transcode request_pb
3150
+ end
3151
+
3152
+ ##
3153
+ # @private
3154
+ #
3155
+ # GRPC transcoding helper method for the import_assets REST call
3156
+ #
3157
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ImportAssetsRequest]
3158
+ # A request object representing the call parameters. Required.
3159
+ # @return [Array(String, [String, nil], Hash{String => String})]
3160
+ # Uri, Body, Query string parameters
3161
+ def self.transcode_import_assets_request request_pb
3162
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3163
+ .with_bindings(
3164
+ uri_method: :post,
3165
+ uri_template: "/v1/{parent}/assets:import",
3166
+ body: "*",
3167
+ matches: [
3168
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
3169
+ ]
3170
+ )
3171
+ transcoder.transcode request_pb
3172
+ end
3173
+
3174
+ ##
3175
+ # @private
3176
+ #
3177
+ # GRPC transcoding helper method for the create_search_config REST call
3178
+ #
3179
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateSearchConfigRequest]
3180
+ # A request object representing the call parameters. Required.
3181
+ # @return [Array(String, [String, nil], Hash{String => String})]
3182
+ # Uri, Body, Query string parameters
3183
+ def self.transcode_create_search_config_request request_pb
3184
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3185
+ .with_bindings(
3186
+ uri_method: :post,
3187
+ uri_template: "/v1/{parent}/searchConfigs",
3188
+ body: "search_config",
3189
+ matches: [
3190
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
3191
+ ]
3192
+ )
3193
+ transcoder.transcode request_pb
3194
+ end
3195
+
3196
+ ##
3197
+ # @private
3198
+ #
3199
+ # GRPC transcoding helper method for the update_search_config REST call
3200
+ #
3201
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateSearchConfigRequest]
3202
+ # A request object representing the call parameters. Required.
3203
+ # @return [Array(String, [String, nil], Hash{String => String})]
3204
+ # Uri, Body, Query string parameters
3205
+ def self.transcode_update_search_config_request request_pb
3206
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3207
+ .with_bindings(
3208
+ uri_method: :patch,
3209
+ uri_template: "/v1/{search_config.name}",
3210
+ body: "search_config",
3211
+ matches: [
3212
+ ["search_config.name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/searchConfigs/[^/]+/?$}, false]
3213
+ ]
3214
+ )
3215
+ transcoder.transcode request_pb
3216
+ end
3217
+
3218
+ ##
3219
+ # @private
3220
+ #
3221
+ # GRPC transcoding helper method for the get_search_config REST call
3222
+ #
3223
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetSearchConfigRequest]
3224
+ # A request object representing the call parameters. Required.
3225
+ # @return [Array(String, [String, nil], Hash{String => String})]
3226
+ # Uri, Body, Query string parameters
3227
+ def self.transcode_get_search_config_request request_pb
3228
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3229
+ .with_bindings(
3230
+ uri_method: :get,
3231
+ uri_template: "/v1/{name}",
3232
+ matches: [
3233
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/searchConfigs/[^/]+/?$}, false]
3234
+ ]
3235
+ )
3236
+ transcoder.transcode request_pb
3237
+ end
3238
+
3239
+ ##
3240
+ # @private
3241
+ #
3242
+ # GRPC transcoding helper method for the delete_search_config REST call
3243
+ #
3244
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteSearchConfigRequest]
3245
+ # A request object representing the call parameters. Required.
3246
+ # @return [Array(String, [String, nil], Hash{String => String})]
3247
+ # Uri, Body, Query string parameters
3248
+ def self.transcode_delete_search_config_request request_pb
3249
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3250
+ .with_bindings(
3251
+ uri_method: :delete,
3252
+ uri_template: "/v1/{name}",
3253
+ matches: [
3254
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/searchConfigs/[^/]+/?$}, false]
3255
+ ]
3256
+ )
3257
+ transcoder.transcode request_pb
3258
+ end
3259
+
3260
+ ##
3261
+ # @private
3262
+ #
3263
+ # GRPC transcoding helper method for the list_search_configs REST call
3264
+ #
3265
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListSearchConfigsRequest]
3266
+ # A request object representing the call parameters. Required.
3267
+ # @return [Array(String, [String, nil], Hash{String => String})]
3268
+ # Uri, Body, Query string parameters
3269
+ def self.transcode_list_search_configs_request request_pb
3270
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3271
+ .with_bindings(
3272
+ uri_method: :get,
3273
+ uri_template: "/v1/{parent}/searchConfigs",
3274
+ matches: [
3275
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
3276
+ ]
3277
+ )
3278
+ transcoder.transcode request_pb
3279
+ end
3280
+
3281
+ ##
3282
+ # @private
3283
+ #
3284
+ # GRPC transcoding helper method for the create_search_hypernym REST call
3285
+ #
3286
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateSearchHypernymRequest]
3287
+ # A request object representing the call parameters. Required.
3288
+ # @return [Array(String, [String, nil], Hash{String => String})]
3289
+ # Uri, Body, Query string parameters
3290
+ def self.transcode_create_search_hypernym_request request_pb
3291
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3292
+ .with_bindings(
3293
+ uri_method: :post,
3294
+ uri_template: "/v1/{parent}/searchHypernyms",
3295
+ body: "search_hypernym",
3296
+ matches: [
3297
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
3298
+ ]
3299
+ )
3300
+ transcoder.transcode request_pb
3301
+ end
3302
+
3303
+ ##
3304
+ # @private
3305
+ #
3306
+ # GRPC transcoding helper method for the update_search_hypernym REST call
3307
+ #
3308
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateSearchHypernymRequest]
3309
+ # A request object representing the call parameters. Required.
3310
+ # @return [Array(String, [String, nil], Hash{String => String})]
3311
+ # Uri, Body, Query string parameters
3312
+ def self.transcode_update_search_hypernym_request request_pb
3313
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3314
+ .with_bindings(
3315
+ uri_method: :patch,
3316
+ uri_template: "/v1/{search_hypernym.name}",
3317
+ body: "search_hypernym",
3318
+ matches: [
3319
+ ["search_hypernym.name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/searchHypernyms/[^/]+/?$}, false]
3320
+ ]
3321
+ )
3322
+ transcoder.transcode request_pb
3323
+ end
3324
+
3325
+ ##
3326
+ # @private
3327
+ #
3328
+ # GRPC transcoding helper method for the get_search_hypernym REST call
3329
+ #
3330
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetSearchHypernymRequest]
3331
+ # A request object representing the call parameters. Required.
3332
+ # @return [Array(String, [String, nil], Hash{String => String})]
3333
+ # Uri, Body, Query string parameters
3334
+ def self.transcode_get_search_hypernym_request request_pb
3335
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3336
+ .with_bindings(
3337
+ uri_method: :get,
3338
+ uri_template: "/v1/{name}",
3339
+ matches: [
3340
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/searchHypernyms/[^/]+/?$}, false]
3341
+ ]
3342
+ )
3343
+ transcoder.transcode request_pb
3344
+ end
3345
+
3346
+ ##
3347
+ # @private
3348
+ #
3349
+ # GRPC transcoding helper method for the delete_search_hypernym REST call
3350
+ #
3351
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteSearchHypernymRequest]
3352
+ # A request object representing the call parameters. Required.
3353
+ # @return [Array(String, [String, nil], Hash{String => String})]
3354
+ # Uri, Body, Query string parameters
3355
+ def self.transcode_delete_search_hypernym_request request_pb
3356
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3357
+ .with_bindings(
3358
+ uri_method: :delete,
3359
+ uri_template: "/v1/{name}",
3360
+ matches: [
3361
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/searchHypernyms/[^/]+/?$}, false]
3362
+ ]
3363
+ )
3364
+ transcoder.transcode request_pb
3365
+ end
3366
+
3367
+ ##
3368
+ # @private
3369
+ #
3370
+ # GRPC transcoding helper method for the list_search_hypernyms REST call
3371
+ #
3372
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListSearchHypernymsRequest]
3373
+ # A request object representing the call parameters. Required.
3374
+ # @return [Array(String, [String, nil], Hash{String => String})]
3375
+ # Uri, Body, Query string parameters
3376
+ def self.transcode_list_search_hypernyms_request request_pb
3377
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3378
+ .with_bindings(
3379
+ uri_method: :get,
3380
+ uri_template: "/v1/{parent}/searchHypernyms",
3381
+ matches: [
3382
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
3383
+ ]
3384
+ )
3385
+ transcoder.transcode request_pb
3386
+ end
3387
+
3388
+ ##
3389
+ # @private
3390
+ #
3391
+ # GRPC transcoding helper method for the search_assets REST call
3392
+ #
3393
+ # @param request_pb [::Google::Cloud::VisionAI::V1::SearchAssetsRequest]
3394
+ # A request object representing the call parameters. Required.
3395
+ # @return [Array(String, [String, nil], Hash{String => String})]
3396
+ # Uri, Body, Query string parameters
3397
+ def self.transcode_search_assets_request request_pb
3398
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3399
+ .with_bindings(
3400
+ uri_method: :post,
3401
+ uri_template: "/v1/{corpus}:searchAssets",
3402
+ body: "*",
3403
+ matches: [
3404
+ ["corpus", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
3405
+ ]
3406
+ )
3407
+ transcoder.transcode request_pb
3408
+ end
3409
+
3410
+ ##
3411
+ # @private
3412
+ #
3413
+ # GRPC transcoding helper method for the search_index_endpoint REST call
3414
+ #
3415
+ # @param request_pb [::Google::Cloud::VisionAI::V1::SearchIndexEndpointRequest]
3416
+ # A request object representing the call parameters. Required.
3417
+ # @return [Array(String, [String, nil], Hash{String => String})]
3418
+ # Uri, Body, Query string parameters
3419
+ def self.transcode_search_index_endpoint_request request_pb
3420
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3421
+ .with_bindings(
3422
+ uri_method: :post,
3423
+ uri_template: "/v1/{index_endpoint}:searchIndexEndpoint",
3424
+ body: "*",
3425
+ matches: [
3426
+ ["index_endpoint", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/?$}, false]
3427
+ ]
3428
+ )
3429
+ transcoder.transcode request_pb
3430
+ end
3431
+
3432
+ ##
3433
+ # @private
3434
+ #
3435
+ # GRPC transcoding helper method for the create_index_endpoint REST call
3436
+ #
3437
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateIndexEndpointRequest]
3438
+ # A request object representing the call parameters. Required.
3439
+ # @return [Array(String, [String, nil], Hash{String => String})]
3440
+ # Uri, Body, Query string parameters
3441
+ def self.transcode_create_index_endpoint_request request_pb
3442
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3443
+ .with_bindings(
3444
+ uri_method: :post,
3445
+ uri_template: "/v1/{parent}/indexEndpoints",
3446
+ body: "index_endpoint",
3447
+ matches: [
3448
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
3449
+ ]
3450
+ )
3451
+ transcoder.transcode request_pb
3452
+ end
3453
+
3454
+ ##
3455
+ # @private
3456
+ #
3457
+ # GRPC transcoding helper method for the get_index_endpoint REST call
3458
+ #
3459
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetIndexEndpointRequest]
3460
+ # A request object representing the call parameters. Required.
3461
+ # @return [Array(String, [String, nil], Hash{String => String})]
3462
+ # Uri, Body, Query string parameters
3463
+ def self.transcode_get_index_endpoint_request request_pb
3464
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3465
+ .with_bindings(
3466
+ uri_method: :get,
3467
+ uri_template: "/v1/{name}",
3468
+ matches: [
3469
+ ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/?$}, false]
3470
+ ]
3471
+ )
3472
+ transcoder.transcode request_pb
3473
+ end
3474
+
3475
+ ##
3476
+ # @private
3477
+ #
3478
+ # GRPC transcoding helper method for the list_index_endpoints REST call
3479
+ #
3480
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListIndexEndpointsRequest]
3481
+ # A request object representing the call parameters. Required.
3482
+ # @return [Array(String, [String, nil], Hash{String => String})]
3483
+ # Uri, Body, Query string parameters
3484
+ def self.transcode_list_index_endpoints_request request_pb
3485
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3486
+ .with_bindings(
3487
+ uri_method: :get,
3488
+ uri_template: "/v1/{parent}/indexEndpoints",
3489
+ matches: [
3490
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
3491
+ ]
3492
+ )
3493
+ transcoder.transcode request_pb
3494
+ end
3495
+
3496
+ ##
3497
+ # @private
3498
+ #
3499
+ # GRPC transcoding helper method for the update_index_endpoint REST call
3500
+ #
3501
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateIndexEndpointRequest]
3502
+ # A request object representing the call parameters. Required.
3503
+ # @return [Array(String, [String, nil], Hash{String => String})]
3504
+ # Uri, Body, Query string parameters
3505
+ def self.transcode_update_index_endpoint_request request_pb
3506
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3507
+ .with_bindings(
3508
+ uri_method: :patch,
3509
+ uri_template: "/v1/{index_endpoint.name}",
3510
+ body: "index_endpoint",
3511
+ matches: [
3512
+ ["index_endpoint.name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/?$}, false]
3513
+ ]
3514
+ )
3515
+ transcoder.transcode request_pb
3516
+ end
3517
+
3518
+ ##
3519
+ # @private
3520
+ #
3521
+ # GRPC transcoding helper method for the delete_index_endpoint REST call
3522
+ #
3523
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteIndexEndpointRequest]
3524
+ # A request object representing the call parameters. Required.
3525
+ # @return [Array(String, [String, nil], Hash{String => String})]
3526
+ # Uri, Body, Query string parameters
3527
+ def self.transcode_delete_index_endpoint_request request_pb
3528
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3529
+ .with_bindings(
3530
+ uri_method: :delete,
3531
+ uri_template: "/v1/{name}",
3532
+ matches: [
3533
+ ["name", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/?$}, false]
3534
+ ]
3535
+ )
3536
+ transcoder.transcode request_pb
3537
+ end
3538
+
3539
+ ##
3540
+ # @private
3541
+ #
3542
+ # GRPC transcoding helper method for the deploy_index REST call
3543
+ #
3544
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeployIndexRequest]
3545
+ # A request object representing the call parameters. Required.
3546
+ # @return [Array(String, [String, nil], Hash{String => String})]
3547
+ # Uri, Body, Query string parameters
3548
+ def self.transcode_deploy_index_request request_pb
3549
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3550
+ .with_bindings(
3551
+ uri_method: :post,
3552
+ uri_template: "/v1/{index_endpoint}:deployIndex",
3553
+ body: "*",
3554
+ matches: [
3555
+ ["index_endpoint", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/?$}, false]
3556
+ ]
3557
+ )
3558
+ transcoder.transcode request_pb
3559
+ end
3560
+
3561
+ ##
3562
+ # @private
3563
+ #
3564
+ # GRPC transcoding helper method for the undeploy_index REST call
3565
+ #
3566
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UndeployIndexRequest]
3567
+ # A request object representing the call parameters. Required.
3568
+ # @return [Array(String, [String, nil], Hash{String => String})]
3569
+ # Uri, Body, Query string parameters
3570
+ def self.transcode_undeploy_index_request request_pb
3571
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3572
+ .with_bindings(
3573
+ uri_method: :post,
3574
+ uri_template: "/v1/{index_endpoint}:undeployIndex",
3575
+ body: "*",
3576
+ matches: [
3577
+ ["index_endpoint", %r{^projects/[^/]+/locations/[^/]+/indexEndpoints/[^/]+/?$}, false]
3578
+ ]
3579
+ )
3580
+ transcoder.transcode request_pb
3581
+ end
3582
+
3583
+ ##
3584
+ # @private
3585
+ #
3586
+ # GRPC transcoding helper method for the create_collection REST call
3587
+ #
3588
+ # @param request_pb [::Google::Cloud::VisionAI::V1::CreateCollectionRequest]
3589
+ # A request object representing the call parameters. Required.
3590
+ # @return [Array(String, [String, nil], Hash{String => String})]
3591
+ # Uri, Body, Query string parameters
3592
+ def self.transcode_create_collection_request request_pb
3593
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3594
+ .with_bindings(
3595
+ uri_method: :post,
3596
+ uri_template: "/v1/{parent}/collections",
3597
+ body: "collection",
3598
+ matches: [
3599
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
3600
+ ]
3601
+ )
3602
+ transcoder.transcode request_pb
3603
+ end
3604
+
3605
+ ##
3606
+ # @private
3607
+ #
3608
+ # GRPC transcoding helper method for the delete_collection REST call
3609
+ #
3610
+ # @param request_pb [::Google::Cloud::VisionAI::V1::DeleteCollectionRequest]
3611
+ # A request object representing the call parameters. Required.
3612
+ # @return [Array(String, [String, nil], Hash{String => String})]
3613
+ # Uri, Body, Query string parameters
3614
+ def self.transcode_delete_collection_request request_pb
3615
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3616
+ .with_bindings(
3617
+ uri_method: :delete,
3618
+ uri_template: "/v1/{name}",
3619
+ matches: [
3620
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/collections/[^/]+/?$}, false]
3621
+ ]
3622
+ )
3623
+ transcoder.transcode request_pb
3624
+ end
3625
+
3626
+ ##
3627
+ # @private
3628
+ #
3629
+ # GRPC transcoding helper method for the get_collection REST call
3630
+ #
3631
+ # @param request_pb [::Google::Cloud::VisionAI::V1::GetCollectionRequest]
3632
+ # A request object representing the call parameters. Required.
3633
+ # @return [Array(String, [String, nil], Hash{String => String})]
3634
+ # Uri, Body, Query string parameters
3635
+ def self.transcode_get_collection_request request_pb
3636
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3637
+ .with_bindings(
3638
+ uri_method: :get,
3639
+ uri_template: "/v1/{name}",
3640
+ matches: [
3641
+ ["name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/collections/[^/]+/?$}, false]
3642
+ ]
3643
+ )
3644
+ transcoder.transcode request_pb
3645
+ end
3646
+
3647
+ ##
3648
+ # @private
3649
+ #
3650
+ # GRPC transcoding helper method for the update_collection REST call
3651
+ #
3652
+ # @param request_pb [::Google::Cloud::VisionAI::V1::UpdateCollectionRequest]
3653
+ # A request object representing the call parameters. Required.
3654
+ # @return [Array(String, [String, nil], Hash{String => String})]
3655
+ # Uri, Body, Query string parameters
3656
+ def self.transcode_update_collection_request request_pb
3657
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3658
+ .with_bindings(
3659
+ uri_method: :patch,
3660
+ uri_template: "/v1/{collection.name}",
3661
+ body: "collection",
3662
+ matches: [
3663
+ ["collection.name", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/collections/[^/]+/?$}, false]
3664
+ ]
3665
+ )
3666
+ transcoder.transcode request_pb
3667
+ end
3668
+
3669
+ ##
3670
+ # @private
3671
+ #
3672
+ # GRPC transcoding helper method for the list_collections REST call
3673
+ #
3674
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ListCollectionsRequest]
3675
+ # A request object representing the call parameters. Required.
3676
+ # @return [Array(String, [String, nil], Hash{String => String})]
3677
+ # Uri, Body, Query string parameters
3678
+ def self.transcode_list_collections_request request_pb
3679
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3680
+ .with_bindings(
3681
+ uri_method: :get,
3682
+ uri_template: "/v1/{parent}/collections",
3683
+ matches: [
3684
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/?$}, false]
3685
+ ]
3686
+ )
3687
+ transcoder.transcode request_pb
3688
+ end
3689
+
3690
+ ##
3691
+ # @private
3692
+ #
3693
+ # GRPC transcoding helper method for the add_collection_item REST call
3694
+ #
3695
+ # @param request_pb [::Google::Cloud::VisionAI::V1::AddCollectionItemRequest]
3696
+ # A request object representing the call parameters. Required.
3697
+ # @return [Array(String, [String, nil], Hash{String => String})]
3698
+ # Uri, Body, Query string parameters
3699
+ def self.transcode_add_collection_item_request request_pb
3700
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3701
+ .with_bindings(
3702
+ uri_method: :post,
3703
+ uri_template: "/v1/{item.collection}:addCollectionItem",
3704
+ body: "*",
3705
+ matches: [
3706
+ ["item.collection", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/collections/[^/]+/?$}, false]
3707
+ ]
3708
+ )
3709
+ transcoder.transcode request_pb
3710
+ end
3711
+
3712
+ ##
3713
+ # @private
3714
+ #
3715
+ # GRPC transcoding helper method for the remove_collection_item REST call
3716
+ #
3717
+ # @param request_pb [::Google::Cloud::VisionAI::V1::RemoveCollectionItemRequest]
3718
+ # A request object representing the call parameters. Required.
3719
+ # @return [Array(String, [String, nil], Hash{String => String})]
3720
+ # Uri, Body, Query string parameters
3721
+ def self.transcode_remove_collection_item_request request_pb
3722
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3723
+ .with_bindings(
3724
+ uri_method: :post,
3725
+ uri_template: "/v1/{item.collection}:removeCollectionItem",
3726
+ body: "*",
3727
+ matches: [
3728
+ ["item.collection", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/collections/[^/]+/?$}, false]
3729
+ ]
3730
+ )
3731
+ transcoder.transcode request_pb
3732
+ end
3733
+
3734
+ ##
3735
+ # @private
3736
+ #
3737
+ # GRPC transcoding helper method for the view_collection_items REST call
3738
+ #
3739
+ # @param request_pb [::Google::Cloud::VisionAI::V1::ViewCollectionItemsRequest]
3740
+ # A request object representing the call parameters. Required.
3741
+ # @return [Array(String, [String, nil], Hash{String => String})]
3742
+ # Uri, Body, Query string parameters
3743
+ def self.transcode_view_collection_items_request request_pb
3744
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3745
+ .with_bindings(
3746
+ uri_method: :get,
3747
+ uri_template: "/v1/{collection}:viewCollectionItems",
3748
+ matches: [
3749
+ ["collection", %r{^projects/[^/]+/locations/[^/]+/corpora/[^/]+/collections/[^/]+/?$}, false]
3750
+ ]
3751
+ )
3752
+ transcoder.transcode request_pb
3753
+ end
3754
+ end
3755
+ end
3756
+ end
3757
+ end
3758
+ end
3759
+ end
3760
+ end