Reference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::ShipmentTypeRequirement.
Specifies requirements between shipments based on their shipment_type.
The specifics of the requirement are defined by the requirement mode.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#dependent_shipment_types
defdependent_shipment_types()->::Array<::String>
Returns
(::Array<::String>) — 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.
value (::Array<::String>) — 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
(::Array<::String>) — 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-09 UTC."],[],[],null,["# Cloud Optimization V1 API - Class Google::Cloud::Optimization::V1::ShipmentTypeRequirement (v0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentTypeRequirement)\n- [0.11.1](/ruby/docs/reference/google-cloud-optimization-v1/0.11.1/Google-Cloud-Optimization-V1-ShipmentTypeRequirement)\n- [0.10.0](/ruby/docs/reference/google-cloud-optimization-v1/0.10.0/Google-Cloud-Optimization-V1-ShipmentTypeRequirement)\n- [0.9.2](/ruby/docs/reference/google-cloud-optimization-v1/0.9.2/Google-Cloud-Optimization-V1-ShipmentTypeRequirement)\n- [0.8.2](/ruby/docs/reference/google-cloud-optimization-v1/0.8.2/Google-Cloud-Optimization-V1-ShipmentTypeRequirement)\n- [0.7.0](/ruby/docs/reference/google-cloud-optimization-v1/0.7.0/Google-Cloud-Optimization-V1-ShipmentTypeRequirement)\n- [0.6.0](/ruby/docs/reference/google-cloud-optimization-v1/0.6.0/Google-Cloud-Optimization-V1-ShipmentTypeRequirement)\n- [0.5.0](/ruby/docs/reference/google-cloud-optimization-v1/0.5.0/Google-Cloud-Optimization-V1-ShipmentTypeRequirement)\n- [0.4.1](/ruby/docs/reference/google-cloud-optimization-v1/0.4.1/Google-Cloud-Optimization-V1-ShipmentTypeRequirement)\n- [0.3.0](/ruby/docs/reference/google-cloud-optimization-v1/0.3.0/Google-Cloud-Optimization-V1-ShipmentTypeRequirement)\n- [0.2.1](/ruby/docs/reference/google-cloud-optimization-v1/0.2.1/Google-Cloud-Optimization-V1-ShipmentTypeRequirement)\n- [0.1.1](/ruby/docs/reference/google-cloud-optimization-v1/0.1.1/Google-Cloud-Optimization-V1-ShipmentTypeRequirement) \nReference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::ShipmentTypeRequirement.\n\nSpecifies requirements between shipments based on their shipment_type.\nThe specifics of the requirement are defined by the requirement mode. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #dependent_shipment_types\n\n def dependent_shipment_types() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- 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.\n\n\n NOTE: Chains of requirements such that a `shipment_type` depends on itself\n are not allowed.\n\n### #dependent_shipment_types=\n\n def dependent_shipment_types=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- 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.\n\n\n NOTE: Chains of requirements such that a `shipment_type` depends on itself\nare not allowed. \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- 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.\n\n\n NOTE: Chains of requirements such that a `shipment_type` depends on itself\n are not allowed.\n\n### #required_shipment_type_alternatives\n\n def required_shipment_type_alternatives() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- List of alternative shipment types required by the `dependent_shipment_types`.\n\n### #required_shipment_type_alternatives=\n\n def required_shipment_type_alternatives=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- List of alternative shipment types required by the `dependent_shipment_types`. \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- List of alternative shipment types required by the `dependent_shipment_types`.\n\n### #requirement_mode\n\n def requirement_mode() -\u003e ::Google::Cloud::Optimization::V1::ShipmentTypeRequirement::RequirementMode\n\n**Returns**\n\n- ([::Google::Cloud::Optimization::V1::ShipmentTypeRequirement::RequirementMode](./Google-Cloud-Optimization-V1-ShipmentTypeRequirement-RequirementMode)) --- Mode applied to the requirement.\n\n### #requirement_mode=\n\n def requirement_mode=(value) -\u003e ::Google::Cloud::Optimization::V1::ShipmentTypeRequirement::RequirementMode\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Optimization::V1::ShipmentTypeRequirement::RequirementMode](./Google-Cloud-Optimization-V1-ShipmentTypeRequirement-RequirementMode)) --- Mode applied to the requirement. \n**Returns**\n\n- ([::Google::Cloud::Optimization::V1::ShipmentTypeRequirement::RequirementMode](./Google-Cloud-Optimization-V1-ShipmentTypeRequirement-RequirementMode)) --- Mode applied to the requirement."]]