Reference documentation and code samples for the Google Maps Route Optimization V1 Client class ShipmentTypeRequirement.
Specifies requirements between shipments based on their shipment_type.
The specifics of the requirement are defined by the requirement mode.
Generated from protobuf message google.maps.routeoptimization.v1.ShipmentTypeRequirement
Namespace
Google \ Maps \ RouteOptimization \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ required_shipment_type_alternatives
array
List of alternative shipment types required by the dependent_shipment_types.
↳ dependent_shipment_types
array
All shipments with a type in the dependent_shipment_types field require at least one shipment of type required_shipment_type_alternatives to be visited on the same route. NOTE: Chains of requirements such that a shipment_type depends on itself are not allowed.
↳ requirement_mode
int
Mode applied to the requirement.
getRequiredShipmentTypeAlternatives
List of alternative shipment types required by the
dependent_shipment_types.
List of alternative shipment types required by the
dependent_shipment_types.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getDependentShipmentTypes
All shipments with a type in the dependent_shipment_types field require
at least one shipment of type required_shipment_type_alternatives to be
visited on the same route.
NOTE: Chains of requirements such that a shipment_type depends on itself
are not allowed.
All shipments with a type in the dependent_shipment_types field require
at least one shipment of type required_shipment_type_alternatives to be
visited on the same route.
NOTE: Chains of requirements such that a shipment_type depends on itself
are not allowed.
[[["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 ShipmentTypeRequirement (0.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.1 (latest)](/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentTypeRequirement)\n- [0.4.0](/php/docs/reference/maps-routeoptimization/0.4.0/V1.ShipmentTypeRequirement)\n- [0.3.3](/php/docs/reference/maps-routeoptimization/0.3.3/V1.ShipmentTypeRequirement)\n- [0.2.0](/php/docs/reference/maps-routeoptimization/0.2.0/V1.ShipmentTypeRequirement)\n- [0.1.0](/php/docs/reference/maps-routeoptimization/0.1.0/V1.ShipmentTypeRequirement) \nReference documentation and code samples for the Google Maps Route Optimization V1 Client class ShipmentTypeRequirement.\n\nSpecifies requirements between shipments based on their shipment_type.\n\nThe specifics of the requirement are defined by the requirement mode.\n\nGenerated from protobuf message `google.maps.routeoptimization.v1.ShipmentTypeRequirement`\n\nNamespace\n---------\n\nGoogle \\\\ Maps \\\\ RouteOptimization \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getRequiredShipmentTypeAlternatives\n\nList of alternative shipment types required by the\n`dependent_shipment_types`.\n\n### setRequiredShipmentTypeAlternatives\n\nList of alternative shipment types required by the\n`dependent_shipment_types`.\n\n### getDependentShipmentTypes\n\nAll shipments with a type in the `dependent_shipment_types` field require\nat least one shipment of type `required_shipment_type_alternatives` to be\nvisited on the same route.\n\nNOTE: Chains of requirements such that a `shipment_type` depends on itself\nare not allowed.\n\n### setDependentShipmentTypes\n\nAll shipments with a type in the `dependent_shipment_types` field require\nat least one shipment of type `required_shipment_type_alternatives` to be\nvisited on the same route.\n\nNOTE: Chains of requirements such that a `shipment_type` depends on itself\nare not allowed.\n\n### getRequirementMode\n\nMode applied to the requirement.\n\n### setRequirementMode\n\nMode applied to the requirement."]]