public static final class RouteModifiers.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder> implements RouteModifiersOrBuilder
Encapsulates a set of optional conditions to satisfy when calculating the routes.Protobuf type
google.maps.routing.v2.RouteModifiers| Modifier and Type | Method and Description |
|---|---|
RouteModifiers.Builder |
addAllTollPasses(Iterable<? extends TollPass> values)
Encapsulates information about toll passes.
|
RouteModifiers.Builder |
addAllTollPassesValue(Iterable<Integer> values)
Encapsulates information about toll passes.
|
RouteModifiers.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
RouteModifiers.Builder |
addTollPasses(TollPass value)
Encapsulates information about toll passes.
|
RouteModifiers.Builder |
addTollPassesValue(int value)
Encapsulates information about toll passes.
|
RouteModifiers |
build() |
RouteModifiers |
buildPartial() |
RouteModifiers.Builder |
clear() |
RouteModifiers.Builder |
clearAvoidFerries()
When set to true, avoids ferries where reasonable, giving preference to
routes not containing ferries.
|
RouteModifiers.Builder |
clearAvoidHighways()
When set to true, avoids highways where reasonable, giving preference to
routes not containing highways.
|
RouteModifiers.Builder |
clearAvoidIndoor()
When set to true, avoids navigating indoors where reasonable, giving
preference to routes not containing indoor navigation.
|
RouteModifiers.Builder |
clearAvoidTolls()
When set to true, avoids toll roads where reasonable, giving preference to
routes not containing toll roads.
|
RouteModifiers.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
RouteModifiers.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
RouteModifiers.Builder |
clearTollPasses()
Encapsulates information about toll passes.
|
RouteModifiers.Builder |
clearVehicleInfo()
Specifies the vehicle information.
|
RouteModifiers.Builder |
clone() |
boolean |
getAvoidFerries()
When set to true, avoids ferries where reasonable, giving preference to
routes not containing ferries.
|
boolean |
getAvoidHighways()
When set to true, avoids highways where reasonable, giving preference to
routes not containing highways.
|
boolean |
getAvoidIndoor()
When set to true, avoids navigating indoors where reasonable, giving
preference to routes not containing indoor navigation.
|
boolean |
getAvoidTolls()
When set to true, avoids toll roads where reasonable, giving preference to
routes not containing toll roads.
|
RouteModifiers |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
TollPass |
getTollPasses(int index)
Encapsulates information about toll passes.
|
int |
getTollPassesCount()
Encapsulates information about toll passes.
|
List<TollPass> |
getTollPassesList()
Encapsulates information about toll passes.
|
int |
getTollPassesValue(int index)
Encapsulates information about toll passes.
|
List<Integer> |
getTollPassesValueList()
Encapsulates information about toll passes.
|
VehicleInfo |
getVehicleInfo()
Specifies the vehicle information.
|
VehicleInfo.Builder |
getVehicleInfoBuilder()
Specifies the vehicle information.
|
VehicleInfoOrBuilder |
getVehicleInfoOrBuilder()
Specifies the vehicle information.
|
boolean |
hasVehicleInfo()
Specifies the vehicle information.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
RouteModifiers.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
RouteModifiers.Builder |
mergeFrom(com.google.protobuf.Message other) |
RouteModifiers.Builder |
mergeFrom(RouteModifiers other) |
RouteModifiers.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
RouteModifiers.Builder |
mergeVehicleInfo(VehicleInfo value)
Specifies the vehicle information.
|
RouteModifiers.Builder |
setAvoidFerries(boolean value)
When set to true, avoids ferries where reasonable, giving preference to
routes not containing ferries.
|
RouteModifiers.Builder |
setAvoidHighways(boolean value)
When set to true, avoids highways where reasonable, giving preference to
routes not containing highways.
|
RouteModifiers.Builder |
setAvoidIndoor(boolean value)
When set to true, avoids navigating indoors where reasonable, giving
preference to routes not containing indoor navigation.
|
RouteModifiers.Builder |
setAvoidTolls(boolean value)
When set to true, avoids toll roads where reasonable, giving preference to
routes not containing toll roads.
|
RouteModifiers.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
RouteModifiers.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
RouteModifiers.Builder |
setTollPasses(int index,
TollPass value)
Encapsulates information about toll passes.
|
RouteModifiers.Builder |
setTollPassesValue(int index,
int value)
Encapsulates information about toll passes.
|
RouteModifiers.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
RouteModifiers.Builder |
setVehicleInfo(VehicleInfo.Builder builderForValue)
Specifies the vehicle information.
|
RouteModifiers.Builder |
setVehicleInfo(VehicleInfo value)
Specifies the vehicle information.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>public RouteModifiers.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>public RouteModifiers getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic RouteModifiers build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic RouteModifiers buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic RouteModifiers.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>public RouteModifiers.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>public RouteModifiers.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>public RouteModifiers.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>public RouteModifiers.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>public RouteModifiers.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>public RouteModifiers.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<RouteModifiers.Builder>public RouteModifiers.Builder mergeFrom(RouteModifiers other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>public RouteModifiers.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<RouteModifiers.Builder>IOExceptionpublic 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;getAvoidTolls in interface RouteModifiersOrBuilderpublic RouteModifiers.Builder setAvoidTolls(boolean value)
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;value - The avoidTolls to set.public RouteModifiers.Builder 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;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;getAvoidHighways in interface RouteModifiersOrBuilderpublic RouteModifiers.Builder setAvoidHighways(boolean value)
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;value - The avoidHighways to set.public RouteModifiers.Builder 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;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;getAvoidFerries in interface RouteModifiersOrBuilderpublic RouteModifiers.Builder setAvoidFerries(boolean value)
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;value - The avoidFerries to set.public RouteModifiers.Builder 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;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;getAvoidIndoor in interface RouteModifiersOrBuilderpublic RouteModifiers.Builder setAvoidIndoor(boolean value)
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;value - The avoidIndoor to set.public RouteModifiers.Builder 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;public boolean hasVehicleInfo()
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5;hasVehicleInfo in interface RouteModifiersOrBuilderpublic VehicleInfo getVehicleInfo()
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5;getVehicleInfo in interface RouteModifiersOrBuilderpublic RouteModifiers.Builder setVehicleInfo(VehicleInfo value)
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5;public RouteModifiers.Builder setVehicleInfo(VehicleInfo.Builder builderForValue)
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5;public RouteModifiers.Builder mergeVehicleInfo(VehicleInfo value)
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5;public RouteModifiers.Builder clearVehicleInfo()
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5;public VehicleInfo.Builder getVehicleInfoBuilder()
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5;public VehicleInfoOrBuilder getVehicleInfoOrBuilder()
Specifies the vehicle information.
.google.maps.routing.v2.VehicleInfo vehicle_info = 5;getVehicleInfoOrBuilder in interface RouteModifiersOrBuilderpublic List<TollPass> 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;getTollPassesList in interface RouteModifiersOrBuilderpublic 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;getTollPassesCount in interface RouteModifiersOrBuilderpublic TollPass getTollPasses(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;getTollPasses in interface RouteModifiersOrBuilderindex - The index of the element to return.public RouteModifiers.Builder setTollPasses(int index, TollPass value)
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;index - The index to set the value at.value - The tollPasses to set.public RouteModifiers.Builder addTollPasses(TollPass value)
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;value - The tollPasses to add.public RouteModifiers.Builder addAllTollPasses(Iterable<? extends TollPass> values)
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;values - The tollPasses to add.public RouteModifiers.Builder 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;public List<Integer> 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;getTollPassesValueList in interface RouteModifiersOrBuilderpublic 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;getTollPassesValue in interface RouteModifiersOrBuilderindex - The index of the value to return.public RouteModifiers.Builder setTollPassesValue(int index, int value)
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;index - The index to set the value at.value - The enum numeric value on the wire for tollPasses to set.public RouteModifiers.Builder addTollPassesValue(int value)
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;value - The enum numeric value on the wire for tollPasses to add.public RouteModifiers.Builder addAllTollPassesValue(Iterable<Integer> values)
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;values - The enum numeric values on the wire for tollPasses to add.public final RouteModifiers.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>public final RouteModifiers.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>Copyright © 2025 Google LLC. All rights reserved.