Class RouteLeg

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.maps.routing.v2.RouteLeg
All Implemented Interfaces:
RouteLegOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class RouteLeg extends com.google.protobuf.GeneratedMessage implements RouteLegOrBuilder
 Contains a segment between non-`via` waypoints.
 
Protobuf type google.maps.routing.v2.RouteLeg
See Also:
  • Field Details

    • DISTANCE_METERS_FIELD_NUMBER

      public static final int DISTANCE_METERS_FIELD_NUMBER
      See Also:
    • DURATION_FIELD_NUMBER

      public static final int DURATION_FIELD_NUMBER
      See Also:
    • STATIC_DURATION_FIELD_NUMBER

      public static final int STATIC_DURATION_FIELD_NUMBER
      See Also:
    • POLYLINE_FIELD_NUMBER

      public static final int POLYLINE_FIELD_NUMBER
      See Also:
    • START_LOCATION_FIELD_NUMBER

      public static final int START_LOCATION_FIELD_NUMBER
      See Also:
    • END_LOCATION_FIELD_NUMBER

      public static final int END_LOCATION_FIELD_NUMBER
      See Also:
    • STEPS_FIELD_NUMBER

      public static final int STEPS_FIELD_NUMBER
      See Also:
    • TRAVEL_ADVISORY_FIELD_NUMBER

      public static final int TRAVEL_ADVISORY_FIELD_NUMBER
      See Also:
    • LOCALIZED_VALUES_FIELD_NUMBER

      public static final int LOCALIZED_VALUES_FIELD_NUMBER
      See Also:
    • STEPS_OVERVIEW_FIELD_NUMBER

      public static final int STEPS_OVERVIEW_FIELD_NUMBER
      See Also:
  • 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
    • getDistanceMeters

      public int getDistanceMeters()
       The travel distance of the route leg, in meters.
       
      int32 distance_meters = 1;
      Specified by:
      getDistanceMeters in interface RouteLegOrBuilder
      Returns:
      The distanceMeters.
    • hasDuration

      public boolean hasDuration()
       The length of time needed to navigate the leg. If the `route_preference`
       is set to `TRAFFIC_UNAWARE`, then this value is the same as
       `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
       `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
       conditions into account.
       
      .google.protobuf.Duration duration = 2;
      Specified by:
      hasDuration in interface RouteLegOrBuilder
      Returns:
      Whether the duration field is set.
    • getDuration

      public com.google.protobuf.Duration getDuration()
       The length of time needed to navigate the leg. If the `route_preference`
       is set to `TRAFFIC_UNAWARE`, then this value is the same as
       `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
       `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
       conditions into account.
       
      .google.protobuf.Duration duration = 2;
      Specified by:
      getDuration in interface RouteLegOrBuilder
      Returns:
      The duration.
    • getDurationOrBuilder

      public com.google.protobuf.DurationOrBuilder getDurationOrBuilder()
       The length of time needed to navigate the leg. If the `route_preference`
       is set to `TRAFFIC_UNAWARE`, then this value is the same as
       `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
       `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
       conditions into account.
       
      .google.protobuf.Duration duration = 2;
      Specified by:
      getDurationOrBuilder in interface RouteLegOrBuilder
    • hasStaticDuration

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

      public com.google.protobuf.Duration getStaticDuration()
       The duration of travel through the leg, calculated without taking
       traffic conditions into consideration.
       
      .google.protobuf.Duration static_duration = 3;
      Specified by:
      getStaticDuration in interface RouteLegOrBuilder
      Returns:
      The staticDuration.
    • getStaticDurationOrBuilder

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

      public boolean hasPolyline()
       The overall polyline for this leg that includes each `step`'s
       polyline.
       
      .google.maps.routing.v2.Polyline polyline = 4;
      Specified by:
      hasPolyline in interface RouteLegOrBuilder
      Returns:
      Whether the polyline field is set.
    • getPolyline

      public Polyline getPolyline()
       The overall polyline for this leg that includes each `step`'s
       polyline.
       
      .google.maps.routing.v2.Polyline polyline = 4;
      Specified by:
      getPolyline in interface RouteLegOrBuilder
      Returns:
      The polyline.
    • getPolylineOrBuilder

      public PolylineOrBuilder getPolylineOrBuilder()
       The overall polyline for this leg that includes each `step`'s
       polyline.
       
      .google.maps.routing.v2.Polyline polyline = 4;
      Specified by:
      getPolylineOrBuilder in interface RouteLegOrBuilder
    • hasStartLocation

      public boolean hasStartLocation()
       The start location of this leg. This location might be different from the
       provided `origin`. For example, when the provided `origin` is not near a
       road, this is a point on the road.
       
      .google.maps.routing.v2.Location start_location = 5;
      Specified by:
      hasStartLocation in interface RouteLegOrBuilder
      Returns:
      Whether the startLocation field is set.
    • getStartLocation

      public Location getStartLocation()
       The start location of this leg. This location might be different from the
       provided `origin`. For example, when the provided `origin` is not near a
       road, this is a point on the road.
       
      .google.maps.routing.v2.Location start_location = 5;
      Specified by:
      getStartLocation in interface RouteLegOrBuilder
      Returns:
      The startLocation.
    • getStartLocationOrBuilder

      public LocationOrBuilder getStartLocationOrBuilder()
       The start location of this leg. This location might be different from the
       provided `origin`. For example, when the provided `origin` is not near a
       road, this is a point on the road.
       
      .google.maps.routing.v2.Location start_location = 5;
      Specified by:
      getStartLocationOrBuilder in interface RouteLegOrBuilder
    • hasEndLocation

      public boolean hasEndLocation()
       The end location of this leg. This location might be different from the
       provided `destination`. For example, when the provided `destination` is not
       near a road, this is a point on the road.
       
      .google.maps.routing.v2.Location end_location = 6;
      Specified by:
      hasEndLocation in interface RouteLegOrBuilder
      Returns:
      Whether the endLocation field is set.
    • getEndLocation

      public Location getEndLocation()
       The end location of this leg. This location might be different from the
       provided `destination`. For example, when the provided `destination` is not
       near a road, this is a point on the road.
       
      .google.maps.routing.v2.Location end_location = 6;
      Specified by:
      getEndLocation in interface RouteLegOrBuilder
      Returns:
      The endLocation.
    • getEndLocationOrBuilder

      public LocationOrBuilder getEndLocationOrBuilder()
       The end location of this leg. This location might be different from the
       provided `destination`. For example, when the provided `destination` is not
       near a road, this is a point on the road.
       
      .google.maps.routing.v2.Location end_location = 6;
      Specified by:
      getEndLocationOrBuilder in interface RouteLegOrBuilder
    • getStepsList

      public List<RouteLegStep> getStepsList()
       An array of steps denoting segments within this leg. Each step represents
       one navigation instruction.
       
      repeated .google.maps.routing.v2.RouteLegStep steps = 7;
      Specified by:
      getStepsList in interface RouteLegOrBuilder
    • getStepsOrBuilderList

      public List<? extends RouteLegStepOrBuilder> getStepsOrBuilderList()
       An array of steps denoting segments within this leg. Each step represents
       one navigation instruction.
       
      repeated .google.maps.routing.v2.RouteLegStep steps = 7;
      Specified by:
      getStepsOrBuilderList in interface RouteLegOrBuilder
    • getStepsCount

      public int getStepsCount()
       An array of steps denoting segments within this leg. Each step represents
       one navigation instruction.
       
      repeated .google.maps.routing.v2.RouteLegStep steps = 7;
      Specified by:
      getStepsCount in interface RouteLegOrBuilder
    • getSteps

      public RouteLegStep getSteps(int index)
       An array of steps denoting segments within this leg. Each step represents
       one navigation instruction.
       
      repeated .google.maps.routing.v2.RouteLegStep steps = 7;
      Specified by:
      getSteps in interface RouteLegOrBuilder
    • getStepsOrBuilder

      public RouteLegStepOrBuilder getStepsOrBuilder(int index)
       An array of steps denoting segments within this leg. Each step represents
       one navigation instruction.
       
      repeated .google.maps.routing.v2.RouteLegStep steps = 7;
      Specified by:
      getStepsOrBuilder in interface RouteLegOrBuilder
    • hasTravelAdvisory

      public boolean hasTravelAdvisory()
       Contains the additional information that the user should be informed
       about, such as possible traffic zone restrictions, on a route leg.
       
      .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
      Specified by:
      hasTravelAdvisory in interface RouteLegOrBuilder
      Returns:
      Whether the travelAdvisory field is set.
    • getTravelAdvisory

      public RouteLegTravelAdvisory getTravelAdvisory()
       Contains the additional information that the user should be informed
       about, such as possible traffic zone restrictions, on a route leg.
       
      .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
      Specified by:
      getTravelAdvisory in interface RouteLegOrBuilder
      Returns:
      The travelAdvisory.
    • getTravelAdvisoryOrBuilder

      public RouteLegTravelAdvisoryOrBuilder getTravelAdvisoryOrBuilder()
       Contains the additional information that the user should be informed
       about, such as possible traffic zone restrictions, on a route leg.
       
      .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
      Specified by:
      getTravelAdvisoryOrBuilder in interface RouteLegOrBuilder
    • hasLocalizedValues

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

      public RouteLeg.RouteLegLocalizedValues getLocalizedValues()
       Text representations of properties of the `RouteLeg`.
       
      .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
      Specified by:
      getLocalizedValues in interface RouteLegOrBuilder
      Returns:
      The localizedValues.
    • getLocalizedValuesOrBuilder

      public RouteLeg.RouteLegLocalizedValuesOrBuilder getLocalizedValuesOrBuilder()
       Text representations of properties of the `RouteLeg`.
       
      .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
      Specified by:
      getLocalizedValuesOrBuilder in interface RouteLegOrBuilder
    • hasStepsOverview

      public boolean hasStepsOverview()
       Overview information about the steps in this `RouteLeg`. This field is only
       populated for TRANSIT routes.
       
      .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
      Specified by:
      hasStepsOverview in interface RouteLegOrBuilder
      Returns:
      Whether the stepsOverview field is set.
    • getStepsOverview

      public RouteLeg.StepsOverview getStepsOverview()
       Overview information about the steps in this `RouteLeg`. This field is only
       populated for TRANSIT routes.
       
      .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
      Specified by:
      getStepsOverview in interface RouteLegOrBuilder
      Returns:
      The stepsOverview.
    • getStepsOverviewOrBuilder

      public RouteLeg.StepsOverviewOrBuilder getStepsOverviewOrBuilder()
       Overview information about the steps in this `RouteLeg`. This field is only
       populated for TRANSIT routes.
       
      .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
      Specified by:
      getStepsOverviewOrBuilder in interface RouteLegOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static RouteLeg parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RouteLeg parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RouteLeg parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RouteLeg parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RouteLeg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RouteLeg parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RouteLeg parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RouteLeg parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static RouteLeg parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static RouteLeg parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RouteLeg parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RouteLeg parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public RouteLeg.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static RouteLeg.Builder newBuilder()
    • newBuilder

      public static RouteLeg.Builder newBuilder(RouteLeg prototype)
    • toBuilder

      public RouteLeg.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected RouteLeg.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static RouteLeg getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<RouteLeg> parser()
    • getParserForType

      public com.google.protobuf.Parser<RouteLeg> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public RouteLeg getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder