Interface RouteOrBuilder

  • All Superinterfaces:
    com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
    All Known Implementing Classes:
    Route, Route.Builder

    public interface RouteOrBuilder
    extends com.google.protobuf.MessageOrBuilder
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getDescription()
      A description of the route.
      com.google.protobuf.ByteString getDescriptionBytes()
      A description of the route.
      int getDistanceMeters()
      The travel distance of the route, in meters.
      com.google.protobuf.Duration getDuration()
      The length of time needed to navigate the route.
      com.google.protobuf.DurationOrBuilder getDurationOrBuilder()
      The length of time needed to navigate the route.
      RouteLeg getLegs​(int index)
      A collection of legs (path segments between waypoints) that make up the route.
      int getLegsCount()
      A collection of legs (path segments between waypoints) that make up the route.
      List<RouteLeg> getLegsList()
      A collection of legs (path segments between waypoints) that make up the route.
      RouteLegOrBuilder getLegsOrBuilder​(int index)
      A collection of legs (path segments between waypoints) that make up the route.
      List<? extends RouteLegOrBuilder> getLegsOrBuilderList()
      A collection of legs (path segments between waypoints) that make up the route.
      Route.RouteLocalizedValues getLocalizedValues()
      Text representations of properties of the `Route`.
      Route.RouteLocalizedValuesOrBuilder getLocalizedValuesOrBuilder()
      Text representations of properties of the `Route`.
      int getOptimizedIntermediateWaypointIndex​(int index)
      If you set [optimize_waypoint_order][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order] to true, this field contains the optimized ordering of intermediate waypoints.
      int getOptimizedIntermediateWaypointIndexCount()
      If you set [optimize_waypoint_order][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order] to true, this field contains the optimized ordering of intermediate waypoints.
      List<Integer> getOptimizedIntermediateWaypointIndexList()
      If you set [optimize_waypoint_order][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order] to true, this field contains the optimized ordering of intermediate waypoints.
      Polyline getPolyline()
      The overall route polyline.
      PolylineOrBuilder getPolylineOrBuilder()
      The overall route polyline.
      RouteLabel getRouteLabels​(int index)
      Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
      int getRouteLabelsCount()
      Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
      List<RouteLabel> getRouteLabelsList()
      Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
      int getRouteLabelsValue​(int index)
      Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
      List<Integer> getRouteLabelsValueList()
      Labels for the `Route` that are useful to identify specific properties of the route to compare against others.
      String getRouteToken()
      A web-safe, base64-encoded route token that can be passed to the Navigation SDK, that allows the Navigation SDK to reconstruct the route during navigation, and, in the event of rerouting, honor the original intention when you created the route by calling ComputeRoutes.
      com.google.protobuf.ByteString getRouteTokenBytes()
      A web-safe, base64-encoded route token that can be passed to the Navigation SDK, that allows the Navigation SDK to reconstruct the route during navigation, and, in the event of rerouting, honor the original intention when you created the route by calling ComputeRoutes.
      com.google.protobuf.Duration getStaticDuration()
      The duration of travel through the route without taking traffic conditions into consideration.
      com.google.protobuf.DurationOrBuilder getStaticDurationOrBuilder()
      The duration of travel through the route without taking traffic conditions into consideration.
      RouteTravelAdvisory getTravelAdvisory()
      Additional information about the route.
      RouteTravelAdvisoryOrBuilder getTravelAdvisoryOrBuilder()
      Additional information about the route.
      com.google.geo.type.Viewport getViewport()
      The viewport bounding box of the polyline.
      com.google.geo.type.ViewportOrBuilder getViewportOrBuilder()
      The viewport bounding box of the polyline.
      String getWarnings​(int index)
      An array of warnings to show when displaying the route.
      com.google.protobuf.ByteString getWarningsBytes​(int index)
      An array of warnings to show when displaying the route.
      int getWarningsCount()
      An array of warnings to show when displaying the route.
      List<String> getWarningsList()
      An array of warnings to show when displaying the route.
      boolean hasDuration()
      The length of time needed to navigate the route.
      boolean hasLocalizedValues()
      Text representations of properties of the `Route`.
      boolean hasPolyline()
      The overall route polyline.
      boolean hasStaticDuration()
      The duration of travel through the route without taking traffic conditions into consideration.
      boolean hasTravelAdvisory()
      Additional information about the route.
      boolean hasViewport()
      The viewport bounding box of the polyline.
      • Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

        isInitialized
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • getRouteLabelsList

        List<RouteLabel> getRouteLabelsList()
         Labels for the `Route` that are useful to identify specific properties
         of the route to compare against others.
         
        repeated .google.maps.routing.v2.RouteLabel route_labels = 13;
        Returns:
        A list containing the routeLabels.
      • getRouteLabelsCount

        int getRouteLabelsCount()
         Labels for the `Route` that are useful to identify specific properties
         of the route to compare against others.
         
        repeated .google.maps.routing.v2.RouteLabel route_labels = 13;
        Returns:
        The count of routeLabels.
      • getRouteLabels

        RouteLabel getRouteLabels​(int index)
         Labels for the `Route` that are useful to identify specific properties
         of the route to compare against others.
         
        repeated .google.maps.routing.v2.RouteLabel route_labels = 13;
        Parameters:
        index - The index of the element to return.
        Returns:
        The routeLabels at the given index.
      • getRouteLabelsValueList

        List<Integer> getRouteLabelsValueList()
         Labels for the `Route` that are useful to identify specific properties
         of the route to compare against others.
         
        repeated .google.maps.routing.v2.RouteLabel route_labels = 13;
        Returns:
        A list containing the enum numeric values on the wire for routeLabels.
      • getRouteLabelsValue

        int getRouteLabelsValue​(int index)
         Labels for the `Route` that are useful to identify specific properties
         of the route to compare against others.
         
        repeated .google.maps.routing.v2.RouteLabel route_labels = 13;
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of routeLabels at the given index.
      • getLegsList

        List<RouteLeg> getLegsList()
         A collection of legs (path segments between waypoints) that make up the
         route. Each leg corresponds to the trip between two non-`via`
         [Waypoints][google.maps.routing.v2.Waypoint]. For example, a route with no
         intermediate waypoints has only one leg. A route that includes one
         non-`via` intermediate waypoint has two legs. A route that includes one
         `via` intermediate waypoint has one leg. The order of the legs matches the
         order of waypoints from `origin` to `intermediates` to `destination`.
         
        repeated .google.maps.routing.v2.RouteLeg legs = 1;
      • getLegs

        RouteLeg getLegs​(int index)
         A collection of legs (path segments between waypoints) that make up the
         route. Each leg corresponds to the trip between two non-`via`
         [Waypoints][google.maps.routing.v2.Waypoint]. For example, a route with no
         intermediate waypoints has only one leg. A route that includes one
         non-`via` intermediate waypoint has two legs. A route that includes one
         `via` intermediate waypoint has one leg. The order of the legs matches the
         order of waypoints from `origin` to `intermediates` to `destination`.
         
        repeated .google.maps.routing.v2.RouteLeg legs = 1;
      • getLegsCount

        int getLegsCount()
         A collection of legs (path segments between waypoints) that make up the
         route. Each leg corresponds to the trip between two non-`via`
         [Waypoints][google.maps.routing.v2.Waypoint]. For example, a route with no
         intermediate waypoints has only one leg. A route that includes one
         non-`via` intermediate waypoint has two legs. A route that includes one
         `via` intermediate waypoint has one leg. The order of the legs matches the
         order of waypoints from `origin` to `intermediates` to `destination`.
         
        repeated .google.maps.routing.v2.RouteLeg legs = 1;
      • getLegsOrBuilderList

        List<? extends RouteLegOrBuilder> getLegsOrBuilderList()
         A collection of legs (path segments between waypoints) that make up the
         route. Each leg corresponds to the trip between two non-`via`
         [Waypoints][google.maps.routing.v2.Waypoint]. For example, a route with no
         intermediate waypoints has only one leg. A route that includes one
         non-`via` intermediate waypoint has two legs. A route that includes one
         `via` intermediate waypoint has one leg. The order of the legs matches the
         order of waypoints from `origin` to `intermediates` to `destination`.
         
        repeated .google.maps.routing.v2.RouteLeg legs = 1;
      • getLegsOrBuilder

        RouteLegOrBuilder getLegsOrBuilder​(int index)
         A collection of legs (path segments between waypoints) that make up the
         route. Each leg corresponds to the trip between two non-`via`
         [Waypoints][google.maps.routing.v2.Waypoint]. For example, a route with no
         intermediate waypoints has only one leg. A route that includes one
         non-`via` intermediate waypoint has two legs. A route that includes one
         `via` intermediate waypoint has one leg. The order of the legs matches the
         order of waypoints from `origin` to `intermediates` to `destination`.
         
        repeated .google.maps.routing.v2.RouteLeg legs = 1;
      • getDistanceMeters

        int getDistanceMeters()
         The travel distance of the route, in meters.
         
        int32 distance_meters = 2;
        Returns:
        The distanceMeters.
      • hasDuration

        boolean hasDuration()
         The length of time needed to navigate the route. If you set the
         `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as
         `static_duration`. If you set the `routing_preference` to either
         `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated
         taking traffic conditions into account.
         
        .google.protobuf.Duration duration = 3;
        Returns:
        Whether the duration field is set.
      • getDuration

        com.google.protobuf.Duration getDuration()
         The length of time needed to navigate the route. If you set the
         `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as
         `static_duration`. If you set the `routing_preference` to either
         `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated
         taking traffic conditions into account.
         
        .google.protobuf.Duration duration = 3;
        Returns:
        The duration.
      • getDurationOrBuilder

        com.google.protobuf.DurationOrBuilder getDurationOrBuilder()
         The length of time needed to navigate the route. If you set the
         `routing_preference` to `TRAFFIC_UNAWARE`, then this value is the same as
         `static_duration`. If you set the `routing_preference` to either
         `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated
         taking traffic conditions into account.
         
        .google.protobuf.Duration duration = 3;
      • hasStaticDuration

        boolean hasStaticDuration()
         The duration of travel through the route without taking traffic
         conditions into consideration.
         
        .google.protobuf.Duration static_duration = 4;
        Returns:
        Whether the staticDuration field is set.
      • getStaticDuration

        com.google.protobuf.Duration getStaticDuration()
         The duration of travel through the route without taking traffic
         conditions into consideration.
         
        .google.protobuf.Duration static_duration = 4;
        Returns:
        The staticDuration.
      • getStaticDurationOrBuilder

        com.google.protobuf.DurationOrBuilder getStaticDurationOrBuilder()
         The duration of travel through the route without taking traffic
         conditions into consideration.
         
        .google.protobuf.Duration static_duration = 4;
      • hasPolyline

        boolean hasPolyline()
         The overall route polyline. This polyline is the combined polyline of
         all `legs`.
         
        .google.maps.routing.v2.Polyline polyline = 5;
        Returns:
        Whether the polyline field is set.
      • getPolyline

        Polyline getPolyline()
         The overall route polyline. This polyline is the combined polyline of
         all `legs`.
         
        .google.maps.routing.v2.Polyline polyline = 5;
        Returns:
        The polyline.
      • getPolylineOrBuilder

        PolylineOrBuilder getPolylineOrBuilder()
         The overall route polyline. This polyline is the combined polyline of
         all `legs`.
         
        .google.maps.routing.v2.Polyline polyline = 5;
      • getDescription

        String getDescription()
         A description of the route.
         
        string description = 6;
        Returns:
        The description.
      • getDescriptionBytes

        com.google.protobuf.ByteString getDescriptionBytes()
         A description of the route.
         
        string description = 6;
        Returns:
        The bytes for description.
      • getWarningsList

        List<String> getWarningsList()
         An array of warnings to show when displaying the route.
         
        repeated string warnings = 7;
        Returns:
        A list containing the warnings.
      • getWarningsCount

        int getWarningsCount()
         An array of warnings to show when displaying the route.
         
        repeated string warnings = 7;
        Returns:
        The count of warnings.
      • getWarnings

        String getWarnings​(int index)
         An array of warnings to show when displaying the route.
         
        repeated string warnings = 7;
        Parameters:
        index - The index of the element to return.
        Returns:
        The warnings at the given index.
      • getWarningsBytes

        com.google.protobuf.ByteString getWarningsBytes​(int index)
         An array of warnings to show when displaying the route.
         
        repeated string warnings = 7;
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the warnings at the given index.
      • hasViewport

        boolean hasViewport()
         The viewport bounding box of the polyline.
         
        .google.geo.type.Viewport viewport = 8;
        Returns:
        Whether the viewport field is set.
      • getViewport

        com.google.geo.type.Viewport getViewport()
         The viewport bounding box of the polyline.
         
        .google.geo.type.Viewport viewport = 8;
        Returns:
        The viewport.
      • getViewportOrBuilder

        com.google.geo.type.ViewportOrBuilder getViewportOrBuilder()
         The viewport bounding box of the polyline.
         
        .google.geo.type.Viewport viewport = 8;
      • hasTravelAdvisory

        boolean hasTravelAdvisory()
         Additional information about the route.
         
        .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;
        Returns:
        Whether the travelAdvisory field is set.
      • getTravelAdvisory

        RouteTravelAdvisory getTravelAdvisory()
         Additional information about the route.
         
        .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;
        Returns:
        The travelAdvisory.
      • getTravelAdvisoryOrBuilder

        RouteTravelAdvisoryOrBuilder getTravelAdvisoryOrBuilder()
         Additional information about the route.
         
        .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;
      • getOptimizedIntermediateWaypointIndexList

        List<Integer> getOptimizedIntermediateWaypointIndexList()
         If you set
         [optimize_waypoint_order][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
         to true, this field contains the optimized ordering of intermediate
         waypoints. Otherwise, this field is empty.
         For example, if you give an input of Origin: LA; Intermediate waypoints:
         Dallas, Bangor, Phoenix; Destination: New York; and the optimized
         intermediate waypoint order is Phoenix, Dallas, Bangor, then this field
         contains the values [2, 0, 1]. The index starts with 0 for the first
         intermediate waypoint provided in the input.
         
        repeated int32 optimized_intermediate_waypoint_index = 10;
        Returns:
        A list containing the optimizedIntermediateWaypointIndex.
      • getOptimizedIntermediateWaypointIndexCount

        int getOptimizedIntermediateWaypointIndexCount()
         If you set
         [optimize_waypoint_order][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
         to true, this field contains the optimized ordering of intermediate
         waypoints. Otherwise, this field is empty.
         For example, if you give an input of Origin: LA; Intermediate waypoints:
         Dallas, Bangor, Phoenix; Destination: New York; and the optimized
         intermediate waypoint order is Phoenix, Dallas, Bangor, then this field
         contains the values [2, 0, 1]. The index starts with 0 for the first
         intermediate waypoint provided in the input.
         
        repeated int32 optimized_intermediate_waypoint_index = 10;
        Returns:
        The count of optimizedIntermediateWaypointIndex.
      • getOptimizedIntermediateWaypointIndex

        int getOptimizedIntermediateWaypointIndex​(int index)
         If you set
         [optimize_waypoint_order][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
         to true, this field contains the optimized ordering of intermediate
         waypoints. Otherwise, this field is empty.
         For example, if you give an input of Origin: LA; Intermediate waypoints:
         Dallas, Bangor, Phoenix; Destination: New York; and the optimized
         intermediate waypoint order is Phoenix, Dallas, Bangor, then this field
         contains the values [2, 0, 1]. The index starts with 0 for the first
         intermediate waypoint provided in the input.
         
        repeated int32 optimized_intermediate_waypoint_index = 10;
        Parameters:
        index - The index of the element to return.
        Returns:
        The optimizedIntermediateWaypointIndex at the given index.
      • hasLocalizedValues

        boolean hasLocalizedValues()
         Text representations of properties of the `Route`.
         
        .google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;
        Returns:
        Whether the localizedValues field is set.
      • getLocalizedValues

        Route.RouteLocalizedValues getLocalizedValues()
         Text representations of properties of the `Route`.
         
        .google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;
        Returns:
        The localizedValues.
      • getLocalizedValuesOrBuilder

        Route.RouteLocalizedValuesOrBuilder getLocalizedValuesOrBuilder()
         Text representations of properties of the `Route`.
         
        .google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;
      • getRouteToken

        String getRouteToken()
         A web-safe, base64-encoded route token that can be passed to the Navigation
         SDK, that allows the Navigation SDK to reconstruct the route during
         navigation, and, in the event of rerouting, honor the original intention
         when you created the route by calling ComputeRoutes. Customers should treat
         this token as an opaque blob. It is not meant for reading or mutating.
         NOTE: `Route.route_token` is only available for requests that have set
         `ComputeRoutesRequest.routing_preference` to `TRAFFIC_AWARE` or
         `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests
         that have Via waypoints.
         
        string route_token = 12;
        Returns:
        The routeToken.
      • getRouteTokenBytes

        com.google.protobuf.ByteString getRouteTokenBytes()
         A web-safe, base64-encoded route token that can be passed to the Navigation
         SDK, that allows the Navigation SDK to reconstruct the route during
         navigation, and, in the event of rerouting, honor the original intention
         when you created the route by calling ComputeRoutes. Customers should treat
         this token as an opaque blob. It is not meant for reading or mutating.
         NOTE: `Route.route_token` is only available for requests that have set
         `ComputeRoutesRequest.routing_preference` to `TRAFFIC_AWARE` or
         `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests
         that have Via waypoints.
         
        string route_token = 12;
        Returns:
        The bytes for routeToken.