Class RouteLegStep

  • All Implemented Interfaces:
    RouteLegStepOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class RouteLegStep
    extends com.google.protobuf.GeneratedMessageV3
    implements RouteLegStepOrBuilder
     Contains a segment of a [RouteLeg][google.maps.routing.v2.RouteLeg]. A
     step corresponds to a single navigation instruction. Route legs are made up
     of steps.
     
    Protobuf type google.maps.routing.v2.RouteLegStep
    See Also:
    Serialized Form
    • Field Detail

      • DISTANCE_METERS_FIELD_NUMBER

        public static final int DISTANCE_METERS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • STATIC_DURATION_FIELD_NUMBER

        public static final int STATIC_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • START_LOCATION_FIELD_NUMBER

        public static final int START_LOCATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • END_LOCATION_FIELD_NUMBER

        public static final int END_LOCATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • NAVIGATION_INSTRUCTION_FIELD_NUMBER

        public static final int NAVIGATION_INSTRUCTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRAVEL_ADVISORY_FIELD_NUMBER

        public static final int TRAVEL_ADVISORY_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LOCALIZED_VALUES_FIELD_NUMBER

        public static final int LOCALIZED_VALUES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRANSIT_DETAILS_FIELD_NUMBER

        public static final int TRANSIT_DETAILS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRAVEL_MODE_FIELD_NUMBER

        public static final int TRAVEL_MODE_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • getDistanceMeters

        public int getDistanceMeters()
         The travel distance of this step, in meters. In some circumstances, this
         field might not have a value.
         
        int32 distance_meters = 1;
        Specified by:
        getDistanceMeters in interface RouteLegStepOrBuilder
        Returns:
        The distanceMeters.
      • hasStaticDuration

        public boolean hasStaticDuration()
         The duration of travel through this step without taking traffic conditions
         into consideration. In some circumstances, this field might not have a
         value.
         
        .google.protobuf.Duration static_duration = 2;
        Specified by:
        hasStaticDuration in interface RouteLegStepOrBuilder
        Returns:
        Whether the staticDuration field is set.
      • getStaticDuration

        public com.google.protobuf.Duration getStaticDuration()
         The duration of travel through this step without taking traffic conditions
         into consideration. In some circumstances, this field might not have a
         value.
         
        .google.protobuf.Duration static_duration = 2;
        Specified by:
        getStaticDuration in interface RouteLegStepOrBuilder
        Returns:
        The staticDuration.
      • getStaticDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getStaticDurationOrBuilder()
         The duration of travel through this step without taking traffic conditions
         into consideration. In some circumstances, this field might not have a
         value.
         
        .google.protobuf.Duration static_duration = 2;
        Specified by:
        getStaticDurationOrBuilder in interface RouteLegStepOrBuilder
      • hasPolyline

        public boolean hasPolyline()
         The polyline associated with this step.
         
        .google.maps.routing.v2.Polyline polyline = 3;
        Specified by:
        hasPolyline in interface RouteLegStepOrBuilder
        Returns:
        Whether the polyline field is set.
      • getPolyline

        public Polyline getPolyline()
         The polyline associated with this step.
         
        .google.maps.routing.v2.Polyline polyline = 3;
        Specified by:
        getPolyline in interface RouteLegStepOrBuilder
        Returns:
        The polyline.
      • hasStartLocation

        public boolean hasStartLocation()
         The start location of this step.
         
        .google.maps.routing.v2.Location start_location = 4;
        Specified by:
        hasStartLocation in interface RouteLegStepOrBuilder
        Returns:
        Whether the startLocation field is set.
      • getStartLocation

        public Location getStartLocation()
         The start location of this step.
         
        .google.maps.routing.v2.Location start_location = 4;
        Specified by:
        getStartLocation in interface RouteLegStepOrBuilder
        Returns:
        The startLocation.
      • hasEndLocation

        public boolean hasEndLocation()
         The end location of this step.
         
        .google.maps.routing.v2.Location end_location = 5;
        Specified by:
        hasEndLocation in interface RouteLegStepOrBuilder
        Returns:
        Whether the endLocation field is set.
      • getEndLocation

        public Location getEndLocation()
         The end location of this step.
         
        .google.maps.routing.v2.Location end_location = 5;
        Specified by:
        getEndLocation in interface RouteLegStepOrBuilder
        Returns:
        The endLocation.
      • hasNavigationInstruction

        public boolean hasNavigationInstruction()
         Navigation instructions.
         
        .google.maps.routing.v2.NavigationInstruction navigation_instruction = 6;
        Specified by:
        hasNavigationInstruction in interface RouteLegStepOrBuilder
        Returns:
        Whether the navigationInstruction field is set.
      • hasTravelAdvisory

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

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

        public boolean hasLocalizedValues()
         Text representations of properties of the `RouteLegStep`.
         
        .google.maps.routing.v2.RouteLegStep.RouteLegStepLocalizedValues localized_values = 8;
        Specified by:
        hasLocalizedValues in interface RouteLegStepOrBuilder
        Returns:
        Whether the localizedValues field is set.
      • hasTransitDetails

        public boolean hasTransitDetails()
         Details pertaining to this step if the travel mode is `TRANSIT`.
         
        .google.maps.routing.v2.RouteLegStepTransitDetails transit_details = 9;
        Specified by:
        hasTransitDetails in interface RouteLegStepOrBuilder
        Returns:
        Whether the transitDetails field is set.
      • getTravelModeValue

        public int getTravelModeValue()
         The travel mode used for this step.
         
        .google.maps.routing.v2.RouteTravelMode travel_mode = 10;
        Specified by:
        getTravelModeValue in interface RouteLegStepOrBuilder
        Returns:
        The enum numeric value on the wire for travelMode.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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 RouteLegStep parseFrom​(ByteBuffer data)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

        protected RouteLegStep.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static RouteLegStep getDefaultInstance()
      • parser

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

        public com.google.protobuf.Parser<RouteLegStep> 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.GeneratedMessageV3
      • getDefaultInstanceForType

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