vehicle_api.proto 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package maps.fleetengine.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/field_behavior.proto";
  18. import "google/api/resource.proto";
  19. import "google/maps/fleetengine/v1/fleetengine.proto";
  20. import "google/maps/fleetengine/v1/header.proto";
  21. import "google/maps/fleetengine/v1/vehicles.proto";
  22. import "google/protobuf/duration.proto";
  23. import "google/protobuf/field_mask.proto";
  24. import "google/protobuf/timestamp.proto";
  25. import "google/protobuf/wrappers.proto";
  26. import "google/type/latlng.proto";
  27. import "google/api/client.proto";
  28. option go_package = "google.golang.org/genproto/googleapis/maps/fleetengine/v1;fleetengine";
  29. option java_multiple_files = true;
  30. option java_outer_classname = "VehicleApi";
  31. option java_package = "google.maps.fleetengine.v1";
  32. option objc_class_prefix = "CFE";
  33. // Vehicle management service.
  34. service VehicleService {
  35. option (google.api.default_host) = "fleetengine.googleapis.com";
  36. // CreateVehicle instantiates a new vehicle associated with a rideshare
  37. // provider in the Fleet Engine. Vehicles must have a unique vehicle ID.
  38. //
  39. // The following Vehicle fields are required when creating a Vehicle:
  40. //
  41. // * vehicleState
  42. // * supportedTripTypes
  43. // * maximumCapacity
  44. // * vehicleType
  45. //
  46. // The following Vehicle fields are ignored when creating a Vehicle:
  47. //
  48. // * name
  49. // * currentTrips
  50. // * availableCapacity
  51. // * current_route_segment
  52. // * current_route_segment_version
  53. // * waypoint
  54. // * waypoints_version
  55. // * remaining_distance_meters
  56. // * eta_to_next_waypoint
  57. // * navigation_status
  58. //
  59. // All other fields are optional and used if provided.
  60. rpc CreateVehicle(CreateVehicleRequest) returns (Vehicle) {
  61. option (google.api.http) = {
  62. post: "/v1/{parent=providers/*}/vehicles"
  63. body: "vehicle"
  64. };
  65. }
  66. // GetVehicle returns a vehicle from the Fleet Engine.
  67. rpc GetVehicle(GetVehicleRequest) returns (Vehicle) {
  68. option (google.api.http) = {
  69. get: "/v1/{name=providers/*/vehicles/*}"
  70. };
  71. }
  72. // UpdateVehicle writes updated vehicle data to the Fleet Engine.
  73. //
  74. // When updating a Vehicle, the following fields cannot be updated since they
  75. // are managed by the Fleet Engine:
  76. //
  77. // * currentTrips
  78. // * availableCapacity
  79. // * current_route_segment_version
  80. // * waypoints_version
  81. //
  82. // The vehicle name also cannot be updated.
  83. //
  84. // The waypoints field can be updated, but must contain all the waypoints
  85. // currently on the vehicle, and no other waypoints.
  86. rpc UpdateVehicle(UpdateVehicleRequest) returns (Vehicle) {
  87. option (google.api.http) = {
  88. put: "/v1/{name=providers/*/vehicles/*}"
  89. body: "vehicle"
  90. };
  91. }
  92. // UpdateVehicleLocation updates the location of the vehicle.
  93. // This method is deprecated. Use UpdateVehicle method instead.
  94. rpc UpdateVehicleLocation(UpdateVehicleLocationRequest) returns (VehicleLocation) {
  95. option deprecated = true;
  96. option (google.api.http) = {
  97. put: "/v1/{name=providers/*/vehicles/*}:updateLocation"
  98. body: "*"
  99. };
  100. }
  101. // UpdateVehicleAttributes partially updates a vehicle's attributes.
  102. // Only the attributes mentioned in the request will be updated, other
  103. // attributes will NOT be altered. Note: this is different in UpdateVehicle,
  104. // where the whole `attributes` field will be replaced by the one in
  105. // UpdateVehicleRequest, attributes not in the request would be removed.
  106. rpc UpdateVehicleAttributes(UpdateVehicleAttributesRequest) returns (UpdateVehicleAttributesResponse) {
  107. option (google.api.http) = {
  108. post: "/v1/{name=providers/*/vehicles/*}:updateAttributes"
  109. body: "*"
  110. };
  111. }
  112. // ListVehicles returns a paginated list of vehicles associated with
  113. // a provider that match the request options.
  114. rpc ListVehicles(ListVehiclesRequest) returns (ListVehiclesResponse) {
  115. option (google.api.http) = {
  116. get: "/v1/{parent=providers/*}/vehicles"
  117. };
  118. }
  119. // SearchVehicles returns a list of vehicles that match the request options.
  120. rpc SearchVehicles(SearchVehiclesRequest) returns (SearchVehiclesResponse) {
  121. option (google.api.http) = {
  122. post: "/v1/{parent=providers/*}/vehicles:search"
  123. body: "*"
  124. };
  125. }
  126. // SearchFuzzedVehicles returns a list of vehicles that match the request
  127. // options with their locations fuzzed.
  128. // Request does not support 'order_by' field.
  129. // Vehicle matches in response will be in order of distance from pickup point.
  130. // Vehicle matches in response will only have 'vehicle' and 'trip_type' field
  131. // set.
  132. rpc SearchFuzzedVehicles(SearchVehiclesRequest) returns (SearchVehiclesResponse) {
  133. option (google.api.http) = {
  134. post: "/v1/{parent=providers/*}/vehicles:searchFuzzed"
  135. body: "*"
  136. };
  137. }
  138. }
  139. // CreateVehicle request message.
  140. message CreateVehicleRequest {
  141. // The standard Fleet Engine request header.
  142. RequestHeader header = 1;
  143. // Required. Must be in the format "providers/{provider}".
  144. // The provider must be the Project ID (for example, sample-cloud-project)
  145. // of the Google Cloud Project of which the service account making
  146. // this call is a member.
  147. string parent = 3 [(google.api.field_behavior) = REQUIRED];
  148. // Required. Unique Vehicle ID; must be unique per provider. The actual
  149. // format and value is opaque to the Fleet Engine and is determined
  150. // by the provider.
  151. string vehicle_id = 4 [(google.api.field_behavior) = REQUIRED];
  152. // Required. The Vehicle entity to create. When creating a Vehicle, the following
  153. // fields are required:
  154. //
  155. // * vehicle_state
  156. // * supported_trip_types
  157. // * maximum_capacity
  158. // * vehicle_type
  159. //
  160. // When creating a Vehicle, the following fields are ignored:
  161. //
  162. // * name
  163. // * current_trips
  164. // * available_capacity
  165. // * current_route_segment
  166. // * current_route_segment_version
  167. // * waypoints
  168. // * waypoints_version
  169. // * remaining_distance_meters
  170. // * eta_to_next_waypoint
  171. // * navigation_status
  172. //
  173. // All other fields will be used if provided.
  174. Vehicle vehicle = 5 [(google.api.field_behavior) = REQUIRED];
  175. }
  176. // GetVehicle request message.
  177. message GetVehicleRequest {
  178. // The standard Fleet Engine request header.
  179. RequestHeader header = 1;
  180. // Required. Must be in the format
  181. // "providers/{provider}/vehicles/{vehicle}".
  182. // The provider must be the Project ID (for example, sample-cloud-project)
  183. // of the Google Cloud Project of which the service account making
  184. // this call is a member.
  185. string name = 3 [
  186. (google.api.field_behavior) = REQUIRED,
  187. (google.api.resource_reference) = {
  188. type: "fleetengine.googleapis.com/Vehicle"
  189. }
  190. ];
  191. // Indicates the minimum timestamp (exclusive) for which
  192. // vehicle.current_route_segment is retrieved.
  193. // If route is unchanged since this timestamp, the current_route_segment
  194. // field is not set in the response. If a minimum is unspecified, the
  195. // current_route_segment is always retrieved.
  196. google.protobuf.Timestamp current_route_segment_version = 4;
  197. // Indicates the minimum timestamp (exclusive) for which vehicle.waypoints
  198. // data is retrieved. If data is unchanged since this timestamp, the
  199. // vehicle.waypoints data is not set in the response. If this field is
  200. // unspecified, vehicle.waypoints is always retrieved.
  201. google.protobuf.Timestamp waypoints_version = 5;
  202. }
  203. // UpdateVehicle request message.
  204. message UpdateVehicleRequest {
  205. // The standard Fleet Engine request header.
  206. RequestHeader header = 1;
  207. // Required. Must be in the format
  208. // "providers/{provider}/vehicles/{vehicle}".
  209. // The {provider} must be the Project ID (for example, sample-cloud-project)
  210. // of the Google Cloud Project of which the service account making
  211. // this call is a member.
  212. //
  213. // Note that if the name is also specified in the name field of the
  214. // vehicle and name is set in the update_mask, both names must be the
  215. // same. Otherwise it is an Error.
  216. string name = 3 [(google.api.field_behavior) = REQUIRED];
  217. // Required. The Vehicle entity update to apply. When updating a Vehicle,
  218. // the following fields may not be updated as they are managed by the
  219. // Fleet Engine.
  220. // current_trips
  221. // available_capacity
  222. // current_route_segment_version
  223. // waypoints_version
  224. // Furthermore, the name of the vehicle cannot be updated.
  225. Vehicle vehicle = 4 [(google.api.field_behavior) = REQUIRED];
  226. // Required. A field mask indicating which fields of the Vehicle to update.
  227. // The update_mask must contain at least one field.
  228. google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = REQUIRED];
  229. }
  230. // UpdateVehicleLocation request message.
  231. message UpdateVehicleLocationRequest {
  232. option deprecated = true;
  233. // The standard Fleet Engine request header.
  234. RequestHeader header = 1;
  235. // Required. Must be in the format
  236. // "providers/{provider}/vehicles/{vehicle}.
  237. // The {provider} must be the Project ID (for example, sample-cloud-project)
  238. // of the Google Cloud Project of which the service account making
  239. // this call is a member.
  240. string name = 3 [(google.api.field_behavior) = REQUIRED];
  241. // Required. The location to update to. The last_location and update_time
  242. // subfields are required.
  243. VehicleLocation current_location = 4 [(google.api.field_behavior) = REQUIRED];
  244. // Set current vehicle state to either ONLINE or OFFLINE;
  245. // if set to UNKNOWN_VEHICLE_STATE, vehicle state will not be altered.
  246. VehicleState current_state = 5;
  247. }
  248. // UpdateVehicleAttributes request message.
  249. message UpdateVehicleAttributesRequest {
  250. // The standard Fleet Engine request header.
  251. RequestHeader header = 1;
  252. // Required. Must be in the format
  253. // "providers/{provider}/vehicles/{vehicle}.
  254. // The provider must be the Project ID (for example, sample-cloud-project)
  255. // of the Google Cloud Project of which the service account making
  256. // this call is a member.
  257. string name = 3 [(google.api.field_behavior) = REQUIRED];
  258. // Required. The attributes to update;
  259. // unmentioned attributes will not be altered or removed.
  260. // At most 20 attributes; the combined "key:value" string length cannot
  261. // exceed 256.
  262. repeated VehicleAttribute attributes = 4 [(google.api.field_behavior) = REQUIRED];
  263. }
  264. // UpdateVehicleAttributes response message.
  265. message UpdateVehicleAttributesResponse {
  266. // Required. The updated full list of vehicle attributes, including new,
  267. // altered and untouched attributes.
  268. repeated VehicleAttribute attributes = 1 [(google.api.field_behavior) = REQUIRED];
  269. }
  270. // SearchVehicles request message.
  271. message SearchVehiclesRequest {
  272. // Specifies the sort order of the vehicle matches in the response.
  273. enum VehicleMatchOrder {
  274. // Default, used for unspecified or unrecognized vehicle matches order.
  275. UNKNOWN_VEHICLE_MATCH_ORDER = 0;
  276. // Ascending order by vehicle driving time to the pickup point.
  277. PICKUP_POINT_ETA = 1;
  278. // Ascending order by the vehicle driving distance to the pickup point.
  279. PICKUP_POINT_DISTANCE = 2;
  280. // Ascending order by vehicle driving time to the dropoff point. This order
  281. // can only be used if the dropoff_point is specified in the request.
  282. DROPOFF_POINT_ETA = 3;
  283. // Ascending order by straightline distance from vehicle location to pickup
  284. // location. This is used primarily as a backup if the maps backend is not
  285. // reachable.
  286. PICKUP_POINT_STRAIGHT_DISTANCE = 4;
  287. // Ascending order by the match cost.
  288. COST = 5;
  289. }
  290. // The standard Fleet Engine request header.
  291. RequestHeader header = 1;
  292. // Required. Must be in the format "providers/{provider}".
  293. // The provider must be the Project ID (for example, sample-cloud-project)
  294. // of the Google Cloud Project of which the service account making
  295. // this call is a member.
  296. string parent = 3 [(google.api.field_behavior) = REQUIRED];
  297. // Required. The pickup point to search near.
  298. TerminalLocation pickup_point = 4 [(google.api.field_behavior) = REQUIRED];
  299. // The customer's intended dropoff location. The field is required if
  300. // trip_types contains TripType.SHARED.
  301. TerminalLocation dropoff_point = 5;
  302. // Required. Defines the vehicle search radius around the pickup point. Only
  303. // vehicles within the search radius will be returned. Value must be between
  304. // 400 and 10000 meters.
  305. int32 pickup_radius_meters = 6 [(google.api.field_behavior) = REQUIRED];
  306. // Required. Specifies the maximum number of available vehicles to return. By
  307. // default, the Fleet Engine limits the number to 50.
  308. int32 count = 7 [(google.api.field_behavior) = REQUIRED];
  309. // Required. Specifies the minimum number of passengers allowed in the
  310. // vehicle. Must number must be greater than or equal to one. The driver is
  311. // not considered in the capacity search. This number indicates the number of
  312. // passengers being considered for a trip.
  313. int32 minimum_capacity = 8 [(google.api.field_behavior) = REQUIRED];
  314. // Required. Restricts the search to only those vehicles that support at least
  315. // one of the specified trip types.
  316. repeated TripType trip_types = 9 [(google.api.field_behavior) = REQUIRED];
  317. // Restricts the search to only those vehicles that have updated their
  318. // locations within the specified duration back from now. If this field is not
  319. // set, the server uses five minutes as the default value.
  320. google.protobuf.Duration maximum_staleness = 10;
  321. // Required. Restricts the search to those vehicles with the specified types.
  322. // At least one vehicle type must be specified.
  323. repeated Vehicle.VehicleType vehicle_types = 14 [(google.api.field_behavior) = REQUIRED];
  324. // Callers can form complex logical operations using the
  325. // requiredAttributes and requiredOneOfAttributes fields.
  326. //
  327. // requiredAttributes is a list; requiredOneOfAttributes uses a message which
  328. // allows a list of lists. In combination, the two fields allow the
  329. // composition of this expression:
  330. //
  331. // ```
  332. // (required_attribute[0] AND required_attribute[1] AND ...)
  333. // AND
  334. // (required_one_of_attribute[0][0] OR required_one_of_attribute[0][1] OR ...)
  335. // AND
  336. // (required_one_of_attribute[1][0] OR required_one_of_attribute[1][1] OR ...)
  337. // ```
  338. //
  339. // Restricts the search to only those vehicles with the specified attributes.
  340. // This field is a conjunction/AND operation. Your app can specify up to 100
  341. // attributes; however, the combined key:value string length cannot exceed
  342. // 1024 characters.
  343. repeated VehicleAttribute required_attributes = 12;
  344. // Restricts the search to only those vehicles with at least one of
  345. // the specified attributes applied to each VehicleAttributeList. Within each
  346. // list, a vehicle must match at least one of the attributes. This field is an
  347. // inclusive disjunction/OR operation in each VehicleAttributeList and a
  348. // conjunction/AND operation across the collection of VehicleAttributeList.
  349. repeated VehicleAttributeList required_one_of_attributes = 15;
  350. // Restricts the search to only those vehicles with at least one set of the
  351. // specified attributes in the VehicleAttributeList. Within each list, a
  352. // vehicle must match all of the attributes. This field is a conjunction/AND
  353. // operation in each VehicleAttributeList and inclusive disjunction/OR
  354. // operation across the collection of VehicleAttributeList.
  355. repeated VehicleAttributeList required_one_of_attribute_sets = 20;
  356. // Required. Specifies ordering criterion for results.
  357. VehicleMatchOrder order_by = 13 [(google.api.field_behavior) = REQUIRED];
  358. // Indicates if a vehicle with an active trip is eligible for
  359. // another match. If `false`, a vehicle is excluded from search results.
  360. // If `true`, search results include vehicles with `TripStatus` of
  361. // `ENROUTE_TO_DROPOFF`. The services only use this field if
  362. // the `SearchVehicles` request has `TripType` set to EXCLUSIVE.
  363. // Default value is `false`.
  364. bool include_back_to_back = 18;
  365. // Indicates the ID of the trip the searchVehicleRequest is
  366. // associated with.
  367. string trip_id = 19;
  368. }
  369. // SearchVehicles response message.
  370. message SearchVehiclesResponse {
  371. // List of vehicles that match the request options.
  372. //
  373. // Ordered by ascending vehicle_pickup_eta, with ties broken by ascending
  374. // trip_type enum value, followed by matches that don't have
  375. // vehicle_pickup_eta set.
  376. //
  377. // Example response: (Logically represented, not actual response fields):
  378. //
  379. // * (VehicleId: Vehicle1, ETA: 10 AM, TripType: SHARED),
  380. // * (VehicleId: Vehicle2, ETA: 10 AM, TripType: EXCLUSIVE),
  381. // * (VehicleId: Vehicle3, ETA: 11 AM, TripType: EXCLUSIVE),
  382. // * (VehicleId: Vehicle4, ETA: Not set, TripType: SHARED),
  383. // * (VehicleId: Vehicle5, ETA: Not set, TripType: EXCLUSIVE)
  384. repeated VehicleMatch matches = 1;
  385. }
  386. // ListVehicles request message.
  387. message ListVehiclesRequest {
  388. // The standard Fleet Engine request header.
  389. RequestHeader header = 12;
  390. // Required. Must be in the format "providers/{provider}".
  391. // The provider must be the Project ID (for example, sample-cloud-project)
  392. // of the Google Cloud Project of which the service account making
  393. // this call is a member.
  394. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  395. // The maximum number of vehicles to return.
  396. // Default value: 100.
  397. int32 page_size = 3;
  398. // The next_page_token value returned from a previous response, if any.
  399. string page_token = 4;
  400. // Specifies the required minimum capacity of the vehicle.
  401. // The driver is not considered in the capacity search.
  402. // This is just the number of passengers being considered for a trip.
  403. // If set, must be greater or equal to 0.
  404. google.protobuf.Int32Value minimum_capacity = 6;
  405. // Restrict the search to only those vehicles that support at least
  406. // one of the specified trip types.
  407. repeated TripType trip_types = 7;
  408. // Restrict the search to only those vehicles that have updated
  409. // their locations within the specified duration back from now.
  410. // If present, must be a valid positive duration.
  411. google.protobuf.Duration maximum_staleness = 8;
  412. // Required. Restrict the search to those vehicles with the specified type categories.
  413. repeated Vehicle.VehicleType.Category vehicle_type_categories = 9 [(google.api.field_behavior) = REQUIRED];
  414. // Callers can form complex logical operations using the
  415. // requiredAttributes and requiredOneOfAttributes fields.
  416. //
  417. // requiredAttributes is a list; requiredOneOfAttributes uses a message which
  418. // allows a list of lists. In combination, the two fields allow the
  419. // composition of this expression:
  420. //
  421. // ```
  422. // (required_attribute[0] AND required_attribute[1] AND ...)
  423. // AND
  424. // (required_one_of_attribute[0][0] OR required_one_of_attribute[0][1] OR ...)
  425. // AND
  426. // (required_one_of_attribute[1][0] OR required_one_of_attribute[1][1] OR ...)
  427. // ```
  428. //
  429. // Restrict the search to only those vehicles
  430. // with the specified attributes. This field is a conjunction/AND operation.
  431. // Your app can specify up to 100 attributes; however, the combined
  432. // key:value string length cannot exceed 1024 characters.
  433. repeated string required_attributes = 10;
  434. // Restrict the search to only those vehicles with at least one
  435. // of the specified attributes applied to each VehicleAttributeList.
  436. // Within each list, a vehicle must match at least one of the attributes.
  437. // This field is an inclusive disjunction/OR operation in each
  438. // VehicleAttributeList and a conjunction/AND operation across the collection
  439. // of VehicleAttributeList.
  440. // Format: key1:value1|key2:value2|key3:value3...
  441. repeated string required_one_of_attributes = 13;
  442. // Restrict the search to only those vehicles with at least one set of the
  443. // specified attributes in the VehicleAttributeList. Within each list, a
  444. // vehicle must match all of the attributes. This field is a conjunction/AND
  445. // operation in each VehicleAttributeList and inclusive disjunction/OR
  446. // operation across the collection of VehicleAttributeList.
  447. // Format: key1:value1|key2:value2|key3:value3...
  448. repeated string required_one_of_attribute_sets = 15;
  449. // Restrict the search to only those vehicles that have this vehicle state.
  450. VehicleState vehicle_state = 11;
  451. // Only return the vehicles with current trip(s).
  452. bool on_trip_only = 14;
  453. }
  454. // ListVehicles response message.
  455. message ListVehiclesResponse {
  456. // Depends on vehicles matching request criteria.
  457. // There will be a maximum number of vehicles returned based on the page_size
  458. // field in the request.
  459. repeated Vehicle vehicles = 1;
  460. // Token to retrieve the next page of vehicles, or empty if there are no
  461. // more vehicles in the list.
  462. string next_page_token = 2;
  463. // Required. Total number of vehicles matching request criteria across all pages.
  464. int64 total_size = 3 [(google.api.field_behavior) = REQUIRED];
  465. }
  466. // Waypoint describes intermediate points along a route.
  467. message Waypoint {
  468. // The location of this waypoint.
  469. google.type.LatLng lat_lng = 1;
  470. // The estimated time that the vehicle will arrive at this waypoint.
  471. google.protobuf.Timestamp eta = 2;
  472. }
  473. // VehicleMatch contains the vehicle, ETA, and distance calculations for a
  474. // vehicle that matches the SearchVehiclesRequest.
  475. message VehicleMatch {
  476. // Type of vehicle match.
  477. enum VehicleMatchType {
  478. // Unknown vehicle match type
  479. UNKNOWN = 0;
  480. // Exclusive vehicle trip match
  481. EXCLUSIVE = 1;
  482. // Back to back ride match.
  483. BACK_TO_BACK = 2;
  484. // Carpool ride match.
  485. CARPOOL = 3;
  486. // Carpool ride match. The car has an active exclusive trip.
  487. CARPOOL_BACK_TO_BACK = 4;
  488. }
  489. // Required. A vehicle that matches the request.
  490. Vehicle vehicle = 1 [(google.api.field_behavior) = REQUIRED];
  491. // The vehicle's driving ETA to the pickup point specified in the
  492. // request. An empty value indicates a failure in calculating ETA for the
  493. // vehicle.
  494. google.protobuf.Timestamp vehicle_pickup_eta = 2;
  495. // The vehicle's driving distance to the pickup point specified in
  496. // the request, including any intermediate pickup or dropoff points for
  497. // an existing ride. An empty value indicates a failure in calculating
  498. // distance for the vehicle.
  499. google.protobuf.Int32Value vehicle_pickup_distance_meters = 3;
  500. // Required. The straight-line distance between the vehicle and the pickup
  501. // point specified in the request, including intermediate waypoints for
  502. // existing trips.
  503. google.protobuf.Int32Value vehicle_pickup_straight_line_distance_meters = 11 [(google.api.field_behavior) = REQUIRED];
  504. // The complete vehicle's driving ETA to the drop off point
  505. // specified in the request. The ETA includes any required visits for active
  506. // trips that must be completed before the vehicle visits the dropoff_point
  507. // specified in the request. The value will only be populated when a
  508. // dropoff_point is specified in the request. An empty value indicates
  509. // a failure in calculating the ETA for the vehicle to reach
  510. // the dropoff_point.
  511. google.protobuf.Timestamp vehicle_dropoff_eta = 4;
  512. // The vehicle's driving distance (in meters) from the pickup point
  513. // to the drop off point specified in the request. The distance is only
  514. // between the two points and does not include the vehicle location or any
  515. // other points that must be visited before the vehicle visits either the
  516. // pickup point or dropoff point. The value will only be populated when a
  517. // dropoff_point is specified in the request. An empty value indicates
  518. // a failure in calculating the distance from the pickup to
  519. // dropoff points specified in the request.
  520. google.protobuf.Int32Value vehicle_pickup_to_dropoff_distance_meters = 5;
  521. // Required. The trip type of the request that was used to calculate the ETA
  522. // to the pickup point.
  523. TripType trip_type = 6 [(google.api.field_behavior) = REQUIRED];
  524. // The ordered list of waypoints used to calculate the ETA. The list
  525. // will include the vehicle location, the pickup/drop off points of active
  526. // trips for the vehicle and the pickup/dropoff points provided in the
  527. // request. An empty list indicates a failure in calculating ETA for the
  528. // vehicle.
  529. repeated Waypoint vehicle_trips_waypoints = 7;
  530. // Type of the vehicle match.
  531. VehicleMatchType vehicle_match_type = 8;
  532. // The method the caller requested for sorting vehicle matches.
  533. SearchVehiclesRequest.VehicleMatchOrder requested_ordered_by = 9;
  534. // The actual method that is used to order this vehicle. In normal cases this
  535. // will match the 'order_by' field from the request, however in certain
  536. // circumstances such as a failure of google maps backends, a different method
  537. // may be used (such as PICKUP_POINT_STRAIGHT_DISTANCE).
  538. SearchVehiclesRequest.VehicleMatchOrder ordered_by = 10;
  539. }
  540. // This messages allows a list-of-list datatype for VehicleAttribute.
  541. message VehicleAttributeList {
  542. // A list of attributes in this collection.
  543. repeated VehicleAttribute attributes = 1;
  544. }