FallbackInfo
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Thông tin liên quan đến cách thức và lý do sử dụng kết quả dự phòng. Nếu bạn đặt trường này, thì điều đó có nghĩa là máy chủ đã sử dụng một chế độ định tuyến khác với chế độ ưu tiên của bạn làm chế độ dự phòng.
Trường |
routingMode |
enum (FallbackRoutingMode )
Chế độ định tuyến được dùng cho phản hồi. Nếu tính năng dự phòng được kích hoạt thì chế độ này có thể khác với lựa chọn ưu tiên định tuyến đã đặt trong yêu cầu ứng dụng ban đầu.
|
reason |
enum (FallbackReason )
Lý do tại sao phản hồi dự phòng được sử dụng thay cho phản hồi ban đầu. Trường này chỉ được điền sẵn khi chế độ dự phòng được kích hoạt và phản hồi dự phòng được trả về.
|
FallbackRoutingMode
Chế độ định tuyến thực tế được dùng cho phản hồi dự phòng được trả về.
Enum |
FALLBACK_ROUTING_MODE_UNSPECIFIED |
Không được sử dụng. |
FALLBACK_TRAFFIC_UNAWARE |
Cho biết TRAFFIC_UNAWARE RoutingPreference được dùng để tính toán phản hồi. |
FALLBACK_TRAFFIC_AWARE |
Cho biết TRAFFIC_AWARE RoutingPreference được dùng để tính toán phản hồi. |
FallbackReason
Lý do sử dụng phản hồi dự phòng.
Enum |
FALLBACK_REASON_UNSPECIFIED |
Chưa chỉ định lý do dự phòng. |
SERVER_ERROR |
Đã xảy ra lỗi máy chủ trong khi tính toán các tuyến đường bằng chế độ định tuyến ưu tiên của bạn. Tuy nhiên, chúng tôi có thể trả về kết quả được tính bằng chế độ thay thế. |
LATENCY_EXCEEDED |
Chúng tôi không thể hoàn thành phép tính bằng chế độ định tuyến mong muốn của bạn đúng giờ, nhưng chúng tôi có thể trả về kết quả được tính bằng chế độ thay thế. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-31 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\u003cp\u003eFallbackInfo provides details on why and how a fallback routing result was used if the server deviated from the preferred routing mode.\u003c/p\u003e\n"],["\u003cp\u003eThis information includes the actual routing mode used (FallbackRoutingMode) and the reason for the fallback (FallbackReason).\u003c/p\u003e\n"],["\u003cp\u003eFallbackRoutingMode specifies whether traffic conditions were considered in the fallback route (TRAFFIC_AWARE or TRAFFIC_UNAWARE).\u003c/p\u003e\n"],["\u003cp\u003eFallbackReason clarifies if the fallback was due to a server error or exceeding the allowed calculation time.\u003c/p\u003e\n"]]],["The server may use a fallback routing mode if the preferred mode fails. This fallback information is provided in JSON format, including the `routingMode` used and the `reason` for the fallback. The `routingMode` can be `FALLBACK_TRAFFIC_UNAWARE` or `FALLBACK_TRAFFIC_AWARE`. The `reason` can be `SERVER_ERROR` (due to an internal error) or `LATENCY_EXCEEDED` (calculation exceeded the allowed time). Specific enumerations define the exact fallback mode and reason used.\n"],null,["# FallbackInfo\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [FallbackRoutingMode](#FallbackRoutingMode)\n- [FallbackReason](#FallbackReason)\n\nInformation related to how and why a fallback result was used. If this field is set, then it means the server used a different routing mode from your preferred mode as fallback.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"routingMode\": enum (/maps/documentation/routes/reference/rest/v2/FallbackInfo#FallbackRoutingMode), \"reason\": enum (/maps/documentation/routes/reference/rest/v2/FallbackInfo#FallbackReason) } ``` |\n\n| Fields ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `routingMode` | `enum (`[FallbackRoutingMode](/maps/documentation/routes/reference/rest/v2/FallbackInfo#FallbackRoutingMode)`)` Routing mode used for the response. If fallback was triggered, the mode may be different from routing preference set in the original client request. |\n| `reason` | `enum (`[FallbackReason](/maps/documentation/routes/reference/rest/v2/FallbackInfo#FallbackReason)`)` The reason why fallback response was used instead of the original response. This field is only populated when the fallback mode is triggered and the fallback response is returned. |\n\nFallbackRoutingMode\n-------------------\n\nActual routing mode used for returned fallback response.\n\n| Enums ||\n|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `FALLBACK_ROUTING_MODE_UNSPECIFIED` | Not used. |\n| `FALLBACK_TRAFFIC_UNAWARE` | Indicates the `TRAFFIC_UNAWARE` [`RoutingPreference`](/maps/documentation/routes/reference/rest/v2/RoutingPreference) was used to compute the response. |\n| `FALLBACK_TRAFFIC_AWARE` | Indicates the `TRAFFIC_AWARE` [`RoutingPreference`](/maps/documentation/routes/reference/rest/v2/RoutingPreference) was used to compute the response. |\n\nFallbackReason\n--------------\n\nReasons for using fallback response.\n\n| Enums ||\n|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `FALLBACK_REASON_UNSPECIFIED` | No fallback reason specified. |\n| `SERVER_ERROR` | A server error happened while calculating routes with your preferred routing mode, but we were able to return a result calculated by an alternative mode. |\n| `LATENCY_EXCEEDED` | We were not able to finish the calculation with your preferred routing mode on time, but we were able to return a result calculated by an alternative mode. |"]]