waypoint.proto 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // Copyright 2021 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.routes.v1;
  16. import "google/protobuf/wrappers.proto";
  17. import "google/type/latlng.proto";
  18. option cc_enable_arenas = true;
  19. option csharp_namespace = "Google.Maps.Routes.V1";
  20. option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "WaypointProto";
  23. option java_package = "com.google.maps.routes.v1";
  24. option objc_class_prefix = "GMRS";
  25. option php_namespace = "Google\\Maps\\Routes\\V1";
  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, as opposed to 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. // If you set this field on terminal waypoints, then the request fails.
  45. bool via = 3;
  46. // Indicates that the waypoint is meant for vehicles to stop at, where the
  47. // intention is to either pickup or drop-off. When you set this value, the
  48. // calculated route won't include non-`via` waypoints on roads that are
  49. // unsuitable for pickup and drop-off. This option works only for `DRIVE` and
  50. // `TWO_WHEELER` travel modes, and when the `location_type` is `location`.
  51. bool vehicle_stopover = 4;
  52. // Indicates that the location of this waypoint is meant to have a preference
  53. // for the vehicle to stop at a particular side of road. When you set this
  54. // value, the route will pass through the location so that the vehicle can
  55. // stop at the side of road that the location is biased towards from the
  56. // center of the road. This option works only for 'DRIVE' and 'TWO_WHEELER'
  57. // travel modes, and when the 'location_type' is set to 'location'.
  58. bool side_of_road = 5;
  59. }
  60. // Encapsulates a location (a geographic point, and an optional heading).
  61. message Location {
  62. // The waypoint's geographic coordinates.
  63. google.type.LatLng lat_lng = 1;
  64. // The compass heading associated with the direction of the flow of traffic.
  65. // This value is used to specify the side of the road to use for pickup and
  66. // drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
  67. // of due North, 90 specifies a heading of due East, etc. You can use this
  68. // field only for `DRIVE` and `TWO_WHEELER` travel modes.
  69. google.protobuf.Int32Value heading = 2;
  70. }