Class Shipment.Builder (1.56.0)
Stay organized with collections
Save and categorize content based on your preferences.
- 1.76.0 (latest)
- 1.74.0
- 1.73.0
- 1.72.0
- 1.71.0
- 1.70.0
- 1.68.0
- 1.66.0
- 1.65.0
- 1.62.0
- 1.61.0
- 1.60.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.14
- 0.1.2
publicstaticfinalclass Shipment.BuilderextendsGeneratedMessageV3.Builder<Shipment.Builder>implementsShipmentOrBuilderThe shipment of a single item, from one of its pickups to one of its deliveries. For the shipment to be considered as performed, a unique vehicle must visit one of its pickup locations (and decrease its spare capacities accordingly), then visit one of its delivery locations later on (and therefore re-increase its spare capacities accordingly).
Protobuf type google.cloud.optimization.v1.Shipment
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Shipment.BuilderImplements
ShipmentOrBuilderInherited Members
Static Methods
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllAllowedVehicleIndices(Iterable<? extends Integer> values)
publicShipment.BuilderaddAllAllowedVehicleIndices(Iterable<?extendsInteger>values) The set of vehicles that may perform this shipment. If empty, all vehicles
may perform it. Vehicles are given by their index in the ShipmentModel's
vehicles list.
repeated int32 allowed_vehicle_indices = 5;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends java.lang.Integer>The allowedVehicleIndices to add. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
addAllCostsPerVehicle(Iterable<? extends Double> values)
publicShipment.BuilderaddAllCostsPerVehicle(Iterable<?extendsDouble>values)Specifies the cost that is incurred when this shipment is delivered by each vehicle. If specified, it must have EITHER:
- the same number of elements as
costs_per_vehicle_indices.costs_per_vehicle[i]corresponds to vehiclecosts_per_vehicle_indices[i]of the model. the same number of elements as there are vehicles in the model. The i-th element corresponds to vehicle #i of the model.
These costs must be in the same unit as
penalty_costand must not be negative. Leave this field empty, if there are no such costs.
repeated double costs_per_vehicle = 6;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends java.lang.Double>The costsPerVehicle to add. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
addAllCostsPerVehicleIndices(Iterable<? extends Integer> values)
publicShipment.BuilderaddAllCostsPerVehicleIndices(Iterable<?extendsInteger>values) Indices of the vehicles to which costs_per_vehicle applies. If non-empty,
it must have the same number of elements as costs_per_vehicle. A vehicle
index may not be specified more than once. If a vehicle is excluded from
costs_per_vehicle_indices, its cost is zero.
repeated int32 costs_per_vehicle_indices = 7;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends java.lang.Integer>The costsPerVehicleIndices to add. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
addAllDeliveries(Iterable<? extends Shipment.VisitRequest> values)
publicShipment.BuilderaddAllDeliveries(Iterable<?extendsShipment.VisitRequest>values)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.optimization.v1.Shipment.VisitRequest> |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addAllDemands(Iterable<? extends CapacityQuantity> values) (deprecated)
publicShipment.BuilderaddAllDemands(Iterable<?extendsCapacityQuantity>values)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.optimization.v1.CapacityQuantity> |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addAllPickups(Iterable<? extends Shipment.VisitRequest> values)
publicShipment.BuilderaddAllPickups(Iterable<?extendsShipment.VisitRequest>values)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.optimization.v1.Shipment.VisitRequest> |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addAllowedVehicleIndices(int value)
publicShipment.BuilderaddAllowedVehicleIndices(intvalue) The set of vehicles that may perform this shipment. If empty, all vehicles
may perform it. Vehicles are given by their index in the ShipmentModel's
vehicles list.
repeated int32 allowed_vehicle_indices = 5;
| Parameter | |
|---|---|
| Name | Description |
value |
int The allowedVehicleIndices to add. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
addCostsPerVehicle(double value)
publicShipment.BuilderaddCostsPerVehicle(doublevalue)Specifies the cost that is incurred when this shipment is delivered by each vehicle. If specified, it must have EITHER:
- the same number of elements as
costs_per_vehicle_indices.costs_per_vehicle[i]corresponds to vehiclecosts_per_vehicle_indices[i]of the model. the same number of elements as there are vehicles in the model. The i-th element corresponds to vehicle #i of the model.
These costs must be in the same unit as
penalty_costand must not be negative. Leave this field empty, if there are no such costs.
repeated double costs_per_vehicle = 6;
| Parameter | |
|---|---|
| Name | Description |
value |
double The costsPerVehicle to add. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
addCostsPerVehicleIndices(int value)
publicShipment.BuilderaddCostsPerVehicleIndices(intvalue) Indices of the vehicles to which costs_per_vehicle applies. If non-empty,
it must have the same number of elements as costs_per_vehicle. A vehicle
index may not be specified more than once. If a vehicle is excluded from
costs_per_vehicle_indices, its cost is zero.
repeated int32 costs_per_vehicle_indices = 7;
| Parameter | |
|---|---|
| Name | Description |
value |
int The costsPerVehicleIndices to add. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
addDeliveries(Shipment.VisitRequest value)
publicShipment.BuilderaddDeliveries(Shipment.VisitRequestvalue)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
Shipment.VisitRequest |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addDeliveries(Shipment.VisitRequest.Builder builderForValue)
publicShipment.BuilderaddDeliveries(Shipment.VisitRequest.BuilderbuilderForValue)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Shipment.VisitRequest.Builder |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addDeliveries(int index, Shipment.VisitRequest value)
publicShipment.BuilderaddDeliveries(intindex,Shipment.VisitRequestvalue)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Shipment.VisitRequest |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addDeliveries(int index, Shipment.VisitRequest.Builder builderForValue)
publicShipment.BuilderaddDeliveries(intindex,Shipment.VisitRequest.BuilderbuilderForValue)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Shipment.VisitRequest.Builder |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addDeliveriesBuilder()
publicShipment.VisitRequest.BuilderaddDeliveriesBuilder()Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Returns | |
|---|---|
| Type | Description |
Shipment.VisitRequest.Builder |
|
addDeliveriesBuilder(int index)
publicShipment.VisitRequest.BuilderaddDeliveriesBuilder(intindex)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment.VisitRequest.Builder |
|
addDemands(CapacityQuantity value) (deprecated)
publicShipment.BuilderaddDemands(CapacityQuantityvalue)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameter | |
|---|---|
| Name | Description |
value |
CapacityQuantity |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addDemands(CapacityQuantity.Builder builderForValue) (deprecated)
publicShipment.BuilderaddDemands(CapacityQuantity.BuilderbuilderForValue)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
CapacityQuantity.Builder |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addDemands(int index, CapacityQuantity value) (deprecated)
publicShipment.BuilderaddDemands(intindex,CapacityQuantityvalue)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
CapacityQuantity |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addDemands(int index, CapacityQuantity.Builder builderForValue) (deprecated)
publicShipment.BuilderaddDemands(intindex,CapacityQuantity.BuilderbuilderForValue)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
CapacityQuantity.Builder |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addDemandsBuilder() (deprecated)
publicCapacityQuantity.BuilderaddDemandsBuilder()Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Returns | |
|---|---|
| Type | Description |
CapacityQuantity.Builder |
|
addDemandsBuilder(int index) (deprecated)
publicCapacityQuantity.BuilderaddDemandsBuilder(intindex)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
CapacityQuantity.Builder |
|
addPickups(Shipment.VisitRequest value)
publicShipment.BuilderaddPickups(Shipment.VisitRequestvalue)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
Shipment.VisitRequest |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addPickups(Shipment.VisitRequest.Builder builderForValue)
publicShipment.BuilderaddPickups(Shipment.VisitRequest.BuilderbuilderForValue)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Shipment.VisitRequest.Builder |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addPickups(int index, Shipment.VisitRequest value)
publicShipment.BuilderaddPickups(intindex,Shipment.VisitRequestvalue)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Shipment.VisitRequest |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addPickups(int index, Shipment.VisitRequest.Builder builderForValue)
publicShipment.BuilderaddPickups(intindex,Shipment.VisitRequest.BuilderbuilderForValue)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Shipment.VisitRequest.Builder |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
addPickupsBuilder()
publicShipment.VisitRequest.BuilderaddPickupsBuilder()Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Returns | |
|---|---|
| Type | Description |
Shipment.VisitRequest.Builder |
|
addPickupsBuilder(int index)
publicShipment.VisitRequest.BuilderaddPickupsBuilder(intindex)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment.VisitRequest.Builder |
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
publicShipment.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
build()
publicShipmentbuild()| Returns | |
|---|---|
| Type | Description |
Shipment |
|
buildPartial()
publicShipmentbuildPartial()| Returns | |
|---|---|
| Type | Description |
Shipment |
|
clear()
publicShipment.Builderclear()| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
clearAllowedVehicleIndices()
publicShipment.BuilderclearAllowedVehicleIndices() The set of vehicles that may perform this shipment. If empty, all vehicles
may perform it. Vehicles are given by their index in the ShipmentModel's
vehicles list.
repeated int32 allowed_vehicle_indices = 5;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
clearCostsPerVehicle()
publicShipment.BuilderclearCostsPerVehicle()Specifies the cost that is incurred when this shipment is delivered by each vehicle. If specified, it must have EITHER:
- the same number of elements as
costs_per_vehicle_indices.costs_per_vehicle[i]corresponds to vehiclecosts_per_vehicle_indices[i]of the model. the same number of elements as there are vehicles in the model. The i-th element corresponds to vehicle #i of the model.
These costs must be in the same unit as
penalty_costand must not be negative. Leave this field empty, if there are no such costs.
repeated double costs_per_vehicle = 6;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
clearCostsPerVehicleIndices()
publicShipment.BuilderclearCostsPerVehicleIndices() Indices of the vehicles to which costs_per_vehicle applies. If non-empty,
it must have the same number of elements as costs_per_vehicle. A vehicle
index may not be specified more than once. If a vehicle is excluded from
costs_per_vehicle_indices, its cost is zero.
repeated int32 costs_per_vehicle_indices = 7;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
clearDeliveries()
publicShipment.BuilderclearDeliveries()Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
clearDemands() (deprecated)
publicShipment.BuilderclearDemands()Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
clearField(Descriptors.FieldDescriptor field)
publicShipment.BuilderclearField(Descriptors.FieldDescriptorfield)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
clearIgnore()
publicShipment.BuilderclearIgnore() If true, skip this shipment, but don't apply a penalty_cost.
Ignoring a shipment results in a validation error when there are any
shipment_type_requirements in the model.
Ignoring a shipment that is performed in injected_first_solution_routes
or injected_solution_constraint is permitted; the solver removes the
related pickup/delivery visits from the performing route.
precedence_rules that reference ignored shipments will also be ignored.
bool ignore = 13;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
clearLabel()
publicShipment.BuilderclearLabel() Specifies a label for this shipment. This label is reported in the response
in the shipment_label of the corresponding
ShipmentRoute.Visit.
string label = 12;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
clearLoadDemands()
publicShipment.BuilderclearLoadDemands()| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
clearOneof(Descriptors.OneofDescriptor oneof)
publicShipment.BuilderclearOneof(Descriptors.OneofDescriptoroneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
clearPenaltyCost()
publicShipment.BuilderclearPenaltyCost()If the shipment is not completed, this penalty is added to the overall cost of the routes. A shipment is considered completed if one of its pickup and delivery alternatives is visited. The cost may be expressed in the same unit used for all other cost-related fields in the model and must be positive.
IMPORTANT: If this penalty is not specified, it is considered infinite, i.e. the shipment must be completed.
optional double penalty_cost = 4;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
clearPickupToDeliveryAbsoluteDetourLimit()
publicShipment.BuilderclearPickupToDeliveryAbsoluteDetourLimit()Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_absolute_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
.google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
clearPickupToDeliveryRelativeDetourLimit()
publicShipment.BuilderclearPickupToDeliveryRelativeDetourLimit()Specifies the maximum relative detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_relative_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
optional double pickup_to_delivery_relative_detour_limit = 8;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
clearPickupToDeliveryTimeLimit()
publicShipment.BuilderclearPickupToDeliveryTimeLimit()Specifies the maximum duration from start of pickup to start of delivery of a shipment. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. This does not depend on which alternatives are selected for pickup and delivery, nor on vehicle speed. This can be specified alongside maximum detour constraints: the solution will respect both specifications.
.google.protobuf.Duration pickup_to_delivery_time_limit = 10;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
clearPickups()
publicShipment.BuilderclearPickups()Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
clearShipmentType()
publicShipment.BuilderclearShipmentType() Non-empty string specifying a "type" for this shipment.
This feature can be used to define incompatibilities or requirements
between shipment_types (see shipment_type_incompatibilities and
shipment_type_requirements in ShipmentModel).
Differs from visit_types which is specified for a single visit: All
pickup/deliveries belonging to the same shipment share the same
shipment_type.
string shipment_type = 11;
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
clone()
publicShipment.Builderclone()| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
containsLoadDemands(String key)
publicbooleancontainsLoadDemands(Stringkey)Load demands of the shipment (for example weight, volume, number of pallets etc). The keys in the map should be identifiers describing the type of the corresponding load, ideally also including the units. For example: "weight_kg", "volume_gallons", "pallet_count", etc. If a given key does not appear in the map, the corresponding load is considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getAllowedVehicleIndices(int index)
publicintgetAllowedVehicleIndices(intindex) The set of vehicles that may perform this shipment. If empty, all vehicles
may perform it. Vehicles are given by their index in the ShipmentModel's
vehicles list.
repeated int32 allowed_vehicle_indices = 5;
| Parameter | |
|---|---|
| Name | Description |
index |
int The index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
int |
The allowedVehicleIndices at the given index. |
getAllowedVehicleIndicesCount()
publicintgetAllowedVehicleIndicesCount() The set of vehicles that may perform this shipment. If empty, all vehicles
may perform it. Vehicles are given by their index in the ShipmentModel's
vehicles list.
repeated int32 allowed_vehicle_indices = 5;
| Returns | |
|---|---|
| Type | Description |
int |
The count of allowedVehicleIndices. |
getAllowedVehicleIndicesList()
publicList<Integer>getAllowedVehicleIndicesList() The set of vehicles that may perform this shipment. If empty, all vehicles
may perform it. Vehicles are given by their index in the ShipmentModel's
vehicles list.
repeated int32 allowed_vehicle_indices = 5;
| Returns | |
|---|---|
| Type | Description |
List<Integer> |
A list containing the allowedVehicleIndices. |
getCostsPerVehicle(int index)
publicdoublegetCostsPerVehicle(intindex)Specifies the cost that is incurred when this shipment is delivered by each vehicle. If specified, it must have EITHER:
- the same number of elements as
costs_per_vehicle_indices.costs_per_vehicle[i]corresponds to vehiclecosts_per_vehicle_indices[i]of the model. the same number of elements as there are vehicles in the model. The i-th element corresponds to vehicle #i of the model.
These costs must be in the same unit as
penalty_costand must not be negative. Leave this field empty, if there are no such costs.
repeated double costs_per_vehicle = 6;
| Parameter | |
|---|---|
| Name | Description |
index |
int The index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
double |
The costsPerVehicle at the given index. |
getCostsPerVehicleCount()
publicintgetCostsPerVehicleCount()Specifies the cost that is incurred when this shipment is delivered by each vehicle. If specified, it must have EITHER:
- the same number of elements as
costs_per_vehicle_indices.costs_per_vehicle[i]corresponds to vehiclecosts_per_vehicle_indices[i]of the model. the same number of elements as there are vehicles in the model. The i-th element corresponds to vehicle #i of the model.
These costs must be in the same unit as
penalty_costand must not be negative. Leave this field empty, if there are no such costs.
repeated double costs_per_vehicle = 6;
| Returns | |
|---|---|
| Type | Description |
int |
The count of costsPerVehicle. |
getCostsPerVehicleIndices(int index)
publicintgetCostsPerVehicleIndices(intindex) Indices of the vehicles to which costs_per_vehicle applies. If non-empty,
it must have the same number of elements as costs_per_vehicle. A vehicle
index may not be specified more than once. If a vehicle is excluded from
costs_per_vehicle_indices, its cost is zero.
repeated int32 costs_per_vehicle_indices = 7;
| Parameter | |
|---|---|
| Name | Description |
index |
int The index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
int |
The costsPerVehicleIndices at the given index. |
getCostsPerVehicleIndicesCount()
publicintgetCostsPerVehicleIndicesCount() Indices of the vehicles to which costs_per_vehicle applies. If non-empty,
it must have the same number of elements as costs_per_vehicle. A vehicle
index may not be specified more than once. If a vehicle is excluded from
costs_per_vehicle_indices, its cost is zero.
repeated int32 costs_per_vehicle_indices = 7;
| Returns | |
|---|---|
| Type | Description |
int |
The count of costsPerVehicleIndices. |
getCostsPerVehicleIndicesList()
publicList<Integer>getCostsPerVehicleIndicesList() Indices of the vehicles to which costs_per_vehicle applies. If non-empty,
it must have the same number of elements as costs_per_vehicle. A vehicle
index may not be specified more than once. If a vehicle is excluded from
costs_per_vehicle_indices, its cost is zero.
repeated int32 costs_per_vehicle_indices = 7;
| Returns | |
|---|---|
| Type | Description |
List<Integer> |
A list containing the costsPerVehicleIndices. |
getCostsPerVehicleList()
publicList<Double>getCostsPerVehicleList()Specifies the cost that is incurred when this shipment is delivered by each vehicle. If specified, it must have EITHER:
- the same number of elements as
costs_per_vehicle_indices.costs_per_vehicle[i]corresponds to vehiclecosts_per_vehicle_indices[i]of the model. the same number of elements as there are vehicles in the model. The i-th element corresponds to vehicle #i of the model.
These costs must be in the same unit as
penalty_costand must not be negative. Leave this field empty, if there are no such costs.
repeated double costs_per_vehicle = 6;
| Returns | |
|---|---|
| Type | Description |
List<Double> |
A list containing the costsPerVehicle. |
getDefaultInstanceForType()
publicShipmentgetDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Shipment |
|
getDeliveries(int index)
publicShipment.VisitRequestgetDeliveries(intindex)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment.VisitRequest |
|
getDeliveriesBuilder(int index)
publicShipment.VisitRequest.BuildergetDeliveriesBuilder(intindex)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment.VisitRequest.Builder |
|
getDeliveriesBuilderList()
publicList<Shipment.VisitRequest.Builder>getDeliveriesBuilderList()Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getDeliveriesCount()
publicintgetDeliveriesCount()Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Returns | |
|---|---|
| Type | Description |
int |
|
getDeliveriesList()
publicList<Shipment.VisitRequest>getDeliveriesList()Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Returns | |
|---|---|
| Type | Description |
List<VisitRequest> |
|
getDeliveriesOrBuilder(int index)
publicShipment.VisitRequestOrBuildergetDeliveriesOrBuilder(intindex)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment.VisitRequestOrBuilder |
|
getDeliveriesOrBuilderList()
publicList<?extendsShipment.VisitRequestOrBuilder>getDeliveriesOrBuilderList()Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.optimization.v1.Shipment.VisitRequestOrBuilder> |
|
getDemands(int index) (deprecated)
publicCapacityQuantitygetDemands(intindex)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
CapacityQuantity |
|
getDemandsBuilder(int index) (deprecated)
publicCapacityQuantity.BuildergetDemandsBuilder(intindex)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
CapacityQuantity.Builder |
|
getDemandsBuilderList() (deprecated)
publicList<CapacityQuantity.Builder>getDemandsBuilderList()Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getDemandsCount() (deprecated)
publicintgetDemandsCount()Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Returns | |
|---|---|
| Type | Description |
int |
|
getDemandsList() (deprecated)
publicList<CapacityQuantity>getDemandsList()Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Returns | |
|---|---|
| Type | Description |
List<CapacityQuantity> |
|
getDemandsOrBuilder(int index) (deprecated)
publicCapacityQuantityOrBuildergetDemandsOrBuilder(intindex)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
CapacityQuantityOrBuilder |
|
getDemandsOrBuilderList() (deprecated)
publicList<?extendsCapacityQuantityOrBuilder>getDemandsOrBuilderList()Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.optimization.v1.CapacityQuantityOrBuilder> |
|
getDescriptorForType()
publicDescriptors.DescriptorgetDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getIgnore()
publicbooleangetIgnore() If true, skip this shipment, but don't apply a penalty_cost.
Ignoring a shipment results in a validation error when there are any
shipment_type_requirements in the model.
Ignoring a shipment that is performed in injected_first_solution_routes
or injected_solution_constraint is permitted; the solver removes the
related pickup/delivery visits from the performing route.
precedence_rules that reference ignored shipments will also be ignored.
bool ignore = 13;
| Returns | |
|---|---|
| Type | Description |
boolean |
The ignore. |
getLabel()
publicStringgetLabel() Specifies a label for this shipment. This label is reported in the response
in the shipment_label of the corresponding
ShipmentRoute.Visit.
string label = 12;
| Returns | |
|---|---|
| Type | Description |
String |
The label. |
getLabelBytes()
publicByteStringgetLabelBytes() Specifies a label for this shipment. This label is reported in the response
in the shipment_label of the corresponding
ShipmentRoute.Visit.
string label = 12;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for label. |
getLoadDemands() (deprecated)
publicMap<String,Shipment.Load>getLoadDemands()Use #getLoadDemandsMap() instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,Load> |
|
getLoadDemandsCount()
publicintgetLoadDemandsCount()Load demands of the shipment (for example weight, volume, number of pallets etc). The keys in the map should be identifiers describing the type of the corresponding load, ideally also including the units. For example: "weight_kg", "volume_gallons", "pallet_count", etc. If a given key does not appear in the map, the corresponding load is considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
| Returns | |
|---|---|
| Type | Description |
int |
|
getLoadDemandsMap()
publicMap<String,Shipment.Load>getLoadDemandsMap()Load demands of the shipment (for example weight, volume, number of pallets etc). The keys in the map should be identifiers describing the type of the corresponding load, ideally also including the units. For example: "weight_kg", "volume_gallons", "pallet_count", etc. If a given key does not appear in the map, the corresponding load is considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
| Returns | |
|---|---|
| Type | Description |
Map<String,Load> |
|
getLoadDemandsOrDefault(String key, Shipment.Load defaultValue)
publicShipment.LoadgetLoadDemandsOrDefault(Stringkey,Shipment.LoaddefaultValue)Load demands of the shipment (for example weight, volume, number of pallets etc). The keys in the map should be identifiers describing the type of the corresponding load, ideally also including the units. For example: "weight_kg", "volume_gallons", "pallet_count", etc. If a given key does not appear in the map, the corresponding load is considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
Shipment.Load |
| Returns | |
|---|---|
| Type | Description |
Shipment.Load |
|
getLoadDemandsOrThrow(String key)
publicShipment.LoadgetLoadDemandsOrThrow(Stringkey)Load demands of the shipment (for example weight, volume, number of pallets etc). The keys in the map should be identifiers describing the type of the corresponding load, ideally also including the units. For example: "weight_kg", "volume_gallons", "pallet_count", etc. If a given key does not appear in the map, the corresponding load is considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
Shipment.Load |
|
getMutableLoadDemands() (deprecated)
publicMap<String,Shipment.Load>getMutableLoadDemands()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,Load> |
|
getPenaltyCost()
publicdoublegetPenaltyCost()If the shipment is not completed, this penalty is added to the overall cost of the routes. A shipment is considered completed if one of its pickup and delivery alternatives is visited. The cost may be expressed in the same unit used for all other cost-related fields in the model and must be positive.
IMPORTANT: If this penalty is not specified, it is considered infinite, i.e. the shipment must be completed.
optional double penalty_cost = 4;
| Returns | |
|---|---|
| Type | Description |
double |
The penaltyCost. |
getPickupToDeliveryAbsoluteDetourLimit()
publicDurationgetPickupToDeliveryAbsoluteDetourLimit()Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_absolute_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
.google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
| Returns | |
|---|---|
| Type | Description |
Duration |
The pickupToDeliveryAbsoluteDetourLimit. |
getPickupToDeliveryAbsoluteDetourLimitBuilder()
publicDuration.BuildergetPickupToDeliveryAbsoluteDetourLimitBuilder()Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_absolute_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
.google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getPickupToDeliveryAbsoluteDetourLimitOrBuilder()
publicDurationOrBuildergetPickupToDeliveryAbsoluteDetourLimitOrBuilder()Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_absolute_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
.google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
| Returns | |
|---|---|
| Type | Description |
DurationOrBuilder |
|
getPickupToDeliveryRelativeDetourLimit()
publicdoublegetPickupToDeliveryRelativeDetourLimit()Specifies the maximum relative detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_relative_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
optional double pickup_to_delivery_relative_detour_limit = 8;
| Returns | |
|---|---|
| Type | Description |
double |
The pickupToDeliveryRelativeDetourLimit. |
getPickupToDeliveryTimeLimit()
publicDurationgetPickupToDeliveryTimeLimit()Specifies the maximum duration from start of pickup to start of delivery of a shipment. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. This does not depend on which alternatives are selected for pickup and delivery, nor on vehicle speed. This can be specified alongside maximum detour constraints: the solution will respect both specifications.
.google.protobuf.Duration pickup_to_delivery_time_limit = 10;
| Returns | |
|---|---|
| Type | Description |
Duration |
The pickupToDeliveryTimeLimit. |
getPickupToDeliveryTimeLimitBuilder()
publicDuration.BuildergetPickupToDeliveryTimeLimitBuilder()Specifies the maximum duration from start of pickup to start of delivery of a shipment. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. This does not depend on which alternatives are selected for pickup and delivery, nor on vehicle speed. This can be specified alongside maximum detour constraints: the solution will respect both specifications.
.google.protobuf.Duration pickup_to_delivery_time_limit = 10;
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getPickupToDeliveryTimeLimitOrBuilder()
publicDurationOrBuildergetPickupToDeliveryTimeLimitOrBuilder()Specifies the maximum duration from start of pickup to start of delivery of a shipment. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. This does not depend on which alternatives are selected for pickup and delivery, nor on vehicle speed. This can be specified alongside maximum detour constraints: the solution will respect both specifications.
.google.protobuf.Duration pickup_to_delivery_time_limit = 10;
| Returns | |
|---|---|
| Type | Description |
DurationOrBuilder |
|
getPickups(int index)
publicShipment.VisitRequestgetPickups(intindex)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment.VisitRequest |
|
getPickupsBuilder(int index)
publicShipment.VisitRequest.BuildergetPickupsBuilder(intindex)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment.VisitRequest.Builder |
|
getPickupsBuilderList()
publicList<Shipment.VisitRequest.Builder>getPickupsBuilderList()Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getPickupsCount()
publicintgetPickupsCount()Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Returns | |
|---|---|
| Type | Description |
int |
|
getPickupsList()
publicList<Shipment.VisitRequest>getPickupsList()Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Returns | |
|---|---|
| Type | Description |
List<VisitRequest> |
|
getPickupsOrBuilder(int index)
publicShipment.VisitRequestOrBuildergetPickupsOrBuilder(intindex)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment.VisitRequestOrBuilder |
|
getPickupsOrBuilderList()
publicList<?extendsShipment.VisitRequestOrBuilder>getPickupsOrBuilderList()Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.optimization.v1.Shipment.VisitRequestOrBuilder> |
|
getShipmentType()
publicStringgetShipmentType() Non-empty string specifying a "type" for this shipment.
This feature can be used to define incompatibilities or requirements
between shipment_types (see shipment_type_incompatibilities and
shipment_type_requirements in ShipmentModel).
Differs from visit_types which is specified for a single visit: All
pickup/deliveries belonging to the same shipment share the same
shipment_type.
string shipment_type = 11;
| Returns | |
|---|---|
| Type | Description |
String |
The shipmentType. |
getShipmentTypeBytes()
publicByteStringgetShipmentTypeBytes() Non-empty string specifying a "type" for this shipment.
This feature can be used to define incompatibilities or requirements
between shipment_types (see shipment_type_incompatibilities and
shipment_type_requirements in ShipmentModel).
Differs from visit_types which is specified for a single visit: All
pickup/deliveries belonging to the same shipment share the same
shipment_type.
string shipment_type = 11;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for shipmentType. |
hasPenaltyCost()
publicbooleanhasPenaltyCost()If the shipment is not completed, this penalty is added to the overall cost of the routes. A shipment is considered completed if one of its pickup and delivery alternatives is visited. The cost may be expressed in the same unit used for all other cost-related fields in the model and must be positive.
IMPORTANT: If this penalty is not specified, it is considered infinite, i.e. the shipment must be completed.
optional double penalty_cost = 4;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the penaltyCost field is set. |
hasPickupToDeliveryAbsoluteDetourLimit()
publicbooleanhasPickupToDeliveryAbsoluteDetourLimit()Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_absolute_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
.google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the pickupToDeliveryAbsoluteDetourLimit field is set. |
hasPickupToDeliveryRelativeDetourLimit()
publicbooleanhasPickupToDeliveryRelativeDetourLimit()Specifies the maximum relative detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_relative_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
optional double pickup_to_delivery_relative_detour_limit = 8;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the pickupToDeliveryRelativeDetourLimit field is set. |
hasPickupToDeliveryTimeLimit()
publicbooleanhasPickupToDeliveryTimeLimit()Specifies the maximum duration from start of pickup to start of delivery of a shipment. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. This does not depend on which alternatives are selected for pickup and delivery, nor on vehicle speed. This can be specified alongside maximum detour constraints: the solution will respect both specifications.
.google.protobuf.Duration pickup_to_delivery_time_limit = 10;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the pickupToDeliveryTimeLimit field is set. |
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
internalGetMapFieldReflection(int number)
protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
internalGetMutableMapFieldReflection(int number)
protectedMapFieldReflectionAccessorinternalGetMutableMapFieldReflection(intnumber)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
isInitialized()
publicfinalbooleanisInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Shipment other)
publicShipment.BuildermergeFrom(Shipmentother)| Parameter | |
|---|---|
| Name | Description |
other |
Shipment |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicShipment.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
publicShipment.BuildermergeFrom(Messageother)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
mergePickupToDeliveryAbsoluteDetourLimit(Duration value)
publicShipment.BuildermergePickupToDeliveryAbsoluteDetourLimit(Durationvalue)Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_absolute_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
.google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
| Parameter | |
|---|---|
| Name | Description |
value |
Duration |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
mergePickupToDeliveryTimeLimit(Duration value)
publicShipment.BuildermergePickupToDeliveryTimeLimit(Durationvalue)Specifies the maximum duration from start of pickup to start of delivery of a shipment. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. This does not depend on which alternatives are selected for pickup and delivery, nor on vehicle speed. This can be specified alongside maximum detour constraints: the solution will respect both specifications.
.google.protobuf.Duration pickup_to_delivery_time_limit = 10;
| Parameter | |
|---|---|
| Name | Description |
value |
Duration |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
publicfinalShipment.BuildermergeUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
putAllLoadDemands(Map<String,Shipment.Load> values)
publicShipment.BuilderputAllLoadDemands(Map<String,Shipment.Load>values)Load demands of the shipment (for example weight, volume, number of pallets etc). The keys in the map should be identifiers describing the type of the corresponding load, ideally also including the units. For example: "weight_kg", "volume_gallons", "pallet_count", etc. If a given key does not appear in the map, the corresponding load is considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
| Parameter | |
|---|---|
| Name | Description |
values |
Map<String,Load> |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
putLoadDemands(String key, Shipment.Load value)
publicShipment.BuilderputLoadDemands(Stringkey,Shipment.Loadvalue)Load demands of the shipment (for example weight, volume, number of pallets etc). The keys in the map should be identifiers describing the type of the corresponding load, ideally also including the units. For example: "weight_kg", "volume_gallons", "pallet_count", etc. If a given key does not appear in the map, the corresponding load is considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
value |
Shipment.Load |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
putLoadDemandsBuilderIfAbsent(String key)
publicShipment.Load.BuilderputLoadDemandsBuilderIfAbsent(Stringkey)Load demands of the shipment (for example weight, volume, number of pallets etc). The keys in the map should be identifiers describing the type of the corresponding load, ideally also including the units. For example: "weight_kg", "volume_gallons", "pallet_count", etc. If a given key does not appear in the map, the corresponding load is considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
Shipment.Load.Builder |
|
removeDeliveries(int index)
publicShipment.BuilderremoveDeliveries(intindex)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
removeDemands(int index) (deprecated)
publicShipment.BuilderremoveDemands(intindex)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
removeLoadDemands(String key)
publicShipment.BuilderremoveLoadDemands(Stringkey)Load demands of the shipment (for example weight, volume, number of pallets etc). The keys in the map should be identifiers describing the type of the corresponding load, ideally also including the units. For example: "weight_kg", "volume_gallons", "pallet_count", etc. If a given key does not appear in the map, the corresponding load is considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
removePickups(int index)
publicShipment.BuilderremovePickups(intindex)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setAllowedVehicleIndices(int index, int value)
publicShipment.BuildersetAllowedVehicleIndices(intindex,intvalue) The set of vehicles that may perform this shipment. If empty, all vehicles
may perform it. Vehicles are given by their index in the ShipmentModel's
vehicles list.
repeated int32 allowed_vehicle_indices = 5;
| Parameters | |
|---|---|
| Name | Description |
index |
int The index to set the value at. |
value |
int The allowedVehicleIndices to set. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
setCostsPerVehicle(int index, double value)
publicShipment.BuildersetCostsPerVehicle(intindex,doublevalue)Specifies the cost that is incurred when this shipment is delivered by each vehicle. If specified, it must have EITHER:
- the same number of elements as
costs_per_vehicle_indices.costs_per_vehicle[i]corresponds to vehiclecosts_per_vehicle_indices[i]of the model. the same number of elements as there are vehicles in the model. The i-th element corresponds to vehicle #i of the model.
These costs must be in the same unit as
penalty_costand must not be negative. Leave this field empty, if there are no such costs.
repeated double costs_per_vehicle = 6;
| Parameters | |
|---|---|
| Name | Description |
index |
int The index to set the value at. |
value |
double The costsPerVehicle to set. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
setCostsPerVehicleIndices(int index, int value)
publicShipment.BuildersetCostsPerVehicleIndices(intindex,intvalue) Indices of the vehicles to which costs_per_vehicle applies. If non-empty,
it must have the same number of elements as costs_per_vehicle. A vehicle
index may not be specified more than once. If a vehicle is excluded from
costs_per_vehicle_indices, its cost is zero.
repeated int32 costs_per_vehicle_indices = 7;
| Parameters | |
|---|---|
| Name | Description |
index |
int The index to set the value at. |
value |
int The costsPerVehicleIndices to set. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
setDeliveries(int index, Shipment.VisitRequest value)
publicShipment.BuildersetDeliveries(intindex,Shipment.VisitRequestvalue)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Shipment.VisitRequest |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setDeliveries(int index, Shipment.VisitRequest.Builder builderForValue)
publicShipment.BuildersetDeliveries(intindex,Shipment.VisitRequest.BuilderbuilderForValue)Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Shipment.VisitRequest.Builder |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setDemands(int index, CapacityQuantity value) (deprecated)
publicShipment.BuildersetDemands(intindex,CapacityQuantityvalue)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
CapacityQuantity |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setDemands(int index, CapacityQuantity.Builder builderForValue) (deprecated)
publicShipment.BuildersetDemands(intindex,CapacityQuantity.BuilderbuilderForValue)Deprecated: Use Shipment.load_demands instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
CapacityQuantity.Builder |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setField(Descriptors.FieldDescriptor field, Object value)
publicShipment.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setIgnore(boolean value)
publicShipment.BuildersetIgnore(booleanvalue) If true, skip this shipment, but don't apply a penalty_cost.
Ignoring a shipment results in a validation error when there are any
shipment_type_requirements in the model.
Ignoring a shipment that is performed in injected_first_solution_routes
or injected_solution_constraint is permitted; the solver removes the
related pickup/delivery visits from the performing route.
precedence_rules that reference ignored shipments will also be ignored.
bool ignore = 13;
| Parameter | |
|---|---|
| Name | Description |
value |
boolean The ignore to set. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
setLabel(String value)
publicShipment.BuildersetLabel(Stringvalue) Specifies a label for this shipment. This label is reported in the response
in the shipment_label of the corresponding
ShipmentRoute.Visit.
string label = 12;
| Parameter | |
|---|---|
| Name | Description |
value |
String The label to set. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
setLabelBytes(ByteString value)
publicShipment.BuildersetLabelBytes(ByteStringvalue) Specifies a label for this shipment. This label is reported in the response
in the shipment_label of the corresponding
ShipmentRoute.Visit.
string label = 12;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteString The bytes for label to set. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
setPenaltyCost(double value)
publicShipment.BuildersetPenaltyCost(doublevalue)If the shipment is not completed, this penalty is added to the overall cost of the routes. A shipment is considered completed if one of its pickup and delivery alternatives is visited. The cost may be expressed in the same unit used for all other cost-related fields in the model and must be positive.
IMPORTANT: If this penalty is not specified, it is considered infinite, i.e. the shipment must be completed.
optional double penalty_cost = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
double The penaltyCost to set. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
setPickupToDeliveryAbsoluteDetourLimit(Duration value)
publicShipment.BuildersetPickupToDeliveryAbsoluteDetourLimit(Durationvalue)Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_absolute_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
.google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
| Parameter | |
|---|---|
| Name | Description |
value |
Duration |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setPickupToDeliveryAbsoluteDetourLimit(Duration.Builder builderForValue)
publicShipment.BuildersetPickupToDeliveryAbsoluteDetourLimit(Duration.BuilderbuilderForValue)Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_absolute_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
.google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setPickupToDeliveryRelativeDetourLimit(double value)
publicShipment.BuildersetPickupToDeliveryRelativeDetourLimit(doublevalue)Specifies the maximum relative detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_relative_detour_limit enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))
</code></code>
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles.
optional double pickup_to_delivery_relative_detour_limit = 8;
| Parameter | |
|---|---|
| Name | Description |
value |
double The pickupToDeliveryRelativeDetourLimit to set. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
setPickupToDeliveryTimeLimit(Duration value)
publicShipment.BuildersetPickupToDeliveryTimeLimit(Durationvalue)Specifies the maximum duration from start of pickup to start of delivery of a shipment. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. This does not depend on which alternatives are selected for pickup and delivery, nor on vehicle speed. This can be specified alongside maximum detour constraints: the solution will respect both specifications.
.google.protobuf.Duration pickup_to_delivery_time_limit = 10;
| Parameter | |
|---|---|
| Name | Description |
value |
Duration |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setPickupToDeliveryTimeLimit(Duration.Builder builderForValue)
publicShipment.BuildersetPickupToDeliveryTimeLimit(Duration.BuilderbuilderForValue)Specifies the maximum duration from start of pickup to start of delivery of a shipment. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. This does not depend on which alternatives are selected for pickup and delivery, nor on vehicle speed. This can be specified alongside maximum detour constraints: the solution will respect both specifications.
.google.protobuf.Duration pickup_to_delivery_time_limit = 10;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setPickups(int index, Shipment.VisitRequest value)
publicShipment.BuildersetPickups(intindex,Shipment.VisitRequestvalue)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Shipment.VisitRequest |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setPickups(int index, Shipment.VisitRequest.Builder builderForValue)
publicShipment.BuildersetPickups(intindex,Shipment.VisitRequest.BuilderbuilderForValue)Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Shipment.VisitRequest.Builder |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
publicShipment.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|
setShipmentType(String value)
publicShipment.BuildersetShipmentType(Stringvalue) Non-empty string specifying a "type" for this shipment.
This feature can be used to define incompatibilities or requirements
between shipment_types (see shipment_type_incompatibilities and
shipment_type_requirements in ShipmentModel).
Differs from visit_types which is specified for a single visit: All
pickup/deliveries belonging to the same shipment share the same
shipment_type.
string shipment_type = 11;
| Parameter | |
|---|---|
| Name | Description |
value |
String The shipmentType to set. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
setShipmentTypeBytes(ByteString value)
publicShipment.BuildersetShipmentTypeBytes(ByteStringvalue) Non-empty string specifying a "type" for this shipment.
This feature can be used to define incompatibilities or requirements
between shipment_types (see shipment_type_incompatibilities and
shipment_type_requirements in ShipmentModel).
Differs from visit_types which is specified for a single visit: All
pickup/deliveries belonging to the same shipment share the same
shipment_type.
string shipment_type = 11;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteString The bytes for shipmentType to set. |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
publicfinalShipment.BuildersetUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Shipment.Builder |
|