Class Route
- java.lang.Object
-
- software.amazon.awssdk.services.georoutes.model.Route
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Route.Builder,Route>
@Generated("software.amazon.awssdk:codegen") public final class Route extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Route.Builder,Route>
The route.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRoute.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Route.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasLegs()For responses, this returns true if the service returned a value for the Legs property.booleanhasMajorRoadLabels()For responses, this returns true if the service returned a value for the MajorRoadLabels property.List<RouteLeg>legs()A leg is a section of a route from one waypoint to the next.List<RouteMajorRoadLabel>majorRoadLabels()Important labels including names and route numbers that differentiate the current route from the alternatives presented.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends Route.Builder>serializableBuilderClass()RouteSummarysummary()Summarized details of the leg.Route.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
hasLegs
public final boolean hasLegs()
For responses, this returns true if the service returned a value for the Legs property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
legs
public final List<RouteLeg> legs()
A leg is a section of a route from one waypoint to the next. A leg could be of type Vehicle, Pedestrian or Ferry. Legs of different types could occur together within a single route. For example, a car employing the use of a Ferry will contain Vehicle legs corresponding to journey on land, and Ferry legs corresponding to the journey via Ferry.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasLegs()method.- Returns:
- A leg is a section of a route from one waypoint to the next. A leg could be of type Vehicle, Pedestrian or Ferry. Legs of different types could occur together within a single route. For example, a car employing the use of a Ferry will contain Vehicle legs corresponding to journey on land, and Ferry legs corresponding to the journey via Ferry.
-
hasMajorRoadLabels
public final boolean hasMajorRoadLabels()
For responses, this returns true if the service returned a value for the MajorRoadLabels property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
majorRoadLabels
public final List<RouteMajorRoadLabel> majorRoadLabels()
Important labels including names and route numbers that differentiate the current route from the alternatives presented.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasMajorRoadLabels()method.- Returns:
- Important labels including names and route numbers that differentiate the current route from the alternatives presented.
-
summary
public final RouteSummary summary()
Summarized details of the leg.
- Returns:
- Summarized details of the leg.
-
toBuilder
public Route.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Route.Builder,Route>
-
builder
public static Route.Builder builder()
-
serializableBuilderClass
public static Class<? extends Route.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-