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,1399 @@
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/errors"
20
+ require "google/maps/fleetengine/delivery/v1/delivery_api_pb"
21
+ require "google/maps/fleet_engine/delivery/v1/delivery_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Maps
25
+ module FleetEngine
26
+ module Delivery
27
+ module V1
28
+ module DeliveryService
29
+ module Rest
30
+ ##
31
+ # REST client for the DeliveryService service.
32
+ #
33
+ # The Last Mile Delivery service.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :delivery_service_stub
46
+
47
+ ##
48
+ # Configure the DeliveryService Client class.
49
+ #
50
+ # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all DeliveryService clients
56
+ # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Maps", "FleetEngine", "Delivery", "V1"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.rpcs.create_delivery_vehicle.timeout = 60.0
77
+ default_config.rpcs.create_delivery_vehicle.retry_policy = {
78
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config.rpcs.get_delivery_vehicle.timeout = 60.0
82
+ default_config.rpcs.get_delivery_vehicle.retry_policy = {
83
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
84
+ }
85
+
86
+ default_config.rpcs.update_delivery_vehicle.timeout = 60.0
87
+ default_config.rpcs.update_delivery_vehicle.retry_policy = {
88
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
89
+ }
90
+
91
+ default_config.rpcs.batch_create_tasks.timeout = 60.0
92
+ default_config.rpcs.batch_create_tasks.retry_policy = {
93
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
94
+ }
95
+
96
+ default_config.rpcs.create_task.timeout = 60.0
97
+ default_config.rpcs.create_task.retry_policy = {
98
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
99
+ }
100
+
101
+ default_config.rpcs.get_task.timeout = 60.0
102
+ default_config.rpcs.get_task.retry_policy = {
103
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
104
+ }
105
+
106
+ default_config.rpcs.update_task.timeout = 60.0
107
+ default_config.rpcs.update_task.retry_policy = {
108
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
109
+ }
110
+
111
+ default_config.rpcs.list_tasks.timeout = 60.0
112
+ default_config.rpcs.list_tasks.retry_policy = {
113
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
114
+ }
115
+
116
+ default_config.rpcs.get_task_tracking_info.timeout = 60.0
117
+ default_config.rpcs.get_task_tracking_info.retry_policy = {
118
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
119
+ }
120
+
121
+ default_config.rpcs.list_delivery_vehicles.timeout = 60.0
122
+ default_config.rpcs.list_delivery_vehicles.retry_policy = {
123
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
124
+ }
125
+
126
+ default_config
127
+ end
128
+ yield @configure if block_given?
129
+ @configure
130
+ end
131
+
132
+ ##
133
+ # Configure the DeliveryService Client instance.
134
+ #
135
+ # The configuration is set to the derived mode, meaning that values can be changed,
136
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
137
+ # should be made on {Client.configure}.
138
+ #
139
+ # See {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration}
140
+ # for a description of the configuration fields.
141
+ #
142
+ # @yield [config] Configure the Client client.
143
+ # @yieldparam config [Client::Configuration]
144
+ #
145
+ # @return [Client::Configuration]
146
+ #
147
+ def configure
148
+ yield @config if block_given?
149
+ @config
150
+ end
151
+
152
+ ##
153
+ # The effective universe domain
154
+ #
155
+ # @return [String]
156
+ #
157
+ def universe_domain
158
+ @delivery_service_stub.universe_domain
159
+ end
160
+
161
+ ##
162
+ # Create a new DeliveryService REST client object.
163
+ #
164
+ # @example
165
+ #
166
+ # # Create a client using the default configuration
167
+ # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new
168
+ #
169
+ # # Create a client using a custom configuration
170
+ # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config|
171
+ # config.timeout = 10.0
172
+ # end
173
+ #
174
+ # @yield [config] Configure the DeliveryService client.
175
+ # @yieldparam config [Client::Configuration]
176
+ #
177
+ def initialize
178
+ # Create the configuration object
179
+ @config = Configuration.new Client.configure
180
+
181
+ # Yield the configuration if needed
182
+ yield @config if block_given?
183
+
184
+ # Create credentials
185
+ credentials = @config.credentials
186
+ # Use self-signed JWT if the endpoint is unchanged from default,
187
+ # but only if the default endpoint does not have a region prefix.
188
+ enable_self_signed_jwt = @config.endpoint.nil? ||
189
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
190
+ !@config.endpoint.split(".").first.include?("-"))
191
+ credentials ||= Credentials.default scope: @config.scope,
192
+ enable_self_signed_jwt: enable_self_signed_jwt
193
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
194
+ credentials = Credentials.new credentials, scope: @config.scope
195
+ end
196
+
197
+ @quota_project_id = @config.quota_project
198
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
199
+
200
+ @delivery_service_stub = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::ServiceStub.new(
201
+ endpoint: @config.endpoint,
202
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
203
+ universe_domain: @config.universe_domain,
204
+ credentials: credentials
205
+ )
206
+ end
207
+
208
+ # Service calls
209
+
210
+ ##
211
+ # Creates and returns a new `DeliveryVehicle`.
212
+ #
213
+ # @overload create_delivery_vehicle(request, options = nil)
214
+ # Pass arguments to `create_delivery_vehicle` via a request object, either of type
215
+ # {::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest} or an equivalent Hash.
216
+ #
217
+ # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest, ::Hash]
218
+ # A request object representing the call parameters. Required. To specify no
219
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
220
+ # @param options [::Gapic::CallOptions, ::Hash]
221
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
222
+ #
223
+ # @overload create_delivery_vehicle(header: nil, parent: nil, delivery_vehicle_id: nil, delivery_vehicle: nil)
224
+ # Pass arguments to `create_delivery_vehicle` via keyword arguments. Note that at
225
+ # least one keyword argument is required. To specify no parameters, or to keep all
226
+ # the default parameter values, pass an empty Hash as a request object (see above).
227
+ #
228
+ # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash]
229
+ # Optional. The standard Delivery API request header.
230
+ # @param parent [::String]
231
+ # Required. Must be in the format `providers/{provider}`. The provider must
232
+ # be the Google Cloud Project ID. For example, `sample-cloud-project`.
233
+ # @param delivery_vehicle_id [::String]
234
+ # Required. The Delivery Vehicle ID must be unique and subject to the
235
+ # following restrictions:
236
+ #
237
+ # * Must be a valid Unicode string.
238
+ # * Limited to a maximum length of 64 characters.
239
+ # * Normalized according to [Unicode Normalization Form C]
240
+ # (http://www.unicode.org/reports/tr15/).
241
+ # * May not contain any of the following ASCII characters: '/', ':', '?',
242
+ # ',', or '#'.
243
+ # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash]
244
+ # Required. The `DeliveryVehicle` entity to create. When creating a new
245
+ # delivery vehicle, you may set the following optional fields:
246
+ #
247
+ # * last_location
248
+ # * attributes
249
+ #
250
+ # Note: The DeliveryVehicle's `name` field is ignored. All other
251
+ # DeliveryVehicle fields must not be set; otherwise, an error is returned.
252
+ # @yield [result, operation] Access the result along with the TransportOperation object
253
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
254
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
255
+ #
256
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
257
+ #
258
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
259
+ #
260
+ # @example Basic example
261
+ # require "google/maps/fleet_engine/delivery/v1"
262
+ #
263
+ # # Create a client object. The client can be reused for multiple calls.
264
+ # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new
265
+ #
266
+ # # Create a request. To set request fields, pass in keyword arguments.
267
+ # request = Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest.new
268
+ #
269
+ # # Call the create_delivery_vehicle method.
270
+ # result = client.create_delivery_vehicle request
271
+ #
272
+ # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.
273
+ # p result
274
+ #
275
+ def create_delivery_vehicle request, options = nil
276
+ raise ::ArgumentError, "request must be provided" if request.nil?
277
+
278
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateDeliveryVehicleRequest
279
+
280
+ # Converts hash and nil to an options object
281
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
282
+
283
+ # Customize the options with defaults
284
+ call_metadata = @config.rpcs.create_delivery_vehicle.metadata.to_h
285
+
286
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
287
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
288
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
289
+ gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION,
290
+ transports_version_send: [:rest]
291
+
292
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
293
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
294
+
295
+ options.apply_defaults timeout: @config.rpcs.create_delivery_vehicle.timeout,
296
+ metadata: call_metadata,
297
+ retry_policy: @config.rpcs.create_delivery_vehicle.retry_policy
298
+
299
+ options.apply_defaults timeout: @config.timeout,
300
+ metadata: @config.metadata,
301
+ retry_policy: @config.retry_policy
302
+
303
+ @delivery_service_stub.create_delivery_vehicle request, options do |result, operation|
304
+ yield result, operation if block_given?
305
+ return result
306
+ end
307
+ rescue ::Gapic::Rest::Error => e
308
+ raise ::Google::Cloud::Error.from_error(e)
309
+ end
310
+
311
+ ##
312
+ # Returns the specified `DeliveryVehicle` instance.
313
+ #
314
+ # @overload get_delivery_vehicle(request, options = nil)
315
+ # Pass arguments to `get_delivery_vehicle` via a request object, either of type
316
+ # {::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest} or an equivalent Hash.
317
+ #
318
+ # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest, ::Hash]
319
+ # A request object representing the call parameters. Required. To specify no
320
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
321
+ # @param options [::Gapic::CallOptions, ::Hash]
322
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
323
+ #
324
+ # @overload get_delivery_vehicle(header: nil, name: nil)
325
+ # Pass arguments to `get_delivery_vehicle` via keyword arguments. Note that at
326
+ # least one keyword argument is required. To specify no parameters, or to keep all
327
+ # the default parameter values, pass an empty Hash as a request object (see above).
328
+ #
329
+ # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash]
330
+ # Optional. The standard Delivery API request header.
331
+ # @param name [::String]
332
+ # Required. Must be in the format
333
+ # `providers/{provider}/deliveryVehicles/{delivery_vehicle}`.
334
+ # The `provider` must be the Google Cloud Project ID. For example,
335
+ # `sample-cloud-project`.
336
+ # @yield [result, operation] Access the result along with the TransportOperation object
337
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
338
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
339
+ #
340
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
341
+ #
342
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
343
+ #
344
+ # @example Basic example
345
+ # require "google/maps/fleet_engine/delivery/v1"
346
+ #
347
+ # # Create a client object. The client can be reused for multiple calls.
348
+ # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new
349
+ #
350
+ # # Create a request. To set request fields, pass in keyword arguments.
351
+ # request = Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest.new
352
+ #
353
+ # # Call the get_delivery_vehicle method.
354
+ # result = client.get_delivery_vehicle request
355
+ #
356
+ # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.
357
+ # p result
358
+ #
359
+ def get_delivery_vehicle request, options = nil
360
+ raise ::ArgumentError, "request must be provided" if request.nil?
361
+
362
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetDeliveryVehicleRequest
363
+
364
+ # Converts hash and nil to an options object
365
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
366
+
367
+ # Customize the options with defaults
368
+ call_metadata = @config.rpcs.get_delivery_vehicle.metadata.to_h
369
+
370
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
371
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
372
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
373
+ gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION,
374
+ transports_version_send: [:rest]
375
+
376
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
377
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
378
+
379
+ options.apply_defaults timeout: @config.rpcs.get_delivery_vehicle.timeout,
380
+ metadata: call_metadata,
381
+ retry_policy: @config.rpcs.get_delivery_vehicle.retry_policy
382
+
383
+ options.apply_defaults timeout: @config.timeout,
384
+ metadata: @config.metadata,
385
+ retry_policy: @config.retry_policy
386
+
387
+ @delivery_service_stub.get_delivery_vehicle request, options do |result, operation|
388
+ yield result, operation if block_given?
389
+ return result
390
+ end
391
+ rescue ::Gapic::Rest::Error => e
392
+ raise ::Google::Cloud::Error.from_error(e)
393
+ end
394
+
395
+ ##
396
+ # Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns
397
+ # `Tasks` to the `DeliveryVehicle`. You cannot update the name of the
398
+ # `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`
399
+ # though, but it must contain all of the `VehicleJourneySegment`s currently
400
+ # on the `DeliveryVehicle`. The `task_id`s are retrieved from
401
+ # `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are
402
+ # assigned to the `DeliveryVehicle` if they have not yet been assigned.
403
+ #
404
+ # @overload update_delivery_vehicle(request, options = nil)
405
+ # Pass arguments to `update_delivery_vehicle` via a request object, either of type
406
+ # {::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest} or an equivalent Hash.
407
+ #
408
+ # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest, ::Hash]
409
+ # A request object representing the call parameters. Required. To specify no
410
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
411
+ # @param options [::Gapic::CallOptions, ::Hash]
412
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
413
+ #
414
+ # @overload update_delivery_vehicle(header: nil, delivery_vehicle: nil, update_mask: nil)
415
+ # Pass arguments to `update_delivery_vehicle` via keyword arguments. Note that at
416
+ # least one keyword argument is required. To specify no parameters, or to keep all
417
+ # the default parameter values, pass an empty Hash as a request object (see above).
418
+ #
419
+ # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash]
420
+ # Optional. The standard Delivery API request header.
421
+ # @param delivery_vehicle [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle, ::Hash]
422
+ # Required. The `DeliveryVehicle` entity update to apply.
423
+ # Note: You cannot update the name of the `DeliveryVehicle`.
424
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
425
+ # Required. A field mask that indicates which `DeliveryVehicle` fields to
426
+ # update. Note that the update_mask must contain at least one field.
427
+ #
428
+ # This is a comma-separated list of fully qualified names of fields. Example:
429
+ # `"remaining_vehicle_journey_segments"`.
430
+ # @yield [result, operation] Access the result along with the TransportOperation object
431
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
432
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
433
+ #
434
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle]
435
+ #
436
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
437
+ #
438
+ # @example Basic example
439
+ # require "google/maps/fleet_engine/delivery/v1"
440
+ #
441
+ # # Create a client object. The client can be reused for multiple calls.
442
+ # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new
443
+ #
444
+ # # Create a request. To set request fields, pass in keyword arguments.
445
+ # request = Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest.new
446
+ #
447
+ # # Call the update_delivery_vehicle method.
448
+ # result = client.update_delivery_vehicle request
449
+ #
450
+ # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.
451
+ # p result
452
+ #
453
+ def update_delivery_vehicle request, options = nil
454
+ raise ::ArgumentError, "request must be provided" if request.nil?
455
+
456
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateDeliveryVehicleRequest
457
+
458
+ # Converts hash and nil to an options object
459
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
460
+
461
+ # Customize the options with defaults
462
+ call_metadata = @config.rpcs.update_delivery_vehicle.metadata.to_h
463
+
464
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
465
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
466
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
467
+ gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION,
468
+ transports_version_send: [:rest]
469
+
470
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
471
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
472
+
473
+ options.apply_defaults timeout: @config.rpcs.update_delivery_vehicle.timeout,
474
+ metadata: call_metadata,
475
+ retry_policy: @config.rpcs.update_delivery_vehicle.retry_policy
476
+
477
+ options.apply_defaults timeout: @config.timeout,
478
+ metadata: @config.metadata,
479
+ retry_policy: @config.retry_policy
480
+
481
+ @delivery_service_stub.update_delivery_vehicle request, options do |result, operation|
482
+ yield result, operation if block_given?
483
+ return result
484
+ end
485
+ rescue ::Gapic::Rest::Error => e
486
+ raise ::Google::Cloud::Error.from_error(e)
487
+ end
488
+
489
+ ##
490
+ # Creates and returns a batch of new `Task` objects.
491
+ #
492
+ # @overload batch_create_tasks(request, options = nil)
493
+ # Pass arguments to `batch_create_tasks` via a request object, either of type
494
+ # {::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest} or an equivalent Hash.
495
+ #
496
+ # @param request [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest, ::Hash]
497
+ # A request object representing the call parameters. Required. To specify no
498
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
499
+ # @param options [::Gapic::CallOptions, ::Hash]
500
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
501
+ #
502
+ # @overload batch_create_tasks(header: nil, parent: nil, requests: nil)
503
+ # Pass arguments to `batch_create_tasks` via keyword arguments. Note that at
504
+ # least one keyword argument is required. To specify no parameters, or to keep all
505
+ # the default parameter values, pass an empty Hash as a request object (see above).
506
+ #
507
+ # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash]
508
+ # Optional. The standard Delivery API request header.
509
+ # Note: If you set this field, then the header field in the
510
+ # `CreateTaskRequest` messages must either be empty, or it must match this
511
+ # field.
512
+ # @param parent [::String]
513
+ # Required. The parent resource shared by all tasks. This value must be in
514
+ # the format `providers/{provider}`. The `provider` must be the Google Cloud
515
+ # Project ID. For example, `sample-cloud-project`. The parent field in the
516
+ # `CreateTaskRequest` messages must either be empty, or it must match this
517
+ # field.
518
+ # @param requests [::Array<::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash>]
519
+ # Required. The request message that specifies the resources to create.
520
+ # Note: You can create a maximum of 500 tasks in a batch.
521
+ # @yield [result, operation] Access the result along with the TransportOperation object
522
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse]
523
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
524
+ #
525
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse]
526
+ #
527
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
528
+ #
529
+ # @example Basic example
530
+ # require "google/maps/fleet_engine/delivery/v1"
531
+ #
532
+ # # Create a client object. The client can be reused for multiple calls.
533
+ # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new
534
+ #
535
+ # # Create a request. To set request fields, pass in keyword arguments.
536
+ # request = Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest.new
537
+ #
538
+ # # Call the batch_create_tasks method.
539
+ # result = client.batch_create_tasks request
540
+ #
541
+ # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksResponse.
542
+ # p result
543
+ #
544
+ def batch_create_tasks request, options = nil
545
+ raise ::ArgumentError, "request must be provided" if request.nil?
546
+
547
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::BatchCreateTasksRequest
548
+
549
+ # Converts hash and nil to an options object
550
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
551
+
552
+ # Customize the options with defaults
553
+ call_metadata = @config.rpcs.batch_create_tasks.metadata.to_h
554
+
555
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
556
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
557
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
558
+ gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION,
559
+ transports_version_send: [:rest]
560
+
561
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
562
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
563
+
564
+ options.apply_defaults timeout: @config.rpcs.batch_create_tasks.timeout,
565
+ metadata: call_metadata,
566
+ retry_policy: @config.rpcs.batch_create_tasks.retry_policy
567
+
568
+ options.apply_defaults timeout: @config.timeout,
569
+ metadata: @config.metadata,
570
+ retry_policy: @config.retry_policy
571
+
572
+ @delivery_service_stub.batch_create_tasks request, options do |result, operation|
573
+ yield result, operation if block_given?
574
+ return result
575
+ end
576
+ rescue ::Gapic::Rest::Error => e
577
+ raise ::Google::Cloud::Error.from_error(e)
578
+ end
579
+
580
+ ##
581
+ # Creates and returns a new `Task` object.
582
+ #
583
+ # @overload create_task(request, options = nil)
584
+ # Pass arguments to `create_task` via a request object, either of type
585
+ # {::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest} or an equivalent Hash.
586
+ #
587
+ # @param request [::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest, ::Hash]
588
+ # A request object representing the call parameters. Required. To specify no
589
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
590
+ # @param options [::Gapic::CallOptions, ::Hash]
591
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
592
+ #
593
+ # @overload create_task(header: nil, parent: nil, task_id: nil, task: nil)
594
+ # Pass arguments to `create_task` via keyword arguments. Note that at
595
+ # least one keyword argument is required. To specify no parameters, or to keep all
596
+ # the default parameter values, pass an empty Hash as a request object (see above).
597
+ #
598
+ # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash]
599
+ # Optional. The standard Delivery API request header.
600
+ # @param parent [::String]
601
+ # Required. Must be in the format `providers/{provider}`. The `provider` must
602
+ # be the Google Cloud Project ID. For example, `sample-cloud-project`.
603
+ # @param task_id [::String]
604
+ # Required. The Task ID must be unique, but it should be not a shipment
605
+ # tracking ID. To store a shipment tracking ID, use the `tracking_id` field.
606
+ # Note that multiple tasks can have the same `tracking_id`. Task IDs are
607
+ # subject to the following restrictions:
608
+ #
609
+ # * Must be a valid Unicode string.
610
+ # * Limited to a maximum length of 64 characters.
611
+ # * Normalized according to [Unicode Normalization Form C]
612
+ # (http://www.unicode.org/reports/tr15/).
613
+ # * May not contain any of the following ASCII characters: '/', ':', '?',
614
+ # ',', or '#'.
615
+ # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash]
616
+ # Required. The Task entity to create.
617
+ # When creating a Task, the following fields are required:
618
+ #
619
+ # * `type`
620
+ # * `state` (must be set to `OPEN`)
621
+ # * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP`
622
+ # tasks, but required for all other task types)
623
+ # * `planned_location` (optional for `UNAVAILABLE` tasks)
624
+ # * `task_duration`
625
+ #
626
+ # Note: The Task's `name` field is ignored. All other Task fields must not be
627
+ # set; otherwise, an error is returned.
628
+ # @yield [result, operation] Access the result along with the TransportOperation object
629
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task]
630
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
631
+ #
632
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::Task]
633
+ #
634
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
635
+ #
636
+ # @example Basic example
637
+ # require "google/maps/fleet_engine/delivery/v1"
638
+ #
639
+ # # Create a client object. The client can be reused for multiple calls.
640
+ # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new
641
+ #
642
+ # # Create a request. To set request fields, pass in keyword arguments.
643
+ # request = Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest.new
644
+ #
645
+ # # Call the create_task method.
646
+ # result = client.create_task request
647
+ #
648
+ # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task.
649
+ # p result
650
+ #
651
+ def create_task request, options = nil
652
+ raise ::ArgumentError, "request must be provided" if request.nil?
653
+
654
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::CreateTaskRequest
655
+
656
+ # Converts hash and nil to an options object
657
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
658
+
659
+ # Customize the options with defaults
660
+ call_metadata = @config.rpcs.create_task.metadata.to_h
661
+
662
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
663
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
664
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
665
+ gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION,
666
+ transports_version_send: [:rest]
667
+
668
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
669
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
670
+
671
+ options.apply_defaults timeout: @config.rpcs.create_task.timeout,
672
+ metadata: call_metadata,
673
+ retry_policy: @config.rpcs.create_task.retry_policy
674
+
675
+ options.apply_defaults timeout: @config.timeout,
676
+ metadata: @config.metadata,
677
+ retry_policy: @config.retry_policy
678
+
679
+ @delivery_service_stub.create_task request, options do |result, operation|
680
+ yield result, operation if block_given?
681
+ return result
682
+ end
683
+ rescue ::Gapic::Rest::Error => e
684
+ raise ::Google::Cloud::Error.from_error(e)
685
+ end
686
+
687
+ ##
688
+ # Gets information about a `Task`.
689
+ #
690
+ # @overload get_task(request, options = nil)
691
+ # Pass arguments to `get_task` via a request object, either of type
692
+ # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest} or an equivalent Hash.
693
+ #
694
+ # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest, ::Hash]
695
+ # A request object representing the call parameters. Required. To specify no
696
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
697
+ # @param options [::Gapic::CallOptions, ::Hash]
698
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
699
+ #
700
+ # @overload get_task(header: nil, name: nil)
701
+ # Pass arguments to `get_task` via keyword arguments. Note that at
702
+ # least one keyword argument is required. To specify no parameters, or to keep all
703
+ # the default parameter values, pass an empty Hash as a request object (see above).
704
+ #
705
+ # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash]
706
+ # Optional. The standard Delivery API request header.
707
+ # @param name [::String]
708
+ # Required. Must be in the format `providers/{provider}/tasks/{task}`. The
709
+ # `provider` must be the Google Cloud Project ID. For example,
710
+ # `sample-cloud-project`.
711
+ # @yield [result, operation] Access the result along with the TransportOperation object
712
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task]
713
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
714
+ #
715
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::Task]
716
+ #
717
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
718
+ #
719
+ # @example Basic example
720
+ # require "google/maps/fleet_engine/delivery/v1"
721
+ #
722
+ # # Create a client object. The client can be reused for multiple calls.
723
+ # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new
724
+ #
725
+ # # Create a request. To set request fields, pass in keyword arguments.
726
+ # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest.new
727
+ #
728
+ # # Call the get_task method.
729
+ # result = client.get_task request
730
+ #
731
+ # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task.
732
+ # p result
733
+ #
734
+ def get_task request, options = nil
735
+ raise ::ArgumentError, "request must be provided" if request.nil?
736
+
737
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskRequest
738
+
739
+ # Converts hash and nil to an options object
740
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
741
+
742
+ # Customize the options with defaults
743
+ call_metadata = @config.rpcs.get_task.metadata.to_h
744
+
745
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
746
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
747
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
748
+ gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION,
749
+ transports_version_send: [:rest]
750
+
751
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
752
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
753
+
754
+ options.apply_defaults timeout: @config.rpcs.get_task.timeout,
755
+ metadata: call_metadata,
756
+ retry_policy: @config.rpcs.get_task.retry_policy
757
+
758
+ options.apply_defaults timeout: @config.timeout,
759
+ metadata: @config.metadata,
760
+ retry_policy: @config.retry_policy
761
+
762
+ @delivery_service_stub.get_task request, options do |result, operation|
763
+ yield result, operation if block_given?
764
+ return result
765
+ end
766
+ rescue ::Gapic::Rest::Error => e
767
+ raise ::Google::Cloud::Error.from_error(e)
768
+ end
769
+
770
+ ##
771
+ # Updates `Task` data.
772
+ #
773
+ # @overload update_task(request, options = nil)
774
+ # Pass arguments to `update_task` via a request object, either of type
775
+ # {::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest} or an equivalent Hash.
776
+ #
777
+ # @param request [::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest, ::Hash]
778
+ # A request object representing the call parameters. Required. To specify no
779
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
780
+ # @param options [::Gapic::CallOptions, ::Hash]
781
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
782
+ #
783
+ # @overload update_task(header: nil, task: nil, update_mask: nil)
784
+ # Pass arguments to `update_task` via keyword arguments. Note that at
785
+ # least one keyword argument is required. To specify no parameters, or to keep all
786
+ # the default parameter values, pass an empty Hash as a request object (see above).
787
+ #
788
+ # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash]
789
+ # Optional. The standard Delivery API request header.
790
+ # @param task [::Google::Maps::FleetEngine::Delivery::V1::Task, ::Hash]
791
+ # Required. The Task associated with the update.
792
+ # The following fields are maintained by Fleet Engine. Do not update
793
+ # them using `Task.update`.
794
+ #
795
+ # * `last_location`.
796
+ # * `last_location_snappable`.
797
+ # * `name`.
798
+ # * `remaining_vehicle_journey_segments`.
799
+ # * `task_outcome_location_source`.
800
+ #
801
+ # Note: You cannot change the value of `task_outcome` once you set it.
802
+ #
803
+ # If the Task has been assigned to a delivery vehicle, then don't set the
804
+ # Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop`
805
+ # that contains the Task from the delivery vehicle, which automatically sets
806
+ # the Task state to CLOSED.
807
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
808
+ # Required. The field mask that indicates which Task fields to update.
809
+ # Note: The `update_mask` must contain at least one field.
810
+ #
811
+ # This is a comma-separated list of fully qualified names of fields. Example:
812
+ # `"task_outcome,task_outcome_time,task_outcome_location"`.
813
+ # @yield [result, operation] Access the result along with the TransportOperation object
814
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::Task]
815
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
816
+ #
817
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::Task]
818
+ #
819
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
820
+ #
821
+ # @example Basic example
822
+ # require "google/maps/fleet_engine/delivery/v1"
823
+ #
824
+ # # Create a client object. The client can be reused for multiple calls.
825
+ # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new
826
+ #
827
+ # # Create a request. To set request fields, pass in keyword arguments.
828
+ # request = Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest.new
829
+ #
830
+ # # Call the update_task method.
831
+ # result = client.update_task request
832
+ #
833
+ # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::Task.
834
+ # p result
835
+ #
836
+ def update_task request, options = nil
837
+ raise ::ArgumentError, "request must be provided" if request.nil?
838
+
839
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::UpdateTaskRequest
840
+
841
+ # Converts hash and nil to an options object
842
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
843
+
844
+ # Customize the options with defaults
845
+ call_metadata = @config.rpcs.update_task.metadata.to_h
846
+
847
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
848
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
849
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
850
+ gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION,
851
+ transports_version_send: [:rest]
852
+
853
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
854
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
855
+
856
+ options.apply_defaults timeout: @config.rpcs.update_task.timeout,
857
+ metadata: call_metadata,
858
+ retry_policy: @config.rpcs.update_task.retry_policy
859
+
860
+ options.apply_defaults timeout: @config.timeout,
861
+ metadata: @config.metadata,
862
+ retry_policy: @config.retry_policy
863
+
864
+ @delivery_service_stub.update_task request, options do |result, operation|
865
+ yield result, operation if block_given?
866
+ return result
867
+ end
868
+ rescue ::Gapic::Rest::Error => e
869
+ raise ::Google::Cloud::Error.from_error(e)
870
+ end
871
+
872
+ ##
873
+ # Gets all `Task`s that meet the specified filtering criteria.
874
+ #
875
+ # @overload list_tasks(request, options = nil)
876
+ # Pass arguments to `list_tasks` via a request object, either of type
877
+ # {::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest} or an equivalent Hash.
878
+ #
879
+ # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest, ::Hash]
880
+ # A request object representing the call parameters. Required. To specify no
881
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
882
+ # @param options [::Gapic::CallOptions, ::Hash]
883
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
884
+ #
885
+ # @overload list_tasks(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil)
886
+ # Pass arguments to `list_tasks` via keyword arguments. Note that at
887
+ # least one keyword argument is required. To specify no parameters, or to keep all
888
+ # the default parameter values, pass an empty Hash as a request object (see above).
889
+ #
890
+ # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash]
891
+ # Optional. The standard Delivery API request header.
892
+ # @param parent [::String]
893
+ # Required. Must be in the format `providers/{provider}`.
894
+ # The `provider` must be the Google Cloud Project ID. For example,
895
+ # `sample-cloud-project`.
896
+ # @param page_size [::Integer]
897
+ # Optional. The maximum number of Tasks to return. The service may return
898
+ # fewer than this value. If you don't specify this value, then the server
899
+ # determines the number of results to return.
900
+ # @param page_token [::String]
901
+ # Optional. A page token received from a previous `ListTasks` call.
902
+ # You can provide this to retrieve the subsequent page.
903
+ #
904
+ # When paginating, all other parameters provided to `ListTasks` must match
905
+ # the call that provided the page token.
906
+ # @param filter [::String]
907
+ # Optional. A filter query to apply when listing Tasks. See
908
+ # http://aip.dev/160 for examples of filter syntax. If you don't specify a
909
+ # value, or if you filter on an empty string, then all Tasks are returned.
910
+ # For information about the Task properties that you can filter on, see [List
911
+ # tasks](https://developers.google.com/maps/documentation/transportation-logistics/last-mile-fleet-solution/fleet-performance/fleet-engine/deliveries_api#list-tasks).
912
+ # @yield [result, operation] Access the result along with the TransportOperation object
913
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>]
914
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
915
+ #
916
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::Task>]
917
+ #
918
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
919
+ #
920
+ # @example Basic example
921
+ # require "google/maps/fleet_engine/delivery/v1"
922
+ #
923
+ # # Create a client object. The client can be reused for multiple calls.
924
+ # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new
925
+ #
926
+ # # Create a request. To set request fields, pass in keyword arguments.
927
+ # request = Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest.new
928
+ #
929
+ # # Call the list_tasks method.
930
+ # result = client.list_tasks request
931
+ #
932
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
933
+ # # over elements, and API calls will be issued to fetch pages as needed.
934
+ # result.each do |item|
935
+ # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::Task.
936
+ # p item
937
+ # end
938
+ #
939
+ def list_tasks request, options = nil
940
+ raise ::ArgumentError, "request must be provided" if request.nil?
941
+
942
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListTasksRequest
943
+
944
+ # Converts hash and nil to an options object
945
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
946
+
947
+ # Customize the options with defaults
948
+ call_metadata = @config.rpcs.list_tasks.metadata.to_h
949
+
950
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
951
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
952
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
953
+ gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION,
954
+ transports_version_send: [:rest]
955
+
956
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
957
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
958
+
959
+ options.apply_defaults timeout: @config.rpcs.list_tasks.timeout,
960
+ metadata: call_metadata,
961
+ retry_policy: @config.rpcs.list_tasks.retry_policy
962
+
963
+ options.apply_defaults timeout: @config.timeout,
964
+ metadata: @config.metadata,
965
+ retry_policy: @config.retry_policy
966
+
967
+ @delivery_service_stub.list_tasks request, options do |result, operation|
968
+ result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_tasks, "tasks", request, result, options
969
+ yield result, operation if block_given?
970
+ return result
971
+ end
972
+ rescue ::Gapic::Rest::Error => e
973
+ raise ::Google::Cloud::Error.from_error(e)
974
+ end
975
+
976
+ ##
977
+ # Returns the specified `TaskTrackingInfo` instance.
978
+ #
979
+ # @overload get_task_tracking_info(request, options = nil)
980
+ # Pass arguments to `get_task_tracking_info` via a request object, either of type
981
+ # {::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest} or an equivalent Hash.
982
+ #
983
+ # @param request [::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest, ::Hash]
984
+ # A request object representing the call parameters. Required. To specify no
985
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
986
+ # @param options [::Gapic::CallOptions, ::Hash]
987
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
988
+ #
989
+ # @overload get_task_tracking_info(header: nil, name: nil)
990
+ # Pass arguments to `get_task_tracking_info` via keyword arguments. Note that at
991
+ # least one keyword argument is required. To specify no parameters, or to keep all
992
+ # the default parameter values, pass an empty Hash as a request object (see above).
993
+ #
994
+ # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash]
995
+ # Optional. The standard Delivery API request header.
996
+ # @param name [::String]
997
+ # Required. Must be in the format
998
+ # `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider`
999
+ # must be the Google Cloud Project ID, and the `tracking_id` must be the
1000
+ # tracking ID associated with the task. An example name can be
1001
+ # `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`.
1002
+ # @yield [result, operation] Access the result along with the TransportOperation object
1003
+ # @yieldparam result [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo]
1004
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1005
+ #
1006
+ # @return [::Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo]
1007
+ #
1008
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1009
+ #
1010
+ # @example Basic example
1011
+ # require "google/maps/fleet_engine/delivery/v1"
1012
+ #
1013
+ # # Create a client object. The client can be reused for multiple calls.
1014
+ # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new
1015
+ #
1016
+ # # Create a request. To set request fields, pass in keyword arguments.
1017
+ # request = Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest.new
1018
+ #
1019
+ # # Call the get_task_tracking_info method.
1020
+ # result = client.get_task_tracking_info request
1021
+ #
1022
+ # # The returned object is of type Google::Maps::FleetEngine::Delivery::V1::TaskTrackingInfo.
1023
+ # p result
1024
+ #
1025
+ def get_task_tracking_info request, options = nil
1026
+ raise ::ArgumentError, "request must be provided" if request.nil?
1027
+
1028
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::GetTaskTrackingInfoRequest
1029
+
1030
+ # Converts hash and nil to an options object
1031
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1032
+
1033
+ # Customize the options with defaults
1034
+ call_metadata = @config.rpcs.get_task_tracking_info.metadata.to_h
1035
+
1036
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1037
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1038
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1039
+ gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION,
1040
+ transports_version_send: [:rest]
1041
+
1042
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1043
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1044
+
1045
+ options.apply_defaults timeout: @config.rpcs.get_task_tracking_info.timeout,
1046
+ metadata: call_metadata,
1047
+ retry_policy: @config.rpcs.get_task_tracking_info.retry_policy
1048
+
1049
+ options.apply_defaults timeout: @config.timeout,
1050
+ metadata: @config.metadata,
1051
+ retry_policy: @config.retry_policy
1052
+
1053
+ @delivery_service_stub.get_task_tracking_info request, options do |result, operation|
1054
+ yield result, operation if block_given?
1055
+ return result
1056
+ end
1057
+ rescue ::Gapic::Rest::Error => e
1058
+ raise ::Google::Cloud::Error.from_error(e)
1059
+ end
1060
+
1061
+ ##
1062
+ # Gets all `DeliveryVehicle`s that meet the specified filtering criteria.
1063
+ #
1064
+ # @overload list_delivery_vehicles(request, options = nil)
1065
+ # Pass arguments to `list_delivery_vehicles` via a request object, either of type
1066
+ # {::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest} or an equivalent Hash.
1067
+ #
1068
+ # @param request [::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest, ::Hash]
1069
+ # A request object representing the call parameters. Required. To specify no
1070
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1071
+ # @param options [::Gapic::CallOptions, ::Hash]
1072
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1073
+ #
1074
+ # @overload list_delivery_vehicles(header: nil, parent: nil, page_size: nil, page_token: nil, filter: nil, viewport: nil)
1075
+ # Pass arguments to `list_delivery_vehicles` via keyword arguments. Note that at
1076
+ # least one keyword argument is required. To specify no parameters, or to keep all
1077
+ # the default parameter values, pass an empty Hash as a request object (see above).
1078
+ #
1079
+ # @param header [::Google::Maps::FleetEngine::Delivery::V1::DeliveryRequestHeader, ::Hash]
1080
+ # Optional. The standard Delivery API request header.
1081
+ # @param parent [::String]
1082
+ # Required. Must be in the format `providers/{provider}`.
1083
+ # The `provider` must be the Google Cloud Project ID.
1084
+ # For example, `sample-cloud-project`.
1085
+ # @param page_size [::Integer]
1086
+ # Optional. The maximum number of vehicles to return. The service may return
1087
+ # fewer than this number. If you don't specify this number, then the server
1088
+ # determines the number of results to return.
1089
+ # @param page_token [::String]
1090
+ # Optional. A page token, received from a previous `ListDeliveryVehicles`
1091
+ # call. You must provide this in order to retrieve the subsequent page.
1092
+ #
1093
+ # When paginating, all other parameters provided to `ListDeliveryVehicles`
1094
+ # must match the call that provided the page token.
1095
+ # @param filter [::String]
1096
+ # Optional. A filter query to apply when listing delivery vehicles. See
1097
+ # http://aip.dev/160 for examples of the filter syntax. If you don't specify
1098
+ # a value, or if you specify an empty string for the filter, then all
1099
+ # delivery vehicles are returned.
1100
+ #
1101
+ # Note that the only queries supported for `ListDeliveryVehicles` are
1102
+ # on vehicle attributes (for example, `attributes.<key> = <value>` or
1103
+ # `attributes.<key1> = <value1> AND attributes.<key2> = <value2>`). Also, all
1104
+ # attributes are stored as strings, so the only supported comparisons against
1105
+ # attributes are string comparisons. In order to compare against number or
1106
+ # boolean values, the values must be explicitly quoted to be treated as
1107
+ # strings (for example, `attributes.<key> = "10"` or
1108
+ # `attributes.<key> = "true"`).
1109
+ #
1110
+ # The maximum number of restrictions allowed in a filter query is 50. A
1111
+ # restriction is a part of the query of the form
1112
+ # `attribute.<KEY> <COMPARATOR> <VALUE>`, for example `attributes.foo = bar`
1113
+ # is 1 restriction.
1114
+ # @param viewport [::Google::Geo::Type::Viewport, ::Hash]
1115
+ # Optional. A filter that limits the vehicles returned to those whose last
1116
+ # known location was in the rectangular area defined by the viewport.
1117
+ # @yield [result, operation] Access the result along with the TransportOperation object
1118
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>]
1119
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1120
+ #
1121
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle>]
1122
+ #
1123
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1124
+ #
1125
+ # @example Basic example
1126
+ # require "google/maps/fleet_engine/delivery/v1"
1127
+ #
1128
+ # # Create a client object. The client can be reused for multiple calls.
1129
+ # client = Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new
1130
+ #
1131
+ # # Create a request. To set request fields, pass in keyword arguments.
1132
+ # request = Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest.new
1133
+ #
1134
+ # # Call the list_delivery_vehicles method.
1135
+ # result = client.list_delivery_vehicles request
1136
+ #
1137
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1138
+ # # over elements, and API calls will be issued to fetch pages as needed.
1139
+ # result.each do |item|
1140
+ # # Each element is of type ::Google::Maps::FleetEngine::Delivery::V1::DeliveryVehicle.
1141
+ # p item
1142
+ # end
1143
+ #
1144
+ def list_delivery_vehicles request, options = nil
1145
+ raise ::ArgumentError, "request must be provided" if request.nil?
1146
+
1147
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::Delivery::V1::ListDeliveryVehiclesRequest
1148
+
1149
+ # Converts hash and nil to an options object
1150
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1151
+
1152
+ # Customize the options with defaults
1153
+ call_metadata = @config.rpcs.list_delivery_vehicles.metadata.to_h
1154
+
1155
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1156
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1157
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1158
+ gapic_version: ::Google::Maps::FleetEngine::Delivery::V1::VERSION,
1159
+ transports_version_send: [:rest]
1160
+
1161
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1162
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1163
+
1164
+ options.apply_defaults timeout: @config.rpcs.list_delivery_vehicles.timeout,
1165
+ metadata: call_metadata,
1166
+ retry_policy: @config.rpcs.list_delivery_vehicles.retry_policy
1167
+
1168
+ options.apply_defaults timeout: @config.timeout,
1169
+ metadata: @config.metadata,
1170
+ retry_policy: @config.retry_policy
1171
+
1172
+ @delivery_service_stub.list_delivery_vehicles request, options do |result, operation|
1173
+ result = ::Gapic::Rest::PagedEnumerable.new @delivery_service_stub, :list_delivery_vehicles, "delivery_vehicles", request, result, options
1174
+ yield result, operation if block_given?
1175
+ return result
1176
+ end
1177
+ rescue ::Gapic::Rest::Error => e
1178
+ raise ::Google::Cloud::Error.from_error(e)
1179
+ end
1180
+
1181
+ ##
1182
+ # Configuration class for the DeliveryService REST API.
1183
+ #
1184
+ # This class represents the configuration for DeliveryService REST,
1185
+ # providing control over timeouts, retry behavior, logging, transport
1186
+ # parameters, and other low-level controls. Certain parameters can also be
1187
+ # applied individually to specific RPCs. See
1188
+ # {::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client::Configuration::Rpcs}
1189
+ # for a list of RPCs that can be configured independently.
1190
+ #
1191
+ # Configuration can be applied globally to all clients, or to a single client
1192
+ # on construction.
1193
+ #
1194
+ # @example
1195
+ #
1196
+ # # Modify the global config, setting the timeout for
1197
+ # # create_delivery_vehicle to 20 seconds,
1198
+ # # and all remaining timeouts to 10 seconds.
1199
+ # ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.configure do |config|
1200
+ # config.timeout = 10.0
1201
+ # config.rpcs.create_delivery_vehicle.timeout = 20.0
1202
+ # end
1203
+ #
1204
+ # # Apply the above configuration only to a new client.
1205
+ # client = ::Google::Maps::FleetEngine::Delivery::V1::DeliveryService::Rest::Client.new do |config|
1206
+ # config.timeout = 10.0
1207
+ # config.rpcs.create_delivery_vehicle.timeout = 20.0
1208
+ # end
1209
+ #
1210
+ # @!attribute [rw] endpoint
1211
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1212
+ # nil, indicating to use the default endpoint in the current universe domain.
1213
+ # @return [::String,nil]
1214
+ # @!attribute [rw] credentials
1215
+ # Credentials to send with calls. You may provide any of the following types:
1216
+ # * (`String`) The path to a service account key file in JSON format
1217
+ # * (`Hash`) A service account key as a Hash
1218
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1219
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1220
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1221
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1222
+ # * (`nil`) indicating no credentials
1223
+ # @return [::Object]
1224
+ # @!attribute [rw] scope
1225
+ # The OAuth scopes
1226
+ # @return [::Array<::String>]
1227
+ # @!attribute [rw] lib_name
1228
+ # The library name as recorded in instrumentation and logging
1229
+ # @return [::String]
1230
+ # @!attribute [rw] lib_version
1231
+ # The library version as recorded in instrumentation and logging
1232
+ # @return [::String]
1233
+ # @!attribute [rw] timeout
1234
+ # The call timeout in seconds.
1235
+ # @return [::Numeric]
1236
+ # @!attribute [rw] metadata
1237
+ # Additional headers to be sent with the call.
1238
+ # @return [::Hash{::Symbol=>::String}]
1239
+ # @!attribute [rw] retry_policy
1240
+ # The retry policy. The value is a hash with the following keys:
1241
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1242
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1243
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1244
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1245
+ # trigger a retry.
1246
+ # @return [::Hash]
1247
+ # @!attribute [rw] quota_project
1248
+ # A separate project against which to charge quota.
1249
+ # @return [::String]
1250
+ # @!attribute [rw] universe_domain
1251
+ # The universe domain within which to make requests. This determines the
1252
+ # default endpoint URL. The default value of nil uses the environment
1253
+ # universe (usually the default "googleapis.com" universe).
1254
+ # @return [::String,nil]
1255
+ #
1256
+ class Configuration
1257
+ extend ::Gapic::Config
1258
+
1259
+ # @private
1260
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1261
+ DEFAULT_ENDPOINT = "fleetengine.googleapis.com"
1262
+
1263
+ config_attr :endpoint, nil, ::String, nil
1264
+ config_attr :credentials, nil do |value|
1265
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1266
+ allowed.any? { |klass| klass === value }
1267
+ end
1268
+ config_attr :scope, nil, ::String, ::Array, nil
1269
+ config_attr :lib_name, nil, ::String, nil
1270
+ config_attr :lib_version, nil, ::String, nil
1271
+ config_attr :timeout, nil, ::Numeric, nil
1272
+ config_attr :metadata, nil, ::Hash, nil
1273
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1274
+ config_attr :quota_project, nil, ::String, nil
1275
+ config_attr :universe_domain, nil, ::String, nil
1276
+
1277
+ # @private
1278
+ def initialize parent_config = nil
1279
+ @parent_config = parent_config unless parent_config.nil?
1280
+
1281
+ yield self if block_given?
1282
+ end
1283
+
1284
+ ##
1285
+ # Configurations for individual RPCs
1286
+ # @return [Rpcs]
1287
+ #
1288
+ def rpcs
1289
+ @rpcs ||= begin
1290
+ parent_rpcs = nil
1291
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1292
+ Rpcs.new parent_rpcs
1293
+ end
1294
+ end
1295
+
1296
+ ##
1297
+ # Configuration RPC class for the DeliveryService API.
1298
+ #
1299
+ # Includes fields providing the configuration for each RPC in this service.
1300
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1301
+ # the following configuration fields:
1302
+ #
1303
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1304
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1305
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1306
+ # include the following keys:
1307
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1308
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1309
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1310
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1311
+ # trigger a retry.
1312
+ #
1313
+ class Rpcs
1314
+ ##
1315
+ # RPC-specific configuration for `create_delivery_vehicle`
1316
+ # @return [::Gapic::Config::Method]
1317
+ #
1318
+ attr_reader :create_delivery_vehicle
1319
+ ##
1320
+ # RPC-specific configuration for `get_delivery_vehicle`
1321
+ # @return [::Gapic::Config::Method]
1322
+ #
1323
+ attr_reader :get_delivery_vehicle
1324
+ ##
1325
+ # RPC-specific configuration for `update_delivery_vehicle`
1326
+ # @return [::Gapic::Config::Method]
1327
+ #
1328
+ attr_reader :update_delivery_vehicle
1329
+ ##
1330
+ # RPC-specific configuration for `batch_create_tasks`
1331
+ # @return [::Gapic::Config::Method]
1332
+ #
1333
+ attr_reader :batch_create_tasks
1334
+ ##
1335
+ # RPC-specific configuration for `create_task`
1336
+ # @return [::Gapic::Config::Method]
1337
+ #
1338
+ attr_reader :create_task
1339
+ ##
1340
+ # RPC-specific configuration for `get_task`
1341
+ # @return [::Gapic::Config::Method]
1342
+ #
1343
+ attr_reader :get_task
1344
+ ##
1345
+ # RPC-specific configuration for `update_task`
1346
+ # @return [::Gapic::Config::Method]
1347
+ #
1348
+ attr_reader :update_task
1349
+ ##
1350
+ # RPC-specific configuration for `list_tasks`
1351
+ # @return [::Gapic::Config::Method]
1352
+ #
1353
+ attr_reader :list_tasks
1354
+ ##
1355
+ # RPC-specific configuration for `get_task_tracking_info`
1356
+ # @return [::Gapic::Config::Method]
1357
+ #
1358
+ attr_reader :get_task_tracking_info
1359
+ ##
1360
+ # RPC-specific configuration for `list_delivery_vehicles`
1361
+ # @return [::Gapic::Config::Method]
1362
+ #
1363
+ attr_reader :list_delivery_vehicles
1364
+
1365
+ # @private
1366
+ def initialize parent_rpcs = nil
1367
+ create_delivery_vehicle_config = parent_rpcs.create_delivery_vehicle if parent_rpcs.respond_to? :create_delivery_vehicle
1368
+ @create_delivery_vehicle = ::Gapic::Config::Method.new create_delivery_vehicle_config
1369
+ get_delivery_vehicle_config = parent_rpcs.get_delivery_vehicle if parent_rpcs.respond_to? :get_delivery_vehicle
1370
+ @get_delivery_vehicle = ::Gapic::Config::Method.new get_delivery_vehicle_config
1371
+ update_delivery_vehicle_config = parent_rpcs.update_delivery_vehicle if parent_rpcs.respond_to? :update_delivery_vehicle
1372
+ @update_delivery_vehicle = ::Gapic::Config::Method.new update_delivery_vehicle_config
1373
+ batch_create_tasks_config = parent_rpcs.batch_create_tasks if parent_rpcs.respond_to? :batch_create_tasks
1374
+ @batch_create_tasks = ::Gapic::Config::Method.new batch_create_tasks_config
1375
+ create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task
1376
+ @create_task = ::Gapic::Config::Method.new create_task_config
1377
+ get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task
1378
+ @get_task = ::Gapic::Config::Method.new get_task_config
1379
+ update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task
1380
+ @update_task = ::Gapic::Config::Method.new update_task_config
1381
+ list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks
1382
+ @list_tasks = ::Gapic::Config::Method.new list_tasks_config
1383
+ get_task_tracking_info_config = parent_rpcs.get_task_tracking_info if parent_rpcs.respond_to? :get_task_tracking_info
1384
+ @get_task_tracking_info = ::Gapic::Config::Method.new get_task_tracking_info_config
1385
+ list_delivery_vehicles_config = parent_rpcs.list_delivery_vehicles if parent_rpcs.respond_to? :list_delivery_vehicles
1386
+ @list_delivery_vehicles = ::Gapic::Config::Method.new list_delivery_vehicles_config
1387
+
1388
+ yield self if block_given?
1389
+ end
1390
+ end
1391
+ end
1392
+ end
1393
+ end
1394
+ end
1395
+ end
1396
+ end
1397
+ end
1398
+ end
1399
+ end