xref: /aosp_15_r20/external/googleapis/google/maps/routing/v2/waypoint.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.maps.routing.v2;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "google/maps/routing/v2/location.proto";
20*d5c09012SAndroid Build Coastguard Worker
21*d5c09012SAndroid Build Coastguard Workeroption cc_enable_arenas = true;
22*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Maps.Routing.V2";
23*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
24*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
25*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "WaypointProto";
26*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.maps.routing.v2";
27*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "GMRV2";
28*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Maps\\Routing\\V2";
29*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Maps::Routing::V2";
30*d5c09012SAndroid Build Coastguard Worker
31*d5c09012SAndroid Build Coastguard Worker// Encapsulates a waypoint. Waypoints mark both the beginning and end of a
32*d5c09012SAndroid Build Coastguard Worker// route, and include intermediate stops along the route.
33*d5c09012SAndroid Build Coastguard Workermessage Waypoint {
34*d5c09012SAndroid Build Coastguard Worker  // Different ways to represent a location.
35*d5c09012SAndroid Build Coastguard Worker  oneof location_type {
36*d5c09012SAndroid Build Coastguard Worker    // A point specified using geographic coordinates, including an optional
37*d5c09012SAndroid Build Coastguard Worker    // heading.
38*d5c09012SAndroid Build Coastguard Worker    Location location = 1;
39*d5c09012SAndroid Build Coastguard Worker
40*d5c09012SAndroid Build Coastguard Worker    // The POI Place ID associated with the waypoint.
41*d5c09012SAndroid Build Coastguard Worker    string place_id = 2;
42*d5c09012SAndroid Build Coastguard Worker
43*d5c09012SAndroid Build Coastguard Worker    // Human readable address or a plus code.
44*d5c09012SAndroid Build Coastguard Worker    // See https://plus.codes for details.
45*d5c09012SAndroid Build Coastguard Worker    string address = 7;
46*d5c09012SAndroid Build Coastguard Worker  }
47*d5c09012SAndroid Build Coastguard Worker
48*d5c09012SAndroid Build Coastguard Worker  // Marks this waypoint as a milestone rather a stopping point. For
49*d5c09012SAndroid Build Coastguard Worker  // each non-via waypoint in the request, the response appends an entry to the
50*d5c09012SAndroid Build Coastguard Worker  // [`legs`][google.maps.routing.v2.Route.legs]
51*d5c09012SAndroid Build Coastguard Worker  // array to provide the details for stopovers on that leg of the trip. Set
52*d5c09012SAndroid Build Coastguard Worker  // this value to true when you want the route to pass through this waypoint
53*d5c09012SAndroid Build Coastguard Worker  // without stopping over. Via waypoints don't cause an entry to be added to
54*d5c09012SAndroid Build Coastguard Worker  // the `legs` array, but they do route the journey through the waypoint. You
55*d5c09012SAndroid Build Coastguard Worker  // can only set this value on waypoints that are intermediates. The request
56*d5c09012SAndroid Build Coastguard Worker  // fails if you set this field on terminal waypoints. If
57*d5c09012SAndroid Build Coastguard Worker  // `ComputeRoutesRequest.optimize_waypoint_order` is set to true then this
58*d5c09012SAndroid Build Coastguard Worker  // field cannot be set to true; otherwise, the request fails.
59*d5c09012SAndroid Build Coastguard Worker  bool via = 3;
60*d5c09012SAndroid Build Coastguard Worker
61*d5c09012SAndroid Build Coastguard Worker  // Indicates that the waypoint is meant for vehicles to stop at, where the
62*d5c09012SAndroid Build Coastguard Worker  // intention is to either pickup or drop-off. When you set this value, the
63*d5c09012SAndroid Build Coastguard Worker  // calculated route won't include non-`via` waypoints on roads that are
64*d5c09012SAndroid Build Coastguard Worker  // unsuitable for pickup and drop-off. This option works only for `DRIVE` and
65*d5c09012SAndroid Build Coastguard Worker  // `TWO_WHEELER` travel modes, and when the `location_type` is
66*d5c09012SAndroid Build Coastguard Worker  // [`Location`][google.maps.routing.v2.Location].
67*d5c09012SAndroid Build Coastguard Worker  bool vehicle_stopover = 4;
68*d5c09012SAndroid Build Coastguard Worker
69*d5c09012SAndroid Build Coastguard Worker  // Indicates that the location of this waypoint is meant to have a preference
70*d5c09012SAndroid Build Coastguard Worker  // for the vehicle to stop at a particular side of road. When you set this
71*d5c09012SAndroid Build Coastguard Worker  // value, the route will pass through the location so that the vehicle can
72*d5c09012SAndroid Build Coastguard Worker  // stop at the side of road that the location is biased towards from the
73*d5c09012SAndroid Build Coastguard Worker  // center of the road. This option works only for `DRIVE` and `TWO_WHEELER`
74*d5c09012SAndroid Build Coastguard Worker  // [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
75*d5c09012SAndroid Build Coastguard Worker  bool side_of_road = 5;
76*d5c09012SAndroid Build Coastguard Worker}
77