1// Copyright 2023 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 15syntax = "proto3"; 16 17package maps.fleetengine.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/maps/fleetengine/v1/traffic.proto"; 21import "google/protobuf/duration.proto"; 22import "google/protobuf/timestamp.proto"; 23import "google/protobuf/wrappers.proto"; 24import "google/type/latlng.proto"; 25 26option csharp_namespace = "Google.Maps.FleetEngine.V1"; 27option go_package = "cloud.google.com/go/maps/fleetengine/apiv1/fleetenginepb;fleetenginepb"; 28option java_multiple_files = true; 29option java_outer_classname = "FleetEngine"; 30option java_package = "google.maps.fleetengine.v1"; 31option objc_class_prefix = "CFE"; 32 33// Identifies a terminal point. 34message TerminalPointId { 35 // Deprecated. 36 oneof Id { 37 // Deprecated. 38 string place_id = 2 [deprecated = true]; 39 40 // Deprecated. 41 string generated_id = 3 [deprecated = true]; 42 } 43 44 // Unique ID of the terminal point. 45 string value = 4; 46} 47 48// Describes the location of a waypoint. 49message TerminalLocation { 50 // Required. Denotes the location of a trip waypoint. 51 google.type.LatLng point = 1 [(google.api.field_behavior) = REQUIRED]; 52 53 // ID of the terminal point. 54 TerminalPointId terminal_point_id = 2; 55 56 // Deprecated. 57 string access_point_id = 3 [deprecated = true]; 58 59 // Deprecated. 60 string trip_id = 4 [deprecated = true]; 61 62 // Deprecated: `Vehicle.waypoint` will have this data. 63 WaypointType terminal_location_type = 5 [deprecated = true]; 64} 65 66// Describes a stopping point on a vehicle's route or an ending point on a 67// vehicle's trip. 68message TripWaypoint { 69 // The location of this waypoint. 70 TerminalLocation location = 1; 71 72 // The trip associated with this waypoint. 73 string trip_id = 2; 74 75 // The role this waypoint plays in this trip, such as pickup or dropoff. 76 WaypointType waypoint_type = 3; 77 78 // The path from the previous waypoint to the current waypoint. Undefined for 79 // the first waypoint in a list. This field is only populated when requested. 80 repeated google.type.LatLng path_to_waypoint = 4; 81 82 // The encoded path from the previous waypoint to the current waypoint. 83 // 84 // <p>Note: This field is intended only for use by the Driver SDK and Consumer 85 // SDK. Decoding is not yet supported. 86 string encoded_path_to_waypoint = 5; 87 88 // The traffic conditions along the path to this waypoint. Note that traffic 89 // is only available for Google Map Platform Rides and Deliveries Solution 90 // customers. 91 ConsumableTrafficPolyline traffic_to_waypoint = 10; 92 93 // The path distance from the previous waypoint to the current waypoint. 94 // Undefined for the first waypoint in a list. 95 google.protobuf.Int32Value distance_meters = 6; 96 97 // The estimated time of arrival at this waypoint. Undefined for the first 98 // waypoint in a list. 99 google.protobuf.Timestamp eta = 7; 100 101 // The travel time from previous waypoint to this point. Undefined for the 102 // first waypoint in a list. 103 google.protobuf.Duration duration = 8; 104} 105 106// The type of a trip. 107enum TripType { 108 // Default, used for unspecified or unrecognized trip types. 109 UNKNOWN_TRIP_TYPE = 0; 110 111 // The trip may share a vehicle with other trips. 112 SHARED = 1; 113 114 // The trip is exclusive to a vehicle. 115 EXCLUSIVE = 2; 116} 117 118// The type of waypoint. 119enum WaypointType { 120 // Unknown or unspecified waypoint type. 121 UNKNOWN_WAYPOINT_TYPE = 0; 122 123 // Waypoints for picking up riders or items. 124 PICKUP_WAYPOINT_TYPE = 1; 125 126 // Waypoints for dropping off riders or items. 127 DROP_OFF_WAYPOINT_TYPE = 2; 128 129 // Waypoints for intermediate destinations in a multi-destination trip. 130 INTERMEDIATE_DESTINATION_WAYPOINT_TYPE = 3; 131} 132 133// The type of polyline format. 134enum PolylineFormatType { 135 // The format is unspecified or unknown. 136 UNKNOWN_FORMAT_TYPE = 0; 137 138 // A list of `google.type.LatLng`. 139 LAT_LNG_LIST_TYPE = 1; 140 141 // A polyline encoded with a polyline compression algorithm. Decoding is not 142 // yet supported. 143 ENCODED_POLYLINE_TYPE = 2; 144} 145 146// The vehicle's navigation status. 147enum NavigationStatus { 148 // Unspecified navigation status. 149 UNKNOWN_NAVIGATION_STATUS = 0; 150 151 // The Driver app's navigation is in `FREE_NAV` mode. 152 NO_GUIDANCE = 1; 153 154 // Turn-by-turn navigation is available and the Driver app navigation has 155 // entered `GUIDED_NAV` mode. 156 ENROUTE_TO_DESTINATION = 2; 157 158 // The vehicle has gone off the suggested route. 159 OFF_ROUTE = 3; 160 161 // The vehicle is within approximately 50m of the destination. 162 ARRIVED_AT_DESTINATION = 4; 163} 164 165// Describes a vehicle attribute as a key-value pair. The "key:value" string 166// length cannot exceed 256 characters. 167message VehicleAttribute { 168 // The attribute's key. Keys may not contain the colon character (:). 169 string key = 1; 170 171 // The attribute's value. 172 string value = 2; 173 174 // The attribute's value, can be in string, bool, or double type. 175 oneof vehicle_attribute_value { 176 // String typed attribute value. 177 // 178 // Note: This is identical to the `value` field which will eventually be 179 // deprecated. For create or update methods, either field can be used, but 180 // it's strongly recommended to use `string_value`. If both `string_value` 181 // and `value` are set, they must be identical or an error will be thrown. 182 // Both fields are populated in responses. 183 string string_value = 3; 184 185 // Boolean typed attribute value. 186 bool bool_value = 4; 187 188 // Double typed attribute value. 189 double number_value = 5; 190 } 191} 192 193// The location, speed, and heading of a vehicle at a point in time. 194message VehicleLocation { 195 // The location of the vehicle. 196 // When it is sent to Fleet Engine, the vehicle's location is a GPS location. 197 // When you receive it in a response, the vehicle's location can be either a 198 // GPS location, a supplemental location, or some other estimated location. 199 // The source is specified in `location_sensor`. 200 google.type.LatLng location = 1; 201 202 // Deprecated: Use `latlng_accuracy` instead. 203 google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; 204 205 // Accuracy of `location` in meters as a radius. 206 google.protobuf.DoubleValue latlng_accuracy = 22; 207 208 // Direction the vehicle is moving in degrees. 0 represents North. 209 // The valid range is [0,360). 210 google.protobuf.Int32Value heading = 2; 211 212 // Deprecated: Use `heading_accuracy` instead. 213 google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; 214 215 // Accuracy of `heading` in degrees. 216 google.protobuf.DoubleValue heading_accuracy = 23; 217 218 // Altitude in meters above WGS84. 219 google.protobuf.DoubleValue altitude = 5; 220 221 // Deprecated: Use `altitude_accuracy` instead. 222 google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; 223 224 // Accuracy of `altitude` in meters. 225 google.protobuf.DoubleValue altitude_accuracy = 24; 226 227 // Speed of the vehicle in kilometers per hour. 228 // Deprecated: Use `speed` instead. 229 google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; 230 231 // Speed of the vehicle in meters/second 232 google.protobuf.DoubleValue speed = 6; 233 234 // Accuracy of `speed` in meters/second. 235 google.protobuf.DoubleValue speed_accuracy = 7; 236 237 // The time when `location` was reported by the sensor according to the 238 // sensor's clock. 239 google.protobuf.Timestamp update_time = 4; 240 241 // Output only. The time when the server received the location information. 242 google.protobuf.Timestamp server_time = 13 243 [(google.api.field_behavior) = OUTPUT_ONLY]; 244 245 // Provider of location data (for example, `GPS`). 246 LocationSensor location_sensor = 11; 247 248 // Whether `location` is snapped to a road. 249 google.protobuf.BoolValue is_road_snapped = 27; 250 251 // Input only. Indicates whether the GPS sensor is enabled on the mobile 252 // device. 253 google.protobuf.BoolValue is_gps_sensor_enabled = 12 254 [(google.api.field_behavior) = INPUT_ONLY]; 255 256 // Input only. Time (in seconds) since this location was first sent to the 257 // server. This will be zero for the first update. If the time is unknown (for 258 // example, when the app restarts), this value resets to zero. 259 google.protobuf.Int32Value time_since_update = 14 260 [(google.api.field_behavior) = INPUT_ONLY]; 261 262 // Input only. Deprecated: Other signals are now used to determine if a 263 // location is stale. 264 google.protobuf.Int32Value num_stale_updates = 15 265 [deprecated = true, (google.api.field_behavior) = INPUT_ONLY]; 266 267 // Raw vehicle location (unprocessed by road-snapper). 268 google.type.LatLng raw_location = 16; 269 270 // Timestamp associated with the raw location. 271 google.protobuf.Timestamp raw_location_time = 17; 272 273 // Source of the raw location. Defaults to `GPS`. 274 LocationSensor raw_location_sensor = 28; 275 276 // Accuracy of `raw_location` as a radius, in meters. 277 google.protobuf.DoubleValue raw_location_accuracy = 25; 278 279 // Supplemental location provided by the integrating app. 280 google.type.LatLng supplemental_location = 18; 281 282 // Timestamp associated with the supplemental location. 283 google.protobuf.Timestamp supplemental_location_time = 19; 284 285 // Source of the supplemental location. Defaults to 286 // `CUSTOMER_SUPPLIED_LOCATION`. 287 LocationSensor supplemental_location_sensor = 20; 288 289 // Accuracy of `supplemental_location` as a radius, in meters. 290 google.protobuf.DoubleValue supplemental_location_accuracy = 21; 291 292 // Deprecated: Use `is_road_snapped` instead. 293 bool road_snapped = 26 [deprecated = true]; 294} 295 296// The sensor or methodology used to determine the location. 297enum LocationSensor { 298 // The sensor is unspecified or unknown. 299 UNKNOWN_SENSOR = 0; 300 301 // GPS or Assisted GPS. 302 GPS = 1; 303 304 // Assisted GPS, cell tower ID, or WiFi access point. 305 NETWORK = 2; 306 307 // Cell tower ID or WiFi access point. 308 PASSIVE = 3; 309 310 // A location determined by the mobile device to be the most likely 311 // road position. 312 ROAD_SNAPPED_LOCATION_PROVIDER = 4; 313 314 // A customer-supplied location from an independent source. Typically, this 315 // value is used for a location provided from sources other than the mobile 316 // device running Driver SDK. If the original source is described by one of 317 // the other enum values, use that value. Locations marked 318 // CUSTOMER_SUPPLIED_LOCATION are typically provided via a Vehicle's 319 // `last_location.supplemental_location_sensor`. 320 CUSTOMER_SUPPLIED_LOCATION = 5; 321 322 // A location calculated by Fleet Engine based on the signals available to it. 323 // Output only. This value will be rejected if it is received in a request. 324 FLEET_ENGINE_LOCATION = 6; 325 326 // Android's Fused Location Provider. 327 FUSED_LOCATION_PROVIDER = 100; 328 329 // The location provider on Apple operating systems. 330 CORE_LOCATION = 200; 331} 332