Reference documentation and code samples for the Google Maps Route Optimization V1 Client class Load.
When performing a visit, a predefined amount may be added to the vehicle
load if it's a pickup, or subtracted if it's a delivery. This message
defines such amount. See
load_demands.
Generated from protobuf message google.maps.routeoptimization.v1.Shipment.Load
Namespace
Google \ Maps \ RouteOptimization \ V1 \ Shipment
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ amount
int|string
The amount by which the load of the vehicle performing the corresponding visit will vary. Since it is an integer, users are advised to choose an appropriate unit to avoid loss of precision. Must be ≥ 0.
getAmount
The amount by which the load of the vehicle performing the corresponding
visit will vary. Since it is an integer, users are advised to choose an
appropriate unit to avoid loss of precision. Must be ≥ 0.
Returns
Type
Description
int|string
setAmount
The amount by which the load of the vehicle performing the corresponding
visit will vary. Since it is an integer, users are advised to choose an
appropriate unit to avoid loss of precision. Must be ≥ 0.
[[["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 Maps Route Optimization V1 Client - Class Load (0.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.1 (latest)](/php/docs/reference/maps-routeoptimization/latest/V1.Shipment.Load)\n- [0.4.0](/php/docs/reference/maps-routeoptimization/0.4.0/V1.Shipment.Load)\n- [0.3.3](/php/docs/reference/maps-routeoptimization/0.3.3/V1.Shipment.Load)\n- [0.2.0](/php/docs/reference/maps-routeoptimization/0.2.0/V1.Shipment.Load)\n- [0.1.0](/php/docs/reference/maps-routeoptimization/0.1.0/V1.Shipment.Load) \nReference documentation and code samples for the Google Maps Route Optimization V1 Client class Load.\n\nWhen performing a visit, a predefined amount may be added to the vehicle\nload if it's a pickup, or subtracted if it's a delivery. This message\ndefines such amount. See\n[load_demands](/php/docs/reference/maps-routeoptimization/latest/V1.Shipment#_Google_Maps_RouteOptimization_V1_Shipment__getLoadDemands__).\n\nGenerated from protobuf message `google.maps.routeoptimization.v1.Shipment.Load`\n\nNamespace\n---------\n\nGoogle \\\\ Maps \\\\ RouteOptimization \\\\ V1 \\\\ Shipment\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getAmount\n\nThe amount by which the load of the vehicle performing the corresponding\nvisit will vary. Since it is an integer, users are advised to choose an\nappropriate unit to avoid loss of precision. Must be ≥ 0.\n\n### setAmount\n\nThe amount by which the load of the vehicle performing the corresponding\nvisit will vary. Since it is an integer, users are advised to choose an\nappropriate unit to avoid loss of precision. Must be ≥ 0."]]