@googlemaps/routing 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +202 -0
  3. package/README.md +238 -0
  4. package/build/protos/google/geo/type/viewport.proto +69 -0
  5. package/build/protos/google/maps/routing/v2/fallback_info.proto +72 -0
  6. package/build/protos/google/maps/routing/v2/location.proto +43 -0
  7. package/build/protos/google/maps/routing/v2/maneuver.proto +88 -0
  8. package/build/protos/google/maps/routing/v2/navigation_instruction.proto +40 -0
  9. package/build/protos/google/maps/routing/v2/polyline.proto +74 -0
  10. package/build/protos/google/maps/routing/v2/route.proto +208 -0
  11. package/build/protos/google/maps/routing/v2/route_modifiers.proto +64 -0
  12. package/build/protos/google/maps/routing/v2/route_travel_mode.proto +46 -0
  13. package/build/protos/google/maps/routing/v2/routes_service.proto +311 -0
  14. package/build/protos/google/maps/routing/v2/routing_preference.proto +55 -0
  15. package/build/protos/google/maps/routing/v2/speed_reading_interval.proto +57 -0
  16. package/build/protos/google/maps/routing/v2/toll_info.proto +40 -0
  17. package/build/protos/google/maps/routing/v2/toll_passes.proto +321 -0
  18. package/build/protos/google/maps/routing/v2/units.proto +40 -0
  19. package/build/protos/google/maps/routing/v2/vehicle_emission_type.proto +43 -0
  20. package/build/protos/google/maps/routing/v2/vehicle_info.proto +37 -0
  21. package/build/protos/google/maps/routing/v2/waypoint.proto +71 -0
  22. package/build/protos/protos.d.ts +8392 -0
  23. package/build/protos/protos.js +22576 -0
  24. package/build/protos/protos.json +2144 -0
  25. package/build/src/index.d.ts +11 -0
  26. package/build/src/index.js +28 -0
  27. package/build/src/index.js.map +1 -0
  28. package/build/src/v2/index.d.ts +1 -0
  29. package/build/src/v2/index.js +23 -0
  30. package/build/src/v2/index.js.map +1 -0
  31. package/build/src/v2/routes_client.d.ts +289 -0
  32. package/build/src/v2/routes_client.js +356 -0
  33. package/build/src/v2/routes_client.js.map +1 -0
  34. package/build/src/v2/routes_client_config.json +34 -0
  35. package/package.json +66 -0
