google-maps-fleet_engine-delivery-v1 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) 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/maps/fleet_engine/delivery/v1/delivery_service/client.rb +1505 -0
  6. data/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb +49 -0
  7. data/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb +100 -0
  8. data/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb +1399 -0
  9. data/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb +666 -0
  10. data/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb +54 -0
  11. data/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb +57 -0
  12. data/lib/google/maps/fleet_engine/delivery/v1/rest.rb +39 -0
  13. data/lib/google/maps/fleet_engine/delivery/v1/version.rb +8 -3
  14. data/lib/google/maps/fleet_engine/delivery/v1.rb +47 -0
  15. data/lib/google/maps/fleetengine/delivery/v1/common_pb.rb +57 -0
  16. data/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb +73 -0
  17. data/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb +71 -0
  18. data/lib/google/maps/fleetengine/delivery/v1/delivery_vehicles_pb.rb +61 -0
  19. data/lib/google/maps/fleetengine/delivery/v1/header_pb.rb +48 -0
  20. data/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb +58 -0
  21. data/lib/google/maps/fleetengine/delivery/v1/tasks_pb.rb +62 -0
  22. data/lib/google-maps-fleet_engine-delivery-v1.rb +21 -0
  23. data/proto_docs/README.md +4 -0
  24. data/proto_docs/google/api/client.rb +399 -0
  25. data/proto_docs/google/api/field_behavior.rb +85 -0
  26. data/proto_docs/google/api/launch_stage.rb +71 -0
  27. data/proto_docs/google/api/resource.rb +222 -0
  28. data/proto_docs/google/api/routing.rb +459 -0
  29. data/proto_docs/google/geo/type/viewport.rb +70 -0
  30. data/proto_docs/google/maps/fleetengine/delivery/v1/common.rb +251 -0
  31. data/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb +359 -0
  32. data/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb +269 -0
  33. data/proto_docs/google/maps/fleetengine/delivery/v1/header.rb +113 -0
  34. data/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb +91 -0
  35. data/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb +281 -0
  36. data/proto_docs/google/protobuf/duration.rb +98 -0
  37. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  38. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  39. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  40. data/proto_docs/google/type/latlng.rb +38 -0
  41. metadata +109 -13
