waypoint.proto 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. syntax = "proto3";
  15. package google.maps.routing.v2;
  16. import "google/maps/routing/v2/location.proto";
  17. option cc_enable_arenas = true;
  18. option csharp_namespace = "Google.Maps.Routing.V2";
  19. option go_package = "google.golang.org/genproto/googleapis/maps/routing/v2;routing";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "WaypointProto";
  22. option java_package = "com.google.maps.routing.v2";
  23. option objc_class_prefix = "GMRV2";
  24. option php_namespace = "Google\\Maps\\Routing\\V2";
  25. option ruby_package = "Google::Maps::Routing::V2";
  26. // Encapsulates a waypoint. Waypoints mark both the beginning and end of a
  27. // route, and include intermediate stops along the route.
  28. message Waypoint {
  29. // Different ways to represent a location.
  30. oneof location_type {
  31. // A point specified using geographic coordinates, including an optional
  32. // heading.
  33. Location location = 1;
  34. // The POI Place ID associated with the waypoint.
  35. string place_id = 2;
  36. }
  37. // Marks this waypoint as a milestone rather a stopping point. For
  38. // each non-via waypoint in the request, the response appends an entry to the
  39. // `legs` array to provide the details for stopovers on that leg of the
  40. // trip. Set this value to true when you want the route to pass through this
  41. // waypoint without stopping over. Via waypoints don't cause an entry to be
  42. // added to the `legs` array, but they do route the journey through the
  43. // waypoint. You can only set this value on waypoints that are intermediates.
  44. // The request fails if you set this field on terminal waypoints.
  45. // If `ComputeRoutesRequest.optimize_waypoint_order`
  46. // is set to true then this field cannot be set to
  47. // true; otherwise, the request fails.
  48. bool via = 3;
  49. // Indicates that the waypoint is meant for vehicles to stop at, where the
  50. // intention is to either pickup or drop-off. When you set this value, the
  51. // calculated route won't include non-`via` waypoints on roads that are
  52. // unsuitable for pickup and drop-off. This option works only for `DRIVE` and
  53. // `TWO_WHEELER` travel modes, and when the `location_type` is `location`.
  54. bool vehicle_stopover = 4;
  55. // Indicates that the location of this waypoint is meant to have a preference
  56. // for the vehicle to stop at a particular side of road. When you set this
  57. // value, the route will pass through the location so that the vehicle can
  58. // stop at the side of road that the location is biased towards from the
  59. // center of the road. This option works only for 'DRIVE' and 'TWO_WHEELER'
  60. // travel modes.
  61. bool side_of_road = 5;
  62. }