public final class Waypoint extends com.google.protobuf.GeneratedMessageV3 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 | Class and Description |
|---|---|
static class |
Waypoint.Builder
Encapsulates a waypoint.
|
static class |
Waypoint.LocationTypeCase |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
ADDRESS_FIELD_NUMBER |
static int |
LOCATION_FIELD_NUMBER |
static int |
PLACE_ID_FIELD_NUMBER |
static int |
SIDE_OF_ROAD_FIELD_NUMBER |
static int |
VEHICLE_STOPOVER_FIELD_NUMBER |
static int |
VIA_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getAddress()
Human readable address or a plus code.
|
com.google.protobuf.ByteString |
getAddressBytes()
Human readable address or a plus code.
|
static Waypoint |
getDefaultInstance() |
Waypoint |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Location |
getLocation()
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() |
com.google.protobuf.Parser<Waypoint> |
getParserForType() |
String |
getPlaceId()
The POI Place ID associated with the waypoint.
|
com.google.protobuf.ByteString |
getPlaceIdBytes()
The POI Place ID associated with the waypoint.
|
int |
getSerializedSize() |
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.
|
int |
hashCode() |
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() |
static Waypoint.Builder |
newBuilder() |
static Waypoint.Builder |
newBuilder(Waypoint prototype) |
Waypoint.Builder |
newBuilderForType() |
protected Waypoint.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Waypoint |
parseDelimitedFrom(InputStream input) |
static Waypoint |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Waypoint |
parseFrom(byte[] data) |
static Waypoint |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Waypoint |
parseFrom(ByteBuffer data) |
static Waypoint |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Waypoint |
parseFrom(com.google.protobuf.ByteString data) |
static Waypoint |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Waypoint |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Waypoint |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Waypoint |
parseFrom(InputStream input) |
static Waypoint |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Waypoint> |
parser() |
Waypoint.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int LOCATION_FIELD_NUMBER
public static final int PLACE_ID_FIELD_NUMBER
public static final int ADDRESS_FIELD_NUMBER
public static final int VIA_FIELD_NUMBER
public static final int VEHICLE_STOPOVER_FIELD_NUMBER
public static final int SIDE_OF_ROAD_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public Waypoint.LocationTypeCase getLocationTypeCase()
getLocationTypeCase in interface WaypointOrBuilderpublic 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 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 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 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 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 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 final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Waypoint parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Waypoint parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Waypoint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Waypoint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Waypoint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Waypoint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Waypoint parseFrom(InputStream input) throws IOException
IOExceptionpublic static Waypoint parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Waypoint parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Waypoint parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Waypoint parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Waypoint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Waypoint.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Waypoint.Builder newBuilder()
public static Waypoint.Builder newBuilder(Waypoint prototype)
public Waypoint.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Waypoint.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Waypoint getDefaultInstance()
public static com.google.protobuf.Parser<Waypoint> parser()
public com.google.protobuf.Parser<Waypoint> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Waypoint getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.