@@ -90,6 +90,51 @@ message ComputeRoutesRequest {
9090 Units units = 11 ;
9191}
9292
93+ // Encapsulates a set of optional conditions to satisfy when calculating the
94+ // routes.
95+ message RouteModifiers {
96+ // Specifies whether to avoid toll roads where reasonable. Preference will be
97+ // given to routes not containing toll roads. Applies only to the `DRIVE` and
98+ // `TWO_WHEELER` travel modes.
99+ bool avoid_tolls = 1 ;
100+
101+ // Specifies whether to avoid highways where reasonable. Preference will be
102+ // given to routes not containing highways. Applies only to the `DRIVE` and
103+ // `TWO_WHEELER` travel modes.
104+ bool avoid_highways = 2 ;
105+
106+ // Specifies whether to avoid ferries where reasonable. Preference will be
107+ // given to routes not containing travel by ferries.
108+ // Applies only to the `DRIVE` and`TWO_WHEELER` travel modes.
109+ bool avoid_ferries = 3 ;
110+
111+ // Specifies whether to avoid navigating indoors where reasonable. Preference
112+ // will be given to routes not containing indoor navigation.
113+ // Applies only to the `WALK` travel mode.
114+ bool avoid_indoor = 4 ;
115+
116+ // Specifies the vehicle information.
117+ VehicleInfo vehicle_info = 5 ;
118+
119+ // Encapsulates information about toll passes.
120+ // If toll passes are provided, the API tries to return the pass price. If
121+ // toll passes are not provided, the API treats the toll pass as unknown and
122+ // tries to return the cash price.
123+ // Applies only to the DRIVE and TWO_WHEELER travel modes.
124+ repeated TollPass toll_passes = 6 ;
125+ }
126+
127+ // Encapsulates the vehicle information, such as the license plate last
128+ // character.
129+ message VehicleInfo {
130+ // Specifies the license plate last character. Could be a digit or a letter.
131+ string license_plate_last_character = 1 ;
132+
133+ // Describes the vehicle's emission type.
134+ // Applies only to the DRIVE travel mode.
135+ VehicleEmissionType emission_type = 2 ;
136+ }
137+
93138// A set of values used to specify the mode of travel.
94139enum RouteTravelMode {
95140 // No travel mode specified. Defaults to `DRIVE`.
@@ -135,49 +180,6 @@ enum RoutingPreference {
135180 TRAFFIC_AWARE_OPTIMAL = 3 ;
136181}
137182
138- // Encapsulates a set of optional conditions to satisfy when calculating the
139- // routes.
140- message RouteModifiers {
141- // Specifies whether to avoid toll roads where reasonable. Preference will be
142- // given to routes not containing toll roads. Applies only to the `DRIVE` and
143- // `TWO_WHEELER` travel modes.
144- bool avoid_tolls = 1 ;
145-
146- // Specifies whether to avoid highways where reasonable. Preference will be
147- // given to routes not containing highways. Applies only to the `DRIVE` and
148- // `TWO_WHEELER` travel modes.
149- bool avoid_highways = 2 ;
150-
151- // Specifies whether to avoid ferries where reasonable. Preference will be
152- // given to routes not containing travel by ferries.
153- // Applies only to the `DRIVE` and`TWO_WHEELER` travel modes.
154- bool avoid_ferries = 3 ;
155-
156- // Specifies whether to avoid navigating indoors where reasonable. Preference
157- // will be given to routes not containing indoor navigation.
158- // Applies only to the `WALK` travel mode.
159- bool avoid_indoor = 4 ;
160-
161- // Optional. Specifies the vehicle information.
162- VehicleInfo vehicle_info = 5 ;
163-
164- // Encapsulates information about toll passes.
165- // TollPass is unset means no available pass.
166- // Applies only to the DRIVE and TWO_WHEELER travel modes.
167- repeated TollPass toll_passes = 6 ;
168- }
169-
170- // Encapsulates the vehicle information, such as the license plate last
171- // character.
172- message VehicleInfo {
173- // Specifies the license plate last character. Could be a digit or a letter.
174- string license_plate_last_character = 1 ;
175-
176- // Describes the vehicle's emission type.
177- // Applies only to the DRIVE travel mode.
178- VehicleEmissionType emission_type = 2 ;
179- }
180-
181183// A set of values that specify the unit of measure used in the display.
182184enum Units {
183185 // Units of measure not specified. Defaults to the unit of measure inferred
0 commit comments