@@ -0,0 +1,88 @@
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
+
15
+ syntax = "proto3";
16
+
17
+ package google.maps.routing.v2;
18
+
19
+ option cc_enable_arenas = true;
20
+ option csharp_namespace = "Google.Maps.Routing.V2";
21
+ option go_package = "google.golang.org/genproto/googleapis/maps/routing/v2;routing";
22
+ option java_multiple_files = true;
23
+ option java_outer_classname = "ManeuverProto";
24
+ option java_package = "com.google.maps.routing.v2";
25
+ option objc_class_prefix = "GMRV2";
26
+ option php_namespace = "Google\\Maps\\Routing\\V2";
27
+ option ruby_package = "Google::Maps::Routing::V2";
28
+
29
+ // A set of values that specify the navigation action to take for the current
30
+ // step (e.g., turn left, merge, straight, etc.).
31
+ enum Maneuver {
32
+ // Not used.
33
+ MANEUVER_UNSPECIFIED = 0;
34
+
35
+ // Turn slightly to the left.
36
+ TURN_SLIGHT_LEFT = 1;
37
+
38
+ // Turn sharply to the left.
39
+ TURN_SHARP_LEFT = 2;
40
+
41
+ // Make a left u-turn.
42
+ UTURN_LEFT = 3;
43
+
44
+ // Turn left.
45
+ TURN_LEFT = 4;
46
+
47
+ // Turn slightly to the right.
48
+ TURN_SLIGHT_RIGHT = 5;
49
+
50
+ // Turn sharply to the right.
51
+ TURN_SHARP_RIGHT = 6;
52
+
53
+ // Make a right u-turn.
54
+ UTURN_RIGHT = 7;
55
+
56
+ // Turn right.
57
+ TURN_RIGHT = 8;
58
+
59
+ // Go straight.
60
+ STRAIGHT = 9;
61
+
62
+ // Take the left ramp.
63
+ RAMP_LEFT = 10;
64
+
65
+ // Take the right ramp.
66
+ RAMP_RIGHT = 11;
67
+
68
+ // Merge into traffic.
69
+ MERGE = 12;
70
+
71
+ // Take the left fork.
72
+ FORK_LEFT = 13;
73
+
74
+ // Take the right fork.
75
+ FORK_RIGHT = 14;
76
+
77
+ // Take the ferry.
78
+ FERRY = 15;
79
+
80
+ // Take the train leading onto the ferry.
81
+ FERRY_TRAIN = 16;
82
+
83
+ // Turn left at the roundabout.
84
+ ROUNDABOUT_LEFT = 17;
85
+
86
+ // Turn right at the roundabout.
87
+ ROUNDABOUT_RIGHT = 18;
88
+ }
@@ -0,0 +1,40 @@
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
+
15
+ syntax = "proto3";
16
+
17
+ package google.maps.routing.v2;
18
+
19
+ import "google/maps/routing/v2/maneuver.proto";
20
+
21
+ option cc_enable_arenas = true;
22
+ option csharp_namespace = "Google.Maps.Routing.V2";
23
+ option go_package = "google.golang.org/genproto/googleapis/maps/routing/v2;routing";
24
+ option java_multiple_files = true;
25
+ option java_outer_classname = "NavigationInstructionProto";
26
+ option java_package = "com.google.maps.routing.v2";
27
+ option objc_class_prefix = "GMRV2";
28
+ option php_namespace = "Google\\Maps\\Routing\\V2";
29
+ option ruby_package = "Google::Maps::Routing::V2";
30
+
31
+ // Encapsulates navigation instructions for a
32
+ // [RouteLegStep][google.maps.routing.v2.RouteLegStep]
33
+ message NavigationInstruction {
34
+ // Encapsulates the navigation instructions for the current step (e.g., turn
35
+ // left, merge, straight, etc.). This field determines which icon to display.
36
+ Maneuver maneuver = 1;
37
+
38
+ // Instructions for navigating this step.
39
+ string instructions = 2;
40
+ }
@@ -0,0 +1,74 @@
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
+
15
+ syntax = "proto3";
16
+
17
+ package google.maps.routing.v2;
18
+
19
+ import "google/protobuf/struct.proto";
20
+
21
+ option cc_enable_arenas = true;
22
+ option csharp_namespace = "Google.Maps.Routing.V2";
23
+ option go_package = "google.golang.org/genproto/googleapis/maps/routing/v2;routing";
24
+ option java_multiple_files = true;
25
+ option java_outer_classname = "PolylineProto";
26
+ option java_package = "com.google.maps.routing.v2";
27
+ option objc_class_prefix = "GMRV2";
28
+ option php_namespace = "Google\\Maps\\Routing\\V2";
29
+ option ruby_package = "Google::Maps::Routing::V2";
30
+
31
+ // Encapsulates an encoded polyline.
32
+ message Polyline {
33
+ // Encapsulates the type of polyline. Defaults to encoded_polyline.
34
+ oneof polyline_type {
35
+ // The string encoding of the polyline using the [polyline encoding
36
+ // algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm)
37
+ string encoded_polyline = 1;
38
+
39
+ // Specifies a polyline using the [GeoJSON LineString
40
+ // format](https://tools.ietf.org/html/rfc7946#section-3.1.4)
41
+ google.protobuf.Struct geo_json_linestring = 2;
42
+ }
43
+ }
44
+
45
+ // A set of values that specify the quality of the polyline.
46
+ enum PolylineQuality {
47
+ // No polyline quality preference specified. Defaults to `OVERVIEW`.
48
+ POLYLINE_QUALITY_UNSPECIFIED = 0;
49
+
50
+ // Specifies a high-quality polyline - which is composed using more points
51
+ // than `OVERVIEW`, at the cost of increased response size. Use this value
52
+ // when you need more precision.
53
+ HIGH_QUALITY = 1;
54
+
55
+ // Specifies an overview polyline - which is composed using a small number of
56
+ // points. Use this value when displaying an overview of the route. Using this
57
+ // option has a lower request latency compared to using the
58
+ // `HIGH_QUALITY` option.
59
+ OVERVIEW = 2;
60
+ }
61
+
62
+ // Specifies the preferred type of polyline to be returned.
63
+ enum PolylineEncoding {
64
+ // No polyline type preference specified. Defaults to `ENCODED_POLYLINE`.
65
+ POLYLINE_ENCODING_UNSPECIFIED = 0;
66
+
67
+ // Specifies a polyline encoded using the [polyline encoding
68
+ // algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm).
69
+ ENCODED_POLYLINE = 1;
70
+
71
+ // Specifies a polyline using the [GeoJSON LineString
72
+ // format](https://tools.ietf.org/html/rfc7946#section-3.1.4)
73
+ GEO_JSON_LINESTRING = 2;
74
+ }
@@ -0,0 +1,208 @@
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
+
15
+ syntax = "proto3";
16
+
17
+ package google.maps.routing.v2;
18
+
19
+ import "google/geo/type/viewport.proto";
20
+ import "google/maps/routing/v2/location.proto";
21
+ import "google/maps/routing/v2/navigation_instruction.proto";
22
+ import "google/maps/routing/v2/polyline.proto";
23
+ import "google/maps/routing/v2/speed_reading_interval.proto";
24
+ import "google/maps/routing/v2/toll_info.proto";
25
+ import "google/protobuf/duration.proto";
26
+
27
+ option cc_enable_arenas = true;
28
+ option csharp_namespace = "Google.Maps.Routing.V2";
29
+ option go_package = "google.golang.org/genproto/googleapis/maps/routing/v2;routing";
30
+ option java_multiple_files = true;
31
+ option java_outer_classname = "RouteProto";
32
+ option java_package = "com.google.maps.routing.v2";
33
+ option objc_class_prefix = "GMRV2";
34
+ option php_namespace = "Google\\Maps\\Routing\\V2";
35
+ option ruby_package = "Google::Maps::Routing::V2";
36
+
37
+ // Encapsulates a route, which consists of a series of connected road segments
38
+ // that join beginning, ending, and intermediate waypoints.
39
+ message Route {
40
+ // A collection of legs (path segments between waypoints) that make-up the
41
+ // route. Each leg corresponds to the trip between two non-`via` Waypoints.
42
+ // For example, a route with no intermediate waypoints has only one leg. A
43
+ // route that includes one non-`via` intermediate waypoint has two legs. A
44
+ // route that includes one `via` intermediate waypoint has one leg. The order
45
+ // of the legs matches the order of Waypoints from `origin` to `intermediates`
46
+ // to `destination`.
47
+ repeated RouteLeg legs = 1;
48
+
49
+ // The travel distance of the route, in meters.
50
+ int32 distance_meters = 2;
51
+
52
+ // The length of time needed to navigate the route. If you set the
53
+ // `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as
54
+ // `static_duration`. If you set the `routing_preference` to either
55
+ // `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated
56
+ // taking traffic conditions into account.
57
+ google.protobuf.Duration duration = 3;
58
+
59
+ // The duration of traveling through the route without taking traffic
60
+ // conditions into consideration.
61
+ google.protobuf.Duration static_duration = 4;
62
+
63
+ // The overall route polyline. This polyline will be the combined polyline of
64
+ // all `legs`.
65
+ Polyline polyline = 5;
66
+
67
+ // A description of the route.
68
+ string description = 6;
69
+
70
+ // An array of warnings to show when displaying the route.
71
+ repeated string warnings = 7;
72
+
73
+ // The viewport bounding box of the polyline.
74
+ google.geo.type.Viewport viewport = 8;
75
+
76
+ // Additional information about the route.
77
+ RouteTravelAdvisory travel_advisory = 9;
78
+ }
79
+
80
+ // Encapsulates the additional information that the user should be informed
81
+ // about, such as possible traffic zone restriction etc.
82
+ message RouteTravelAdvisory {
83
+ // Encapsulates information about tolls on the Route.
84
+ // This field is only populated if we expect there are tolls on the Route.
85
+ // If this field is set but the estimated_price subfield is not populated,
86
+ // we expect that road contains tolls but we do not know an estimated price.
87
+ // If this field is not set, then we expect there is no toll on the Route.
88
+ TollInfo toll_info = 2;
89
+
90
+ // Speed reading intervals detailing traffic density. Applicable in case of
91
+ // `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
92
+ // The intervals cover the entire polyline of the route without overlap.
93
+ // The start point of a specified interval is the same as the end point of the
94
+ // preceding interval.
95
+ //
96
+ // Example:
97
+ //
98
+ // polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
99
+ // speed_reading_intervals: [A,C), [C,D), [D,G).
100
+ repeated SpeedReadingInterval speed_reading_intervals = 3;
101
+ }
102
+
103
+ // Encapsulates the additional information that the user should be informed
104
+ // about, such as possible traffic zone restriction etc. on a route leg.
105
+ message RouteLegTravelAdvisory {
106
+ // Encapsulates information about tolls on the specific RouteLeg.
107
+ // This field is only populated if we expect there are tolls on the RouteLeg.
108
+ // If this field is set but the estimated_price subfield is not populated,
109
+ // we expect that road contains tolls but we do not know an estimated price.
110
+ // If this field does not exist, then there is no toll on the RouteLeg.
111
+ TollInfo toll_info = 1;
112
+
113
+ // Speed reading intervals detailing traffic density. Applicable in case of
114
+ // `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
115
+ // The intervals cover the entire polyline of the RouteLg without overlap.
116
+ // The start point of a specified interval is the same as the end point of the
117
+ // preceding interval.
118
+ //
119
+ // Example:
120
+ //
121
+ // polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
122
+ // speed_reading_intervals: [A,C), [C,D), [D,G).
123
+ repeated SpeedReadingInterval speed_reading_intervals = 2;
124
+ }
125
+
126
+ // Encapsulates the additional information that the user should be informed
127
+ // about, such as possible traffic zone restriction on a leg step.
128
+ message RouteLegStepTravelAdvisory {
129
+ // Speed reading intervals detailing traffic density. Applicable in case of
130
+ // `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
131
+ // The intervals cover the entire polyline of the RouteLegStep without
132
+ // overlap. The start point of a specified interval is the same as the end
133
+ // point of the preceding interval.
134
+ //
135
+ // Example:
136
+ //
137
+ // polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
138
+ // speed_reading_intervals: [A,C), [C,D), [D,G).
139
+ repeated SpeedReadingInterval speed_reading_intervals = 1;
140
+ }
141
+
142
+ // Encapsulates a segment between non-`via` waypoints.
143
+ message RouteLeg {
144
+ // The travel distance of the route leg, in meters.
145
+ int32 distance_meters = 1;
146
+
147
+ // The length of time needed to navigate the leg. If the `route_preference`
148
+ // is set to `TRAFFIC_UNAWARE`, then this value is the same as
149
+ // `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
150
+ // `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
151
+ // conditions into account.
152
+ google.protobuf.Duration duration = 2;
153
+
154
+ // The duration of traveling through the leg, calculated without taking
155
+ // traffic conditions into consideration.
156
+ google.protobuf.Duration static_duration = 3;
157
+
158
+ // The overall polyline for this leg. This includes that each `step`'s
159
+ // polyline.
160
+ Polyline polyline = 4;
161
+
162
+ // The start location of this leg. This might be different from the provided
163
+ // `origin`. For example, when the provided `origin` is not near a road, this
164
+ // is a point on the road.
165
+ Location start_location = 5;
166
+
167
+ // The end location of this leg. This might be different from the provided
168
+ // `destination`. For example, when the provided `destination` is not near a
169
+ // road, this is a point on the road.
170
+ Location end_location = 6;
171
+
172
+ // An array of steps denoting segments within this leg. Each step represents
173
+ // one navigation instruction.
174
+ repeated RouteLegStep steps = 7;
175
+
176
+ // Encapsulates the additional information that the user should be informed
177
+ // about, such as possible traffic zone restriction etc. on a route leg.
178
+ RouteLegTravelAdvisory travel_advisory = 8;
179
+ }
180
+
181
+ // Encapsulates a segment of a `RouteLeg`. A step corresponds to a single
182
+ // navigation instruction. Route legs are made up of steps.
183
+ message RouteLegStep {
184
+ // The travel distance of this step, in meters. In some circumstances, this
185
+ // field might not have a value.
186
+ int32 distance_meters = 1;
187
+
188
+ // The duration of travel through this step without taking traffic conditions
189
+ // into consideration. In some circumstances, this field might not have a
190
+ // value.
191
+ google.protobuf.Duration static_duration = 2;
192
+
193
+ // The polyline associated with this step.
194
+ Polyline polyline = 3;
195
+
196
+ // The start location of this step.
197
+ Location start_location = 4;
198
+
199
+ // The end location of this step.
200
+ Location end_location = 5;
201
+
202
+ // Navigation instructions.
203
+ NavigationInstruction navigation_instruction = 6;
204
+
205
+ // Encapsulates the additional information that the user should be informed
206
+ // about, such as possible traffic zone restriction on a leg step.
207
+ RouteLegStepTravelAdvisory travel_advisory = 7;
208
+ }
@@ -0,0 +1,64 @@
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
+
15
+ syntax = "proto3";
16
+
17
+ package google.maps.routing.v2;
18
+
19
+ import "google/maps/routing/v2/toll_passes.proto";
20
+ import "google/maps/routing/v2/vehicle_info.proto";
21
+
22
+ option cc_enable_arenas = true;
23
+ option csharp_namespace = "Google.Maps.Routing.V2";
24
+ option go_package = "google.golang.org/genproto/googleapis/maps/routing/v2;routing";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "RouteModifiersProto";
27
+ option java_package = "com.google.maps.routing.v2";
28
+ option objc_class_prefix = "GMRV2";
29
+ option php_namespace = "Google\\Maps\\Routing\\V2";
30
+ option ruby_package = "Google::Maps::Routing::V2";
31
+
32
+ // Encapsulates a set of optional conditions to satisfy when calculating the
33
+ // routes.
34
+ message RouteModifiers {
35
+ // Specifies whether to avoid toll roads where reasonable. Preference will be
36
+ // given to routes not containing toll roads. Applies only to the `DRIVE` and
37
+ // `TWO_WHEELER` travel modes.
38
+ bool avoid_tolls = 1;
39
+
40
+ // Specifies whether to avoid highways where reasonable. Preference will be
41
+ // given to routes not containing highways. Applies only to the `DRIVE` and
42
+ // `TWO_WHEELER` travel modes.
43
+ bool avoid_highways = 2;
44
+
45
+ // Specifies whether to avoid ferries where reasonable. Preference will be
46
+ // given to routes not containing travel by ferries.
47
+ // Applies only to the `DRIVE` and`TWO_WHEELER` travel modes.
48
+ bool avoid_ferries = 3;
49
+
50
+ // Specifies whether to avoid navigating indoors where reasonable. Preference
51
+ // will be given to routes not containing indoor navigation.
52
+ // Applies only to the `WALK` travel mode.
53
+ bool avoid_indoor = 4;
54
+
55
+ // Specifies the vehicle information.
56
+ VehicleInfo vehicle_info = 5;
57
+
58
+ // Encapsulates information about toll passes.
59
+ // If toll passes are provided, the API tries to return the pass price. If
60
+ // toll passes are not provided, the API treats the toll pass as unknown and
61
+ // tries to return the cash price.
62
+ // Applies only to the DRIVE and TWO_WHEELER travel modes.
63
+ repeated TollPass toll_passes = 6;
64
+ }
@@ -0,0 +1,46 @@
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
+
15
+ syntax = "proto3";
16
+
17
+ package google.maps.routing.v2;
18
+
19
+ option cc_enable_arenas = true;
20
+ option csharp_namespace = "Google.Maps.Routing.V2";
21
+ option go_package = "google.golang.org/genproto/googleapis/maps/routing/v2;routing";
22
+ option java_multiple_files = true;
23
+ option java_outer_classname = "RouteTravelModeProto";
24
+ option java_package = "com.google.maps.routing.v2";
25
+ option objc_class_prefix = "GMRV2";
26
+ option php_namespace = "Google\\Maps\\Routing\\V2";
27
+ option ruby_package = "Google::Maps::Routing::V2";
28
+
29
+ // A set of values used to specify the mode of travel.
30
+ enum RouteTravelMode {
31
+ // No travel mode specified. Defaults to `DRIVE`.
32
+ TRAVEL_MODE_UNSPECIFIED = 0;
33
+
34
+ // Travel by passenger car.
35
+ DRIVE = 1;
36
+
37
+ // Travel by bicycle.
38
+ BICYCLE = 2;
39
+
40
+ // Travel by walking.
41
+ WALK = 3;
42
+
43
+ // Two-wheeled, motorized vehicle. For example, motorcycle. Note that this
44
+ // differs from the `BICYCLE` travel mode which covers human-powered mode.
45
+ TWO_WHEELER = 4;
46
+ }