fleetengine.proto 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  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/field_behavior.proto";
  17. import "google/protobuf/any.proto";
  18. import "google/protobuf/duration.proto";
  19. import "google/protobuf/timestamp.proto";
  20. import "google/protobuf/wrappers.proto";
  21. import "google/type/latlng.proto";
  22. option go_package = "google.golang.org/genproto/googleapis/maps/fleetengine/v1;fleetengine";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "FleetEngine";
  25. option java_package = "google.maps.fleetengine.v1";
  26. option objc_class_prefix = "CFE";
  27. // Identifies a terminal point.
  28. message TerminalPointId {
  29. // Deprecated.
  30. oneof Id {
  31. // Deprecated.
  32. string place_id = 2 [deprecated = true];
  33. // Deprecated.
  34. string generated_id = 3 [deprecated = true];
  35. }
  36. // Unique ID of the terminal point.
  37. string value = 4;
  38. }
  39. // Describes the location of a pickup or dropoff.
  40. message TerminalLocation {
  41. // Required. Denotes the actual location of a pickup or dropoff.
  42. google.type.LatLng point = 1 [(google.api.field_behavior) = REQUIRED];
  43. // Required. ID of the terminal point.
  44. TerminalPointId terminal_point_id = 2 [(google.api.field_behavior) = REQUIRED];
  45. // Deprecated.
  46. string access_point_id = 3 [deprecated = true];
  47. // Deprecated. Use vehicle.waypoint instead.
  48. string trip_id = 4 [deprecated = true];
  49. // Deprecated. Vehicle.waypoint will have this data.
  50. WaypointType terminal_location_type = 5 [deprecated = true];
  51. }
  52. // Describes a stopping point on a vehicle's route or an ending point on a
  53. // vehicle's trip.
  54. message TripWaypoint {
  55. // The location where this waypoint is
  56. TerminalLocation location = 1;
  57. // The trip this waypoint is part of
  58. string trip_id = 2;
  59. // The type described the role the waypoint plays for this trip such as a
  60. // pickup or dropoff.
  61. WaypointType waypoint_type = 3;
  62. // The path calculated by Fleet Engine from the previous waypoint to the
  63. // current waypoint.
  64. repeated google.type.LatLng path_to_waypoint = 4;
  65. // The path distance calculated by Fleet Engine from the previous waypoint to
  66. // the current waypoint.
  67. // If the current waypoint is the first waypoint in the list (Vehicle.waypoint
  68. // or Trip.remaining_waypoints), then the starting point is the vehicle's
  69. // location recorded at the time this TripWaypoint was added to the list.
  70. google.protobuf.Int32Value distance_meters = 6;
  71. // The arrival time to this waypoint calculated by Fleet Engine.
  72. google.protobuf.Timestamp eta = 7;
  73. // The travel time from previous waypoint to this point.
  74. // If the current waypoint is the first waypoint in the list (Vehicle.waypoint
  75. // or Trip.remaining_waypoints), then the starting point is the vehicle's
  76. // location recorded at the time that this waypoint was added to the list.
  77. // This field is filled only when returning Trip/Vehicle data.
  78. google.protobuf.Duration duration = 8;
  79. }
  80. // The 'Status' defines a FleetEngine custom logical error mode.
  81. message Status {
  82. // The canonical error code.
  83. enum Code {
  84. // Unspecified status, not a valid value to set.
  85. UNSPECIFIED = 0;
  86. // Internal server error. Usually expect the client to retry in this case.
  87. FAILURE = 1;
  88. // There is no possible route. Client should not retry.
  89. ROUTE_NOT_POSSIBLE = 2;
  90. }
  91. // The error code. It is not possible to have a value as 0 if it is explicitly
  92. // set by the server.
  93. Code code = 1;
  94. // Detailed error message.
  95. string message = 2;
  96. // A list of messages that carry the error details. There is a common set of
  97. // message types for APIs to use.
  98. repeated google.protobuf.Any details = 3;
  99. }
  100. // A full, human-readable address for the entity containing this message.
  101. message FormattedAddress {
  102. // The lines of text that describe the address.
  103. // At least one line must be present.
  104. repeated string lines = 1;
  105. }
  106. // Address of a place.
  107. message Address {
  108. // A full, human-readable address for this place.
  109. FormattedAddress formatted_address = 1;
  110. }
  111. // Describes a vehicle attribute as a key-value pair.
  112. message VehicleAttribute {
  113. // The attribute's key. Keys may not contain the colon character (:).
  114. string key = 1;
  115. // The attribute's value.
  116. string value = 2;
  117. }
  118. // The location, speed, and heading of a vehicle at a point in time.
  119. message VehicleLocation {
  120. // The location of the vehicle.
  121. // When it is sent to FleetEngine, the vehicle's location is a GPS location.
  122. // When you receive it in a response, the vehicle's location can be either a
  123. // GPS location or a supplemental location. The source is specified in the
  124. // field 'location_sensor'.
  125. google.type.LatLng location = 1;
  126. // Deprecated. Use latlng_accuracy instead.
  127. google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true];
  128. // Accuracy of horizontal measurements (lat/lng) in meters as a radius.
  129. google.protobuf.DoubleValue latlng_accuracy = 22;
  130. // Direction the vehicle is moving in degrees. 0 represents North.
  131. // The valid range is [0,360).
  132. google.protobuf.Int32Value heading = 2;
  133. // Deprecated. Use heading_accuracy instead.
  134. google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true];
  135. // Accuracy of heading (bearing) in degrees.
  136. google.protobuf.DoubleValue heading_accuracy = 23;
  137. // Altitude in meters above WGS84.
  138. google.protobuf.DoubleValue altitude = 5;
  139. // Deprecated. Use altitude_accurarcy instead.
  140. google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true];
  141. // Accuracy of altitude measurement in meters.
  142. google.protobuf.DoubleValue altitude_accuracy = 24;
  143. // Speed of the vehicle in kilometers per hour.
  144. // Deprecated. Use speed instead.
  145. google.protobuf.Int32Value speed_kmph = 3 [deprecated = true];
  146. // Speed of the vehicle in meters/second
  147. google.protobuf.DoubleValue speed = 6;
  148. // Accuracy of speed in meters/second.
  149. google.protobuf.DoubleValue speed_accuracy = 7;
  150. // The time when the location was recorded.
  151. google.protobuf.Timestamp update_time = 4;
  152. // Output only. The time when the server receives the location information, filled by
  153. // FleetEngine.
  154. google.protobuf.Timestamp server_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  155. // Provider of location data (for example, "gps").
  156. LocationSensor location_sensor = 11;
  157. // Whether the vehicle location given by "location" field is snapped to a road
  158. // closest to the location given by "raw_location".
  159. // Driver SDK 1.15.1/2.1.1 and up will always set this field.
  160. // Unset value will be treated as true.
  161. google.protobuf.BoolValue is_road_snapped = 27;
  162. // Input only. Indicates whether the GPS sensor is enabled.
  163. google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(google.api.field_behavior) = INPUT_ONLY];
  164. // Input only. Time (in seconds) since this location sample was first sent to the server.
  165. // This will be zero for the first update. If the time is unknown
  166. // (for example, when the app restarts), this value resets to zero.
  167. google.protobuf.Int32Value time_since_update = 14 [(google.api.field_behavior) = INPUT_ONLY];
  168. // Input only. Number of additional attempts to send the current location to the server.
  169. // If this value is zero, then it is not stale.
  170. google.protobuf.Int32Value num_stale_updates = 15 [(google.api.field_behavior) = INPUT_ONLY];
  171. // Raw vehicle location (unprocessed by road-snapper).
  172. google.type.LatLng raw_location = 16;
  173. // Input only. Timestamp associated with the raw location.
  174. google.protobuf.Timestamp raw_location_time = 17 [(google.api.field_behavior) = INPUT_ONLY];
  175. // Input only. Source of the raw location.
  176. LocationSensor raw_location_sensor = 28 [(google.api.field_behavior) = INPUT_ONLY];
  177. // Input only. Accuracy of the raw location (lat/lng) as a radius, measured in meters.
  178. google.protobuf.DoubleValue raw_location_accuracy = 25 [(google.api.field_behavior) = INPUT_ONLY];
  179. // Input only. Supplemental location provided by the integrating app, such as the location
  180. // provided by Fused Location Provider.
  181. google.type.LatLng supplemental_location = 18 [(google.api.field_behavior) = INPUT_ONLY];
  182. // Input only. Timestamp associated with the supplemental location.
  183. google.protobuf.Timestamp supplemental_location_time = 19 [(google.api.field_behavior) = INPUT_ONLY];
  184. // Input only. Source of the supplemental location.
  185. LocationSensor supplemental_location_sensor = 20 [(google.api.field_behavior) = INPUT_ONLY];
  186. // Input only. Accuracy of supplemental location (lat/lng) as a radius, measured in
  187. // meters.
  188. google.protobuf.DoubleValue supplemental_location_accuracy = 21 [(google.api.field_behavior) = INPUT_ONLY];
  189. // Deprecated, use is_road_snapped instead.
  190. bool road_snapped = 26 [deprecated = true];
  191. }
  192. // The type of a trip.
  193. enum TripType {
  194. // Default, used for unspecified or unrecognized trip types.
  195. UNKNOWN_TRIP_TYPE = 0;
  196. // The trip may share a vehicle with other trips.
  197. SHARED = 1;
  198. // The trip is exclusive to a vehicle.
  199. EXCLUSIVE = 2;
  200. }
  201. // The type of waypoint.
  202. enum WaypointType {
  203. // Default, unknown waypoint type
  204. UNKNOWN_WAYPOINT_TYPE = 0;
  205. // Waypoints for picking up customers or merchandise.
  206. PICKUP_WAYPOINT_TYPE = 1;
  207. // Waypoints for dropping off customers or merchandise.
  208. DROP_OFF_WAYPOINT_TYPE = 2;
  209. // Waypoints for intermediate destinations in a multi-destination trip.
  210. INTERMEDIATE_DESTINATION_WAYPOINT_TYPE = 3;
  211. }
  212. // The type of polyline format.
  213. enum PolylineFormatType {
  214. // Unspecified format type.
  215. UNKNOWN_FORMAT_TYPE = 0;
  216. // Repeated LatLng.
  217. LAT_LNG_LIST_TYPE = 1;
  218. // A polyline encoded with a polyline compression algorithm. Decoding is not
  219. // yet supported.
  220. ENCODED_POLYLINE_TYPE = 2;
  221. }
  222. // A set of values that specify the vehicle's navigation status.
  223. enum NavigationStatus {
  224. // Unspecified navigation status.
  225. UNKNOWN_NAVIGATION_STATUS = 0;
  226. // The Driver app's navigation is in FREE_NAV mode.
  227. NO_GUIDANCE = 1;
  228. // Turn-by-turn navigation starts and the Driver app navigation enters
  229. // GUIDED_NAV mode showing the green header, route, and destination marker.
  230. ENROUTE_TO_DESTINATION = 2;
  231. // Vehicle has gone off the suggested route.
  232. OFF_ROUTE = 3;
  233. // The vehicle is within 50m of the destination and onArrival was
  234. // automatically triggered.
  235. ARRIVED_AT_DESTINATION = 4;
  236. }
  237. // Possible location providers.
  238. enum LocationSensor {
  239. // Undefined sensor.
  240. UNKNOWN_SENSOR = 0;
  241. // Sensors: (GPS, AGPS).
  242. GPS = 1;
  243. // Sensors: (AGPS, CellID, WiFi MACID).
  244. NETWORK = 2;
  245. // Sensors: (CellID, WiFi MACID).
  246. PASSIVE = 3;
  247. // GMM's road snapped (gmfc) location.
  248. ROAD_SNAPPED_LOCATION_PROVIDER = 4;
  249. // Unspecified, but generated by the Fused Location Provider.
  250. FUSED_LOCATION_PROVIDER = 100;
  251. }