Google Cloud Optimization V1 Client - Class ShipmentTypeRequirement (0.3.4)

Reference documentation and code samples for the Google Cloud 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.cloud.optimization.v1.ShipmentTypeRequirement

Namespace

Google \ Cloud \ Optimization \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setRequiredShipmentTypeAlternatives

List of alternative shipment types required by the dependent_shipment_types.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDependentShipmentTypes

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.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getRequirementMode

Mode applied to the requirement.

Returns
TypeDescription
int

setRequirementMode

Mode applied to the requirement.

Parameter
NameDescription
var int
Returns
TypeDescription
$this