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.GeneratedMessageV3.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.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 typegoogle.maps.routing.v2.Waypoint
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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(Waypoint other)
Waypoint.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Waypoint.Builder
mergeFrom(com.google.protobuf.Message 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 value)
A point specified using geographic coordinates, including an optional heading.Waypoint.Builder
setLocation(Location.Builder builderForValue)
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.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
clear
public Waypoint.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
getDefaultInstanceForType
public Waypoint getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Waypoint build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Waypoint buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Waypoint.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
setField
public Waypoint.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
clearField
public Waypoint.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
clearOneof
public Waypoint.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
setRepeatedField
public Waypoint.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
addRepeatedField
public Waypoint.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
mergeFrom
public Waypoint.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Waypoint.Builder>
-
mergeFrom
public Waypoint.Builder mergeFrom(Waypoint other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
mergeFrom
public Waypoint.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Waypoint.Builder>
- Throws:
IOException
-
getLocationTypeCase
public Waypoint.LocationTypeCase getLocationTypeCase()
- Specified by:
getLocationTypeCase
in interfaceWaypointOrBuilder
-
clearLocationType
public Waypoint.Builder clearLocationType()
-
hasLocation
public boolean hasLocation()
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;
- Specified by:
hasLocation
in interfaceWaypointOrBuilder
- Returns:
- Whether the location field is set.
-
getLocation
public Location getLocation()
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;
- Specified by:
getLocation
in interfaceWaypointOrBuilder
- Returns:
- The location.
-
setLocation
public Waypoint.Builder setLocation(Location value)
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;
-
setLocation
public Waypoint.Builder setLocation(Location.Builder builderForValue)
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;
-
mergeLocation
public Waypoint.Builder mergeLocation(Location value)
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;
-
clearLocation
public Waypoint.Builder clearLocation()
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;
-
getLocationBuilder
public Location.Builder getLocationBuilder()
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;
-
getLocationOrBuilder
public LocationOrBuilder getLocationOrBuilder()
A point specified using geographic coordinates, including an optional heading.
.google.maps.routing.v2.Location location = 1;
- Specified by:
getLocationOrBuilder
in interfaceWaypointOrBuilder
-
hasPlaceId
public boolean hasPlaceId()
The POI Place ID associated with the waypoint.
string place_id = 2;
- Specified by:
hasPlaceId
in interfaceWaypointOrBuilder
- Returns:
- Whether the placeId field is set.
-
getPlaceId
public String getPlaceId()
The POI Place ID associated with the waypoint.
string place_id = 2;
- Specified by:
getPlaceId
in 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:
getPlaceIdBytes
in interfaceWaypointOrBuilder
- Returns:
- The bytes for placeId.
-
setPlaceId
public Waypoint.Builder setPlaceId(String value)
The POI Place ID associated with the waypoint.
string place_id = 2;
- Parameters:
value
- The placeId to set.- Returns:
- This builder for chaining.
-
clearPlaceId
public Waypoint.Builder clearPlaceId()
The POI Place ID associated with the waypoint.
string place_id = 2;
- Returns:
- This builder for chaining.
-
setPlaceIdBytes
public Waypoint.Builder setPlaceIdBytes(com.google.protobuf.ByteString value)
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:
hasAddress
in interfaceWaypointOrBuilder
- Returns:
- Whether the address field is set.
-
getAddress
public String getAddress()
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;
- Specified by:
getAddress
in 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:
getAddressBytes
in interfaceWaypointOrBuilder
- Returns:
- The bytes for address.
-
setAddress
public Waypoint.Builder setAddress(String value)
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
public Waypoint.Builder clearAddress()
Human readable address or a plus code. See https://plus.codes for details.
string address = 7;
- Returns:
- This builder for chaining.
-
setAddressBytes
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;
- 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:
getVia
in interfaceWaypointOrBuilder
- Returns:
- The via.
-
setVia
public 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;
- Parameters:
value
- The via to set.- Returns:
- This builder for chaining.
-
clearVia
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;
- 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:
getVehicleStopover
in interfaceWaypointOrBuilder
- Returns:
- The vehicleStopover.
-
setVehicleStopover
public 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;
- Parameters:
value
- The vehicleStopover to set.- Returns:
- This builder for chaining.
-
clearVehicleStopover
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;
- 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:
getSideOfRoad
in interfaceWaypointOrBuilder
- Returns:
- The sideOfRoad.
-
setSideOfRoad
public 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;
- Parameters:
value
- The sideOfRoad to set.- Returns:
- This builder for chaining.
-
clearSideOfRoad
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;
- Returns:
- This builder for chaining.
-
setUnknownFields
public final Waypoint.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
mergeUnknownFields
public final Waypoint.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Waypoint.Builder>
-
-