google-maps-fleet_engine-delivery-v1 0.a → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +144 -8
- data/lib/google/maps/fleet_engine/delivery/v1/delivery_service/client.rb +1621 -0
- data/lib/google/maps/fleet_engine/delivery/v1/delivery_service/credentials.rb +49 -0
- data/lib/google/maps/fleet_engine/delivery/v1/delivery_service/paths.rb +100 -0
- data/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/client.rb +1505 -0
- data/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub.rb +725 -0
- data/lib/google/maps/fleet_engine/delivery/v1/delivery_service/rest.rb +54 -0
- data/lib/google/maps/fleet_engine/delivery/v1/delivery_service.rb +57 -0
- data/lib/google/maps/fleet_engine/delivery/v1/rest.rb +39 -0
- data/lib/google/maps/fleet_engine/delivery/v1/version.rb +8 -3
- data/lib/google/maps/fleet_engine/delivery/v1.rb +47 -0
- data/lib/google/maps/fleetengine/delivery/v1/common_pb.rb +57 -0
- data/lib/google/maps/fleetengine/delivery/v1/delivery_api_pb.rb +75 -0
- data/lib/google/maps/fleetengine/delivery/v1/delivery_api_services_pb.rb +73 -0
- data/lib/google/maps/fleetengine/delivery/v1/delivery_vehicles_pb.rb +61 -0
- data/lib/google/maps/fleetengine/delivery/v1/header_pb.rb +48 -0
- data/lib/google/maps/fleetengine/delivery/v1/task_tracking_info_pb.rb +58 -0
- data/lib/google/maps/fleetengine/delivery/v1/tasks_pb.rb +62 -0
- data/lib/google-maps-fleet_engine-delivery-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +399 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/api/routing.rb +459 -0
- data/proto_docs/google/geo/type/viewport.rb +70 -0
- data/proto_docs/google/maps/fleetengine/delivery/v1/common.rb +251 -0
- data/proto_docs/google/maps/fleetengine/delivery/v1/delivery_api.rb +416 -0
- data/proto_docs/google/maps/fleetengine/delivery/v1/delivery_vehicles.rb +271 -0
- data/proto_docs/google/maps/fleetengine/delivery/v1/header.rb +113 -0
- data/proto_docs/google/maps/fleetengine/delivery/v1/task_tracking_info.rb +91 -0
- data/proto_docs/google/maps/fleetengine/delivery/v1/tasks.rb +281 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/type/latlng.rb +38 -0
- metadata +109 -13
@@ -0,0 +1,725 @@
|
|
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 search_tasks REST call
|
295
|
+
#
|
296
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::SearchTasksRequest]
|
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::SearchTasksResponse]
|
303
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
304
|
+
#
|
305
|
+
# @return [::Google::Maps::FleetEngine::Delivery::V1::SearchTasksResponse]
|
306
|
+
# A result object deserialized from the server's reply
|
307
|
+
def search_tasks 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_search_tasks_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::SearchTasksResponse.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 update_task REST call
|
333
|
+
#
|
334
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest]
|
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::Task]
|
341
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
342
|
+
#
|
343
|
+
# @return [::Google::Maps::FleetEngine::Delivery::V1::Task]
|
344
|
+
# A result object deserialized from the server's reply
|
345
|
+
def update_task 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_update_task_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::Task.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 list_tasks REST call
|
371
|
+
#
|
372
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest]
|
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::ListTasksResponse]
|
379
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
380
|
+
#
|
381
|
+
# @return [::Google::Maps::FleetEngine::Delivery::V1::ListTasksResponse]
|
382
|
+
# A result object deserialized from the server's reply
|
383
|
+
def list_tasks 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_list_tasks_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::ListTasksResponse.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 get_task_tracking_info REST call
|
409
|
+
#
|
410
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest]
|
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::TaskTrackingInfo]
|
417
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
418
|
+
#
|
419
|
+
# @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo]
|
420
|
+
# A result object deserialized from the server's reply
|
421
|
+
def get_task_tracking_info 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_get_task_tracking_info_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::TaskTrackingInfo.decode_json response.body, ignore_unknown_fields: true
|
440
|
+
|
441
|
+
yield result, operation if block_given?
|
442
|
+
result
|
443
|
+
end
|
444
|
+
|
445
|
+
##
|
446
|
+
# Baseline implementation for the list_delivery_vehicles REST call
|
447
|
+
#
|
448
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest]
|
449
|
+
# A request object representing the call parameters. Required.
|
450
|
+
# @param options [::Gapic::CallOptions]
|
451
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
452
|
+
#
|
453
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
454
|
+
# @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse]
|
455
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
456
|
+
#
|
457
|
+
# @return [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse]
|
458
|
+
# A result object deserialized from the server's reply
|
459
|
+
def list_delivery_vehicles request_pb, options = nil
|
460
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
461
|
+
|
462
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_delivery_vehicles_request request_pb
|
463
|
+
query_string_params = if query_string_params.any?
|
464
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
465
|
+
else
|
466
|
+
{}
|
467
|
+
end
|
468
|
+
|
469
|
+
response = @client_stub.make_http_request(
|
470
|
+
verb,
|
471
|
+
uri: uri,
|
472
|
+
body: body || "",
|
473
|
+
params: query_string_params,
|
474
|
+
options: options
|
475
|
+
)
|
476
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
477
|
+
result = ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesResponse.decode_json response.body, ignore_unknown_fields: true
|
478
|
+
|
479
|
+
yield result, operation if block_given?
|
480
|
+
result
|
481
|
+
end
|
482
|
+
|
483
|
+
##
|
484
|
+
# @private
|
485
|
+
#
|
486
|
+
# GRPC transcoding helper method for the create_delivery_vehicle REST call
|
487
|
+
#
|
488
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest]
|
489
|
+
# A request object representing the call parameters. Required.
|
490
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
491
|
+
# Uri, Body, Query string parameters
|
492
|
+
def self.transcode_create_delivery_vehicle_request request_pb
|
493
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
494
|
+
.with_bindings(
|
495
|
+
uri_method: :post,
|
496
|
+
uri_template: "/v1/{parent}/deliveryVehicles",
|
497
|
+
body: "delivery_vehicle",
|
498
|
+
matches: [
|
499
|
+
["parent", %r{^providers/[^/]+/?$}, false]
|
500
|
+
]
|
501
|
+
)
|
502
|
+
transcoder.transcode request_pb
|
503
|
+
end
|
504
|
+
|
505
|
+
##
|
506
|
+
# @private
|
507
|
+
#
|
508
|
+
# GRPC transcoding helper method for the get_delivery_vehicle REST call
|
509
|
+
#
|
510
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest]
|
511
|
+
# A request object representing the call parameters. Required.
|
512
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
513
|
+
# Uri, Body, Query string parameters
|
514
|
+
def self.transcode_get_delivery_vehicle_request request_pb
|
515
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
516
|
+
.with_bindings(
|
517
|
+
uri_method: :get,
|
518
|
+
uri_template: "/v1/{name}",
|
519
|
+
matches: [
|
520
|
+
["name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false]
|
521
|
+
]
|
522
|
+
)
|
523
|
+
transcoder.transcode request_pb
|
524
|
+
end
|
525
|
+
|
526
|
+
##
|
527
|
+
# @private
|
528
|
+
#
|
529
|
+
# GRPC transcoding helper method for the update_delivery_vehicle REST call
|
530
|
+
#
|
531
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest]
|
532
|
+
# A request object representing the call parameters. Required.
|
533
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
534
|
+
# Uri, Body, Query string parameters
|
535
|
+
def self.transcode_update_delivery_vehicle_request request_pb
|
536
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
537
|
+
.with_bindings(
|
538
|
+
uri_method: :patch,
|
539
|
+
uri_template: "/v1/{delivery_vehicle.name}",
|
540
|
+
body: "delivery_vehicle",
|
541
|
+
matches: [
|
542
|
+
["delivery_vehicle.name", %r{^providers/[^/]+/deliveryVehicles/[^/]+/?$}, false]
|
543
|
+
]
|
544
|
+
)
|
545
|
+
transcoder.transcode request_pb
|
546
|
+
end
|
547
|
+
|
548
|
+
##
|
549
|
+
# @private
|
550
|
+
#
|
551
|
+
# GRPC transcoding helper method for the batch_create_tasks REST call
|
552
|
+
#
|
553
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest]
|
554
|
+
# A request object representing the call parameters. Required.
|
555
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
556
|
+
# Uri, Body, Query string parameters
|
557
|
+
def self.transcode_batch_create_tasks_request request_pb
|
558
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
559
|
+
.with_bindings(
|
560
|
+
uri_method: :post,
|
561
|
+
uri_template: "/v1/{parent}/tasks:batchCreate",
|
562
|
+
body: "*",
|
563
|
+
matches: [
|
564
|
+
["parent", %r{^providers/[^/]+/?$}, false]
|
565
|
+
]
|
566
|
+
)
|
567
|
+
transcoder.transcode request_pb
|
568
|
+
end
|
569
|
+
|
570
|
+
##
|
571
|
+
# @private
|
572
|
+
#
|
573
|
+
# GRPC transcoding helper method for the create_task REST call
|
574
|
+
#
|
575
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest]
|
576
|
+
# A request object representing the call parameters. Required.
|
577
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
578
|
+
# Uri, Body, Query string parameters
|
579
|
+
def self.transcode_create_task_request request_pb
|
580
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
581
|
+
.with_bindings(
|
582
|
+
uri_method: :post,
|
583
|
+
uri_template: "/v1/{parent}/tasks",
|
584
|
+
body: "task",
|
585
|
+
matches: [
|
586
|
+
["parent", %r{^providers/[^/]+/?$}, false]
|
587
|
+
]
|
588
|
+
)
|
589
|
+
transcoder.transcode request_pb
|
590
|
+
end
|
591
|
+
|
592
|
+
##
|
593
|
+
# @private
|
594
|
+
#
|
595
|
+
# GRPC transcoding helper method for the get_task REST call
|
596
|
+
#
|
597
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest]
|
598
|
+
# A request object representing the call parameters. Required.
|
599
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
600
|
+
# Uri, Body, Query string parameters
|
601
|
+
def self.transcode_get_task_request request_pb
|
602
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
603
|
+
.with_bindings(
|
604
|
+
uri_method: :get,
|
605
|
+
uri_template: "/v1/{name}",
|
606
|
+
matches: [
|
607
|
+
["name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false]
|
608
|
+
]
|
609
|
+
)
|
610
|
+
transcoder.transcode request_pb
|
611
|
+
end
|
612
|
+
|
613
|
+
##
|
614
|
+
# @private
|
615
|
+
#
|
616
|
+
# GRPC transcoding helper method for the search_tasks REST call
|
617
|
+
#
|
618
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::SearchTasksRequest]
|
619
|
+
# A request object representing the call parameters. Required.
|
620
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
621
|
+
# Uri, Body, Query string parameters
|
622
|
+
def self.transcode_search_tasks_request request_pb
|
623
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
624
|
+
.with_bindings(
|
625
|
+
uri_method: :get,
|
626
|
+
uri_template: "/v1/{parent}/tasks:search",
|
627
|
+
matches: [
|
628
|
+
["parent", %r{^providers/[^/]+/?$}, false]
|
629
|
+
]
|
630
|
+
)
|
631
|
+
transcoder.transcode request_pb
|
632
|
+
end
|
633
|
+
|
634
|
+
##
|
635
|
+
# @private
|
636
|
+
#
|
637
|
+
# GRPC transcoding helper method for the update_task REST call
|
638
|
+
#
|
639
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest]
|
640
|
+
# A request object representing the call parameters. Required.
|
641
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
642
|
+
# Uri, Body, Query string parameters
|
643
|
+
def self.transcode_update_task_request request_pb
|
644
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
645
|
+
.with_bindings(
|
646
|
+
uri_method: :patch,
|
647
|
+
uri_template: "/v1/{task.name}",
|
648
|
+
body: "task",
|
649
|
+
matches: [
|
650
|
+
["task.name", %r{^providers/[^/]+/tasks/[^/]+/?$}, false]
|
651
|
+
]
|
652
|
+
)
|
653
|
+
transcoder.transcode request_pb
|
654
|
+
end
|
655
|
+
|
656
|
+
##
|
657
|
+
# @private
|
658
|
+
#
|
659
|
+
# GRPC transcoding helper method for the list_tasks REST call
|
660
|
+
#
|
661
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest]
|
662
|
+
# A request object representing the call parameters. Required.
|
663
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
664
|
+
# Uri, Body, Query string parameters
|
665
|
+
def self.transcode_list_tasks_request request_pb
|
666
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
667
|
+
.with_bindings(
|
668
|
+
uri_method: :get,
|
669
|
+
uri_template: "/v1/{parent}/tasks",
|
670
|
+
matches: [
|
671
|
+
["parent", %r{^providers/[^/]+/?$}, false]
|
672
|
+
]
|
673
|
+
)
|
674
|
+
transcoder.transcode request_pb
|
675
|
+
end
|
676
|
+
|
677
|
+
##
|
678
|
+
# @private
|
679
|
+
#
|
680
|
+
# GRPC transcoding helper method for the get_task_tracking_info REST call
|
681
|
+
#
|
682
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest]
|
683
|
+
# A request object representing the call parameters. Required.
|
684
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
685
|
+
# Uri, Body, Query string parameters
|
686
|
+
def self.transcode_get_task_tracking_info_request request_pb
|
687
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
688
|
+
.with_bindings(
|
689
|
+
uri_method: :get,
|
690
|
+
uri_template: "/v1/{name}",
|
691
|
+
matches: [
|
692
|
+
["name", %r{^providers/[^/]+/taskTrackingInfo/[^/]+/?$}, false]
|
693
|
+
]
|
694
|
+
)
|
695
|
+
transcoder.transcode request_pb
|
696
|
+
end
|
697
|
+
|
698
|
+
##
|
699
|
+
# @private
|
700
|
+
#
|
701
|
+
# GRPC transcoding helper method for the list_delivery_vehicles REST call
|
702
|
+
#
|
703
|
+
# @param request_pb [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest]
|
704
|
+
# A request object representing the call parameters. Required.
|
705
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
706
|
+
# Uri, Body, Query string parameters
|
707
|
+
def self.transcode_list_delivery_vehicles_request request_pb
|
708
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
709
|
+
.with_bindings(
|
710
|
+
uri_method: :get,
|
711
|
+
uri_template: "/v1/{parent}/deliveryVehicles",
|
712
|
+
matches: [
|
713
|
+
["parent", %r{^providers/[^/]+/?$}, false]
|
714
|
+
]
|
715
|
+
)
|
716
|
+
transcoder.transcode request_pb
|
717
|
+
end
|
718
|
+
end
|
719
|
+
end
|
720
|
+
end
|
721
|
+
end
|
722
|
+
end
|
723
|
+
end
|
724
|
+
end
|
725
|
+
end
|