google-maps-fleet_engine-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 (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,659 @@
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
+
20
+ module Google
21
+ module Maps
22
+ module FleetEngine
23
+ module V1
24
+ # `CreateVehicle` request message.
25
+ # @!attribute [rw] header
26
+ # @return [::Google::Maps::FleetEngine::V1::RequestHeader]
27
+ # The standard Fleet Engine request header.
28
+ # @!attribute [rw] parent
29
+ # @return [::String]
30
+ # Required. Must be in the format `providers/{provider}`.
31
+ # The provider must be the Project ID (for example, `sample-cloud-project`)
32
+ # of the Google Cloud Project of which the service account making
33
+ # this call is a member.
34
+ # @!attribute [rw] vehicle_id
35
+ # @return [::String]
36
+ # Required. Unique Vehicle ID.
37
+ # Subject to the following restrictions:
38
+ #
39
+ # * Must be a valid Unicode string.
40
+ # * Limited to a maximum length of 64 characters.
41
+ # * Normalized according to [Unicode Normalization Form C]
42
+ # (http://www.unicode.org/reports/tr15/).
43
+ # * May not contain any of the following ASCII characters: '/', ':', '?',
44
+ # ',', or '#'.
45
+ # @!attribute [rw] vehicle
46
+ # @return [::Google::Maps::FleetEngine::V1::Vehicle]
47
+ # Required. The Vehicle entity to create. When creating a Vehicle, the
48
+ # following fields are required:
49
+ #
50
+ # * `vehicleState`
51
+ # * `supportedTripTypes`
52
+ # * `maximumCapacity`
53
+ # * `vehicleType`
54
+ #
55
+ # When creating a Vehicle, the following fields are ignored:
56
+ #
57
+ # * `name`
58
+ # * `currentTrips`
59
+ # * `availableCapacity`
60
+ # * `current_route_segment`
61
+ # * `current_route_segment_end_point`
62
+ # * `current_route_segment_version`
63
+ # * `current_route_segment_traffic`
64
+ # * `route`
65
+ # * `waypoints`
66
+ # * `waypoints_version`
67
+ # * `remaining_distance_meters`
68
+ # * `remaining_time_seconds`
69
+ # * `eta_to_next_waypoint`
70
+ # * `navigation_status`
71
+ #
72
+ # All other fields are optional and used if provided.
73
+ class CreateVehicleRequest
74
+ include ::Google::Protobuf::MessageExts
75
+ extend ::Google::Protobuf::MessageExts::ClassMethods
76
+ end
77
+
78
+ # `GetVehicle` request message.
79
+ # @!attribute [rw] header
80
+ # @return [::Google::Maps::FleetEngine::V1::RequestHeader]
81
+ # The standard Fleet Engine request header.
82
+ # @!attribute [rw] name
83
+ # @return [::String]
84
+ # Required. Must be in the format
85
+ # `providers/{provider}/vehicles/{vehicle}`.
86
+ # The provider must be the Project ID (for example, `sample-cloud-project`)
87
+ # of the Google Cloud Project of which the service account making
88
+ # this call is a member.
89
+ # @!attribute [rw] current_route_segment_version
90
+ # @return [::Google::Protobuf::Timestamp]
91
+ # Indicates the minimum timestamp (exclusive) for which
92
+ # `Vehicle.current_route_segment` is retrieved.
93
+ # If the route is unchanged since this timestamp, the `current_route_segment`
94
+ # field is not set in the response. If a minimum is unspecified, the
95
+ # `current_route_segment` is always retrieved.
96
+ # @!attribute [rw] waypoints_version
97
+ # @return [::Google::Protobuf::Timestamp]
98
+ # Indicates the minimum timestamp (exclusive) for which `Vehicle.waypoints`
99
+ # data is retrieved. If the waypoints are unchanged since this timestamp, the
100
+ # `vehicle.waypoints` data is not set in the response. If this field is
101
+ # unspecified, `vehicle.waypoints` is always retrieved.
102
+ class GetVehicleRequest
103
+ include ::Google::Protobuf::MessageExts
104
+ extend ::Google::Protobuf::MessageExts::ClassMethods
105
+ end
106
+
107
+ # `UpdateVehicle request message.
108
+ # @!attribute [rw] header
109
+ # @return [::Google::Maps::FleetEngine::V1::RequestHeader]
110
+ # The standard Fleet Engine request header.
111
+ # @!attribute [rw] name
112
+ # @return [::String]
113
+ # Required. Must be in the format
114
+ # `providers/{provider}/vehicles/{vehicle}`.
115
+ # The \\{provider} must be the Project ID (for example, `sample-cloud-project`)
116
+ # of the Google Cloud Project of which the service account making
117
+ # this call is a member.
118
+ # @!attribute [rw] vehicle
119
+ # @return [::Google::Maps::FleetEngine::V1::Vehicle]
120
+ # Required. The `Vehicle` entity values to apply. When updating a `Vehicle`,
121
+ # the following fields may not be updated as they are managed by the
122
+ # server.
123
+ #
124
+ # * `available_capacity`
125
+ # * `current_route_segment_version`
126
+ # * `current_trips`
127
+ # * `name`
128
+ # * `waypoints_version`
129
+ #
130
+ # If the `attributes` field is updated, **all** the vehicle's attributes are
131
+ # replaced with the attributes provided in the request. If you want to update
132
+ # only some attributes, see the `UpdateVehicleAttributes` method.
133
+ #
134
+ # Likewise, the `waypoints` field can be updated, but must contain all the
135
+ # waypoints currently on the vehicle, and no other waypoints.
136
+ # @!attribute [rw] update_mask
137
+ # @return [::Google::Protobuf::FieldMask]
138
+ # Required. A field mask indicating which fields of the `Vehicle` to update.
139
+ # At least one field name must be provided.
140
+ class UpdateVehicleRequest
141
+ include ::Google::Protobuf::MessageExts
142
+ extend ::Google::Protobuf::MessageExts::ClassMethods
143
+ end
144
+
145
+ # `UpdateVehicleAttributes` request message.
146
+ # @!attribute [rw] header
147
+ # @return [::Google::Maps::FleetEngine::V1::RequestHeader]
148
+ # The standard Fleet Engine request header.
149
+ # @!attribute [rw] name
150
+ # @return [::String]
151
+ # Required. Must be in the format `providers/{provider}/vehicles/{vehicle}`.
152
+ # The provider must be the Project ID (for example, `sample-cloud-project`)
153
+ # of the Google Cloud Project of which the service account making
154
+ # this call is a member.
155
+ # @!attribute [rw] attributes
156
+ # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>]
157
+ # Required. The vehicle attributes to update. Unmentioned attributes are not
158
+ # altered or removed.
159
+ class UpdateVehicleAttributesRequest
160
+ include ::Google::Protobuf::MessageExts
161
+ extend ::Google::Protobuf::MessageExts::ClassMethods
162
+ end
163
+
164
+ # `UpdateVehicleAttributes` response message.
165
+ # @!attribute [rw] attributes
166
+ # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>]
167
+ # Required. The updated full list of vehicle attributes, including new,
168
+ # altered, and untouched attributes.
169
+ class UpdateVehicleAttributesResponse
170
+ include ::Google::Protobuf::MessageExts
171
+ extend ::Google::Protobuf::MessageExts::ClassMethods
172
+ end
173
+
174
+ # `SearchVehicles` request message.
175
+ # @!attribute [rw] header
176
+ # @return [::Google::Maps::FleetEngine::V1::RequestHeader]
177
+ # The standard Fleet Engine request header.
178
+ # @!attribute [rw] parent
179
+ # @return [::String]
180
+ # Required. Must be in the format `providers/{provider}`.
181
+ # The provider must be the Project ID (for example, `sample-cloud-project`)
182
+ # of the Google Cloud Project of which the service account making
183
+ # this call is a member.
184
+ # @!attribute [rw] pickup_point
185
+ # @return [::Google::Maps::FleetEngine::V1::TerminalLocation]
186
+ # Required. The pickup point to search near.
187
+ # @!attribute [rw] dropoff_point
188
+ # @return [::Google::Maps::FleetEngine::V1::TerminalLocation]
189
+ # The customer's intended dropoff location. The field is required if
190
+ # `trip_types` contains `TripType.SHARED`.
191
+ # @!attribute [rw] pickup_radius_meters
192
+ # @return [::Integer]
193
+ # Required. Defines the vehicle search radius around the pickup point. Only
194
+ # vehicles within the search radius will be returned. Value must be between
195
+ # 400 and 10000 meters (inclusive).
196
+ # @!attribute [rw] count
197
+ # @return [::Integer]
198
+ # Required. Specifies the maximum number of vehicles to return. The value
199
+ # must be between 1 and 50 (inclusive).
200
+ # @!attribute [rw] minimum_capacity
201
+ # @return [::Integer]
202
+ # Required. Specifies the number of passengers being considered for a trip.
203
+ # The value must be greater than or equal to one. The driver is not
204
+ # considered in the capacity value.
205
+ # @!attribute [rw] trip_types
206
+ # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>]
207
+ # Required. Represents the type of proposed trip. Must include exactly one
208
+ # type. `UNKNOWN_TRIP_TYPE` is not allowed. Restricts the search to only
209
+ # those vehicles that can support that trip type.
210
+ # @!attribute [rw] maximum_staleness
211
+ # @return [::Google::Protobuf::Duration]
212
+ # Restricts the search to only those vehicles that have sent location updates
213
+ # to Fleet Engine within the specified duration. Stationary vehicles still
214
+ # transmitting their locations are not considered stale. If this field is not
215
+ # set, the server uses five minutes as the default value.
216
+ # @!attribute [rw] vehicle_types
217
+ # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType>]
218
+ # Required. Restricts the search to vehicles with one of the specified types.
219
+ # At least one vehicle type must be specified. VehicleTypes with a category
220
+ # of `UNKNOWN` are not allowed.
221
+ # @!attribute [rw] required_attributes
222
+ # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>]
223
+ # Callers can form complex logical operations using any combination of the
224
+ # `required_attributes`, `required_one_of_attributes`, and
225
+ # `required_one_of_attribute_sets` fields.
226
+ #
227
+ # `required_attributes` is a list; `required_one_of_attributes` uses a
228
+ # message which allows a list of lists. In combination, the two fields allow
229
+ # the composition of this expression:
230
+ #
231
+ # ```
232
+ # (required_attributes[0] AND required_attributes[1] AND ...)
233
+ # AND
234
+ # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
235
+ # ...)
236
+ # AND
237
+ # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
238
+ # ...)
239
+ # ```
240
+ #
241
+ # Restricts the search to only those vehicles with the specified attributes.
242
+ # This field is a conjunction/AND operation. A max of 50 required_attributes
243
+ # is allowed. This matches the maximum number of attributes allowed on a
244
+ # vehicle.
245
+ # @!attribute [rw] required_one_of_attributes
246
+ # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>]
247
+ # Restricts the search to only those vehicles with at least one of
248
+ # the specified attributes in each `VehicleAttributeList`. Within each
249
+ # list, a vehicle must match at least one of the attributes. This field is an
250
+ # inclusive disjunction/OR operation in each `VehicleAttributeList` and a
251
+ # conjunction/AND operation across the collection of `VehicleAttributeList`.
252
+ # @!attribute [rw] required_one_of_attribute_sets
253
+ # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttributeList>]
254
+ # `required_one_of_attribute_sets` provides additional functionality.
255
+ #
256
+ # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
257
+ # uses a message which allows a list of lists, allowing expressions such as
258
+ # this one:
259
+ #
260
+ # ```
261
+ # (required_attributes[0] AND required_attributes[1] AND ...)
262
+ # AND
263
+ # (
264
+ # (required_one_of_attribute_sets[0][0] AND
265
+ # required_one_of_attribute_sets[0][1] AND
266
+ # ...)
267
+ # OR
268
+ # (required_one_of_attribute_sets[1][0] AND
269
+ # required_one_of_attribute_sets[1][1] AND
270
+ # ...)
271
+ # )
272
+ # ```
273
+ #
274
+ # Restricts the search to only those vehicles with all the attributes in a
275
+ # `VehicleAttributeList`. Within each list, a
276
+ # vehicle must match all of the attributes. This field is a conjunction/AND
277
+ # operation in each `VehicleAttributeList` and inclusive disjunction/OR
278
+ # operation across the collection of `VehicleAttributeList`.
279
+ # @!attribute [rw] order_by
280
+ # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder]
281
+ # Required. Specifies the desired ordering criterion for results.
282
+ # @!attribute [rw] include_back_to_back
283
+ # @return [::Boolean]
284
+ # This indicates if vehicles with a single active trip are eligible for this
285
+ # search. This field is only used when `current_trips_present` is
286
+ # unspecified. When `current_trips_present` is unspecified and this field
287
+ # is `false`, vehicles with assigned trips are excluded from the search
288
+ # results. When `current_trips_present` is unspecified and this field is
289
+ # `true`, search results can include vehicles with one active trip that has a
290
+ # status of `ENROUTE_TO_DROPOFF`. When `current_trips_present` is specified,
291
+ # this field cannot be set to true.
292
+ #
293
+ # The default value is `false`.
294
+ # @!attribute [rw] trip_id
295
+ # @return [::String]
296
+ # Indicates the trip associated with this `SearchVehicleRequest`.
297
+ # @!attribute [rw] current_trips_present
298
+ # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::CurrentTripsPresent]
299
+ # This indicates if vehicles with active trips are eligible for this search.
300
+ # This must be set to something other than
301
+ # `CURRENT_TRIPS_PRESENT_UNSPECIFIED` if `trip_type` includes `SHARED`.
302
+ # @!attribute [rw] filter
303
+ # @return [::String]
304
+ # Optional. A filter query to apply when searching vehicles. See
305
+ # http://aip.dev/160 for examples of the filter syntax.
306
+ #
307
+ # This field is designed to replace the `required_attributes`,
308
+ # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
309
+ # If a non-empty value is specified here, the following fields must be empty:
310
+ # `required_attributes`, `required_one_of_attributes`, and
311
+ # `required_one_of_attributes_sets`.
312
+ #
313
+ # This filter functions as an AND clause with other constraints,
314
+ # such as `minimum_capacity` or `vehicle_types`.
315
+ #
316
+ # Note that the only queries supported are on vehicle attributes (for
317
+ # example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
318
+ # attributes.<key2> = <value2>`). The maximum number of restrictions allowed
319
+ # in a filter query is 50.
320
+ #
321
+ # Also, all attributes are stored as strings, so the only supported
322
+ # comparisons against attributes are string comparisons. In order to compare
323
+ # against number or boolean values, the values must be explicitly quoted to
324
+ # be treated as strings (for example, `attributes.<key> = "10"` or
325
+ # `attributes.<key> = "true"`).
326
+ class SearchVehiclesRequest
327
+ include ::Google::Protobuf::MessageExts
328
+ extend ::Google::Protobuf::MessageExts::ClassMethods
329
+
330
+ # Specifies the order of the vehicle matches in the response.
331
+ module VehicleMatchOrder
332
+ # Default, used for unspecified or unrecognized vehicle matches order.
333
+ UNKNOWN_VEHICLE_MATCH_ORDER = 0
334
+
335
+ # Ascending order by vehicle driving time to the pickup point.
336
+ PICKUP_POINT_ETA = 1
337
+
338
+ # Ascending order by vehicle driving distance to the pickup point.
339
+ PICKUP_POINT_DISTANCE = 2
340
+
341
+ # Ascending order by vehicle driving time to the dropoff point. This order
342
+ # can only be used if the dropoff point is specified in the request.
343
+ DROPOFF_POINT_ETA = 3
344
+
345
+ # Ascending order by straight-line distance from the vehicle's last
346
+ # reported location to the pickup point.
347
+ PICKUP_POINT_STRAIGHT_DISTANCE = 4
348
+
349
+ # Ascending order by the configured match cost. Match cost is defined as a
350
+ # weighted calculation between straight-line distance and ETA. Weights are
351
+ # set with default values and can be modified per customer. Please contact
352
+ # Google support if these weights need to be modified for your project.
353
+ COST = 5
354
+ end
355
+
356
+ # Specifies the types of restrictions on a vehicle's current trips.
357
+ module CurrentTripsPresent
358
+ # The availability of vehicles with trips present is governed by the
359
+ # `include_back_to_back` field.
360
+ CURRENT_TRIPS_PRESENT_UNSPECIFIED = 0
361
+
362
+ # Vehicles without trips can appear in search results. When this value is
363
+ # used, `include_back_to_back` cannot be `true`.
364
+ NONE = 1
365
+
366
+ # Vehicles with at most 5 current trips and 10 waypoints are included
367
+ # in the search results. When this value is used, `include_back_to_back`
368
+ # cannot be `true`.
369
+ ANY = 2
370
+ end
371
+ end
372
+
373
+ # `SearchVehicles` response message.
374
+ # @!attribute [rw] matches
375
+ # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleMatch>]
376
+ # List of vehicles that match the `SearchVehiclesRequest` criteria, ordered
377
+ # according to `SearchVehiclesRequest.order_by` field.
378
+ class SearchVehiclesResponse
379
+ include ::Google::Protobuf::MessageExts
380
+ extend ::Google::Protobuf::MessageExts::ClassMethods
381
+ end
382
+
383
+ # `ListVehicles` request message.
384
+ # @!attribute [rw] header
385
+ # @return [::Google::Maps::FleetEngine::V1::RequestHeader]
386
+ # The standard Fleet Engine request header.
387
+ # @!attribute [rw] parent
388
+ # @return [::String]
389
+ # Required. Must be in the format `providers/{provider}`.
390
+ # The provider must be the Project ID (for example, `sample-cloud-project`)
391
+ # of the Google Cloud Project of which the service account making
392
+ # this call is a member.
393
+ # @!attribute [rw] page_size
394
+ # @return [::Integer]
395
+ # The maximum number of vehicles to return.
396
+ # Default value: 100.
397
+ # @!attribute [rw] page_token
398
+ # @return [::String]
399
+ # The value of the `next_page_token` provided by a previous call to
400
+ # `ListVehicles` so that you can paginate through groups of vehicles. The
401
+ # value is undefined if the filter criteria of the request is not the same as
402
+ # the filter criteria for the previous call to `ListVehicles`.
403
+ # @!attribute [rw] minimum_capacity
404
+ # @return [::Google::Protobuf::Int32Value]
405
+ # Specifies the required minimum capacity of the vehicle. All vehicles
406
+ # returned will have a `maximum_capacity` greater than or equal to this
407
+ # value. If set, must be greater or equal to 0.
408
+ # @!attribute [rw] trip_types
409
+ # @return [::Array<::Google::Maps::FleetEngine::V1::TripType>]
410
+ # Restricts the response to vehicles that support at least one of the
411
+ # specified trip types.
412
+ # @!attribute [rw] maximum_staleness
413
+ # @return [::Google::Protobuf::Duration]
414
+ # Restricts the response to vehicles that have sent location updates to Fleet
415
+ # Engine within the specified duration. Stationary vehicles still
416
+ # transmitting their locations are not considered stale. If present, must be
417
+ # a valid positive duration.
418
+ # @!attribute [rw] vehicle_type_categories
419
+ # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle::VehicleType::Category>]
420
+ # Required. Restricts the response to vehicles with one of the specified type
421
+ # categories. `UNKNOWN` is not allowed.
422
+ # @!attribute [rw] required_attributes
423
+ # @return [::Array<::String>]
424
+ # Callers can form complex logical operations using any combination of the
425
+ # `required_attributes`, `required_one_of_attributes`, and
426
+ # `required_one_of_attribute_sets` fields.
427
+ #
428
+ # `required_attributes` is a list; `required_one_of_attributes` uses a
429
+ # message which allows a list of lists. In combination, the two fields allow
430
+ # the composition of this expression:
431
+ #
432
+ # ```
433
+ # (required_attributes[0] AND required_attributes[1] AND ...)
434
+ # AND
435
+ # (required_one_of_attributes[0][0] OR required_one_of_attributes[0][1] OR
436
+ # ...)
437
+ # AND
438
+ # (required_one_of_attributes[1][0] OR required_one_of_attributes[1][1] OR
439
+ # ...)
440
+ # ```
441
+ #
442
+ # Restricts the response to vehicles with the specified attributes. This
443
+ # field is a conjunction/AND operation. A max of 50 required_attributes is
444
+ # allowed. This matches the maximum number of attributes allowed on a
445
+ # vehicle. Each repeated string should be of the format "key:value".
446
+ # @!attribute [rw] required_one_of_attributes
447
+ # @return [::Array<::String>]
448
+ # Restricts the response to vehicles with at least one of the specified
449
+ # attributes in each `VehicleAttributeList`. Within each list, a vehicle must
450
+ # match at least one of the attributes. This field is an inclusive
451
+ # disjunction/OR operation in each `VehicleAttributeList` and a
452
+ # conjunction/AND operation across the collection of `VehicleAttributeList`.
453
+ # Each repeated string should be of the format
454
+ # "key1:value1|key2:value2|key3:value3".
455
+ # @!attribute [rw] required_one_of_attribute_sets
456
+ # @return [::Array<::String>]
457
+ # `required_one_of_attribute_sets` provides additional functionality.
458
+ #
459
+ # Similar to `required_one_of_attributes`, `required_one_of_attribute_sets`
460
+ # uses a message which allows a list of lists, allowing expressions such as
461
+ # this one:
462
+ #
463
+ # ```
464
+ # (required_attributes[0] AND required_attributes[1] AND ...)
465
+ # AND
466
+ # (
467
+ # (required_one_of_attribute_sets[0][0] AND
468
+ # required_one_of_attribute_sets[0][1] AND
469
+ # ...)
470
+ # OR
471
+ # (required_one_of_attribute_sets[1][0] AND
472
+ # required_one_of_attribute_sets[1][1] AND
473
+ # ...)
474
+ # )
475
+ # ```
476
+ #
477
+ # Restricts the response to vehicles that match all the attributes in a
478
+ # `VehicleAttributeList`. Within each list, a vehicle must match all of the
479
+ # attributes. This field is a conjunction/AND operation in each
480
+ # `VehicleAttributeList` and inclusive disjunction/OR operation across the
481
+ # collection of `VehicleAttributeList`. Each repeated string should be of the
482
+ # format "key1:value1|key2:value2|key3:value3".
483
+ # @!attribute [rw] vehicle_state
484
+ # @return [::Google::Maps::FleetEngine::V1::VehicleState]
485
+ # Restricts the response to vehicles that have this vehicle state.
486
+ # @!attribute [rw] on_trip_only
487
+ # @return [::Boolean]
488
+ # Only return the vehicles with current trip(s).
489
+ # @!attribute [rw] filter
490
+ # @return [::String]
491
+ # Optional. A filter query to apply when listing vehicles. See
492
+ # http://aip.dev/160 for examples of the filter syntax.
493
+ #
494
+ # This field is designed to replace the `required_attributes`,
495
+ # `required_one_of_attributes`, and `required_one_of_attributes_sets` fields.
496
+ # If a non-empty value is specified here, the following fields must be empty:
497
+ # `required_attributes`, `required_one_of_attributes`, and
498
+ # `required_one_of_attributes_sets`.
499
+ #
500
+ # This filter functions as an AND clause with other constraints,
501
+ # such as `vehicle_state` or `on_trip_only`.
502
+ #
503
+ # Note that the only queries supported are on vehicle attributes (for
504
+ # example, `attributes.<key> = <value>` or `attributes.<key1> = <value1> AND
505
+ # attributes.<key2> = <value2>`). The maximum number of restrictions allowed
506
+ # in a filter query is 50.
507
+ #
508
+ # Also, all attributes are stored as strings, so the only supported
509
+ # comparisons against attributes are string comparisons. In order to compare
510
+ # against number or boolean values, the values must be explicitly quoted to
511
+ # be treated as strings (for example, `attributes.<key> = "10"` or
512
+ # `attributes.<key> = "true"`).
513
+ # @!attribute [rw] viewport
514
+ # @return [::Google::Geo::Type::Viewport]
515
+ # Optional. A filter that limits the vehicles returned to those whose last
516
+ # known location was in the rectangular area defined by the viewport.
517
+ class ListVehiclesRequest
518
+ include ::Google::Protobuf::MessageExts
519
+ extend ::Google::Protobuf::MessageExts::ClassMethods
520
+ end
521
+
522
+ # `ListVehicles` response message.
523
+ # @!attribute [rw] vehicles
524
+ # @return [::Array<::Google::Maps::FleetEngine::V1::Vehicle>]
525
+ # Vehicles matching the criteria in the request.
526
+ # The maximum number of vehicles returned is determined by the `page_size`
527
+ # field in the request.
528
+ # @!attribute [rw] next_page_token
529
+ # @return [::String]
530
+ # Token to retrieve the next page of vehicles, or empty if there are no
531
+ # more vehicles that meet the request criteria.
532
+ # @!attribute [rw] total_size
533
+ # @return [::Integer]
534
+ # Required. Total number of vehicles matching the request criteria across all
535
+ # pages.
536
+ class ListVehiclesResponse
537
+ include ::Google::Protobuf::MessageExts
538
+ extend ::Google::Protobuf::MessageExts::ClassMethods
539
+ end
540
+
541
+ # Describes intermediate points along a route for a `VehicleMatch` in a
542
+ # `SearchVehiclesResponse`. This concept is represented as a `TripWaypoint` in
543
+ # all other endpoints.
544
+ # @!attribute [rw] lat_lng
545
+ # @return [::Google::Type::LatLng]
546
+ # The location of this waypoint.
547
+ # @!attribute [rw] eta
548
+ # @return [::Google::Protobuf::Timestamp]
549
+ # The estimated time that the vehicle will arrive at this waypoint.
550
+ class Waypoint
551
+ include ::Google::Protobuf::MessageExts
552
+ extend ::Google::Protobuf::MessageExts::ClassMethods
553
+ end
554
+
555
+ # Contains the vehicle and related estimates for a vehicle that match the
556
+ # points of active trips for the vehicle `SearchVehiclesRequest`.
557
+ # @!attribute [rw] vehicle
558
+ # @return [::Google::Maps::FleetEngine::V1::Vehicle]
559
+ # Required. A vehicle that matches the request.
560
+ # @!attribute [rw] vehicle_pickup_eta
561
+ # @return [::Google::Protobuf::Timestamp]
562
+ # The vehicle's driving ETA to the pickup point specified in the
563
+ # request. An empty value indicates a failure in calculating ETA for the
564
+ # vehicle. If `SearchVehiclesRequest.include_back_to_back` was `true` and
565
+ # this vehicle has an active trip, `vehicle_pickup_eta` includes the time
566
+ # required to complete the current active trip.
567
+ # @!attribute [rw] vehicle_pickup_distance_meters
568
+ # @return [::Google::Protobuf::Int32Value]
569
+ # The distance from the Vehicle's current location to the pickup point
570
+ # specified in the request, including any intermediate pickup or dropoff
571
+ # points for existing trips. This distance comprises the calculated driving
572
+ # (route) distance, plus the straight line distance between the navigation
573
+ # end point and the requested pickup point. (The distance between the
574
+ # navigation end point and the requested pickup point is typically small.) An
575
+ # empty value indicates an error in calculating the distance.
576
+ # @!attribute [rw] vehicle_pickup_straight_line_distance_meters
577
+ # @return [::Google::Protobuf::Int32Value]
578
+ # Required. The straight-line distance between the vehicle and the pickup
579
+ # point specified in the request.
580
+ # @!attribute [rw] vehicle_dropoff_eta
581
+ # @return [::Google::Protobuf::Timestamp]
582
+ # The complete vehicle's driving ETA to the drop off point specified in the
583
+ # request. The ETA includes stopping at any waypoints before the
584
+ # `dropoff_point` specified in the request. The value will only be populated
585
+ # when a drop off point is specified in the request. An empty value indicates
586
+ # an error calculating the ETA.
587
+ # @!attribute [rw] vehicle_pickup_to_dropoff_distance_meters
588
+ # @return [::Google::Protobuf::Int32Value]
589
+ # The vehicle's driving distance (in meters) from the pickup point
590
+ # to the drop off point specified in the request. The distance is only
591
+ # between the two points and does not include the vehicle location or any
592
+ # other points that must be visited before the vehicle visits either the
593
+ # pickup point or dropoff point. The value will only be populated when a
594
+ # `dropoff_point` is specified in the request. An empty value indicates
595
+ # a failure in calculating the distance from the pickup to
596
+ # drop off point specified in the request.
597
+ # @!attribute [rw] trip_type
598
+ # @return [::Google::Maps::FleetEngine::V1::TripType]
599
+ # Required. The trip type of the request that was used to calculate the ETA
600
+ # to the pickup point.
601
+ # @!attribute [rw] vehicle_trips_waypoints
602
+ # @return [::Array<::Google::Maps::FleetEngine::V1::Waypoint>]
603
+ # The ordered list of waypoints used to calculate the ETA. The list
604
+ # includes vehicle location, the pickup points of active
605
+ # trips for the vehicle, and the pickup points provided in the
606
+ # request. An empty list indicates a failure in calculating ETA for the
607
+ # vehicle.
608
+ # @!attribute [rw] vehicle_match_type
609
+ # @return [::Google::Maps::FleetEngine::V1::VehicleMatch::VehicleMatchType]
610
+ # Type of the vehicle match.
611
+ # @!attribute [rw] requested_ordered_by
612
+ # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder]
613
+ # The order requested for sorting vehicle matches.
614
+ # @!attribute [rw] ordered_by
615
+ # @return [::Google::Maps::FleetEngine::V1::SearchVehiclesRequest::VehicleMatchOrder]
616
+ # The actual order that was used for this vehicle. Normally this
617
+ # will match the 'order_by' field from the request; however, in certain
618
+ # circumstances such as an internal server error, a different method
619
+ # may be used (such as `PICKUP_POINT_STRAIGHT_DISTANCE`).
620
+ class VehicleMatch
621
+ include ::Google::Protobuf::MessageExts
622
+ extend ::Google::Protobuf::MessageExts::ClassMethods
623
+
624
+ # Type of vehicle match.
625
+ module VehicleMatchType
626
+ # Unknown vehicle match type
627
+ UNKNOWN = 0
628
+
629
+ # The vehicle currently has no trip assigned to it and can proceed to the
630
+ # pickup point.
631
+ EXCLUSIVE = 1
632
+
633
+ # The vehicle is currently assigned to a trip, but can proceed to the
634
+ # pickup point after completing the in-progress trip. ETA and distance
635
+ # calculations take the existing trip into account.
636
+ BACK_TO_BACK = 2
637
+
638
+ # The vehicle has sufficient capacity for a shared ride.
639
+ CARPOOL = 3
640
+
641
+ # The vehicle will finish its current, active trip before proceeding to the
642
+ # pickup point. ETA and distance calculations take the existing trip into
643
+ # account.
644
+ CARPOOL_BACK_TO_BACK = 4
645
+ end
646
+ end
647
+
648
+ # A list-of-lists datatype for vehicle attributes.
649
+ # @!attribute [rw] attributes
650
+ # @return [::Array<::Google::Maps::FleetEngine::V1::VehicleAttribute>]
651
+ # A list of attributes in this collection.
652
+ class VehicleAttributeList
653
+ include ::Google::Protobuf::MessageExts
654
+ extend ::Google::Protobuf::MessageExts::ClassMethods
655
+ end
656
+ end
657
+ end
658
+ end
659
+ end