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 = "TransitPreferencesProto"; 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// Preferences for `TRANSIT` based routes that influence the route that is 30// returned. 31message TransitPreferences { 32 // A set of values used to specify the mode of transit. 33 enum TransitTravelMode { 34 // No transit travel mode specified. 35 TRANSIT_TRAVEL_MODE_UNSPECIFIED = 0; 36 37 // Travel by bus. 38 BUS = 1; 39 40 // Travel by subway. 41 SUBWAY = 2; 42 43 // Travel by train. 44 TRAIN = 3; 45 46 // Travel by light rail or tram. 47 LIGHT_RAIL = 4; 48 49 // Travel by rail. This is equivalent to a combination of `SUBWAY`, `TRAIN`, 50 // and `LIGHT_RAIL`. 51 RAIL = 5; 52 } 53 54 // Specifies routing preferences for transit routes. 55 enum TransitRoutingPreference { 56 // No preference specified. 57 TRANSIT_ROUTING_PREFERENCE_UNSPECIFIED = 0; 58 59 // Indicates that the calculated route should prefer limited amounts of 60 // walking. 61 LESS_WALKING = 1; 62 63 // Indicates that the calculated route should prefer a limited number of 64 // transfers. 65 FEWER_TRANSFERS = 2; 66 } 67 68 // A set of travel modes to use when getting a `TRANSIT` route. Defaults to 69 // all supported modes of travel. 70 repeated TransitTravelMode allowed_travel_modes = 1; 71 72 // A routing preference that, when specified, influences the `TRANSIT` route 73 // returned. 74 TransitRoutingPreference routing_preference = 2; 75} 76