Package com.google.maps.routing.v2
Class Waypoint.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Waypoint.Builder>
com.google.maps.routing.v2.Waypoint.Builder
- All Implemented Interfaces:
WaypointOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Waypoint
public static final class Waypoint.Builder
extends com.google.protobuf.GeneratedMessage.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-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Human readable address or a plus code.A point specified using geographic coordinates, including an optional heading.A token that identifies a [`NavigationPoint`](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4alpha/geocode.destinations/searchDestinations#navigationpoint), obtained from the `SearchDestinations` method of the Geocoding API.The POI Place ID associated with the waypoint.Indicates that the location of this waypoint is meant to have a preference for the vehicle to stop at a particular side of road.Indicates that the waypoint is meant for vehicles to stop at, where the intention is to either pickup or drop-off.clearVia()Marks this waypoint as a milestone rather a stopping point.Human readable address or a plus code.com.google.protobuf.ByteStringHuman readable address or a plus code.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorA point specified using geographic coordinates, including an optional heading.A point specified using geographic coordinates, including an optional heading.A point specified using geographic coordinates, including an optional heading.A token that identifies a [`NavigationPoint`](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4alpha/geocode.destinations/searchDestinations#navigationpoint), obtained from the `SearchDestinations` method of the Geocoding API.com.google.protobuf.ByteStringA token that identifies a [`NavigationPoint`](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4alpha/geocode.destinations/searchDestinations#navigationpoint), obtained from the `SearchDestinations` method of the Geocoding API.The POI Place ID associated with the waypoint.com.google.protobuf.ByteStringThe POI Place ID associated with the waypoint.booleanIndicates that the location of this waypoint is meant to have a preference for the vehicle to stop at a particular side of road.booleanIndicates that the waypoint is meant for vehicles to stop at, where the intention is to either pickup or drop-off.booleangetVia()Marks this waypoint as a milestone rather a stopping point.booleanHuman readable address or a plus code.booleanA point specified using geographic coordinates, including an optional heading.booleanA token that identifies a [`NavigationPoint`](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4alpha/geocode.destinations/searchDestinations#navigationpoint), obtained from the `SearchDestinations` method of the Geocoding API.booleanThe POI Place ID associated with the waypoint.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeLocation(Location value) A point specified using geographic coordinates, including an optional heading.setAddress(String value) Human readable address or a plus code.setAddressBytes(com.google.protobuf.ByteString value) Human readable address or a plus code.setLocation(Location value) A point specified using geographic coordinates, including an optional heading.setLocation(Location.Builder builderForValue) A point specified using geographic coordinates, including an optional heading.setNavigationPointToken(String value) A token that identifies a [`NavigationPoint`](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4alpha/geocode.destinations/searchDestinations#navigationpoint), obtained from the `SearchDestinations` method of the Geocoding API.setNavigationPointTokenBytes(com.google.protobuf.ByteString value) A token that identifies a [`NavigationPoint`](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4alpha/geocode.destinations/searchDestinations#navigationpoint), obtained from the `SearchDestinations` method of the Geocoding API.setPlaceId(String value) The POI Place ID associated with the waypoint.setPlaceIdBytes(com.google.protobuf.ByteString value) The POI Place ID associated with the waypoint.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.setVehicleStopover(boolean value) Indicates that the waypoint is meant for vehicles to stop at, where the intention is to either pickup or drop-off.setVia(boolean value) Marks this waypoint as a milestone rather a stopping point.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<Waypoint.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<Waypoint.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<Waypoint.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<Waypoint.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Waypoint.Builder>
-
mergeFrom
public Waypoint.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<Waypoint.Builder>- Throws:
IOException
-
getLocationTypeCase
- Specified by:
getLocationTypeCasein interfaceWaypointOrBuilder
-
clearLocationType
-
hasLocation
public boolean hasLocation()A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;- Specified by:
hasLocationin interfaceWaypointOrBuilder- Returns:
- Whether the location field is set.
-
getLocation
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;- Specified by:
getLocationin interfaceWaypointOrBuilder- Returns:
- The location.
-
setLocation
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1; -
setLocation
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1; -
mergeLocation
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1; -
clearLocation
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1; -
getLocationBuilder
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1; -
getLocationOrBuilder
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;- Specified by:
getLocationOrBuilderin interfaceWaypointOrBuilder
-
hasPlaceId
public boolean hasPlaceId()The POI Place ID associated with the waypoint.
string place_id = 2;- Specified by:
hasPlaceIdin interfaceWaypointOrBuilder- Returns:
- Whether the placeId field is set.
-
getPlaceId
The POI Place ID associated with the waypoint.
string place_id = 2;- Specified by:
getPlaceIdin interfaceWaypointOrBuilder- Returns:
- The placeId.
-
getPlaceIdBytes
public com.google.protobuf.ByteString getPlaceIdBytes()The POI Place ID associated with the waypoint.
string place_id = 2;- Specified by:
getPlaceIdBytesin interfaceWaypointOrBuilder- Returns:
- The bytes for placeId.
-
setPlaceId
The POI Place ID associated with the waypoint.
string place_id = 2;- Parameters:
value- The placeId to set.- Returns:
- This builder for chaining.
-
clearPlaceId
The POI Place ID associated with the waypoint.
string place_id = 2;- Returns:
- This builder for chaining.
-
setPlaceIdBytes
The POI Place ID associated with the waypoint.
string place_id = 2;- Parameters:
value- The bytes for placeId to set.- Returns:
- This builder for chaining.
-
hasAddress
public boolean hasAddress()Human readable address or a plus code. See https://plus.codes for details.
string address = 7;- Specified by:
hasAddressin interfaceWaypointOrBuilder- Returns:
- Whether the address field is set.
-
getAddress
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;- Specified by:
getAddressin interfaceWaypointOrBuilder- Returns:
- The address.
-
getAddressBytes
public com.google.protobuf.ByteString getAddressBytes()Human readable address or a plus code. See https://plus.codes for details.
string address = 7;- Specified by:
getAddressBytesin interfaceWaypointOrBuilder- Returns:
- The bytes for address.
-
setAddress
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;- Parameters:
value- The address to set.- Returns:
- This builder for chaining.
-
clearAddress
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;- Returns:
- This builder for chaining.
-
setAddressBytes
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;- Parameters:
value- The bytes for address to set.- Returns:
- This builder for chaining.
-
getVia
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;- Specified by:
getViain interfaceWaypointOrBuilder- Returns:
- The via.
-
setVia
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;- Parameters:
value- The via to set.- Returns:
- This builder for chaining.
-
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;- Returns:
- This builder for chaining.
-
getVehicleStopover
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;- Specified by:
getVehicleStopoverin interfaceWaypointOrBuilder- Returns:
- The vehicleStopover.
-
setVehicleStopover
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;- Parameters:
value- The vehicleStopover to set.- Returns:
- This builder for chaining.
-
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;- Returns:
- This builder for chaining.
-
getSideOfRoad
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;- Specified by:
getSideOfRoadin interfaceWaypointOrBuilder- Returns:
- The sideOfRoad.
-
setSideOfRoad
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;- Parameters:
value- The sideOfRoad to set.- Returns:
- This builder for chaining.
-
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;- Returns:
- This builder for chaining.
-