Class 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.GeneratedMessageV3.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 Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public Route.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>
      • setField

        public Route.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                      Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>
      • clearField

        public Route.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>
      • clearOneof

        public Route.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>
      • setRepeatedField

        public Route.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                              int index,
                                              Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>
      • addRepeatedField

        public Route.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                              Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Route.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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 com.google.geo.type.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​(com.google.geo.type.Viewport value)
         The viewport bounding box of the polyline.
         
        .google.geo.type.Viewport viewport = 8;
      • setViewport

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

        public Route.Builder mergeViewport​(com.google.geo.type.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 com.google.geo.type.Viewport.Builder getViewportBuilder()
         The viewport bounding box of the polyline.
         
        .google.geo.type.Viewport viewport = 8;
      • getViewportOrBuilder

        public com.google.geo.type.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;
      • 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;
      • getRouteToken

        public 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;
        Specified by:
        getRouteToken in interface RouteOrBuilder
        Returns:
        The routeToken.
      • getRouteTokenBytes

        public 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;
        Specified by:
        getRouteTokenBytes in interface RouteOrBuilder
        Returns:
        The bytes for routeToken.
      • setRouteToken

        public Route.Builder setRouteToken​(String value)
         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;
        Parameters:
        value - The routeToken to set.
        Returns:
        This builder for chaining.
      • clearRouteToken

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

        public Route.Builder setRouteTokenBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for routeToken to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Route.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>
      • mergeUnknownFields

        public final Route.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Route.Builder>