fallback_info.proto 2.5 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.routes.v1;
  16. option cc_enable_arenas = true;
  17. option csharp_namespace = "Google.Maps.Routes.V1";
  18. option go_package = "google.golang.org/genproto/googleapis/maps/routes/v1;routes";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "FallbackInfoProto";
  21. option java_package = "com.google.maps.routes.v1";
  22. option objc_class_prefix = "GMRS";
  23. option php_namespace = "Google\\Maps\\Routes\\V1";
  24. // Information related to how and why a fallback result was used. If this field
  25. // is set, then it means the server used a different routing mode from your
  26. // preferred mode as fallback.
  27. message FallbackInfo {
  28. // Routing mode used for the response. If fallback was triggered, the mode
  29. // may be different from routing preference set in the original client
  30. // request.
  31. FallbackRoutingMode routing_mode = 1;
  32. // The reason why fallback response was used instead of the original response.
  33. // This field is only populated when the fallback mode is triggered and the
  34. // fallback response is returned.
  35. FallbackReason reason = 2;
  36. }
  37. // Reasons for using fallback response.
  38. enum FallbackReason {
  39. // No fallback reason specified.
  40. FALLBACK_REASON_UNSPECIFIED = 0;
  41. // A server error happened while calculating routes with your preferred
  42. // routing mode, but we were able to return a result calculated by an
  43. // alternative mode.
  44. SERVER_ERROR = 1;
  45. // We were not able to finish the calculation with your preferred routing mode
  46. // on time, but we were able to return a result calculated by an alternative
  47. // mode.
  48. LATENCY_EXCEEDED = 2;
  49. }
  50. // Actual routing mode used for returned fallback response.
  51. enum FallbackRoutingMode {
  52. // Not used.
  53. FALLBACK_ROUTING_MODE_UNSPECIFIED = 0;
  54. // Indicates the "TRAFFIC_UNAWARE" routing mode was used to compute the
  55. // response.
  56. FALLBACK_TRAFFIC_UNAWARE = 1;
  57. // Indicates the "TRAFFIC_AWARE" routing mode was used to compute the
  58. // response.
  59. FALLBACK_TRAFFIC_AWARE = 2;
  60. }