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 google.maps.routing.v2; 18 19option cc_enable_arenas = true; 20option csharp_namespace = "Google.Maps.Routing.V2"; 21option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb"; 22option java_multiple_files = true; 23option java_outer_classname = "SpeedReadingIntervalProto"; 24option java_package = "com.google.maps.routing.v2"; 25option objc_class_prefix = "GMRV2"; 26option php_namespace = "Google\\Maps\\Routing\\V2"; 27option ruby_package = "Google::Maps::Routing::V2"; 28 29// Traffic density indicator on a contiguous segment of a polyline or path. 30// Given a path with points P_0, P_1, ... , P_N (zero-based index), the 31// `SpeedReadingInterval` defines an interval and describes its traffic using 32// the following categories. 33message SpeedReadingInterval { 34 // The classification of polyline speed based on traffic data. 35 enum Speed { 36 // Default value. This value is unused. 37 SPEED_UNSPECIFIED = 0; 38 39 // Normal speed, no slowdown is detected. 40 NORMAL = 1; 41 42 // Slowdown detected, but no traffic jam formed. 43 SLOW = 2; 44 45 // Traffic jam detected. 46 TRAFFIC_JAM = 3; 47 } 48 49 // The starting index of this interval in the polyline. 50 optional int32 start_polyline_point_index = 1; 51 52 // The ending index of this interval in the polyline. 53 optional int32 end_polyline_point_index = 2; 54 55 oneof speed_type { 56 // Traffic speed in this interval. 57 Speed speed = 3; 58 } 59} 60