traffic.proto 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. option go_package = "google.golang.org/genproto/googleapis/maps/fleetengine/v1;fleetengine";
  17. option java_multiple_files = true;
  18. option java_outer_classname = "TrafficProto";
  19. option java_package = "google.maps.fleetengine.v1";
  20. option objc_class_prefix = "CFE";
  21. // Traffic density indicator on a contiguous segment of a path. Given a path
  22. // with points P_0, P_1, ... , P_N (zero-based index), the SpeedReadingInterval
  23. // defines an interval and describes its traffic using the following categories.
  24. message SpeedReadingInterval {
  25. // The classification of polyline speed based on traffic data.
  26. enum Speed {
  27. // Default value. This value is unused.
  28. SPEED_UNSPECIFIED = 0;
  29. // Normal speed, no slowdown is detected.
  30. NORMAL = 1;
  31. // Slowdown detected, but no traffic jam formed.
  32. SLOW = 2;
  33. // Traffic jam detected.
  34. TRAFFIC_JAM = 3;
  35. }
  36. // The starting index of this interval in the path.
  37. // In JSON, when the index is 0, the field will appear to be unpopulated.
  38. int32 start_polyline_point_index = 1;
  39. // The ending index of this interval in the path.
  40. // In JSON, when the index is 0, the field will appear to be unpopulated.
  41. int32 end_polyline_point_index = 2;
  42. // Traffic speed in this interval.
  43. Speed speed = 3;
  44. }
  45. // Traffic density along a Vehicle's path.
  46. message ConsumableTrafficPolyline {
  47. // Traffic speed along the path from the previous waypoint to the current
  48. // waypoint.
  49. repeated SpeedReadingInterval speed_reading_interval = 1;
  50. // The path the driver is taking from the previous waypoint to the current
  51. // waypoint. This path has landmarks in it so clients can show traffic markers
  52. // along the path (see `speed_reading_interval`). Decoding is not yet
  53. // supported.
  54. string encoded_path_to_waypoint = 2;
  55. }