Class Route.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Route.Builder>
com.google.maps.routing.v2.Route.Builder
All Implemented Interfaces:
RouteOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Route

public static final class Route.Builder extends com.google.protobuf.GeneratedMessage.Builder<Route.Builder> implements RouteOrBuilder
 Contains a route, which consists of a series of connected road segments
 that join beginning, ending, and intermediate waypoints.
 
Protobuf type google.maps.routing.v2.Route
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Route.Builder>
    • clear

      public Route.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Route.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Route.Builder>
    • getDefaultInstanceForType

      public Route getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Route build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Route buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Route.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Route.Builder>
    • mergeFrom

      public Route.Builder mergeFrom(Route other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Route.Builder>
    • mergeFrom

      public Route.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Route.Builder>
      Throws:
      IOException
    • getRouteLabelsList

      public 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;
      Specified by:
      getRouteLabelsList in interface RouteOrBuilder
      Returns:
      A list containing the routeLabels.
    • getRouteLabelsCount

      public 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;
      Specified by:
      getRouteLabelsCount in interface RouteOrBuilder
      Returns:
      The count of routeLabels.
    • getRouteLabels

      public 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;
      Specified by:
      getRouteLabels in interface RouteOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The routeLabels at the given index.
    • setRouteLabels

      public Route.Builder setRouteLabels(int index, RouteLabel value)
       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 to set the value at.
      value - The routeLabels to set.
      Returns:
      This builder for chaining.
    • addRouteLabels

      public Route.Builder addRouteLabels(RouteLabel value)
       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:
      value - The routeLabels to add.
      Returns:
      This builder for chaining.
    • addAllRouteLabels

      public Route.Builder addAllRouteLabels(Iterable<? extends RouteLabel> values)
       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:
      values - The routeLabels to add.
      Returns:
      This builder for chaining.
    • clearRouteLabels

      public Route.Builder clearRouteLabels()
       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:
      This builder for chaining.
    • getRouteLabelsValueList

      public 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;
      Specified by:
      getRouteLabelsValueList in interface RouteOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for routeLabels.
    • getRouteLabelsValue

      public 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;
      Specified by:
      getRouteLabelsValue in interface RouteOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of routeLabels at the given index.
    • setRouteLabelsValue

      public Route.Builder setRouteLabelsValue(int index, int value)
       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 to set the value at.
      value - The enum numeric value on the wire for routeLabels to set.
      Returns:
      This builder for chaining.
    • addRouteLabelsValue

      public Route.Builder addRouteLabelsValue(int value)
       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:
      value - The enum numeric value on the wire for routeLabels to add.
      Returns:
      This builder for chaining.
    • addAllRouteLabelsValue

      public Route.Builder addAllRouteLabelsValue(Iterable<Integer> values)
       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:
      values - The enum numeric values on the wire for routeLabels to add.
      Returns:
      This builder for chaining.
    • getLegsList

      public 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;
      Specified by:
      getLegsList in interface RouteOrBuilder
    • getLegsCount

      public 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;
      Specified by:
      getLegsCount in interface RouteOrBuilder
    • getLegs

      public 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;
      Specified by:
      getLegs in interface RouteOrBuilder
    • setLegs

      public Route.Builder setLegs(int index, RouteLeg value)
       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;
    • setLegs

      public Route.Builder setLegs(int index, RouteLeg.Builder builderForValue)
       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;
    • addLegs

      public Route.Builder addLegs(RouteLeg value)
       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;
    • addLegs

      public Route.Builder addLegs(int index, RouteLeg value)
       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;
    • addLegs

      public Route.Builder addLegs(RouteLeg.Builder builderForValue)
       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;
    • addLegs

      public Route.Builder addLegs(int index, RouteLeg.Builder builderForValue)
       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;
    • addAllLegs

      public Route.Builder addAllLegs(Iterable<? extends RouteLeg> values)
       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;
    • clearLegs

      public Route.Builder clearLegs()
       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;
    • removeLegs

      public Route.Builder removeLegs(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;
    • getLegsBuilder

      public RouteLeg.Builder getLegsBuilder(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;
    • getLegsOrBuilder

      public 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;
      Specified by:
      getLegsOrBuilder in interface RouteOrBuilder
    • getLegsOrBuilderList

      public 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;
      Specified by:
      getLegsOrBuilderList in interface RouteOrBuilder
    • addLegsBuilder

      public RouteLeg.Builder addLegsBuilder()
       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;
    • addLegsBuilder

      public RouteLeg.Builder addLegsBuilder(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;
    • getLegsBuilderList

      public List<RouteLeg.Builder> getLegsBuilderList()
       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

      public int getDistanceMeters()
       The travel distance of the route, in meters.
       
      int32 distance_meters = 2;
      Specified by:
      getDistanceMeters in interface RouteOrBuilder
      Returns:
      The distanceMeters.
    • setDistanceMeters

      public Route.Builder setDistanceMeters(int value)
       The travel distance of the route, in meters.
       
      int32 distance_meters = 2;
      Parameters:
      value - The distanceMeters to set.
      Returns:
      This builder for chaining.
    • clearDistanceMeters

      public Route.Builder clearDistanceMeters()
       The travel distance of the route, in meters.
       
      int32 distance_meters = 2;
      Returns:
      This builder for chaining.
    • hasDuration

      public 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;
      Specified by:
      hasDuration in interface RouteOrBuilder
      Returns:
      Whether the duration field is set.
    • getDuration

      public 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;
      Specified by:
      getDuration in interface RouteOrBuilder
      Returns:
      The duration.
    • setDuration

      public Route.Builder setDuration(com.google.protobuf.Duration value)
       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;
    • setDuration

      public Route.Builder setDuration(com.google.protobuf.Duration.Builder builderForValue)
       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;
    • mergeDuration

      public Route.Builder mergeDuration(com.google.protobuf.Duration value)
       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;
    • clearDuration

      public Route.Builder clearDuration()
       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;
    • getDurationBuilder

      public com.google.protobuf.Duration.Builder getDurationBuilder()
       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;
    • getDurationOrBuilder

      public 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;
      Specified by:
      getDurationOrBuilder in interface RouteOrBuilder
    • hasStaticDuration

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

      public com.google.protobuf.Duration getStaticDuration()
       The duration of travel through the route without taking traffic
       conditions into consideration.
       
      .google.protobuf.Duration static_duration = 4;
      Specified by:
      getStaticDuration in interface RouteOrBuilder
      Returns:
      The staticDuration.
    • setStaticDuration

      public Route.Builder setStaticDuration(com.google.protobuf.Duration value)
       The duration of travel through the route without taking traffic
       conditions into consideration.
       
      .google.protobuf.Duration static_duration = 4;
    • setStaticDuration

      public Route.Builder setStaticDuration(com.google.protobuf.Duration.Builder builderForValue)
       The duration of travel through the route without taking traffic
       conditions into consideration.
       
      .google.protobuf.Duration static_duration = 4;
    • mergeStaticDuration

      public Route.Builder mergeStaticDuration(com.google.protobuf.Duration value)
       The duration of travel through the route without taking traffic
       conditions into consideration.
       
      .google.protobuf.Duration static_duration = 4;
    • clearStaticDuration

      public Route.Builder clearStaticDuration()
       The duration of travel through the route without taking traffic
       conditions into consideration.
       
      .google.protobuf.Duration static_duration = 4;
    • getStaticDurationBuilder

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

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

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

      public Polyline getPolyline()
       The overall route polyline. This polyline is the combined polyline of
       all `legs`.
       
      .google.maps.routing.v2.Polyline polyline = 5;
      Specified by:
      getPolyline in interface RouteOrBuilder
      Returns:
      The polyline.
    • setPolyline

      public Route.Builder setPolyline(Polyline value)
       The overall route polyline. This polyline is the combined polyline of
       all `legs`.
       
      .google.maps.routing.v2.Polyline polyline = 5;
    • setPolyline

      public Route.Builder setPolyline(Polyline.Builder builderForValue)
       The overall route polyline. This polyline is the combined polyline of
       all `legs`.
       
      .google.maps.routing.v2.Polyline polyline = 5;
    • mergePolyline

      public Route.Builder mergePolyline(Polyline value)
       The overall route polyline. This polyline is the combined polyline of
       all `legs`.
       
      .google.maps.routing.v2.Polyline polyline = 5;
    • clearPolyline

      public Route.Builder clearPolyline()
       The overall route polyline. This polyline is the combined polyline of
       all `legs`.
       
      .google.maps.routing.v2.Polyline polyline = 5;
    • getPolylineBuilder

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

      public PolylineOrBuilder getPolylineOrBuilder()
       The overall route polyline. This polyline is the combined polyline of
       all `legs`.
       
      .google.maps.routing.v2.Polyline polyline = 5;
      Specified by:
      getPolylineOrBuilder in interface RouteOrBuilder
    • getDescription

      public String getDescription()
       A description of the route.
       
      string description = 6;
      Specified by:
      getDescription in interface RouteOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       A description of the route.
       
      string description = 6;
      Specified by:
      getDescriptionBytes in interface RouteOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public Route.Builder setDescription(String value)
       A description of the route.
       
      string description = 6;
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public Route.Builder clearDescription()
       A description of the route.
       
      string description = 6;
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public Route.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       A description of the route.
       
      string description = 6;
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getWarningsList

      public com.google.protobuf.ProtocolStringList getWarningsList()
       An array of warnings to show when displaying the route.
       
      repeated string warnings = 7;
      Specified by:
      getWarningsList in interface RouteOrBuilder
      Returns:
      A list containing the warnings.
    • getWarningsCount

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

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

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

      public Route.Builder setWarnings(int index, String value)
       An array of warnings to show when displaying the route.
       
      repeated string warnings = 7;
      Parameters:
      index - The index to set the value at.
      value - The warnings to set.
      Returns:
      This builder for chaining.
    • addWarnings

      public Route.Builder addWarnings(String value)
       An array of warnings to show when displaying the route.
       
      repeated string warnings = 7;
      Parameters:
      value - The warnings to add.
      Returns:
      This builder for chaining.
    • addAllWarnings

      public Route.Builder addAllWarnings(Iterable<String> values)
       An array of warnings to show when displaying the route.
       
      repeated string warnings = 7;
      Parameters:
      values - The warnings to add.
      Returns:
      This builder for chaining.
    • clearWarnings

      public Route.Builder clearWarnings()
       An array of warnings to show when displaying the route.
       
      repeated string warnings = 7;
      Returns:
      This builder for chaining.
    • addWarningsBytes

      public Route.Builder addWarningsBytes(com.google.protobuf.ByteString value)
       An array of warnings to show when displaying the route.
       
      repeated string warnings = 7;
      Parameters:
      value - The bytes of the warnings to add.
      Returns:
      This builder for chaining.
    • hasViewport

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

      public Viewport getViewport()
       The viewport bounding box of the polyline.
       
      .google.geo.type.Viewport viewport = 8;
      Specified by:
      getViewport in interface RouteOrBuilder
      Returns:
      The viewport.
    • setViewport

      public Route.Builder setViewport(Viewport value)
       The viewport bounding box of the polyline.
       
      .google.geo.type.Viewport viewport = 8;
    • setViewport

      public Route.Builder setViewport(Viewport.Builder builderForValue)
       The viewport bounding box of the polyline.
       
      .google.geo.type.Viewport viewport = 8;
    • mergeViewport

      public Route.Builder mergeViewport(Viewport value)
       The viewport bounding box of the polyline.
       
      .google.geo.type.Viewport viewport = 8;
    • clearViewport

      public Route.Builder clearViewport()
       The viewport bounding box of the polyline.
       
      .google.geo.type.Viewport viewport = 8;
    • getViewportBuilder

      public Viewport.Builder getViewportBuilder()
       The viewport bounding box of the polyline.
       
      .google.geo.type.Viewport viewport = 8;
    • getViewportOrBuilder

      public ViewportOrBuilder getViewportOrBuilder()
       The viewport bounding box of the polyline.
       
      .google.geo.type.Viewport viewport = 8;
      Specified by:
      getViewportOrBuilder in interface RouteOrBuilder
    • hasTravelAdvisory

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

      public RouteTravelAdvisory getTravelAdvisory()
       Additional information about the route.
       
      .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;
      Specified by:
      getTravelAdvisory in interface RouteOrBuilder
      Returns:
      The travelAdvisory.
    • setTravelAdvisory

      public Route.Builder setTravelAdvisory(RouteTravelAdvisory value)
       Additional information about the route.
       
      .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;
    • setTravelAdvisory

      public Route.Builder setTravelAdvisory(RouteTravelAdvisory.Builder builderForValue)
       Additional information about the route.
       
      .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;
    • mergeTravelAdvisory

      public Route.Builder mergeTravelAdvisory(RouteTravelAdvisory value)
       Additional information about the route.
       
      .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;
    • clearTravelAdvisory

      public Route.Builder clearTravelAdvisory()
       Additional information about the route.
       
      .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;
    • getTravelAdvisoryBuilder

      public RouteTravelAdvisory.Builder getTravelAdvisoryBuilder()
       Additional information about the route.
       
      .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;
    • getTravelAdvisoryOrBuilder

      public RouteTravelAdvisoryOrBuilder getTravelAdvisoryOrBuilder()
       Additional information about the route.
       
      .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 9;
      Specified by:
      getTravelAdvisoryOrBuilder in interface RouteOrBuilder
    • getOptimizedIntermediateWaypointIndexList

      public 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;
      Specified by:
      getOptimizedIntermediateWaypointIndexList in interface RouteOrBuilder
      Returns:
      A list containing the optimizedIntermediateWaypointIndex.
    • getOptimizedIntermediateWaypointIndexCount

      public 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;
      Specified by:
      getOptimizedIntermediateWaypointIndexCount in interface RouteOrBuilder
      Returns:
      The count of optimizedIntermediateWaypointIndex.
    • getOptimizedIntermediateWaypointIndex

      public 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;
      Specified by:
      getOptimizedIntermediateWaypointIndex in interface RouteOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The optimizedIntermediateWaypointIndex at the given index.
    • setOptimizedIntermediateWaypointIndex

      public Route.Builder setOptimizedIntermediateWaypointIndex(int index, int value)
       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 to set the value at.
      value - The optimizedIntermediateWaypointIndex to set.
      Returns:
      This builder for chaining.
    • addOptimizedIntermediateWaypointIndex

      public Route.Builder addOptimizedIntermediateWaypointIndex(int value)
       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:
      value - The optimizedIntermediateWaypointIndex to add.
      Returns:
      This builder for chaining.
    • addAllOptimizedIntermediateWaypointIndex

      public Route.Builder addAllOptimizedIntermediateWaypointIndex(Iterable<? extends Integer> values)
       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:
      values - The optimizedIntermediateWaypointIndex to add.
      Returns:
      This builder for chaining.
    • clearOptimizedIntermediateWaypointIndex

      public Route.Builder clearOptimizedIntermediateWaypointIndex()
       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:
      This builder for chaining.
    • hasLocalizedValues

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

      public Route.RouteLocalizedValues getLocalizedValues()
       Text representations of properties of the `Route`.
       
      .google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;
      Specified by:
      getLocalizedValues in interface RouteOrBuilder
      Returns:
      The localizedValues.
    • setLocalizedValues

      public Route.Builder setLocalizedValues(Route.RouteLocalizedValues value)
       Text representations of properties of the `Route`.
       
      .google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;
    • setLocalizedValues

      public Route.Builder setLocalizedValues(Route.RouteLocalizedValues.Builder builderForValue)
       Text representations of properties of the `Route`.
       
      .google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;
    • mergeLocalizedValues

      public Route.Builder mergeLocalizedValues(Route.RouteLocalizedValues value)
       Text representations of properties of the `Route`.
       
      .google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;
    • clearLocalizedValues

      public Route.Builder clearLocalizedValues()
       Text representations of properties of the `Route`.
       
      .google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;
    • getLocalizedValuesBuilder

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

      public Route.RouteLocalizedValuesOrBuilder getLocalizedValuesOrBuilder()
       Text representations of properties of the `Route`.
       
      .google.maps.routing.v2.Route.RouteLocalizedValues localized_values = 11;
      Specified by:
      getLocalizedValuesOrBuilder in interface RouteOrBuilder
    • getRouteToken

      public String getRouteToken()
       An opaque token that can be passed to [Navigation
       SDK](https://developers.google.com/maps/documentation/mobility/driver-sdk/navigation)
       to reconstruct the route during navigation, and, in the event of rerouting,
       honor the original intention when the route was created. Treat this token
       as an opaque blob.  Don't compare its value across requests as its value
       may change even if the service returns the exact same route.
      
       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;
      Specified by:
      getRouteToken in interface RouteOrBuilder
      Returns:
      The routeToken.
    • getRouteTokenBytes

      public com.google.protobuf.ByteString getRouteTokenBytes()
       An opaque token that can be passed to [Navigation
       SDK](https://developers.google.com/maps/documentation/mobility/driver-sdk/navigation)
       to reconstruct the route during navigation, and, in the event of rerouting,
       honor the original intention when the route was created. Treat this token
       as an opaque blob.  Don't compare its value across requests as its value
       may change even if the service returns the exact same route.
      
       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;
      Specified by:
      getRouteTokenBytes in interface RouteOrBuilder
      Returns:
      The bytes for routeToken.
    • setRouteToken

      public Route.Builder setRouteToken(String value)
       An opaque token that can be passed to [Navigation
       SDK](https://developers.google.com/maps/documentation/mobility/driver-sdk/navigation)
       to reconstruct the route during navigation, and, in the event of rerouting,
       honor the original intention when the route was created. Treat this token
       as an opaque blob.  Don't compare its value across requests as its value
       may change even if the service returns the exact same route.
      
       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;
      Parameters:
      value - The routeToken to set.
      Returns:
      This builder for chaining.
    • clearRouteToken

      public Route.Builder clearRouteToken()
       An opaque token that can be passed to [Navigation
       SDK](https://developers.google.com/maps/documentation/mobility/driver-sdk/navigation)
       to reconstruct the route during navigation, and, in the event of rerouting,
       honor the original intention when the route was created. Treat this token
       as an opaque blob.  Don't compare its value across requests as its value
       may change even if the service returns the exact same route.
      
       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:
      This builder for chaining.
    • setRouteTokenBytes

      public Route.Builder setRouteTokenBytes(com.google.protobuf.ByteString value)
       An opaque token that can be passed to [Navigation
       SDK](https://developers.google.com/maps/documentation/mobility/driver-sdk/navigation)
       to reconstruct the route during navigation, and, in the event of rerouting,
       honor the original intention when the route was created. Treat this token
       as an opaque blob.  Don't compare its value across requests as its value
       may change even if the service returns the exact same route.
      
       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;
      Parameters:
      value - The bytes for routeToken to set.
      Returns:
      This builder for chaining.
    • hasPolylineDetails

      public boolean hasPolylineDetails()
       Contains information about details along the polyline.
       
      .google.maps.routing.v2.PolylineDetails polyline_details = 14;
      Specified by:
      hasPolylineDetails in interface RouteOrBuilder
      Returns:
      Whether the polylineDetails field is set.
    • getPolylineDetails

      public PolylineDetails getPolylineDetails()
       Contains information about details along the polyline.
       
      .google.maps.routing.v2.PolylineDetails polyline_details = 14;
      Specified by:
      getPolylineDetails in interface RouteOrBuilder
      Returns:
      The polylineDetails.
    • setPolylineDetails

      public Route.Builder setPolylineDetails(PolylineDetails value)
       Contains information about details along the polyline.
       
      .google.maps.routing.v2.PolylineDetails polyline_details = 14;
    • setPolylineDetails

      public Route.Builder setPolylineDetails(PolylineDetails.Builder builderForValue)
       Contains information about details along the polyline.
       
      .google.maps.routing.v2.PolylineDetails polyline_details = 14;
    • mergePolylineDetails

      public Route.Builder mergePolylineDetails(PolylineDetails value)
       Contains information about details along the polyline.
       
      .google.maps.routing.v2.PolylineDetails polyline_details = 14;
    • clearPolylineDetails

      public Route.Builder clearPolylineDetails()
       Contains information about details along the polyline.
       
      .google.maps.routing.v2.PolylineDetails polyline_details = 14;
    • getPolylineDetailsBuilder

      public PolylineDetails.Builder getPolylineDetailsBuilder()
       Contains information about details along the polyline.
       
      .google.maps.routing.v2.PolylineDetails polyline_details = 14;
    • getPolylineDetailsOrBuilder

      public PolylineDetailsOrBuilder getPolylineDetailsOrBuilder()
       Contains information about details along the polyline.
       
      .google.maps.routing.v2.PolylineDetails polyline_details = 14;
      Specified by:
      getPolylineDetailsOrBuilder in interface RouteOrBuilder