Generated from protobuf messagegoogle.cloud.optimization.v1.RouteModifiers
Namespace
Google \ Cloud \ Optimization \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ avoid_tolls
bool
Specifies whether to avoid toll roads where reasonable. Preference will be given to routes not containing toll roads. Applies only to motorized travel modes.
↳ avoid_highways
bool
Specifies whether to avoid highways where reasonable. Preference will be given to routes not containing highways. Applies only to motorized travel modes.
↳ avoid_ferries
bool
Specifies whether to avoid ferries where reasonable. Preference will be given to routes not containing travel by ferries. Applies only to motorized travel modes.
↳ avoid_indoor
bool
Optional. Specifies whether to avoid navigating indoors where reasonable. Preference will be given to routes not containing indoor navigation. Applies only to theWALKINGtravel mode.
getAvoidTolls
Specifies whether to avoid toll roads where reasonable. Preference will be
given to routes not containing toll roads. Applies only to motorized travel
modes.
Returns
Type
Description
bool
setAvoidTolls
Specifies whether to avoid toll roads where reasonable. Preference will be
given to routes not containing toll roads. Applies only to motorized travel
modes.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getAvoidHighways
Specifies whether to avoid highways where reasonable. Preference will be
given to routes not containing highways. Applies only to motorized travel
modes.
Returns
Type
Description
bool
setAvoidHighways
Specifies whether to avoid highways where reasonable. Preference will be
given to routes not containing highways. Applies only to motorized travel
modes.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getAvoidFerries
Specifies whether to avoid ferries where reasonable. Preference will be
given to routes not containing travel by ferries. Applies only to motorized
travel modes.
Returns
Type
Description
bool
setAvoidFerries
Specifies whether to avoid ferries where reasonable. Preference will be
given to routes not containing travel by ferries. Applies only to motorized
travel modes.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getAvoidIndoor
Optional. Specifies whether to avoid navigating indoors where reasonable.
Preference will be given to routes not containing indoor navigation.
Applies only to theWALKINGtravel mode.
Returns
Type
Description
bool
setAvoidIndoor
Optional. Specifies whether to avoid navigating indoors where reasonable.
Preference will be given to routes not containing indoor navigation.
Applies only to theWALKINGtravel mode.
[[["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-04 UTC."],[],[],null,["# Google Cloud Optimization V1 Client - Class RouteModifiers (1.0.5)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.5 (latest)](/php/docs/reference/cloud-optimization/latest/V1.RouteModifiers)\n- [1.0.4](/php/docs/reference/cloud-optimization/1.0.4/V1.RouteModifiers)\n- [0.7.0](/php/docs/reference/cloud-optimization/0.7.0/V1.RouteModifiers)\n- [0.6.5](/php/docs/reference/cloud-optimization/0.6.5/V1.RouteModifiers)\n- [0.5.1](/php/docs/reference/cloud-optimization/0.5.1/V1.RouteModifiers)\n- [0.4.0](/php/docs/reference/cloud-optimization/0.4.0/V1.RouteModifiers)\n- [0.3.4](/php/docs/reference/cloud-optimization/0.3.4/V1.RouteModifiers)\n- [0.2.0](/php/docs/reference/cloud-optimization/0.2.0/V1.RouteModifiers)\n- [0.1.9](/php/docs/reference/cloud-optimization/0.1.9/V1.RouteModifiers) \nReference documentation and code samples for the Google Cloud Optimization V1 Client class RouteModifiers.\n\nEncapsulates a set of optional conditions to satisfy when calculating\nvehicle routes. This is similar to `RouteModifiers` in the Google Maps\nPlatform API; see:\n\u003chttps://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers\u003e.\n\nGenerated from protobuf message `google.cloud.optimization.v1.RouteModifiers`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Optimization \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getAvoidTolls\n\nSpecifies whether to avoid toll roads where reasonable. Preference will be\ngiven to routes not containing toll roads. Applies only to motorized travel\nmodes.\n\n### setAvoidTolls\n\nSpecifies whether to avoid toll roads where reasonable. Preference will be\ngiven to routes not containing toll roads. Applies only to motorized travel\nmodes.\n\n### getAvoidHighways\n\nSpecifies whether to avoid highways where reasonable. Preference will be\ngiven to routes not containing highways. Applies only to motorized travel\nmodes.\n\n### setAvoidHighways\n\nSpecifies whether to avoid highways where reasonable. Preference will be\ngiven to routes not containing highways. Applies only to motorized travel\nmodes.\n\n### getAvoidFerries\n\nSpecifies whether to avoid ferries where reasonable. Preference will be\ngiven to routes not containing travel by ferries. Applies only to motorized\ntravel modes.\n\n### setAvoidFerries\n\nSpecifies whether to avoid ferries where reasonable. Preference will be\ngiven to routes not containing travel by ferries. Applies only to motorized\ntravel modes.\n\n### getAvoidIndoor\n\nOptional. Specifies whether to avoid navigating indoors where reasonable.\n\nPreference will be given to routes not containing indoor navigation.\nApplies only to the `WALKING` travel mode.\n\n### setAvoidIndoor\n\nOptional. Specifies whether to avoid navigating indoors where reasonable.\n\nPreference will be given to routes not containing indoor navigation.\nApplies only to the `WALKING` travel mode."]]