Note: The following fields are mutually exclusive: location, place_id. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: location, place_id. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: location, place_id. If a field in that set is populated, all other fields in the set will automatically be cleared.
#place_id
defplace_id()->::String
Returns
(::String) — The POI Place ID associated with the waypoint.
Note: The following fields are mutually exclusive: place_id, location. If a field in that set is populated, all other fields in the set will automatically be cleared.
#place_id=
defplace_id=(value)->::String
Parameter
value (::String) — The POI Place ID associated with the waypoint.
Note: The following fields are mutually exclusive: place_id, location. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::String) — The POI Place ID associated with the waypoint.
Note: The following fields are mutually exclusive: place_id, location. If a field in that set is populated, all other fields in the set will automatically be cleared.
#side_of_road
defside_of_road()->::Boolean
Returns
(::Boolean) — 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 the 'DRIVING' travel mode,
and when the 'location_type' is set to 'location'.
#side_of_road=
defside_of_road=(value)->::Boolean
Parameter
value (::Boolean) — 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 the 'DRIVING' travel mode,
and when the 'location_type' is set to 'location'.
Returns
(::Boolean) — 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 the 'DRIVING' travel mode,
and when the 'location_type' is set to 'location'.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Optimization V1 API - Class Google::Cloud::Optimization::V1::Waypoint (v0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-Waypoint)\n- [0.11.1](/ruby/docs/reference/google-cloud-optimization-v1/0.11.1/Google-Cloud-Optimization-V1-Waypoint)\n- [0.10.0](/ruby/docs/reference/google-cloud-optimization-v1/0.10.0/Google-Cloud-Optimization-V1-Waypoint)\n- [0.9.2](/ruby/docs/reference/google-cloud-optimization-v1/0.9.2/Google-Cloud-Optimization-V1-Waypoint)\n- [0.8.2](/ruby/docs/reference/google-cloud-optimization-v1/0.8.2/Google-Cloud-Optimization-V1-Waypoint)\n- [0.7.0](/ruby/docs/reference/google-cloud-optimization-v1/0.7.0/Google-Cloud-Optimization-V1-Waypoint)\n- [0.6.0](/ruby/docs/reference/google-cloud-optimization-v1/0.6.0/Google-Cloud-Optimization-V1-Waypoint)\n- [0.5.0](/ruby/docs/reference/google-cloud-optimization-v1/0.5.0/Google-Cloud-Optimization-V1-Waypoint)\n- [0.4.1](/ruby/docs/reference/google-cloud-optimization-v1/0.4.1/Google-Cloud-Optimization-V1-Waypoint)\n- [0.3.0](/ruby/docs/reference/google-cloud-optimization-v1/0.3.0/Google-Cloud-Optimization-V1-Waypoint)\n- [0.2.1](/ruby/docs/reference/google-cloud-optimization-v1/0.2.1/Google-Cloud-Optimization-V1-Waypoint)\n- [0.1.1](/ruby/docs/reference/google-cloud-optimization-v1/0.1.1/Google-Cloud-Optimization-V1-Waypoint) \nReference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::Waypoint.\n\nEncapsulates a waypoint. Waypoints mark arrival and departure locations of\nVisitRequests, and start and end locations of Vehicles. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #location\n\n def location() -\u003e ::Google::Cloud::Optimization::V1::Location\n\n**Returns**\n\n- ([::Google::Cloud::Optimization::V1::Location](./Google-Cloud-Optimization-V1-Location)) --- A point specified using geographic coordinates, including an optional heading.\n\n\n Note: The following fields are mutually exclusive: `location`, `place_id`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #location=\n\n def location=(value) -\u003e ::Google::Cloud::Optimization::V1::Location\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Optimization::V1::Location](./Google-Cloud-Optimization-V1-Location)) --- A point specified using geographic coordinates, including an optional heading.\n\n\nNote: The following fields are mutually exclusive: `location`, `place_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::Optimization::V1::Location](./Google-Cloud-Optimization-V1-Location)) --- A point specified using geographic coordinates, including an optional heading.\n\n\n Note: The following fields are mutually exclusive: `location`, `place_id`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #place_id\n\n def place_id() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The POI Place ID associated with the waypoint.\n\n Note: The following fields are mutually exclusive: `place_id`, `location`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #place_id=\n\n def place_id=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The POI Place ID associated with the waypoint.\n\n\nNote: The following fields are mutually exclusive: `place_id`, `location`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::String) --- The POI Place ID associated with the waypoint.\n\n Note: The following fields are mutually exclusive: `place_id`, `location`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #side_of_road\n\n def side_of_road() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- 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 the 'DRIVING' travel mode, and when the 'location_type' is set to 'location'.\n\n### #side_of_road=\n\n def side_of_road=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- 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 the 'DRIVING' travel mode, and when the 'location_type' is set to 'location'. \n**Returns**\n\n- (::Boolean) --- 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 the 'DRIVING' travel mode, and when the 'location_type' is set to 'location'."]]