public static final class Waypoint.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder> implements WaypointOrBuilder
Encapsulates a waypoint. Waypoints mark both the beginning and end of a route, and include intermediate stops along the route.Protobuf type
google.maps.routing.v2.Waypoint| Modifier and Type | Method and Description |
|---|---|
Waypoint.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Waypoint |
build() |
Waypoint |
buildPartial() |
Waypoint.Builder |
clear() |
Waypoint.Builder |
clearAddress()
Human readable address or a plus code.
|
Waypoint.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Waypoint.Builder |
clearLocation()
A point specified using geographic coordinates, including an optional
heading.
|
Waypoint.Builder |
clearLocationType() |
Waypoint.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Waypoint.Builder |
clearPlaceId()
The POI Place ID associated with the waypoint.
|
Waypoint.Builder |
clearSideOfRoad()
Indicates that the location of this waypoint is meant to have a preference
for the vehicle to stop at a particular side of road.
|
Waypoint.Builder |
clearVehicleStopover()
Indicates that the waypoint is meant for vehicles to stop at, where the
intention is to either pickup or drop-off.
|
Waypoint.Builder |
clearVia()
Marks this waypoint as a milestone rather a stopping point.
|
Waypoint.Builder |
clone() |
String |
getAddress()
Human readable address or a plus code.
|
com.google.protobuf.ByteString |
getAddressBytes()
Human readable address or a plus code.
|
Waypoint |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
Location |
getLocation()
A point specified using geographic coordinates, including an optional
heading.
|
Location.Builder |
getLocationBuilder()
A point specified using geographic coordinates, including an optional
heading.
|
LocationOrBuilder |
getLocationOrBuilder()
A point specified using geographic coordinates, including an optional
heading.
|
Waypoint.LocationTypeCase |
getLocationTypeCase() |
String |
getPlaceId()
The POI Place ID associated with the waypoint.
|
com.google.protobuf.ByteString |
getPlaceIdBytes()
The POI Place ID associated with the waypoint.
|
boolean |
getSideOfRoad()
Indicates that the location of this waypoint is meant to have a preference
for the vehicle to stop at a particular side of road.
|
boolean |
getVehicleStopover()
Indicates that the waypoint is meant for vehicles to stop at, where the
intention is to either pickup or drop-off.
|
boolean |
getVia()
Marks this waypoint as a milestone rather a stopping point.
|
boolean |
hasAddress()
Human readable address or a plus code.
|
boolean |
hasLocation()
A point specified using geographic coordinates, including an optional
heading.
|
boolean |
hasPlaceId()
The POI Place ID associated with the waypoint.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Waypoint.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Waypoint.Builder |
mergeFrom(com.google.protobuf.Message other) |
Waypoint.Builder |
mergeFrom(Waypoint other) |
Waypoint.Builder |
mergeLocation(Location value)
A point specified using geographic coordinates, including an optional
heading.
|
Waypoint.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Waypoint.Builder |
setAddress(String value)
Human readable address or a plus code.
|
Waypoint.Builder |
setAddressBytes(com.google.protobuf.ByteString value)
Human readable address or a plus code.
|
Waypoint.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Waypoint.Builder |
setLocation(Location.Builder builderForValue)
A point specified using geographic coordinates, including an optional
heading.
|
Waypoint.Builder |
setLocation(Location value)
A point specified using geographic coordinates, including an optional
heading.
|
Waypoint.Builder |
setPlaceId(String value)
The POI Place ID associated with the waypoint.
|
Waypoint.Builder |
setPlaceIdBytes(com.google.protobuf.ByteString value)
The POI Place ID associated with the waypoint.
|
Waypoint.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Waypoint.Builder |
setSideOfRoad(boolean value)
Indicates that the location of this waypoint is meant to have a preference
for the vehicle to stop at a particular side of road.
|
Waypoint.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Waypoint.Builder |
setVehicleStopover(boolean value)
Indicates that the waypoint is meant for vehicles to stop at, where the
intention is to either pickup or drop-off.
|
Waypoint.Builder |
setVia(boolean value)
Marks this waypoint as a milestone rather a stopping point.
|
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<Waypoint.Builder>public Waypoint.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Waypoint.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<Waypoint.Builder>public Waypoint getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Waypoint build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Waypoint buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Waypoint.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>public Waypoint.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<Waypoint.Builder>public Waypoint.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>public Waypoint.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>public Waypoint.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<Waypoint.Builder>public Waypoint.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<Waypoint.Builder>public Waypoint.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Waypoint.Builder>public Waypoint.Builder mergeFrom(Waypoint other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>public Waypoint.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<Waypoint.Builder>IOExceptionpublic Waypoint.LocationTypeCase getLocationTypeCase()
getLocationTypeCase in interface WaypointOrBuilderpublic Waypoint.Builder clearLocationType()
public boolean hasLocation()
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;hasLocation in interface WaypointOrBuilderpublic Location getLocation()
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;getLocation in interface WaypointOrBuilderpublic Waypoint.Builder setLocation(Location value)
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;public Waypoint.Builder setLocation(Location.Builder builderForValue)
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;public Waypoint.Builder mergeLocation(Location value)
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;public Waypoint.Builder clearLocation()
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;public Location.Builder getLocationBuilder()
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;public LocationOrBuilder getLocationOrBuilder()
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;getLocationOrBuilder in interface WaypointOrBuilderpublic boolean hasPlaceId()
The POI Place ID associated with the waypoint.
string place_id = 2;hasPlaceId in interface WaypointOrBuilderpublic String getPlaceId()
The POI Place ID associated with the waypoint.
string place_id = 2;getPlaceId in interface WaypointOrBuilderpublic com.google.protobuf.ByteString getPlaceIdBytes()
The POI Place ID associated with the waypoint.
string place_id = 2;getPlaceIdBytes in interface WaypointOrBuilderpublic Waypoint.Builder setPlaceId(String value)
The POI Place ID associated with the waypoint.
string place_id = 2;value - The placeId to set.public Waypoint.Builder clearPlaceId()
The POI Place ID associated with the waypoint.
string place_id = 2;public Waypoint.Builder setPlaceIdBytes(com.google.protobuf.ByteString value)
The POI Place ID associated with the waypoint.
string place_id = 2;value - The bytes for placeId to set.public boolean hasAddress()
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;hasAddress in interface WaypointOrBuilderpublic String getAddress()
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;getAddress in interface WaypointOrBuilderpublic com.google.protobuf.ByteString getAddressBytes()
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;getAddressBytes in interface WaypointOrBuilderpublic Waypoint.Builder setAddress(String value)
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;value - The address to set.public Waypoint.Builder clearAddress()
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;public Waypoint.Builder setAddressBytes(com.google.protobuf.ByteString value)
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;value - The bytes for address to set.public boolean getVia()
Marks this waypoint as a milestone rather a stopping point. For each non-via waypoint in the request, the response appends an entry to the [`legs`][google.maps.routing.v2.Route.legs] array to provide the details for stopovers on that leg of the trip. Set this value to true when you want the route to pass through this waypoint without stopping over. Via waypoints don't cause an entry to be added to the `legs` array, but they do route the journey through the waypoint. You can only set this value on waypoints that are intermediates. The request fails if you set this field on terminal waypoints. If `ComputeRoutesRequest.optimize_waypoint_order` is set to true then this field cannot be set to true; otherwise, the request fails.
bool via = 3;getVia in interface WaypointOrBuilderpublic Waypoint.Builder setVia(boolean value)
Marks this waypoint as a milestone rather a stopping point. For each non-via waypoint in the request, the response appends an entry to the [`legs`][google.maps.routing.v2.Route.legs] array to provide the details for stopovers on that leg of the trip. Set this value to true when you want the route to pass through this waypoint without stopping over. Via waypoints don't cause an entry to be added to the `legs` array, but they do route the journey through the waypoint. You can only set this value on waypoints that are intermediates. The request fails if you set this field on terminal waypoints. If `ComputeRoutesRequest.optimize_waypoint_order` is set to true then this field cannot be set to true; otherwise, the request fails.
bool via = 3;value - The via to set.public Waypoint.Builder clearVia()
Marks this waypoint as a milestone rather a stopping point. For each non-via waypoint in the request, the response appends an entry to the [`legs`][google.maps.routing.v2.Route.legs] array to provide the details for stopovers on that leg of the trip. Set this value to true when you want the route to pass through this waypoint without stopping over. Via waypoints don't cause an entry to be added to the `legs` array, but they do route the journey through the waypoint. You can only set this value on waypoints that are intermediates. The request fails if you set this field on terminal waypoints. If `ComputeRoutesRequest.optimize_waypoint_order` is set to true then this field cannot be set to true; otherwise, the request fails.
bool via = 3;public boolean getVehicleStopover()
Indicates that the waypoint is meant for vehicles to stop at, where the intention is to either pickup or drop-off. When you set this value, the calculated route won't include non-`via` waypoints on roads that are unsuitable for pickup and drop-off. This option works only for `DRIVE` and `TWO_WHEELER` travel modes, and when the `location_type` is [`Location`][google.maps.routing.v2.Location].
bool vehicle_stopover = 4;getVehicleStopover in interface WaypointOrBuilderpublic Waypoint.Builder setVehicleStopover(boolean value)
Indicates that the waypoint is meant for vehicles to stop at, where the intention is to either pickup or drop-off. When you set this value, the calculated route won't include non-`via` waypoints on roads that are unsuitable for pickup and drop-off. This option works only for `DRIVE` and `TWO_WHEELER` travel modes, and when the `location_type` is [`Location`][google.maps.routing.v2.Location].
bool vehicle_stopover = 4;value - The vehicleStopover to set.public Waypoint.Builder clearVehicleStopover()
Indicates that the waypoint is meant for vehicles to stop at, where the intention is to either pickup or drop-off. When you set this value, the calculated route won't include non-`via` waypoints on roads that are unsuitable for pickup and drop-off. This option works only for `DRIVE` and `TWO_WHEELER` travel modes, and when the `location_type` is [`Location`][google.maps.routing.v2.Location].
bool vehicle_stopover = 4;public boolean getSideOfRoad()
Indicates that the location of this waypoint is meant to have a preference for the vehicle to stop at a particular side of road. When you set this value, the route will pass through the location so that the vehicle can stop at the side of road that the location is biased towards from the center of the road. This option works only for `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool side_of_road = 5;getSideOfRoad in interface WaypointOrBuilderpublic Waypoint.Builder setSideOfRoad(boolean value)
Indicates that the location of this waypoint is meant to have a preference for the vehicle to stop at a particular side of road. When you set this value, the route will pass through the location so that the vehicle can stop at the side of road that the location is biased towards from the center of the road. This option works only for `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool side_of_road = 5;value - The sideOfRoad to set.public Waypoint.Builder clearSideOfRoad()
Indicates that the location of this waypoint is meant to have a preference for the vehicle to stop at a particular side of road. When you set this value, the route will pass through the location so that the vehicle can stop at the side of road that the location is biased towards from the center of the road. This option works only for `DRIVE` and `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool side_of_road = 5;public final Waypoint.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>public final Waypoint.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>Copyright © 2025 Google LLC. All rights reserved.