route_service.proto 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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.routes.v1alpha;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/maps/routes/v1/compute_custom_routes_request.proto";
  19. import "google/maps/routes/v1/compute_custom_routes_response.proto";
  20. import "google/maps/routes/v1/compute_route_matrix_request.proto";
  21. import "google/maps/routes/v1/compute_routes_request.proto";
  22. import "google/maps/routes/v1/compute_routes_response.proto";
  23. import "google/maps/routes/v1/route_matrix_element.proto";
  24. option cc_enable_arenas = true;
  25. option csharp_namespace = "Google.Maps.Routes.V1Alpha";
  26. option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1alpha;routes";
  27. option java_multiple_files = true;
  28. option java_outer_classname = "RoutesServiceAlphaProto";
  29. option java_package = "com.google.maps.routes.v1alpha";
  30. option objc_class_prefix = "GMRS";
  31. option php_namespace = "Google\\Maps\\Routes\\V1alpha";
  32. // The Routes Preferred API.
  33. service RoutesAlpha {
  34. option (google.api.default_host) = "routespreferred.googleapis.com";
  35. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/maps-platform.routespreferred";
  36. // Returns the primary route along with optional alternate routes, given a set
  37. // of terminal and intermediate waypoints.
  38. //
  39. // **NOTE:** This method requires that you specify a response field mask in
  40. // the input. You can provide the response field mask by using the URL
  41. // parameter `$fields` or `fields`, or by using the HTTP/gRPC header
  42. // `X-Goog-FieldMask` (see the [available URL parameters and
  43. // headers](https://cloud.google.com/apis/docs/system-parameters). The value
  44. // is a comma separated list of field paths. See this detailed documentation
  45. // about [how to construct the field
  46. // paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
  47. //
  48. // For example, in this method:
  49. //
  50. // * Field mask of all available fields (for manual inspection):
  51. // `X-Goog-FieldMask: *`
  52. // * Field mask of Route-level duration, distance, and polyline (an example
  53. // production setup):
  54. // `X-Goog-FieldMask:
  55. // routes.duration,routes.distanceMeters,routes.polyline.encodedPolyline`
  56. //
  57. // Google discourages the use of the wildcard (`*`) response field mask, or
  58. // specifying the field mask at the top level (`routes`), because:
  59. //
  60. // * Selecting only the fields that you need helps our server save computation
  61. // cycles, allowing us to return the result to you with a lower latency.
  62. // * Selecting only the fields that you need in your production job ensures
  63. // stable latency performance. We might add more response fields in the
  64. // future, and those new fields might require extra computation time. If you
  65. // select all fields, or if you select all fields at the top level, then you
  66. // might experience performance degradation because any new field we add will
  67. // be automatically included in the response.
  68. // * Selecting only the fields that you need results in a smaller response
  69. // size, and thus higher network throughput.
  70. rpc ComputeRoutes(google.maps.routes.v1.ComputeRoutesRequest) returns (google.maps.routes.v1.ComputeRoutesResponse) {
  71. option (google.api.http) = {
  72. post: "/v1alpha:computeRoutes"
  73. body: "*"
  74. };
  75. }
  76. // Takes in a list of origins and destinations and returns a stream containing
  77. // route information for each combination of origin and destination.
  78. //
  79. // **NOTE:** This method requires that you specify a response field mask in
  80. // the input. You can provide the response field mask by using the URL
  81. // parameter `$fields` or `fields`, or by using the HTTP/gRPC header
  82. // `X-Goog-FieldMask` (see the [available URL parameters and
  83. // headers](https://cloud.google.com/apis/docs/system-parameters). The value
  84. // is a comma separated list of field paths. See this detailed documentation
  85. // about [how to construct the field
  86. // paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
  87. //
  88. // For example, in this method:
  89. //
  90. // * Field mask of all available fields (for manual inspection):
  91. // `X-Goog-FieldMask: *`
  92. // * Field mask of route durations, distances, element status, condition, and
  93. // element indices (an example production setup):
  94. // `X-Goog-FieldMask:
  95. // originIndex,destinationIndex,status,condition,distanceMeters,duration`
  96. //
  97. // It is critical that you include `status` in your field mask as otherwise
  98. // all messages will appear to be OK. Google discourages the use of the
  99. // wildcard (`*`) response field mask, because:
  100. //
  101. // * Selecting only the fields that you need helps our server save computation
  102. // cycles, allowing us to return the result to you with a lower latency.
  103. // * Selecting only the fields that you need in your production job ensures
  104. // stable latency performance. We might add more response fields in the
  105. // future, and those new fields might require extra computation time. If you
  106. // select all fields, or if you select all fields at the top level, then you
  107. // might experience performance degradation because any new field we add will
  108. // be automatically included in the response.
  109. // * Selecting only the fields that you need results in a smaller response
  110. // size, and thus higher network throughput.
  111. rpc ComputeRouteMatrix(google.maps.routes.v1.ComputeRouteMatrixRequest) returns (stream google.maps.routes.v1.RouteMatrixElement) {
  112. option (google.api.http) = {
  113. post: "/v1alpha:computeRouteMatrix"
  114. body: "*"
  115. };
  116. }
  117. // Given a set of terminal and intermediate waypoints, and a route objective,
  118. // computes the best route for the route objective. Also returns fastest route
  119. // and shortest route as reference routes.
  120. //
  121. // **NOTE:** This method requires that you specify a response field mask in
  122. // the input. You can provide the response field mask by using the URL
  123. // parameter `$fields` or `fields`, or by using the HTTP/gRPC header
  124. // `X-Goog-FieldMask` (see the [available URL parameters and
  125. // headers](https://cloud.google.com/apis/docs/system-parameters). The value
  126. // is a comma separated list of field paths. See this detailed documentation
  127. // about [how to construct the field
  128. // paths](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).
  129. //
  130. // For example, in this method:
  131. //
  132. // * Field mask of all available fields (for manual inspection):
  133. // `X-Goog-FieldMask: *`
  134. // * Field mask of route distances, durations, token and toll info:
  135. // `X-Goog-FieldMask:
  136. // routes.route.distanceMeters,routes.route.duration,routes.token,routes.route.travelAdvisory.tollInfo`
  137. //
  138. // Google discourages the use of the wildcard (`*`) response field mask, or
  139. // specifying the field mask at the top level (`routes`), because:
  140. //
  141. // * Selecting only the fields that you need helps our server save computation
  142. // cycles, allowing us to return the result to you with a lower latency.
  143. // * Selecting only the fields that you need in your production job ensures
  144. // stable latency performance. We might add more response fields in the
  145. // future, and those new fields might require extra computation time. If you
  146. // select all fields, or if you select all fields at the top level, then you
  147. // might experience performance degradation because any new field we add will
  148. // be automatically included in the response.
  149. // * Selecting only the fields that you need results in a smaller response
  150. // size, and thus higher network throughput.
  151. rpc ComputeCustomRoutes(google.maps.routes.v1.ComputeCustomRoutesRequest) returns (google.maps.routes.v1.ComputeCustomRoutesResponse) {
  152. option (google.api.http) = {
  153. post: "/v1alpha:computeCustomRoutes"
  154. body: "*"
  155. };
  156. }
  157. }