google-maps-fleet_engine-v1 0.a → 0.2.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.
Files changed (52) 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/v1/rest.rb +38 -0
  6. data/lib/google/maps/fleet_engine/v1/trip_service/client.rb +1004 -0
  7. data/lib/google/maps/fleet_engine/v1/trip_service/credentials.rb +47 -0
  8. data/lib/google/maps/fleet_engine/v1/trip_service/paths.rb +50 -0
  9. data/lib/google/maps/fleet_engine/v1/trip_service/rest/client.rb +938 -0
  10. data/lib/google/maps/fleet_engine/v1/trip_service/rest/service_stub.rb +368 -0
  11. data/lib/google/maps/fleet_engine/v1/trip_service/rest.rb +52 -0
  12. data/lib/google/maps/fleet_engine/v1/trip_service.rb +55 -0
  13. data/lib/google/maps/fleet_engine/v1/vehicle_service/client.rb +1314 -0
  14. data/lib/google/maps/fleet_engine/v1/vehicle_service/credentials.rb +47 -0
  15. data/lib/google/maps/fleet_engine/v1/vehicle_service/paths.rb +50 -0
  16. data/lib/google/maps/fleet_engine/v1/vehicle_service/rest/client.rb +1240 -0
  17. data/lib/google/maps/fleet_engine/v1/vehicle_service/rest/service_stub.rb +427 -0
  18. data/lib/google/maps/fleet_engine/v1/vehicle_service/rest.rb +52 -0
  19. data/lib/google/maps/fleet_engine/v1/vehicle_service.rb +55 -0
  20. data/lib/google/maps/fleet_engine/v1/version.rb +8 -3
  21. data/lib/google/maps/fleet_engine/v1.rb +46 -0
  22. data/lib/google/maps/fleetengine/v1/fleetengine_pb.rb +63 -0
  23. data/lib/google/maps/fleetengine/v1/header_pb.rb +46 -0
  24. data/lib/google/maps/fleetengine/v1/traffic_pb.rb +44 -0
  25. data/lib/google/maps/fleetengine/v1/trip_api_pb.rb +66 -0
  26. data/lib/google/maps/fleetengine/v1/trip_api_services_pb.rb +53 -0
  27. data/lib/google/maps/fleetengine/v1/trips_pb.rb +61 -0
  28. data/lib/google/maps/fleetengine/v1/vehicle_api_pb.rb +80 -0
  29. data/lib/google/maps/fleetengine/v1/vehicle_api_services_pb.rb +103 -0
  30. data/lib/google/maps/fleetengine/v1/vehicles_pb.rb +64 -0
  31. data/lib/google-maps-fleet_engine-v1.rb +21 -0
  32. data/proto_docs/README.md +4 -0
  33. data/proto_docs/google/api/client.rb +399 -0
  34. data/proto_docs/google/api/field_behavior.rb +85 -0
  35. data/proto_docs/google/api/launch_stage.rb +71 -0
  36. data/proto_docs/google/api/resource.rb +222 -0
  37. data/proto_docs/google/api/routing.rb +459 -0
  38. data/proto_docs/google/geo/type/viewport.rb +70 -0
  39. data/proto_docs/google/maps/fleetengine/v1/fleetengine.rb +342 -0
  40. data/proto_docs/google/maps/fleetengine/v1/header.rb +111 -0
  41. data/proto_docs/google/maps/fleetengine/v1/traffic.rb +76 -0
  42. data/proto_docs/google/maps/fleetengine/v1/trip_api.rb +296 -0
  43. data/proto_docs/google/maps/fleetengine/v1/trips.rb +286 -0
  44. data/proto_docs/google/maps/fleetengine/v1/vehicle_api.rb +659 -0
  45. data/proto_docs/google/maps/fleetengine/v1/vehicles.rb +358 -0
  46. data/proto_docs/google/protobuf/duration.rb +98 -0
  47. data/proto_docs/google/protobuf/empty.rb +34 -0
  48. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  49. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  50. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  51. data/proto_docs/google/type/latlng.rb +38 -0
  52. metadata +119 -13
