Package com.google.maps.routing.v2
Class RouteModifiers.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder>
com.google.maps.routing.v2.RouteModifiers.Builder
- All Implemented Interfaces:
RouteModifiersOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- RouteModifiers
public static final class RouteModifiers.Builder
extends com.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder>
implements RouteModifiersOrBuilder
Encapsulates a set of optional conditions to satisfy when calculating the routes.Protobuf type
google.maps.routing.v2.RouteModifiers-
Method Summary
Modifier and TypeMethodDescriptionaddAllTollPasses(Iterable<? extends TollPass> values) Encapsulates information about toll passes.addAllTollPassesValue(Iterable<Integer> values) Encapsulates information about toll passes.addTollPasses(TollPass value) Encapsulates information about toll passes.addTollPassesValue(int value) Encapsulates information about toll passes.build()clear()When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries.When set to true, avoids highways where reasonable, giving preference to routes not containing highways.When set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation.When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads.Encapsulates information about toll passes.Specifies the vehicle information.booleanWhen set to true, avoids ferries where reasonable, giving preference to routes not containing ferries.booleanWhen set to true, avoids highways where reasonable, giving preference to routes not containing highways.booleanWhen set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation.booleanWhen set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetTollPasses(int index) Encapsulates information about toll passes.intEncapsulates information about toll passes.Encapsulates information about toll passes.intgetTollPassesValue(int index) Encapsulates information about toll passes.Encapsulates information about toll passes.Specifies the vehicle information.Specifies the vehicle information.Specifies the vehicle information.booleanSpecifies the vehicle information.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(RouteModifiers other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeVehicleInfo(VehicleInfo value) Specifies the vehicle information.setAvoidFerries(boolean value) When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries.setAvoidHighways(boolean value) When set to true, avoids highways where reasonable, giving preference to routes not containing highways.setAvoidIndoor(boolean value) When set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation.setAvoidTolls(boolean value) When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads.setTollPasses(int index, TollPass value) Encapsulates information about toll passes.setTollPassesValue(int index, int value) Encapsulates information about toll passes.setVehicleInfo(VehicleInfo value) Specifies the vehicle information.setVehicleInfo(VehicleInfo.Builder builderForValue) Specifies the vehicle information.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RouteModifiers.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder>
-
mergeFrom
public RouteModifiers.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RouteModifiers.Builder>- Throws:
IOException
-
getAvoidTolls
public boolean getAvoidTolls()When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_tolls = 1;- Specified by:
getAvoidTollsin interfaceRouteModifiersOrBuilder- Returns:
- The avoidTolls.
-
setAvoidTolls
When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_tolls = 1;- Parameters:
value- The avoidTolls to set.- Returns:
- This builder for chaining.
-
clearAvoidTolls
When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_tolls = 1;- Returns:
- This builder for chaining.
-
getAvoidHighways
public boolean getAvoidHighways()When set to true, avoids highways where reasonable, giving preference to routes not containing highways. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_highways = 2;- Specified by:
getAvoidHighwaysin interfaceRouteModifiersOrBuilder- Returns:
- The avoidHighways.
-
setAvoidHighways
When set to true, avoids highways where reasonable, giving preference to routes not containing highways. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_highways = 2;- Parameters:
value- The avoidHighways to set.- Returns:
- This builder for chaining.
-
clearAvoidHighways
When set to true, avoids highways where reasonable, giving preference to routes not containing highways. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_highways = 2;- Returns:
- This builder for chaining.
-
getAvoidFerries
public boolean getAvoidFerries()When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries. Applies only to the `DRIVE` and`TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_ferries = 3;- Specified by:
getAvoidFerriesin interfaceRouteModifiersOrBuilder- Returns:
- The avoidFerries.
-
setAvoidFerries
When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries. Applies only to the `DRIVE` and`TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_ferries = 3;- Parameters:
value- The avoidFerries to set.- Returns:
- This builder for chaining.
-
clearAvoidFerries
When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries. Applies only to the `DRIVE` and`TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_ferries = 3;- Returns:
- This builder for chaining.
-
getAvoidIndoor
public boolean getAvoidIndoor()When set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation. Applies only to the `WALK` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_indoor = 4;- Specified by:
getAvoidIndoorin interfaceRouteModifiersOrBuilder- Returns:
- The avoidIndoor.
-
setAvoidIndoor
When set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation. Applies only to the `WALK` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_indoor = 4;- Parameters:
value- The avoidIndoor to set.- Returns:
- This builder for chaining.
-
clearAvoidIndoor
When set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation. Applies only to the `WALK` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_indoor = 4;- Returns:
- This builder for chaining.
-
hasVehicleInfo
public boolean hasVehicleInfo()Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5;- Specified by:
hasVehicleInfoin interfaceRouteModifiersOrBuilder- Returns:
- Whether the vehicleInfo field is set.
-
getVehicleInfo
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5;- Specified by:
getVehicleInfoin interfaceRouteModifiersOrBuilder- Returns:
- The vehicleInfo.
-
setVehicleInfo
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5; -
setVehicleInfo
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5; -
mergeVehicleInfo
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5; -
clearVehicleInfo
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5; -
getVehicleInfoBuilder
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5; -
getVehicleInfoOrBuilder
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5;- Specified by:
getVehicleInfoOrBuilderin interfaceRouteModifiersOrBuilder
-
getTollPassesList
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Specified by:
getTollPassesListin interfaceRouteModifiersOrBuilder- Returns:
- A list containing the tollPasses.
-
getTollPassesCount
public int getTollPassesCount()Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Specified by:
getTollPassesCountin interfaceRouteModifiersOrBuilder- Returns:
- The count of tollPasses.
-
getTollPasses
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Specified by:
getTollPassesin interfaceRouteModifiersOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The tollPasses at the given index.
-
setTollPasses
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Parameters:
index- The index to set the value at.value- The tollPasses to set.- Returns:
- This builder for chaining.
-
addTollPasses
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Parameters:
value- The tollPasses to add.- Returns:
- This builder for chaining.
-
addAllTollPasses
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Parameters:
values- The tollPasses to add.- Returns:
- This builder for chaining.
-
clearTollPasses
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Returns:
- This builder for chaining.
-
getTollPassesValueList
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Specified by:
getTollPassesValueListin interfaceRouteModifiersOrBuilder- Returns:
- A list containing the enum numeric values on the wire for tollPasses.
-
getTollPassesValue
public int getTollPassesValue(int index) Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Specified by:
getTollPassesValuein interfaceRouteModifiersOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The enum numeric value on the wire of tollPasses at the given index.
-
setTollPassesValue
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Parameters:
index- The index to set the value at.value- The enum numeric value on the wire for tollPasses to set.- Returns:
- This builder for chaining.
-
addTollPassesValue
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Parameters:
value- The enum numeric value on the wire for tollPasses to add.- Returns:
- This builder for chaining.
-
addAllTollPassesValue
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated .google.maps.routing.v2.TollPass toll_passes = 6;- Parameters:
values- The enum numeric values on the wire for tollPasses to add.- Returns:
- This builder for chaining.
-