From 9ecb768fc3d617dd431e9646b008c4b4ad00540c Mon Sep 17 00:00:00 2001 From: Google APIs Date: Mon, 20 Jul 2020 11:03:03 -0700 Subject: [PATCH] Added a RouteMatrixElementCondition enum for RouteMatrixElement. PiperOrigin-RevId: 322181375 --- .../maps/routes/v1/route_matrix_element.proto | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/google/maps/routes/v1/route_matrix_element.proto b/google/maps/routes/v1/route_matrix_element.proto index 66211eba..2e05c113 100644 --- a/google/maps/routes/v1/route_matrix_element.proto +++ b/google/maps/routes/v1/route_matrix_element.proto @@ -42,6 +42,9 @@ message RouteMatrixElement { // Error status code for this element. google.rpc.Status status = 3; + // Indicates whether the route was found or not. Independent of status. + RouteMatrixElementCondition condition = 9; + // The travel distance of the route, in meters. int32 distance_meters = 4; @@ -67,3 +70,17 @@ message RouteMatrixElement { // Otherwise this field is unset. FallbackInfo fallback_info = 8; } + +// The condition of the route being returned. +enum RouteMatrixElementCondition { + // Not used. + ROUTE_MATRIX_ELEMENT_CONDITION_UNSPECIFIED = 0; + + // A route was found, and the corresponding information was filled out for the + // element. + ROUTE_EXISTS = 1; + + // No route could be found. Fields containing route information, such as + // distance_meters or duration, will not be filled out in the element. + ROUTE_NOT_FOUND = 2; +}