fleetengine.proto 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. // Copyright 2022 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/maps/fleetengine/v1/traffic.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 waypoint.
  40. message TerminalLocation {
  41. // Required. Denotes the location of a trip waypoint.
  42. google.type.LatLng point = 1 [(google.api.field_behavior) = REQUIRED];
  43. // ID of the terminal point.
  44. TerminalPointId terminal_point_id = 2;
  45. // Deprecated.
  46. string access_point_id = 3 [deprecated = true];
  47. // Deprecated.
  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 of this waypoint.
  56. TerminalLocation location = 1;
  57. // The trip associated with this waypoint.
  58. string trip_id = 2;
  59. // The role this waypoint plays in this trip, such as pickup or dropoff.
  60. WaypointType waypoint_type = 3;
  61. // The path from the previous waypoint to the current waypoint. Undefined for
  62. // the first waypoint in a list. This field is only populated when requested.
  63. repeated google.type.LatLng path_to_waypoint = 4;
  64. // The encoded path from the previous waypoint to the current waypoint.
  65. //
  66. // <p>Note: This field is intended only for use by the Driver SDK and Consumer
  67. // SDK. Decoding is not yet supported.
  68. string encoded_path_to_waypoint = 5;
  69. // The traffic conditions along the path to this waypoint. Note that traffic
  70. // is only available for Google Map Platform Rides and Deliveries Solution
  71. // customers.
  72. ConsumableTrafficPolyline traffic_to_waypoint = 10;
  73. // The path distance from the previous waypoint to the current waypoint.
  74. // Undefined for the first waypoint in a list.
  75. google.protobuf.Int32Value distance_meters = 6;
  76. // The estimated time of arrival at this waypoint. Undefined for the first
  77. // waypoint in a list.
  78. google.protobuf.Timestamp eta = 7;
  79. // The travel time from previous waypoint to this point. Undefined for the
  80. // first waypoint in a list.
  81. google.protobuf.Duration duration = 8;
  82. }
  83. // The type of a trip.
  84. enum TripType {
  85. // Default, used for unspecified or unrecognized trip types.
  86. UNKNOWN_TRIP_TYPE = 0;
  87. // The trip may share a vehicle with other trips.
  88. SHARED = 1;
  89. // The trip is exclusive to a vehicle.
  90. EXCLUSIVE = 2;
  91. }
  92. // The type of waypoint.
  93. enum WaypointType {
  94. // Unknown or unspecified waypoint type.
  95. UNKNOWN_WAYPOINT_TYPE = 0;
  96. // Waypoints for picking up riders or items.
  97. PICKUP_WAYPOINT_TYPE = 1;
  98. // Waypoints for dropping off riders or items.
  99. DROP_OFF_WAYPOINT_TYPE = 2;
  100. // Waypoints for intermediate destinations in a multi-destination trip.
  101. INTERMEDIATE_DESTINATION_WAYPOINT_TYPE = 3;
  102. }
  103. // The type of polyline format.
  104. enum PolylineFormatType {
  105. // The format is unspecified or unknown.
  106. UNKNOWN_FORMAT_TYPE = 0;
  107. // A list of `google.type.LatLng`.
  108. LAT_LNG_LIST_TYPE = 1;
  109. // A polyline encoded with a polyline compression algorithm. Decoding is not
  110. // yet supported.
  111. ENCODED_POLYLINE_TYPE = 2;
  112. }
  113. // The vehicle's navigation status.
  114. enum NavigationStatus {
  115. // Unspecified navigation status.
  116. UNKNOWN_NAVIGATION_STATUS = 0;
  117. // The Driver app's navigation is in `FREE_NAV` mode.
  118. NO_GUIDANCE = 1;
  119. // Turn-by-turn navigation is available and the Driver app navigation has
  120. // entered `GUIDED_NAV` mode.
  121. ENROUTE_TO_DESTINATION = 2;
  122. // The vehicle has gone off the suggested route.
  123. OFF_ROUTE = 3;
  124. // The vehicle is within approximately 50m of the destination.
  125. ARRIVED_AT_DESTINATION = 4;
  126. }
  127. // Describes a vehicle attribute as a key-value pair. The "key:value" string
  128. // length cannot exceed 256 characters.
  129. message VehicleAttribute {
  130. // The attribute's key. Keys may not contain the colon character (:).
  131. string key = 1;
  132. // The attribute's value.
  133. string value = 2;
  134. }
  135. // The location, speed, and heading of a vehicle at a point in time.
  136. message VehicleLocation {
  137. // The location of the vehicle.
  138. // When it is sent to Fleet Engine, the vehicle's location is a GPS location.
  139. // When you receive it in a response, the vehicle's location can be either a
  140. // GPS location, a supplemental location, or some other estimated location.
  141. // The source is specified in `location_sensor`.
  142. google.type.LatLng location = 1;
  143. // Deprecated: Use `latlng_accuracy` instead.
  144. google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true];
  145. // Accuracy of `location` in meters as a radius.
  146. google.protobuf.DoubleValue latlng_accuracy = 22;
  147. // Direction the vehicle is moving in degrees. 0 represents North.
  148. // The valid range is [0,360).
  149. google.protobuf.Int32Value heading = 2;
  150. // Deprecated: Use `heading_accuracy` instead.
  151. google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true];
  152. // Accuracy of `heading` in degrees.
  153. google.protobuf.DoubleValue heading_accuracy = 23;
  154. // Altitude in meters above WGS84.
  155. google.protobuf.DoubleValue altitude = 5;
  156. // Deprecated: Use `altitude_accuracy` instead.
  157. google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true];
  158. // Accuracy of `altitude` in meters.
  159. google.protobuf.DoubleValue altitude_accuracy = 24;
  160. // Speed of the vehicle in kilometers per hour.
  161. // Deprecated: Use `speed` instead.
  162. google.protobuf.Int32Value speed_kmph = 3 [deprecated = true];
  163. // Speed of the vehicle in meters/second
  164. google.protobuf.DoubleValue speed = 6;
  165. // Accuracy of `speed` in meters/second.
  166. google.protobuf.DoubleValue speed_accuracy = 7;
  167. // The time when `location` was reported by the sensor according to the
  168. // sensor's clock.
  169. google.protobuf.Timestamp update_time = 4;
  170. // Output only. The time when the server received the location information.
  171. google.protobuf.Timestamp server_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  172. // Provider of location data (for example, `GPS`).
  173. LocationSensor location_sensor = 11;
  174. // Whether `location` is snapped to a road.
  175. google.protobuf.BoolValue is_road_snapped = 27;
  176. // Input only. Indicates whether the GPS sensor is enabled on the mobile device.
  177. google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(google.api.field_behavior) = INPUT_ONLY];
  178. // Input only. Time (in seconds) since this location was first sent to the server.
  179. // This will be zero for the first update. If the time is unknown
  180. // (for example, when the app restarts), this value resets to zero.
  181. google.protobuf.Int32Value time_since_update = 14 [(google.api.field_behavior) = INPUT_ONLY];
  182. // Input only. Number of additional attempts to send this location to the server.
  183. // If this value is zero, then it is not stale.
  184. google.protobuf.Int32Value num_stale_updates = 15 [(google.api.field_behavior) = INPUT_ONLY];
  185. // Raw vehicle location (unprocessed by road-snapper).
  186. google.type.LatLng raw_location = 16;
  187. // Input only. Timestamp associated with the raw location.
  188. google.protobuf.Timestamp raw_location_time = 17 [(google.api.field_behavior) = INPUT_ONLY];
  189. // Input only. Source of the raw location.
  190. LocationSensor raw_location_sensor = 28 [(google.api.field_behavior) = INPUT_ONLY];
  191. // Input only. Accuracy of `raw_location` as a radius, in meters.
  192. google.protobuf.DoubleValue raw_location_accuracy = 25 [(google.api.field_behavior) = INPUT_ONLY];
  193. // Input only. Supplemental location provided by the integrating app.
  194. google.type.LatLng supplemental_location = 18 [(google.api.field_behavior) = INPUT_ONLY];
  195. // Input only. Timestamp associated with the supplemental location.
  196. google.protobuf.Timestamp supplemental_location_time = 19 [(google.api.field_behavior) = INPUT_ONLY];
  197. // Input only. Source of the supplemental location.
  198. LocationSensor supplemental_location_sensor = 20 [(google.api.field_behavior) = INPUT_ONLY];
  199. // Input only. Accuracy of `supplemental_location` as a radius, in meters.
  200. google.protobuf.DoubleValue supplemental_location_accuracy = 21 [(google.api.field_behavior) = INPUT_ONLY];
  201. // Deprecated: Use `is_road_snapped` instead.
  202. bool road_snapped = 26 [deprecated = true];
  203. }
  204. // The sensor or methodology used to determine the location.
  205. enum LocationSensor {
  206. // The sensor is unspecified or unknown.
  207. UNKNOWN_SENSOR = 0;
  208. // GPS or Assisted GPS.
  209. GPS = 1;
  210. // Assisted GPS, cell tower ID, or WiFi access point.
  211. NETWORK = 2;
  212. // Cell tower ID or WiFi access point.
  213. PASSIVE = 3;
  214. // A location signal snapped to the best road position.
  215. ROAD_SNAPPED_LOCATION_PROVIDER = 4;
  216. // The fused location provider in Google Play services.
  217. FUSED_LOCATION_PROVIDER = 100;
  218. // The location provider on Apple operating systems.
  219. CORE_LOCATION = 200;
  220. }