Specifies requirements between shipments based on their
shipment_type. The specifics of the requirement are defined by the
requirement mode.
Attributes
Name
Description
required_shipment_type_alternatives
MutableSequence[str]
List of alternative shipment types required by the
dependent_shipment_types.
dependent_shipment_types
MutableSequence[str]
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.
Modes defining the appearance of dependent shipments on a
route.
A "dependent" shipment pickup must therefore have either:
- A delivery-only "required" shipment delivered on the
route after, or
- A "required" shipment picked up on the route before it,
and if the "required" shipment has a delivery, this
delivery must be performed after the "dependent"
shipment's pickup.
IN_SAME_VEHICLE_AT_DELIVERY_TIME (3):
Same as before, except the "dependent" shipments need to
have a "required" shipment on their vehicle at the time of
their *delivery*.
[[["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-08-07 UTC."],[],[],null,["# Class ShipmentTypeRequirement (1.11.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.11.2 (latest)](/python/docs/reference/optimization/latest/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.11.0](/python/docs/reference/optimization/1.11.0/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.10.0](/python/docs/reference/optimization/1.10.0/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.9.1](/python/docs/reference/optimization/1.9.1/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.8.5](/python/docs/reference/optimization/1.8.5/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.7.0](/python/docs/reference/optimization/1.7.0/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.6.0](/python/docs/reference/optimization/1.6.0/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.5.0](/python/docs/reference/optimization/1.5.0/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.4.3](/python/docs/reference/optimization/1.4.3/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.3.2](/python/docs/reference/optimization/1.3.2/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.2.0](/python/docs/reference/optimization/1.2.0/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.1.3](/python/docs/reference/optimization/1.1.3/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [1.0.1](/python/docs/reference/optimization/1.0.1/google.cloud.optimization_v1.types.ShipmentTypeRequirement)\n- [0.1.1](/python/docs/reference/optimization/0.1.1/google.cloud.optimization_v1.types.ShipmentTypeRequirement) \n\n ShipmentTypeRequirement(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nSpecifies requirements between shipments based on their\nshipment_type. The specifics of the requirement are defined by the\nrequirement mode.\n\nClasses\n-------\n\n### RequirementMode\n\n RequirementMode(value)\n\nModes defining the appearance of dependent shipments on a\nroute. \n\n A \"dependent\" shipment pickup must therefore have either:\n\n - A delivery-only \"required\" shipment delivered on the\n route after, or\n - A \"required\" shipment picked up on the route before it,\n and if the \"required\" shipment has a delivery, this\n delivery must be performed after the \"dependent\"\n shipment's pickup.\n IN_SAME_VEHICLE_AT_DELIVERY_TIME (3):\n Same as before, except the \"dependent\" shipments need to\n have a \"required\" shipment on their vehicle at the time of\n their *delivery*."]]