@@ -0,0 +1,938 @@
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/v1/trip_api_pb"
21
+ require "google/maps/fleet_engine/v1/trip_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Maps
25
+ module FleetEngine
26
+ module V1
27
+ module TripService
28
+ module Rest
29
+ ##
30
+ # REST client for the TripService service.
31
+ #
32
+ # Trip management service.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "fleetengine.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :trip_service_stub
45
+
46
+ ##
47
+ # Configure the TripService Client class.
48
+ #
49
+ # See {::Google::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all TripService clients
55
+ # ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Maps", "FleetEngine", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config.rpcs.create_trip.timeout = 15.0
76
+ default_config.rpcs.create_trip.retry_policy = {
77
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
78
+ }
79
+
80
+ default_config.rpcs.get_trip.timeout = 15.0
81
+ default_config.rpcs.get_trip.retry_policy = {
82
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
83
+ }
84
+
85
+ default_config.rpcs.search_trips.timeout = 15.0
86
+ default_config.rpcs.search_trips.retry_policy = {
87
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
88
+ }
89
+
90
+ default_config.rpcs.update_trip.timeout = 15.0
91
+ default_config.rpcs.update_trip.retry_policy = {
92
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
93
+ }
94
+
95
+ default_config
96
+ end
97
+ yield @configure if block_given?
98
+ @configure
99
+ end
100
+
101
+ ##
102
+ # Configure the TripService Client instance.
103
+ #
104
+ # The configuration is set to the derived mode, meaning that values can be changed,
105
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
106
+ # should be made on {Client.configure}.
107
+ #
108
+ # See {::Google::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration}
109
+ # for a description of the configuration fields.
110
+ #
111
+ # @yield [config] Configure the Client client.
112
+ # @yieldparam config [Client::Configuration]
113
+ #
114
+ # @return [Client::Configuration]
115
+ #
116
+ def configure
117
+ yield @config if block_given?
118
+ @config
119
+ end
120
+
121
+ ##
122
+ # The effective universe domain
123
+ #
124
+ # @return [String]
125
+ #
126
+ def universe_domain
127
+ @trip_service_stub.universe_domain
128
+ end
129
+
130
+ ##
131
+ # Create a new TripService REST client object.
132
+ #
133
+ # @example
134
+ #
135
+ # # Create a client using the default configuration
136
+ # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new
137
+ #
138
+ # # Create a client using a custom configuration
139
+ # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config|
140
+ # config.timeout = 10.0
141
+ # end
142
+ #
143
+ # @yield [config] Configure the TripService client.
144
+ # @yieldparam config [Client::Configuration]
145
+ #
146
+ def initialize
147
+ # Create the configuration object
148
+ @config = Configuration.new Client.configure
149
+
150
+ # Yield the configuration if needed
151
+ yield @config if block_given?
152
+
153
+ # Create credentials
154
+ credentials = @config.credentials
155
+ # Use self-signed JWT if the endpoint is unchanged from default,
156
+ # but only if the default endpoint does not have a region prefix.
157
+ enable_self_signed_jwt = @config.endpoint.nil? ||
158
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
159
+ !@config.endpoint.split(".").first.include?("-"))
160
+ credentials ||= Credentials.default scope: @config.scope,
161
+ enable_self_signed_jwt: enable_self_signed_jwt
162
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
163
+ credentials = Credentials.new credentials, scope: @config.scope
164
+ end
165
+
166
+ @quota_project_id = @config.quota_project
167
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
168
+
169
+ @trip_service_stub = ::Google::Maps::FleetEngine::V1::TripService::Rest::ServiceStub.new(
170
+ endpoint: @config.endpoint,
171
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
172
+ universe_domain: @config.universe_domain,
173
+ credentials: credentials
174
+ )
175
+ end
176
+
177
+ # Service calls
178
+
179
+ ##
180
+ # Creates a trip in the Fleet Engine and returns the new trip.
181
+ #
182
+ # @overload create_trip(request, options = nil)
183
+ # Pass arguments to `create_trip` via a request object, either of type
184
+ # {::Google::Maps::FleetEngine::V1::CreateTripRequest} or an equivalent Hash.
185
+ #
186
+ # @param request [::Google::Maps::FleetEngine::V1::CreateTripRequest, ::Hash]
187
+ # A request object representing the call parameters. Required. To specify no
188
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
189
+ # @param options [::Gapic::CallOptions, ::Hash]
190
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
191
+ #
192
+ # @overload create_trip(header: nil, parent: nil, trip_id: nil, trip: nil)
193
+ # Pass arguments to `create_trip` via keyword arguments. Note that at
194
+ # least one keyword argument is required. To specify no parameters, or to keep all
195
+ # the default parameter values, pass an empty Hash as a request object (see above).
196
+ #
197
+ # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash]
198
+ # The standard Fleet Engine request header.
199
+ # @param parent [::String]
200
+ # Required. Must be in the format `providers/{provider}`.
201
+ # The provider must be the Project ID (for example, `sample-cloud-project`)
202
+ # of the Google Cloud Project of which the service account making
203
+ # this call is a member.
204
+ # @param trip_id [::String]
205
+ # Required. Unique Trip ID.
206
+ # Subject to the following restrictions:
207
+ #
208
+ # * Must be a valid Unicode string.
209
+ # * Limited to a maximum length of 64 characters.
210
+ # * Normalized according to [Unicode Normalization Form C]
211
+ # (http://www.unicode.org/reports/tr15/).
212
+ # * May not contain any of the following ASCII characters: '/', ':', '?',
213
+ # ',', or '#'.
214
+ # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash]
215
+ # Required. Trip entity to create.
216
+ #
217
+ # When creating a Trip, the following fields are required:
218
+ #
219
+ # * `trip_type`
220
+ # * `pickup_point`
221
+ #
222
+ # The following fields are used if you provide them:
223
+ #
224
+ # * `number_of_passengers`
225
+ # * `vehicle_id`
226
+ # * `dropoff_point`
227
+ # * `intermediate_destinations`
228
+ # * `vehicle_waypoints`
229
+ #
230
+ # All other Trip fields are ignored. For example, all trips start with a
231
+ # `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
232
+ # the creation request.
233
+ #
234
+ # Only `EXCLUSIVE` trips support `intermediate_destinations`.
235
+ #
236
+ # When `vehicle_id` is set for a shared trip, you must supply
237
+ # the list of `Trip.vehicle_waypoints` to specify the order of the remaining
238
+ # waypoints for the vehicle, otherwise the waypoint order will be
239
+ # undetermined.
240
+ #
241
+ # When you specify `Trip.vehicle_waypoints`, the list must contain all
242
+ # the remaining waypoints of the vehicle's trips, with no extra waypoints.
243
+ # You must order these waypoints such that for a given trip, the pickup
244
+ # point is before intermediate destinations, and all intermediate
245
+ # destinations come before the drop-off point. An `EXCLUSIVE` trip's
246
+ # waypoints must not interleave with any other trips.
247
+ #
248
+ # The `trip_id`, `waypoint_type` and `location` fields are used, and all
249
+ # other TripWaypoint fields in `vehicle_waypoints` are ignored.
250
+ # @yield [result, operation] Access the result along with the TransportOperation object
251
+ # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip]
252
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
253
+ #
254
+ # @return [::Google::Maps::FleetEngine::V1::Trip]
255
+ #
256
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
257
+ #
258
+ # @example Basic example
259
+ # require "google/maps/fleet_engine/v1"
260
+ #
261
+ # # Create a client object. The client can be reused for multiple calls.
262
+ # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new
263
+ #
264
+ # # Create a request. To set request fields, pass in keyword arguments.
265
+ # request = Google::Maps::FleetEngine::V1::CreateTripRequest.new
266
+ #
267
+ # # Call the create_trip method.
268
+ # result = client.create_trip request
269
+ #
270
+ # # The returned object is of type Google::Maps::FleetEngine::V1::Trip.
271
+ # p result
272
+ #
273
+ def create_trip request, options = nil
274
+ raise ::ArgumentError, "request must be provided" if request.nil?
275
+
276
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::CreateTripRequest
277
+
278
+ # Converts hash and nil to an options object
279
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
280
+
281
+ # Customize the options with defaults
282
+ call_metadata = @config.rpcs.create_trip.metadata.to_h
283
+
284
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
285
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
286
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
287
+ gapic_version: ::Google::Maps::FleetEngine::V1::VERSION,
288
+ transports_version_send: [:rest]
289
+
290
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
291
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
292
+
293
+ options.apply_defaults timeout: @config.rpcs.create_trip.timeout,
294
+ metadata: call_metadata,
295
+ retry_policy: @config.rpcs.create_trip.retry_policy
296
+
297
+ options.apply_defaults timeout: @config.timeout,
298
+ metadata: @config.metadata,
299
+ retry_policy: @config.retry_policy
300
+
301
+ @trip_service_stub.create_trip request, options do |result, operation|
302
+ yield result, operation if block_given?
303
+ return result
304
+ end
305
+ rescue ::Gapic::Rest::Error => e
306
+ raise ::Google::Cloud::Error.from_error(e)
307
+ end
308
+
309
+ ##
310
+ # Get information about a single trip.
311
+ #
312
+ # @overload get_trip(request, options = nil)
313
+ # Pass arguments to `get_trip` via a request object, either of type
314
+ # {::Google::Maps::FleetEngine::V1::GetTripRequest} or an equivalent Hash.
315
+ #
316
+ # @param request [::Google::Maps::FleetEngine::V1::GetTripRequest, ::Hash]
317
+ # A request object representing the call parameters. Required. To specify no
318
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
319
+ # @param options [::Gapic::CallOptions, ::Hash]
320
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
321
+ #
322
+ # @overload get_trip(header: nil, name: nil, view: nil, current_route_segment_version: nil, remaining_waypoints_version: nil, route_format_type: nil, current_route_segment_traffic_version: nil, remaining_waypoints_route_version: nil)
323
+ # Pass arguments to `get_trip` via keyword arguments. Note that at
324
+ # least one keyword argument is required. To specify no parameters, or to keep all
325
+ # the default parameter values, pass an empty Hash as a request object (see above).
326
+ #
327
+ # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash]
328
+ # The standard Fleet Engine request header.
329
+ # @param name [::String]
330
+ # Required. Must be in the format `providers/{provider}/trips/{trip}`.
331
+ # The provider must be the Project ID (for example, `sample-cloud-project`)
332
+ # of the Google Cloud Project of which the service account making
333
+ # this call is a member.
334
+ # @param view [::Google::Maps::FleetEngine::V1::TripView]
335
+ # The subset of Trip fields that should be returned and their interpretation.
336
+ # @param current_route_segment_version [::Google::Protobuf::Timestamp, ::Hash]
337
+ # Indicates the minimum timestamp (exclusive) for which `Trip.route` or
338
+ # `Trip.current_route_segment` data are retrieved. If route data are
339
+ # unchanged since this timestamp, the route field is not set in the response.
340
+ # If a minimum is unspecified, the route data are always retrieved.
341
+ # @param remaining_waypoints_version [::Google::Protobuf::Timestamp, ::Hash]
342
+ # Indicates the minimum timestamp (exclusive) for which
343
+ # `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
344
+ # timestamp, the `remaining_waypoints` are not set in the response. If this
345
+ # field is unspecified, `remaining_waypoints` is always retrieved.
346
+ # @param route_format_type [::Google::Maps::FleetEngine::V1::PolylineFormatType]
347
+ # The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
348
+ # or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
349
+ # is `LAT_LNG_LIST_TYPE`.
350
+ # @param current_route_segment_traffic_version [::Google::Protobuf::Timestamp, ::Hash]
351
+ # Indicates the minimum timestamp (exclusive) for which
352
+ # `Trip.current_route_segment_traffic` is retrieved. If traffic data are
353
+ # unchanged since this timestamp, the `current_route_segment_traffic` field
354
+ # is not set in the response. If a minimum is unspecified, the traffic data
355
+ # are always retrieved. Note that traffic is only available for On-Demand
356
+ # Rides and Deliveries Solution customers.
357
+ # @param remaining_waypoints_route_version [::Google::Protobuf::Timestamp, ::Hash]
358
+ # Indicates the minimum timestamp (exclusive) for which
359
+ # `Trip.remaining_waypoints.traffic_to_waypoint` and
360
+ # `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
361
+ # unchanged since this timestamp, the fields above are
362
+ # not set in the response. If `remaining_waypoints_route_version` is
363
+ # unspecified, traffic and path are always retrieved.
364
+ # @yield [result, operation] Access the result along with the TransportOperation object
365
+ # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip]
366
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
367
+ #
368
+ # @return [::Google::Maps::FleetEngine::V1::Trip]
369
+ #
370
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
371
+ #
372
+ # @example Basic example
373
+ # require "google/maps/fleet_engine/v1"
374
+ #
375
+ # # Create a client object. The client can be reused for multiple calls.
376
+ # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new
377
+ #
378
+ # # Create a request. To set request fields, pass in keyword arguments.
379
+ # request = Google::Maps::FleetEngine::V1::GetTripRequest.new
380
+ #
381
+ # # Call the get_trip method.
382
+ # result = client.get_trip request
383
+ #
384
+ # # The returned object is of type Google::Maps::FleetEngine::V1::Trip.
385
+ # p result
386
+ #
387
+ def get_trip request, options = nil
388
+ raise ::ArgumentError, "request must be provided" if request.nil?
389
+
390
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::GetTripRequest
391
+
392
+ # Converts hash and nil to an options object
393
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
394
+
395
+ # Customize the options with defaults
396
+ call_metadata = @config.rpcs.get_trip.metadata.to_h
397
+
398
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
399
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
400
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
401
+ gapic_version: ::Google::Maps::FleetEngine::V1::VERSION,
402
+ transports_version_send: [:rest]
403
+
404
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
405
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
406
+
407
+ options.apply_defaults timeout: @config.rpcs.get_trip.timeout,
408
+ metadata: call_metadata,
409
+ retry_policy: @config.rpcs.get_trip.retry_policy
410
+
411
+ options.apply_defaults timeout: @config.timeout,
412
+ metadata: @config.metadata,
413
+ retry_policy: @config.retry_policy
414
+
415
+ @trip_service_stub.get_trip request, options do |result, operation|
416
+ yield result, operation if block_given?
417
+ return result
418
+ end
419
+ rescue ::Gapic::Rest::Error => e
420
+ raise ::Google::Cloud::Error.from_error(e)
421
+ end
422
+
423
+ ##
424
+ # Report billable trip usage.
425
+ #
426
+ # @overload report_billable_trip(request, options = nil)
427
+ # Pass arguments to `report_billable_trip` via a request object, either of type
428
+ # {::Google::Maps::FleetEngine::V1::ReportBillableTripRequest} or an equivalent Hash.
429
+ #
430
+ # @param request [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest, ::Hash]
431
+ # A request object representing the call parameters. Required. To specify no
432
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
433
+ # @param options [::Gapic::CallOptions, ::Hash]
434
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
435
+ #
436
+ # @overload report_billable_trip(name: nil, country_code: nil, platform: nil, related_ids: nil, solution_type: nil)
437
+ # Pass arguments to `report_billable_trip` via keyword arguments. Note that at
438
+ # least one keyword argument is required. To specify no parameters, or to keep all
439
+ # the default parameter values, pass an empty Hash as a request object (see above).
440
+ #
441
+ # @param name [::String]
442
+ # Required. Must be in the format
443
+ # `providers/{provider}/billableTrips/{billable_trip}`. The
444
+ # provider must be the Project ID (for example, `sample-cloud-project`) of
445
+ # the Google Cloud Project of which the service account making this call is a
446
+ # member.
447
+ # @param country_code [::String]
448
+ # Required. Two letter country code of the country where the trip takes
449
+ # place. Price is defined according to country code.
450
+ # @param platform [::Google::Maps::FleetEngine::V1::BillingPlatformIdentifier]
451
+ # The platform upon which the request was issued.
452
+ # @param related_ids [::Array<::String>]
453
+ # The identifiers that are directly related to the trip being reported. These
454
+ # are usually IDs (for example, session IDs) of pre-booking operations done
455
+ # before the trip ID is available. The number of `related_ids` is
456
+ # limited to 50.
457
+ # @param solution_type [::Google::Maps::FleetEngine::V1::ReportBillableTripRequest::SolutionType]
458
+ # The type of GMP product solution (for example,
459
+ # `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
460
+ # @yield [result, operation] Access the result along with the TransportOperation object
461
+ # @yieldparam result [::Google::Protobuf::Empty]
462
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
463
+ #
464
+ # @return [::Google::Protobuf::Empty]
465
+ #
466
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
467
+ #
468
+ # @example Basic example
469
+ # require "google/maps/fleet_engine/v1"
470
+ #
471
+ # # Create a client object. The client can be reused for multiple calls.
472
+ # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new
473
+ #
474
+ # # Create a request. To set request fields, pass in keyword arguments.
475
+ # request = Google::Maps::FleetEngine::V1::ReportBillableTripRequest.new
476
+ #
477
+ # # Call the report_billable_trip method.
478
+ # result = client.report_billable_trip request
479
+ #
480
+ # # The returned object is of type Google::Protobuf::Empty.
481
+ # p result
482
+ #
483
+ def report_billable_trip request, options = nil
484
+ raise ::ArgumentError, "request must be provided" if request.nil?
485
+
486
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::ReportBillableTripRequest
487
+
488
+ # Converts hash and nil to an options object
489
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
490
+
491
+ # Customize the options with defaults
492
+ call_metadata = @config.rpcs.report_billable_trip.metadata.to_h
493
+
494
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
495
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
496
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
497
+ gapic_version: ::Google::Maps::FleetEngine::V1::VERSION,
498
+ transports_version_send: [:rest]
499
+
500
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
501
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
502
+
503
+ options.apply_defaults timeout: @config.rpcs.report_billable_trip.timeout,
504
+ metadata: call_metadata,
505
+ retry_policy: @config.rpcs.report_billable_trip.retry_policy
506
+
507
+ options.apply_defaults timeout: @config.timeout,
508
+ metadata: @config.metadata,
509
+ retry_policy: @config.retry_policy
510
+
511
+ @trip_service_stub.report_billable_trip request, options do |result, operation|
512
+ yield result, operation if block_given?
513
+ return result
514
+ end
515
+ rescue ::Gapic::Rest::Error => e
516
+ raise ::Google::Cloud::Error.from_error(e)
517
+ end
518
+
519
+ ##
520
+ # Get all the trips for a specific vehicle.
521
+ #
522
+ # @overload search_trips(request, options = nil)
523
+ # Pass arguments to `search_trips` via a request object, either of type
524
+ # {::Google::Maps::FleetEngine::V1::SearchTripsRequest} or an equivalent Hash.
525
+ #
526
+ # @param request [::Google::Maps::FleetEngine::V1::SearchTripsRequest, ::Hash]
527
+ # A request object representing the call parameters. Required. To specify no
528
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
529
+ # @param options [::Gapic::CallOptions, ::Hash]
530
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
531
+ #
532
+ # @overload search_trips(header: nil, parent: nil, vehicle_id: nil, active_trips_only: nil, page_size: nil, page_token: nil, minimum_staleness: nil)
533
+ # Pass arguments to `search_trips` via keyword arguments. Note that at
534
+ # least one keyword argument is required. To specify no parameters, or to keep all
535
+ # the default parameter values, pass an empty Hash as a request object (see above).
536
+ #
537
+ # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash]
538
+ # The standard Fleet Engine request header.
539
+ # @param parent [::String]
540
+ # Required. Must be in the format `providers/{provider}`.
541
+ # The provider must be the Project ID (for example, `sample-cloud-project`)
542
+ # of the Google Cloud Project of which the service account making
543
+ # this call is a member.
544
+ # @param vehicle_id [::String]
545
+ # The vehicle associated with the trips in the request. If unspecified, the
546
+ # returned trips do not contain:
547
+ #
548
+ # * `current_route_segment`
549
+ # * `remaining_waypoints`
550
+ # * `remaining_distance_meters`
551
+ # * `eta_to_first_waypoint`
552
+ # @param active_trips_only [::Boolean]
553
+ # If set to true, the response includes Trips that influence a driver's
554
+ # route.
555
+ # @param page_size [::Integer]
556
+ # If not set, the server decides the number of results to return.
557
+ # @param page_token [::String]
558
+ # Set this to a value previously returned in the `SearchTripsResponse` to
559
+ # continue from previous results.
560
+ # @param minimum_staleness [::Google::Protobuf::Duration, ::Hash]
561
+ # If specified, returns the trips that have not been updated after the time
562
+ # `(current - minimum_staleness)`.
563
+ # @yield [result, operation] Access the result along with the TransportOperation object
564
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>]
565
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
566
+ #
567
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Maps::FleetEngine::V1::Trip>]
568
+ #
569
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
570
+ #
571
+ # @example Basic example
572
+ # require "google/maps/fleet_engine/v1"
573
+ #
574
+ # # Create a client object. The client can be reused for multiple calls.
575
+ # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new
576
+ #
577
+ # # Create a request. To set request fields, pass in keyword arguments.
578
+ # request = Google::Maps::FleetEngine::V1::SearchTripsRequest.new
579
+ #
580
+ # # Call the search_trips method.
581
+ # result = client.search_trips request
582
+ #
583
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
584
+ # # over elements, and API calls will be issued to fetch pages as needed.
585
+ # result.each do |item|
586
+ # # Each element is of type ::Google::Maps::FleetEngine::V1::Trip.
587
+ # p item
588
+ # end
589
+ #
590
+ def search_trips request, options = nil
591
+ raise ::ArgumentError, "request must be provided" if request.nil?
592
+
593
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::SearchTripsRequest
594
+
595
+ # Converts hash and nil to an options object
596
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
597
+
598
+ # Customize the options with defaults
599
+ call_metadata = @config.rpcs.search_trips.metadata.to_h
600
+
601
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
602
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
603
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
604
+ gapic_version: ::Google::Maps::FleetEngine::V1::VERSION,
605
+ transports_version_send: [:rest]
606
+
607
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
608
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
609
+
610
+ options.apply_defaults timeout: @config.rpcs.search_trips.timeout,
611
+ metadata: call_metadata,
612
+ retry_policy: @config.rpcs.search_trips.retry_policy
613
+
614
+ options.apply_defaults timeout: @config.timeout,
615
+ metadata: @config.metadata,
616
+ retry_policy: @config.retry_policy
617
+
618
+ @trip_service_stub.search_trips request, options do |result, operation|
619
+ result = ::Gapic::Rest::PagedEnumerable.new @trip_service_stub, :search_trips, "trips", request, result, options
620
+ yield result, operation if block_given?
621
+ return result
622
+ end
623
+ rescue ::Gapic::Rest::Error => e
624
+ raise ::Google::Cloud::Error.from_error(e)
625
+ end
626
+
627
+ ##
628
+ # Updates trip data.
629
+ #
630
+ # @overload update_trip(request, options = nil)
631
+ # Pass arguments to `update_trip` via a request object, either of type
632
+ # {::Google::Maps::FleetEngine::V1::UpdateTripRequest} or an equivalent Hash.
633
+ #
634
+ # @param request [::Google::Maps::FleetEngine::V1::UpdateTripRequest, ::Hash]
635
+ # A request object representing the call parameters. Required. To specify no
636
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
637
+ # @param options [::Gapic::CallOptions, ::Hash]
638
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
639
+ #
640
+ # @overload update_trip(header: nil, name: nil, trip: nil, update_mask: nil)
641
+ # Pass arguments to `update_trip` via keyword arguments. Note that at
642
+ # least one keyword argument is required. To specify no parameters, or to keep all
643
+ # the default parameter values, pass an empty Hash as a request object (see above).
644
+ #
645
+ # @param header [::Google::Maps::FleetEngine::V1::RequestHeader, ::Hash]
646
+ # The standard Fleet Engine request header.
647
+ # @param name [::String]
648
+ # Required. Must be in the format
649
+ # `providers/{provider}/trips/{trip}`. The provider must
650
+ # be the Project ID (for example, `sample-consumer-project`) of the Google
651
+ # Cloud Project of which the service account making this call is a member.
652
+ # @param trip [::Google::Maps::FleetEngine::V1::Trip, ::Hash]
653
+ # Required. The Trip associated with the update.
654
+ #
655
+ # The following fields are maintained by the Fleet Engine. Do not update
656
+ # them using Trip.update.
657
+ #
658
+ # * `current_route_segment`
659
+ # * `current_route_segment_end_point`
660
+ # * `current_route_segment_traffic`
661
+ # * `current_route_segment_traffic_version`
662
+ # * `current_route_segment_version`
663
+ # * `dropoff_time`
664
+ # * `eta_to_next_waypoint`
665
+ # * `intermediate_destinations_version`
666
+ # * `last_location`
667
+ # * `name`
668
+ # * `number_of_passengers`
669
+ # * `pickup_time`
670
+ # * `remaining_distance_meters`
671
+ # * `remaining_time_to_first_waypoint`
672
+ # * `remaining_waypoints`
673
+ # * `remaining_waypoints_version`
674
+ # * `route`
675
+ #
676
+ # When you update the `Trip.vehicle_id` for a shared trip, you must supply
677
+ # the list of `Trip.vehicle_waypoints` to specify the order of the remaining
678
+ # waypoints, otherwise the order will be undetermined.
679
+ #
680
+ # When you specify `Trip.vehicle_waypoints`, the list must contain all
681
+ # the remaining waypoints of the vehicle's trips, with no extra waypoints.
682
+ # You must order these waypoints such that for a given trip, the pickup
683
+ # point is before intermediate destinations, and all intermediate
684
+ # destinations come before the drop-off point. An `EXCLUSIVE` trip's
685
+ # waypoints must not interleave with any other trips.
686
+ # The `trip_id`, `waypoint_type` and `location` fields are used, and all
687
+ # other TripWaypoint fields in `vehicle_waypoints` are ignored.
688
+ #
689
+ # To avoid a race condition for trips with multiple destinations, you
690
+ # should provide `Trip.intermediate_destinations_version` when updating
691
+ # the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
692
+ # `Trip.intermediate_destinations_version` passed must be consistent with
693
+ # Fleet Engine's version. If it isn't, the request fails.
694
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
695
+ # Required. The field mask indicating which fields in Trip to update.
696
+ # The `update_mask` must contain at least one field.
697
+ # @yield [result, operation] Access the result along with the TransportOperation object
698
+ # @yieldparam result [::Google::Maps::FleetEngine::V1::Trip]
699
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
700
+ #
701
+ # @return [::Google::Maps::FleetEngine::V1::Trip]
702
+ #
703
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
704
+ #
705
+ # @example Basic example
706
+ # require "google/maps/fleet_engine/v1"
707
+ #
708
+ # # Create a client object. The client can be reused for multiple calls.
709
+ # client = Google::Maps::FleetEngine::V1::TripService::Rest::Client.new
710
+ #
711
+ # # Create a request. To set request fields, pass in keyword arguments.
712
+ # request = Google::Maps::FleetEngine::V1::UpdateTripRequest.new
713
+ #
714
+ # # Call the update_trip method.
715
+ # result = client.update_trip request
716
+ #
717
+ # # The returned object is of type Google::Maps::FleetEngine::V1::Trip.
718
+ # p result
719
+ #
720
+ def update_trip request, options = nil
721
+ raise ::ArgumentError, "request must be provided" if request.nil?
722
+
723
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Maps::FleetEngine::V1::UpdateTripRequest
724
+
725
+ # Converts hash and nil to an options object
726
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
727
+
728
+ # Customize the options with defaults
729
+ call_metadata = @config.rpcs.update_trip.metadata.to_h
730
+
731
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
732
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
733
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
734
+ gapic_version: ::Google::Maps::FleetEngine::V1::VERSION,
735
+ transports_version_send: [:rest]
736
+
737
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
738
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
739
+
740
+ options.apply_defaults timeout: @config.rpcs.update_trip.timeout,
741
+ metadata: call_metadata,
742
+ retry_policy: @config.rpcs.update_trip.retry_policy
743
+
744
+ options.apply_defaults timeout: @config.timeout,
745
+ metadata: @config.metadata,
746
+ retry_policy: @config.retry_policy
747
+
748
+ @trip_service_stub.update_trip request, options do |result, operation|
749
+ yield result, operation if block_given?
750
+ return result
751
+ end
752
+ rescue ::Gapic::Rest::Error => e
753
+ raise ::Google::Cloud::Error.from_error(e)
754
+ end
755
+
756
+ ##
757
+ # Configuration class for the TripService REST API.
758
+ #
759
+ # This class represents the configuration for TripService REST,
760
+ # providing control over timeouts, retry behavior, logging, transport
761
+ # parameters, and other low-level controls. Certain parameters can also be
762
+ # applied individually to specific RPCs. See
763
+ # {::Google::Maps::FleetEngine::V1::TripService::Rest::Client::Configuration::Rpcs}
764
+ # for a list of RPCs that can be configured independently.
765
+ #
766
+ # Configuration can be applied globally to all clients, or to a single client
767
+ # on construction.
768
+ #
769
+ # @example
770
+ #
771
+ # # Modify the global config, setting the timeout for
772
+ # # create_trip to 20 seconds,
773
+ # # and all remaining timeouts to 10 seconds.
774
+ # ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.configure do |config|
775
+ # config.timeout = 10.0
776
+ # config.rpcs.create_trip.timeout = 20.0
777
+ # end
778
+ #
779
+ # # Apply the above configuration only to a new client.
780
+ # client = ::Google::Maps::FleetEngine::V1::TripService::Rest::Client.new do |config|
781
+ # config.timeout = 10.0
782
+ # config.rpcs.create_trip.timeout = 20.0
783
+ # end
784
+ #
785
+ # @!attribute [rw] endpoint
786
+ # A custom service endpoint, as a hostname or hostname:port. The default is
787
+ # nil, indicating to use the default endpoint in the current universe domain.
788
+ # @return [::String,nil]
789
+ # @!attribute [rw] credentials
790
+ # Credentials to send with calls. You may provide any of the following types:
791
+ # * (`String`) The path to a service account key file in JSON format
792
+ # * (`Hash`) A service account key as a Hash
793
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
794
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
795
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
796
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
797
+ # * (`nil`) indicating no credentials
798
+ # @return [::Object]
799
+ # @!attribute [rw] scope
800
+ # The OAuth scopes
801
+ # @return [::Array<::String>]
802
+ # @!attribute [rw] lib_name
803
+ # The library name as recorded in instrumentation and logging
804
+ # @return [::String]
805
+ # @!attribute [rw] lib_version
806
+ # The library version as recorded in instrumentation and logging
807
+ # @return [::String]
808
+ # @!attribute [rw] timeout
809
+ # The call timeout in seconds.
810
+ # @return [::Numeric]
811
+ # @!attribute [rw] metadata
812
+ # Additional headers to be sent with the call.
813
+ # @return [::Hash{::Symbol=>::String}]
814
+ # @!attribute [rw] retry_policy
815
+ # The retry policy. The value is a hash with the following keys:
816
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
817
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
818
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
819
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
820
+ # trigger a retry.
821
+ # @return [::Hash]
822
+ # @!attribute [rw] quota_project
823
+ # A separate project against which to charge quota.
824
+ # @return [::String]
825
+ # @!attribute [rw] universe_domain
826
+ # The universe domain within which to make requests. This determines the
827
+ # default endpoint URL. The default value of nil uses the environment
828
+ # universe (usually the default "googleapis.com" universe).
829
+ # @return [::String,nil]
830
+ #
831
+ class Configuration
832
+ extend ::Gapic::Config
833
+
834
+ # @private
835
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
836
+ DEFAULT_ENDPOINT = "fleetengine.googleapis.com"
837
+
838
+ config_attr :endpoint, nil, ::String, nil
839
+ config_attr :credentials, nil do |value|
840
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
841
+ allowed.any? { |klass| klass === value }
842
+ end
843
+ config_attr :scope, nil, ::String, ::Array, nil
844
+ config_attr :lib_name, nil, ::String, nil
845
+ config_attr :lib_version, nil, ::String, nil
846
+ config_attr :timeout, nil, ::Numeric, nil
847
+ config_attr :metadata, nil, ::Hash, nil
848
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
849
+ config_attr :quota_project, nil, ::String, nil
850
+ config_attr :universe_domain, nil, ::String, nil
851
+
852
+ # @private
853
+ def initialize parent_config = nil
854
+ @parent_config = parent_config unless parent_config.nil?
855
+
856
+ yield self if block_given?
857
+ end
858
+
859
+ ##
860
+ # Configurations for individual RPCs
861
+ # @return [Rpcs]
862
+ #
863
+ def rpcs
864
+ @rpcs ||= begin
865
+ parent_rpcs = nil
866
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
867
+ Rpcs.new parent_rpcs
868
+ end
869
+ end
870
+
871
+ ##
872
+ # Configuration RPC class for the TripService API.
873
+ #
874
+ # Includes fields providing the configuration for each RPC in this service.
875
+ # Each configuration object is of type `Gapic::Config::Method` and includes
876
+ # the following configuration fields:
877
+ #
878
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
879
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
880
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
881
+ # include the following keys:
882
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
883
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
884
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
885
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
886
+ # trigger a retry.
887
+ #
888
+ class Rpcs
889
+ ##
890
+ # RPC-specific configuration for `create_trip`
891
+ # @return [::Gapic::Config::Method]
892
+ #
893
+ attr_reader :create_trip
894
+ ##
895
+ # RPC-specific configuration for `get_trip`
896
+ # @return [::Gapic::Config::Method]
897
+ #
898
+ attr_reader :get_trip
899
+ ##
900
+ # RPC-specific configuration for `report_billable_trip`
901
+ # @return [::Gapic::Config::Method]
902
+ #
903
+ attr_reader :report_billable_trip
904
+ ##
905
+ # RPC-specific configuration for `search_trips`
906
+ # @return [::Gapic::Config::Method]
907
+ #
908
+ attr_reader :search_trips
909
+ ##
910
+ # RPC-specific configuration for `update_trip`
911
+ # @return [::Gapic::Config::Method]
912
+ #
913
+ attr_reader :update_trip
914
+
915
+ # @private
916
+ def initialize parent_rpcs = nil
917
+ create_trip_config = parent_rpcs.create_trip if parent_rpcs.respond_to? :create_trip
918
+ @create_trip = ::Gapic::Config::Method.new create_trip_config
919
+ get_trip_config = parent_rpcs.get_trip if parent_rpcs.respond_to? :get_trip
920
+ @get_trip = ::Gapic::Config::Method.new get_trip_config
921
+ report_billable_trip_config = parent_rpcs.report_billable_trip if parent_rpcs.respond_to? :report_billable_trip
922
+ @report_billable_trip = ::Gapic::Config::Method.new report_billable_trip_config
923
+ search_trips_config = parent_rpcs.search_trips if parent_rpcs.respond_to? :search_trips
924
+ @search_trips = ::Gapic::Config::Method.new search_trips_config
925
+ update_trip_config = parent_rpcs.update_trip if parent_rpcs.respond_to? :update_trip
926
+ @update_trip = ::Gapic::Config::Method.new update_trip_config
927
+
928
+ yield self if block_given?
929
+ end
930
+ end
931
+ end
932
+ end
933
+ end
934
+ end
935
+ end
936
+ end
937
+ end
938
+ end