@@ -0,0 +1,666 @@
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/maps/fleetengine/delivery/v1/delivery_api_pb"
20
+
21
+ module Google
22
+ module Maps
23
+ module FleetEngine
24
+ module Delivery
25
+ module V1
26
+ module DeliveryService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the DeliveryService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
43
+ numeric_enums: true,
44
+ raise_faraday_errors: false
45
+ end
46
+
47
+ ##
48
+ # The effective universe domain
49
+ #
50
+ # @return [String]
51
+ #
52
+ def universe_domain
53
+ @client_stub.universe_domain
54
+ end
55
+
56
+ ##
57
+ # The effective endpoint
58
+ #
59
+ # @return [String]
60
+ #
61
+ def endpoint
62
+ @client_stub.endpoint
63
+ end
64
+
65
+ ##
66
+ # Baseline implementation for the create_delivery_vehicle REST call
67
+ #
68
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest]
69
+ # A request object representing the call parameters. Required.
70
+ # @param options [::Gapic::CallOptions]
71
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
72
+ #
73
+ # @yield [result, operation] Access the result along with the TransportOperation object
74
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
75
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
76
+ #
77
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
78
+ # A result object deserialized from the server's reply
79
+ def create_delivery_vehicle request_pb, options = nil
80
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
81
+
82
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_delivery_vehicle_request request_pb
83
+ query_string_params = if query_string_params.any?
84
+ query_string_params.to_h { |p| p.split "=", 2 }
85
+ else
86
+ {}
87
+ end
88
+
89
+ response = @client_stub.make_http_request(
90
+ verb,
91
+ uri: uri,
92
+ body: body || "",
93
+ params: query_string_params,
94
+ options: options
95
+ )
96
+ operation = ::Gapic::Rest::TransportOperation.new response
97
+ result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true
98
+
99
+ yield result, operation if block_given?
100
+ result
101
+ end
102
+
103
+ ##
104
+ # Baseline implementation for the get_delivery_vehicle REST call
105
+ #
106
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest]
107
+ # A request object representing the call parameters. Required.
108
+ # @param options [::Gapic::CallOptions]
109
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
110
+ #
111
+ # @yield [result, operation] Access the result along with the TransportOperation object
112
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
113
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
114
+ #
115
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
116
+ # A result object deserialized from the server's reply
117
+ def get_delivery_vehicle request_pb, options = nil
118
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
119
+
120
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_delivery_vehicle_request request_pb
121
+ query_string_params = if query_string_params.any?
122
+ query_string_params.to_h { |p| p.split "=", 2 }
123
+ else
124
+ {}
125
+ end
126
+
127
+ response = @client_stub.make_http_request(
128
+ verb,
129
+ uri: uri,
130
+ body: body || "",
131
+ params: query_string_params,
132
+ options: options
133
+ )
134
+ operation = ::Gapic::Rest::TransportOperation.new response
135
+ result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true
136
+
137
+ yield result, operation if block_given?
138
+ result
139
+ end
140
+
141
+ ##
142
+ # Baseline implementation for the update_delivery_vehicle REST call
143
+ #
144
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest]
145
+ # A request object representing the call parameters. Required.
146
+ # @param options [::Gapic::CallOptions]
147
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
148
+ #
149
+ # @yield [result, operation] Access the result along with the TransportOperation object
150
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
151
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
152
+ #
153
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
154
+ # A result object deserialized from the server's reply
155
+ def update_delivery_vehicle request_pb, options = nil
156
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
157
+
158
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_delivery_vehicle_request request_pb
159
+ query_string_params = if query_string_params.any?
160
+ query_string_params.to_h { |p| p.split "=", 2 }
161
+ else
162
+ {}
163
+ end
164
+
165
+ response = @client_stub.make_http_request(
166
+ verb,
167
+ uri: uri,
168
+ body: body || "",
169
+ params: query_string_params,
170
+ options: options
171
+ )
172
+ operation = ::Gapic::Rest::TransportOperation.new response
173
+ result = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.decode_json response.body, ignore_unknown_fields: true
174
+
175
+ yield result, operation if block_given?
176
+ result
177
+ end
178
+
179
+ ##
180
+ # Baseline implementation for the batch_create_tasks REST call
181
+ #
182
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest]
183
+ # A request object representing the call parameters. Required.
184
+ # @param options [::Gapic::CallOptions]
185
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
186
+ #
187
+ # @yield [result, operation] Access the result along with the TransportOperation object
188
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse]
189
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
190
+ #
191
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse]
192
+ # A result object deserialized from the server's reply
193
+ def batch_create_tasks request_pb, options = nil
194
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
195
+
196
+ verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_tasks_request request_pb
197
+ query_string_params = if query_string_params.any?
198
+ query_string_params.to_h { |p| p.split "=", 2 }
199
+ else
200
+ {}
201
+ end
202
+
203
+ response = @client_stub.make_http_request(
204
+ verb,
205
+ uri: uri,
206
+ body: body || "",
207
+ params: query_string_params,
208
+ options: options
209
+ )
210
+ operation = ::Gapic::Rest::TransportOperation.new response
211
+ result = ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.decode_json response.body, ignore_unknown_fields: true
212
+
213
+ yield result, operation if block_given?
214
+ result
215
+ end
216
+
217
+ ##
218
+ # Baseline implementation for the create_task REST call
219
+ #
220
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest]
221
+ # A request object representing the call parameters. Required.
222
+ # @param options [::Gapic::CallOptions]
223
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
224
+ #
225
+ # @yield [result, operation] Access the result along with the TransportOperation object
226
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task]
227
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
228
+ #
229
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::Task]
230
+ # A result object deserialized from the server's reply
231
+ def create_task request_pb, options = nil
232
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
233
+
234
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb
235
+ query_string_params = if query_string_params.any?
236
+ query_string_params.to_h { |p| p.split "=", 2 }
237
+ else
238
+ {}
239
+ end
240
+
241
+ response = @client_stub.make_http_request(
242
+ verb,
243
+ uri: uri,
244
+ body: body || "",
245
+ params: query_string_params,
246
+ options: options
247
+ )
248
+ operation = ::Gapic::Rest::TransportOperation.new response
249
+ result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true
250
+
251
+ yield result, operation if block_given?
252
+ result
253
+ end
254
+
255
+ ##
256
+ # Baseline implementation for the get_task REST call
257
+ #
258
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest]
259
+ # A request object representing the call parameters. Required.
260
+ # @param options [::Gapic::CallOptions]
261
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
262
+ #
263
+ # @yield [result, operation] Access the result along with the TransportOperation object
264
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task]
265
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
266
+ #
267
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::Task]
268
+ # A result object deserialized from the server's reply
269
+ def get_task request_pb, options = nil
270
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
271
+
272
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb
273
+ query_string_params = if query_string_params.any?
274
+ query_string_params.to_h { |p| p.split "=", 2 }
275
+ else
276
+ {}
277
+ end
278
+
279
+ response = @client_stub.make_http_request(
280
+ verb,
281
+ uri: uri,
282
+ body: body || "",
283
+ params: query_string_params,
284
+ options: options
285
+ )
286
+ operation = ::Gapic::Rest::TransportOperation.new response
287
+ result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true
288
+
289
+ yield result, operation if block_given?
290
+ result
291
+ end
292
+
293
+ ##
294
+ # Baseline implementation for the update_task REST call
295
+ #
296
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest]
297
+ # A request object representing the call parameters. Required.
298
+ # @param options [::Gapic::CallOptions]
299
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
300
+ #
301
+ # @yield [result, operation] Access the result along with the TransportOperation object
302
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task]
303
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
304
+ #
305
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::Task]
306
+ # A result object deserialized from the server's reply
307
+ def update_task request_pb, options = nil
308
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
309
+
310
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb
311
+ query_string_params = if query_string_params.any?
312
+ query_string_params.to_h { |p| p.split "=", 2 }
313
+ else
314
+ {}
315
+ end
316
+
317
+ response = @client_stub.make_http_request(
318
+ verb,
319
+ uri: uri,
320
+ body: body || "",
321
+ params: query_string_params,
322
+ options: options
323
+ )
324
+ operation = ::Gapic::Rest::TransportOperation.new response
325
+ result = ::Google::Maps::FleetEngine::Delivery::V1::Task.decode_json response.body, ignore_unknown_fields: true
326
+
327
+ yield result, operation if block_given?
328
+ result
329
+ end
330
+
331
+ ##
332
+ # Baseline implementation for the list_tasks REST call
333
+ #
334
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest]
335
+ # A request object representing the call parameters. Required.
336
+ # @param options [::Gapic::CallOptions]
337
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
338
+ #
339
+ # @yield [result, operation] Access the result along with the TransportOperation object
340
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse]
341
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
342
+ #
343
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse]
344
+ # A result object deserialized from the server's reply
345
+ def list_tasks request_pb, options = nil
346
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
347
+
348
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb
349
+ query_string_params = if query_string_params.any?
350
+ query_string_params.to_h { |p| p.split "=", 2 }
351
+ else
352
+ {}
353
+ end
354
+
355
+ response = @client_stub.make_http_request(
356
+ verb,
357
+ uri: uri,
358
+ body: body || "",
359
+ params: query_string_params,
360
+ options: options
361
+ )
362
+ operation = ::Gapic::Rest::TransportOperation.new response
363
+ result = ::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true
364
+
365
+ yield result, operation if block_given?
366
+ result
367
+ end
368
+
369
+ ##
370
+ # Baseline implementation for the get_task_tracking_info REST call
371
+ #
372
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest]
373
+ # A request object representing the call parameters. Required.
374
+ # @param options [::Gapic::CallOptions]
375
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
376
+ #
377
+ # @yield [result, operation] Access the result along with the TransportOperation object
378
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo]
379
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
380
+ #
381
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo]
382
+ # A result object deserialized from the server's reply
383
+ def get_task_tracking_info request_pb, options = nil
384
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
385
+
386
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_task_tracking_info_request request_pb
387
+ query_string_params = if query_string_params.any?
388
+ query_string_params.to_h { |p| p.split "=", 2 }
389
+ else
390
+ {}
391
+ end
392
+
393
+ response = @client_stub.make_http_request(
394
+ verb,
395
+ uri: uri,
396
+ body: body || "",
397
+ params: query_string_params,
398
+ options: options
399
+ )
400
+ operation = ::Gapic::Rest::TransportOperation.new response
401
+ result = ::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.decode_json response.body, ignore_unknown_fields: true
402
+
403
+ yield result, operation if block_given?
404
+ result
405
+ end
406
+
407
+ ##
408
+ # Baseline implementation for the list_delivery_vehicles REST call
409
+ #
410
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest]
411
+ # A request object representing the call parameters. Required.
412
+ # @param options [::Gapic::CallOptions]
413
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
414
+ #
415
+ # @yield [result, operation] Access the result along with the TransportOperation object
416
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse]
417
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
418
+ #
419
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse]
420
+ # A result object deserialized from the server's reply
421
+ def list_delivery_vehicles request_pb, options = nil
422
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
423
+
424
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_delivery_vehicles_request request_pb
425
+ query_string_params = if query_string_params.any?
426
+ query_string_params.to_h { |p| p.split "=", 2 }
427
+ else
428
+ {}
429
+ end
430
+
431
+ response = @client_stub.make_http_request(
432
+ verb,
433
+ uri: uri,
434
+ body: body || "",
435
+ params: query_string_params,
436
+ options: options
437
+ )
438
+ operation = ::Gapic::Rest::TransportOperation.new response
439
+ result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.decode_json response.body, ignore_unknown_fields: true
440
+
441
+ yield result, operation if block_given?
442
+ result
443
+ end
444
+
445
+ ##
446
+ # @private
447
+ #
448
+ # GRPC transcoding helper method for the create_delivery_vehicle REST call
449
+ #
450
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest]
451
+ # A request object representing the call parameters. Required.
452
+ # @return [Array(String, [String, nil], Hash{String => String})]
453
+ # Uri, Body, Query string parameters
454
+ def self.transcode_create_delivery_vehicle_request request_pb
455
+ transcoder = Gapic::Rest::GrpcTranscoder.new
456
+ .with_bindings(
457
+ uri_method: :post,
458
+ uri_template: "/v1/{parent}/deliveryVehicles",
459
+ body: "delivery_vehicle",
460
+ matches: [
461
+ ["parent", %r{^providers/[^/]+/?$}, false]
462
+ ]
463
+ )
464
+ transcoder.transcode request_pb
465
+ end
466
+
467
+ ##
468
+ # @private
469
+ #
470
+ # GRPC transcoding helper method for the get_delivery_vehicle REST call
471
+ #
472
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest]
473
+ # A request object representing the call parameters. Required.
474
+ # @return [Array(String, [String, nil], Hash{String => String})]
475
+ # Uri, Body, Query string parameters
476
+ def self.transcode_get_delivery_vehicle_request request_pb
477
+ transcoder = Gapic::Rest::GrpcTranscoder.new
478
+ .with_bindings(
479
+ uri_method: :get,
480
+ uri_template: "/v1/{name}",
481
+ matches: [
482
+ ["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false]
483
+ ]
484
+ )
485
+ transcoder.transcode request_pb
486
+ end
487
+
488
+ ##
489
+ # @private
490
+ #
491
+ # GRPC transcoding helper method for the update_delivery_vehicle REST call
492
+ #
493
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest]
494
+ # A request object representing the call parameters. Required.
495
+ # @return [Array(String, [String, nil], Hash{String => String})]
496
+ # Uri, Body, Query string parameters
497
+ def self.transcode_update_delivery_vehicle_request request_pb
498
+ transcoder = Gapic::Rest::GrpcTranscoder.new
499
+ .with_bindings(
500
+ uri_method: :patch,
501
+ uri_template: "/v1/{delivery_vehicle.name}",
502
+ body: "delivery_vehicle",
503
+ matches: [
504
+ ["delivery_vehicle.name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false]
505
+ ]
506
+ )
507
+ transcoder.transcode request_pb
508
+ end
509
+
510
+ ##
511
+ # @private
512
+ #
513
+ # GRPC transcoding helper method for the batch_create_tasks REST call
514
+ #
515
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest]
516
+ # A request object representing the call parameters. Required.
517
+ # @return [Array(String, [String, nil], Hash{String => String})]
518
+ # Uri, Body, Query string parameters
519
+ def self.transcode_batch_create_tasks_request request_pb
520
+ transcoder = Gapic::Rest::GrpcTranscoder.new
521
+ .with_bindings(
522
+ uri_method: :post,
523
+ uri_template: "/v1/{parent}/tasks:batchCreate",
524
+ body: "*",
525
+ matches: [
526
+ ["parent", %r{^providers/[^/]+/?$}, false]
527
+ ]
528
+ )
529
+ transcoder.transcode request_pb
530
+ end
531
+
532
+ ##
533
+ # @private
534
+ #
535
+ # GRPC transcoding helper method for the create_task REST call
536
+ #
537
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest]
538
+ # A request object representing the call parameters. Required.
539
+ # @return [Array(String, [String, nil], Hash{String => String})]
540
+ # Uri, Body, Query string parameters
541
+ def self.transcode_create_task_request request_pb
542
+ transcoder = Gapic::Rest::GrpcTranscoder.new
543
+ .with_bindings(
544
+ uri_method: :post,
545
+ uri_template: "/v1/{parent}/tasks",
546
+ body: "task",
547
+ matches: [
548
+ ["parent", %r{^providers/[^/]+/?$}, false]
549
+ ]
550
+ )
551
+ transcoder.transcode request_pb
552
+ end
553
+
554
+ ##
555
+ # @private
556
+ #
557
+ # GRPC transcoding helper method for the get_task REST call
558
+ #
559
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest]
560
+ # A request object representing the call parameters. Required.
561
+ # @return [Array(String, [String, nil], Hash{String => String})]
562
+ # Uri, Body, Query string parameters
563
+ def self.transcode_get_task_request request_pb
564
+ transcoder = Gapic::Rest::GrpcTranscoder.new
565
+ .with_bindings(
566
+ uri_method: :get,
567
+ uri_template: "/v1/{name}",
568
+ matches: [
569
+ ["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false]
570
+ ]
571
+ )
572
+ transcoder.transcode request_pb
573
+ end
574
+
575
+ ##
576
+ # @private
577
+ #
578
+ # GRPC transcoding helper method for the update_task REST call
579
+ #
580
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest]
581
+ # A request object representing the call parameters. Required.
582
+ # @return [Array(String, [String, nil], Hash{String => String})]
583
+ # Uri, Body, Query string parameters
584
+ def self.transcode_update_task_request request_pb
585
+ transcoder = Gapic::Rest::GrpcTranscoder.new
586
+ .with_bindings(
587
+ uri_method: :patch,
588
+ uri_template: "/v1/{task.name}",
589
+ body: "task",
590
+ matches: [
591
+ ["task.name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false]
592
+ ]
593
+ )
594
+ transcoder.transcode request_pb
595
+ end
596
+
597
+ ##
598
+ # @private
599
+ #
600
+ # GRPC transcoding helper method for the list_tasks REST call
601
+ #
602
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest]
603
+ # A request object representing the call parameters. Required.
604
+ # @return [Array(String, [String, nil], Hash{String => String})]
605
+ # Uri, Body, Query string parameters
606
+ def self.transcode_list_tasks_request request_pb
607
+ transcoder = Gapic::Rest::GrpcTranscoder.new
608
+ .with_bindings(
609
+ uri_method: :get,
610
+ uri_template: "/v1/{parent}/tasks",
611
+ matches: [
612
+ ["parent", %r{^providers/[^/]+/?$}, false]
613
+ ]
614
+ )
615
+ transcoder.transcode request_pb
616
+ end
617
+
618
+ ##
619
+ # @private
620
+ #
621
+ # GRPC transcoding helper method for the get_task_tracking_info REST call
622
+ #
623
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest]
624
+ # A request object representing the call parameters. Required.
625
+ # @return [Array(String, [String, nil], Hash{String => String})]
626
+ # Uri, Body, Query string parameters
627
+ def self.transcode_get_task_tracking_info_request request_pb
628
+ transcoder = Gapic::Rest::GrpcTranscoder.new
629
+ .with_bindings(
630
+ uri_method: :get,
631
+ uri_template: "/v1/{name}",
632
+ matches: [
633
+ ["name", %r{^providers/[^/]+/taskTrackingInfo/[^/]+/?$}, false]
634
+ ]
635
+ )
636
+ transcoder.transcode request_pb
637
+ end
638
+
639
+ ##
640
+ # @private
641
+ #
642
+ # GRPC transcoding helper method for the list_delivery_vehicles REST call
643
+ #
644
+ # @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest]
645
+ # A request object representing the call parameters. Required.
646
+ # @return [Array(String, [String, nil], Hash{String => String})]
647
+ # Uri, Body, Query string parameters
648
+ def self.transcode_list_delivery_vehicles_request request_pb
649
+ transcoder = Gapic::Rest::GrpcTranscoder.new
650
+ .with_bindings(
651
+ uri_method: :get,
652
+ uri_template: "/v1/{parent}/deliveryVehicles",
653
+ matches: [
654
+ ["parent", %r{^providers/[^/]+/?$}, false]
655
+ ]
656
+ )
657
+ transcoder.transcode request_pb
658
+ end
659
+ end
660
+ end
661
+ end
662
+ end
663
+ end
664
+ end
665
+ end
666
+ end