Class RouteMatrixElement

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

@Generated public final class RouteMatrixElement extends com.google.protobuf.GeneratedMessage implements RouteMatrixElementOrBuilder
 Contains route information computed for an origin/destination pair in the
 ComputeRouteMatrix API. This proto can be streamed to the client.
 
Protobuf type google.maps.routing.v2.RouteMatrixElement
See Also:
  • Field Details

    • ORIGIN_INDEX_FIELD_NUMBER

      public static final int ORIGIN_INDEX_FIELD_NUMBER
      See Also:
    • DESTINATION_INDEX_FIELD_NUMBER

      public static final int DESTINATION_INDEX_FIELD_NUMBER
      See Also:
    • STATUS_FIELD_NUMBER

      public static final int STATUS_FIELD_NUMBER
      See Also:
    • CONDITION_FIELD_NUMBER

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

      public static final int TRAVEL_ADVISORY_FIELD_NUMBER
      See Also:
    • FALLBACK_INFO_FIELD_NUMBER

      public static final int FALLBACK_INFO_FIELD_NUMBER
      See Also:
    • LOCALIZED_VALUES_FIELD_NUMBER

      public static final int LOCALIZED_VALUES_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
    • hasOriginIndex

      public boolean hasOriginIndex()
       Zero-based index of the origin in the request.
       
      optional int32 origin_index = 1;
      Specified by:
      hasOriginIndex in interface RouteMatrixElementOrBuilder
      Returns:
      Whether the originIndex field is set.
    • getOriginIndex

      public int getOriginIndex()
       Zero-based index of the origin in the request.
       
      optional int32 origin_index = 1;
      Specified by:
      getOriginIndex in interface RouteMatrixElementOrBuilder
      Returns:
      The originIndex.
    • hasDestinationIndex

      public boolean hasDestinationIndex()
       Zero-based index of the destination in the request.
       
      optional int32 destination_index = 2;
      Specified by:
      hasDestinationIndex in interface RouteMatrixElementOrBuilder
      Returns:
      Whether the destinationIndex field is set.
    • getDestinationIndex

      public int getDestinationIndex()
       Zero-based index of the destination in the request.
       
      optional int32 destination_index = 2;
      Specified by:
      getDestinationIndex in interface RouteMatrixElementOrBuilder
      Returns:
      The destinationIndex.
    • hasStatus

      public boolean hasStatus()
       Error status code for this element.
       
      .google.rpc.Status status = 3;
      Specified by:
      hasStatus in interface RouteMatrixElementOrBuilder
      Returns:
      Whether the status field is set.
    • getStatus

      public Status getStatus()
       Error status code for this element.
       
      .google.rpc.Status status = 3;
      Specified by:
      getStatus in interface RouteMatrixElementOrBuilder
      Returns:
      The status.
    • getStatusOrBuilder

      public StatusOrBuilder getStatusOrBuilder()
       Error status code for this element.
       
      .google.rpc.Status status = 3;
      Specified by:
      getStatusOrBuilder in interface RouteMatrixElementOrBuilder
    • getConditionValue

      public int getConditionValue()
       Indicates whether the route was found or not. Independent of status.
       
      .google.maps.routing.v2.RouteMatrixElementCondition condition = 9;
      Specified by:
      getConditionValue in interface RouteMatrixElementOrBuilder
      Returns:
      The enum numeric value on the wire for condition.
    • getCondition

      public RouteMatrixElementCondition getCondition()
       Indicates whether the route was found or not. Independent of status.
       
      .google.maps.routing.v2.RouteMatrixElementCondition condition = 9;
      Specified by:
      getCondition in interface RouteMatrixElementOrBuilder
      Returns:
      The condition.
    • getDistanceMeters

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

      public boolean hasDuration()
       The length of time needed to navigate the route. If you set the
       [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.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 = 5;
      Specified by:
      hasDuration in interface RouteMatrixElementOrBuilder
      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][google.maps.routing.v2.ComputeRouteMatrixRequest.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 = 5;
      Specified by:
      getDuration in interface RouteMatrixElementOrBuilder
      Returns:
      The duration.
    • getDurationOrBuilder

      public com.google.protobuf.DurationOrBuilder getDurationOrBuilder()
       The length of time needed to navigate the route. If you set the
       [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.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 = 5;
      Specified by:
      getDurationOrBuilder in interface RouteMatrixElementOrBuilder
    • hasStaticDuration

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

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

      public com.google.protobuf.DurationOrBuilder getStaticDurationOrBuilder()
       The duration of traveling through the route without taking traffic
       conditions into consideration.
       
      .google.protobuf.Duration static_duration = 6;
      Specified by:
      getStaticDurationOrBuilder in interface RouteMatrixElementOrBuilder
    • hasTravelAdvisory

      public boolean hasTravelAdvisory()
       Additional information about the route. For example: restriction
       information and toll information
       
      .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
      Specified by:
      hasTravelAdvisory in interface RouteMatrixElementOrBuilder
      Returns:
      Whether the travelAdvisory field is set.
    • getTravelAdvisory

      public RouteTravelAdvisory getTravelAdvisory()
       Additional information about the route. For example: restriction
       information and toll information
       
      .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
      Specified by:
      getTravelAdvisory in interface RouteMatrixElementOrBuilder
      Returns:
      The travelAdvisory.
    • getTravelAdvisoryOrBuilder

      public RouteTravelAdvisoryOrBuilder getTravelAdvisoryOrBuilder()
       Additional information about the route. For example: restriction
       information and toll information
       
      .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
      Specified by:
      getTravelAdvisoryOrBuilder in interface RouteMatrixElementOrBuilder
    • hasFallbackInfo

      public boolean hasFallbackInfo()
       In some cases when the server is not able to compute the route with the
       given preferences for this particular origin/destination pair, it may
       fall back to using a different mode of computation. When fallback mode is
       used, this field contains detailed information about the fallback response.
       Otherwise this field is unset.
       
      .google.maps.routing.v2.FallbackInfo fallback_info = 8;
      Specified by:
      hasFallbackInfo in interface RouteMatrixElementOrBuilder
      Returns:
      Whether the fallbackInfo field is set.
    • getFallbackInfo

      public FallbackInfo getFallbackInfo()
       In some cases when the server is not able to compute the route with the
       given preferences for this particular origin/destination pair, it may
       fall back to using a different mode of computation. When fallback mode is
       used, this field contains detailed information about the fallback response.
       Otherwise this field is unset.
       
      .google.maps.routing.v2.FallbackInfo fallback_info = 8;
      Specified by:
      getFallbackInfo in interface RouteMatrixElementOrBuilder
      Returns:
      The fallbackInfo.
    • getFallbackInfoOrBuilder

      public FallbackInfoOrBuilder getFallbackInfoOrBuilder()
       In some cases when the server is not able to compute the route with the
       given preferences for this particular origin/destination pair, it may
       fall back to using a different mode of computation. When fallback mode is
       used, this field contains detailed information about the fallback response.
       Otherwise this field is unset.
       
      .google.maps.routing.v2.FallbackInfo fallback_info = 8;
      Specified by:
      getFallbackInfoOrBuilder in interface RouteMatrixElementOrBuilder
    • hasLocalizedValues

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

      public RouteMatrixElement.LocalizedValues getLocalizedValues()
       Text representations of properties of the `RouteMatrixElement`.
       
      .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
      Specified by:
      getLocalizedValues in interface RouteMatrixElementOrBuilder
      Returns:
      The localizedValues.
    • getLocalizedValuesOrBuilder

      public RouteMatrixElement.LocalizedValuesOrBuilder getLocalizedValuesOrBuilder()
       Text representations of properties of the `RouteMatrixElement`.
       
      .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
      Specified by:
      getLocalizedValuesOrBuilder in interface RouteMatrixElementOrBuilder
    • 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 RouteMatrixElement parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static RouteMatrixElement.Builder newBuilder()
    • newBuilder

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

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

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

      public static RouteMatrixElement getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<RouteMatrixElement> 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 RouteMatrixElement getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder