Class Shipment.Builder

  • All Implemented Interfaces:
    ShipmentOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Shipment

    public static final class Shipment.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
    implements ShipmentOrBuilder
     The 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
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • clear

        public Shipment.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • getDefaultInstanceForType

        public Shipment getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Shipment build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Shipment buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Shipment.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • setField

        public Shipment.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                         Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • clearField

        public Shipment.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • clearOneof

        public Shipment.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • setRepeatedField

        public Shipment.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 int index,
                                                 Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • addRepeatedField

        public Shipment.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • mergeFrom

        public Shipment.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Shipment.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • mergeFrom

        public Shipment.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Shipment.Builder>
        Throws:
        IOException
      • getPickupsList

        public List<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;
        Specified by:
        getPickupsList in interface ShipmentOrBuilder
      • getPickupsCount

        public int getPickupsCount()
         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;
        Specified by:
        getPickupsCount in interface ShipmentOrBuilder
      • getPickups

        public Shipment.VisitRequest getPickups​(int index)
         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;
        Specified by:
        getPickups in interface ShipmentOrBuilder
      • setPickups

        public Shipment.Builder setPickups​(int index,
                                           Shipment.VisitRequest value)
         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;
      • setPickups

        public Shipment.Builder setPickups​(int index,
                                           Shipment.VisitRequest.Builder builderForValue)
         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;
      • addPickups

        public Shipment.Builder addPickups​(Shipment.VisitRequest value)
         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;
      • addPickups

        public Shipment.Builder addPickups​(int index,
                                           Shipment.VisitRequest value)
         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;
      • addPickups

        public Shipment.Builder addPickups​(Shipment.VisitRequest.Builder builderForValue)
         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;
      • addPickups

        public Shipment.Builder addPickups​(int index,
                                           Shipment.VisitRequest.Builder builderForValue)
         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;
      • addAllPickups

        public Shipment.Builder addAllPickups​(Iterable<? extends Shipment.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;
      • clearPickups

        public Shipment.Builder clearPickups()
         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;
      • removePickups

        public Shipment.Builder removePickups​(int index)
         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;
      • getPickupsBuilder

        public Shipment.VisitRequest.Builder getPickupsBuilder​(int index)
         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;
      • getPickupsOrBuilder

        public Shipment.VisitRequestOrBuilder getPickupsOrBuilder​(int index)
         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;
        Specified by:
        getPickupsOrBuilder in interface ShipmentOrBuilder
      • getPickupsOrBuilderList

        public List<? extends Shipment.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;
        Specified by:
        getPickupsOrBuilderList in interface ShipmentOrBuilder
      • addPickupsBuilder

        public Shipment.VisitRequest.Builder addPickupsBuilder()
         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;
      • addPickupsBuilder

        public Shipment.VisitRequest.Builder addPickupsBuilder​(int index)
         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;
      • getPickupsBuilderList

        public List<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;
      • getDeliveriesList

        public List<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;
        Specified by:
        getDeliveriesList in interface ShipmentOrBuilder
      • getDeliveriesCount

        public int getDeliveriesCount()
         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;
        Specified by:
        getDeliveriesCount in interface ShipmentOrBuilder
      • getDeliveries

        public Shipment.VisitRequest getDeliveries​(int index)
         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;
        Specified by:
        getDeliveries in interface ShipmentOrBuilder
      • setDeliveries

        public Shipment.Builder setDeliveries​(int index,
                                              Shipment.VisitRequest value)
         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;
      • setDeliveries

        public Shipment.Builder setDeliveries​(int index,
                                              Shipment.VisitRequest.Builder builderForValue)
         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;
      • addDeliveries

        public Shipment.Builder addDeliveries​(Shipment.VisitRequest value)
         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;
      • addDeliveries

        public Shipment.Builder addDeliveries​(int index,
                                              Shipment.VisitRequest value)
         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;
      • addDeliveries

        public Shipment.Builder addDeliveries​(Shipment.VisitRequest.Builder builderForValue)
         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;
      • addDeliveries

        public Shipment.Builder addDeliveries​(int index,
                                              Shipment.VisitRequest.Builder builderForValue)
         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;
      • addAllDeliveries

        public Shipment.Builder addAllDeliveries​(Iterable<? extends Shipment.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;
      • clearDeliveries

        public Shipment.Builder clearDeliveries()
         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;
      • removeDeliveries

        public Shipment.Builder removeDeliveries​(int index)
         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;
      • getDeliveriesBuilder

        public Shipment.VisitRequest.Builder getDeliveriesBuilder​(int index)
         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;
      • getDeliveriesOrBuilder

        public Shipment.VisitRequestOrBuilder getDeliveriesOrBuilder​(int index)
         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;
        Specified by:
        getDeliveriesOrBuilder in interface ShipmentOrBuilder
      • getDeliveriesOrBuilderList

        public List<? extends Shipment.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;
        Specified by:
        getDeliveriesOrBuilderList in interface ShipmentOrBuilder
      • addDeliveriesBuilder

        public Shipment.VisitRequest.Builder addDeliveriesBuilder()
         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;
      • addDeliveriesBuilder

        public Shipment.VisitRequest.Builder addDeliveriesBuilder​(int index)
         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;
      • getDeliveriesBuilderList

        public List<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;
      • getLoadDemandsCount

        public int getLoadDemandsCount()
        Description copied from interface: ShipmentOrBuilder
         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;
        Specified by:
        getLoadDemandsCount in interface ShipmentOrBuilder
      • containsLoadDemands

        public boolean containsLoadDemands​(String key)
         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;
        Specified by:
        containsLoadDemands in interface ShipmentOrBuilder
      • getLoadDemandsMap

        public Map<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;
        Specified by:
        getLoadDemandsMap in interface ShipmentOrBuilder
      • getLoadDemandsOrDefault

        public Shipment.Load getLoadDemandsOrDefault​(String key,
                                                     Shipment.Load defaultValue)
         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;
        Specified by:
        getLoadDemandsOrDefault in interface ShipmentOrBuilder
      • getLoadDemandsOrThrow

        public Shipment.Load getLoadDemandsOrThrow​(String key)
         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;
        Specified by:
        getLoadDemandsOrThrow in interface ShipmentOrBuilder
      • removeLoadDemands

        public Shipment.Builder removeLoadDemands​(String key)
         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;
      • putLoadDemands

        public Shipment.Builder putLoadDemands​(String key,
                                               Shipment.Load value)
         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;
      • putAllLoadDemands

        public Shipment.Builder putAllLoadDemands​(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;
      • hasPenaltyCost

        public boolean hasPenaltyCost()
         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;
        Specified by:
        hasPenaltyCost in interface ShipmentOrBuilder
        Returns:
        Whether the penaltyCost field is set.
      • getPenaltyCost

        public double getPenaltyCost()
         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;
        Specified by:
        getPenaltyCost in interface ShipmentOrBuilder
        Returns:
        The penaltyCost.
      • setPenaltyCost

        public Shipment.Builder setPenaltyCost​(double value)
         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;
        Parameters:
        value - The penaltyCost to set.
        Returns:
        This builder for chaining.
      • clearPenaltyCost

        public Shipment.Builder clearPenaltyCost()
         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:
        This builder for chaining.
      • getAllowedVehicleIndicesList

        public List<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;
        Specified by:
        getAllowedVehicleIndicesList in interface ShipmentOrBuilder
        Returns:
        A list containing the allowedVehicleIndices.
      • getAllowedVehicleIndicesCount

        public int getAllowedVehicleIndicesCount()
         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;
        Specified by:
        getAllowedVehicleIndicesCount in interface ShipmentOrBuilder
        Returns:
        The count of allowedVehicleIndices.
      • getAllowedVehicleIndices

        public int getAllowedVehicleIndices​(int index)
         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;
        Specified by:
        getAllowedVehicleIndices in interface ShipmentOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The allowedVehicleIndices at the given index.
      • setAllowedVehicleIndices

        public Shipment.Builder setAllowedVehicleIndices​(int index,
                                                         int value)
         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:
        index - The index to set the value at.
        value - The allowedVehicleIndices to set.
        Returns:
        This builder for chaining.
      • addAllowedVehicleIndices

        public Shipment.Builder addAllowedVehicleIndices​(int value)
         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:
        value - The allowedVehicleIndices to add.
        Returns:
        This builder for chaining.
      • addAllAllowedVehicleIndices

        public Shipment.Builder addAllAllowedVehicleIndices​(Iterable<? extends Integer> 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;
        Parameters:
        values - The allowedVehicleIndices to add.
        Returns:
        This builder for chaining.
      • clearAllowedVehicleIndices

        public Shipment.Builder clearAllowedVehicleIndices()
         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:
        This builder for chaining.
      • getCostsPerVehicleList

        public List<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 vehicle
             `costs_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_cost` and must not be
         negative. Leave this field empty, if there are no such costs.
         
        repeated double costs_per_vehicle = 6;
        Specified by:
        getCostsPerVehicleList in interface ShipmentOrBuilder
        Returns:
        A list containing the costsPerVehicle.
      • getCostsPerVehicleCount

        public int getCostsPerVehicleCount()
         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 vehicle
             `costs_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_cost` and must not be
         negative. Leave this field empty, if there are no such costs.
         
        repeated double costs_per_vehicle = 6;
        Specified by:
        getCostsPerVehicleCount in interface ShipmentOrBuilder
        Returns:
        The count of costsPerVehicle.
      • getCostsPerVehicle

        public double getCostsPerVehicle​(int index)
         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 vehicle
             `costs_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_cost` and must not be
         negative. Leave this field empty, if there are no such costs.
         
        repeated double costs_per_vehicle = 6;
        Specified by:
        getCostsPerVehicle in interface ShipmentOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The costsPerVehicle at the given index.
      • setCostsPerVehicle

        public Shipment.Builder setCostsPerVehicle​(int index,
                                                   double value)
         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 vehicle
             `costs_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_cost` and must not be
         negative. Leave this field empty, if there are no such costs.
         
        repeated double costs_per_vehicle = 6;
        Parameters:
        index - The index to set the value at.
        value - The costsPerVehicle to set.
        Returns:
        This builder for chaining.
      • addCostsPerVehicle

        public Shipment.Builder addCostsPerVehicle​(double value)
         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 vehicle
             `costs_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_cost` and must not be
         negative. Leave this field empty, if there are no such costs.
         
        repeated double costs_per_vehicle = 6;
        Parameters:
        value - The costsPerVehicle to add.
        Returns:
        This builder for chaining.
      • addAllCostsPerVehicle

        public Shipment.Builder addAllCostsPerVehicle​(Iterable<? extends Double> 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 vehicle
             `costs_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_cost` and must not be
         negative. Leave this field empty, if there are no such costs.
         
        repeated double costs_per_vehicle = 6;
        Parameters:
        values - The costsPerVehicle to add.
        Returns:
        This builder for chaining.
      • clearCostsPerVehicle

        public Shipment.Builder clearCostsPerVehicle()
         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 vehicle
             `costs_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_cost` and must not be
         negative. Leave this field empty, if there are no such costs.
         
        repeated double costs_per_vehicle = 6;
        Returns:
        This builder for chaining.
      • getCostsPerVehicleIndicesList

        public List<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;
        Specified by:
        getCostsPerVehicleIndicesList in interface ShipmentOrBuilder
        Returns:
        A list containing the costsPerVehicleIndices.
      • getCostsPerVehicleIndicesCount

        public int getCostsPerVehicleIndicesCount()
         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;
        Specified by:
        getCostsPerVehicleIndicesCount in interface ShipmentOrBuilder
        Returns:
        The count of costsPerVehicleIndices.
      • getCostsPerVehicleIndices

        public int getCostsPerVehicleIndices​(int index)
         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;
        Specified by:
        getCostsPerVehicleIndices in interface ShipmentOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The costsPerVehicleIndices at the given index.
      • setCostsPerVehicleIndices

        public Shipment.Builder setCostsPerVehicleIndices​(int index,
                                                          int value)
         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:
        index - The index to set the value at.
        value - The costsPerVehicleIndices to set.
        Returns:
        This builder for chaining.
      • addCostsPerVehicleIndices

        public Shipment.Builder addCostsPerVehicleIndices​(int value)
         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:
        value - The costsPerVehicleIndices to add.
        Returns:
        This builder for chaining.
      • addAllCostsPerVehicleIndices

        public Shipment.Builder addAllCostsPerVehicleIndices​(Iterable<? extends Integer> 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;
        Parameters:
        values - The costsPerVehicleIndices to add.
        Returns:
        This builder for chaining.
      • clearCostsPerVehicleIndices

        public Shipment.Builder clearCostsPerVehicleIndices()
         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:
        This builder for chaining.
      • hasPickupToDeliveryRelativeDetourLimit

        public boolean hasPickupToDeliveryRelativeDetourLimit()
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))
         ```
        
         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;
        Specified by:
        hasPickupToDeliveryRelativeDetourLimit in interface ShipmentOrBuilder
        Returns:
        Whether the pickupToDeliveryRelativeDetourLimit field is set.
      • getPickupToDeliveryRelativeDetourLimit

        public double getPickupToDeliveryRelativeDetourLimit()
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))
         ```
        
         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;
        Specified by:
        getPickupToDeliveryRelativeDetourLimit in interface ShipmentOrBuilder
        Returns:
        The pickupToDeliveryRelativeDetourLimit.
      • setPickupToDeliveryRelativeDetourLimit

        public Shipment.Builder setPickupToDeliveryRelativeDetourLimit​(double value)
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))
         ```
        
         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;
        Parameters:
        value - The pickupToDeliveryRelativeDetourLimit to set.
        Returns:
        This builder for chaining.
      • clearPickupToDeliveryRelativeDetourLimit

        public Shipment.Builder clearPickupToDeliveryRelativeDetourLimit()
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))
         ```
        
         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:
        This builder for chaining.
      • hasPickupToDeliveryAbsoluteDetourLimit

        public boolean hasPickupToDeliveryAbsoluteDetourLimit()
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         t + pickup_to_delivery_absolute_detour_limit
         ```
        
         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;
        Specified by:
        hasPickupToDeliveryAbsoluteDetourLimit in interface ShipmentOrBuilder
        Returns:
        Whether the pickupToDeliveryAbsoluteDetourLimit field is set.
      • getPickupToDeliveryAbsoluteDetourLimit

        public com.google.protobuf.Duration getPickupToDeliveryAbsoluteDetourLimit()
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         t + pickup_to_delivery_absolute_detour_limit
         ```
        
         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;
        Specified by:
        getPickupToDeliveryAbsoluteDetourLimit in interface ShipmentOrBuilder
        Returns:
        The pickupToDeliveryAbsoluteDetourLimit.
      • setPickupToDeliveryAbsoluteDetourLimit

        public Shipment.Builder setPickupToDeliveryAbsoluteDetourLimit​(com.google.protobuf.Duration value)
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         t + pickup_to_delivery_absolute_detour_limit
         ```
        
         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;
      • setPickupToDeliveryAbsoluteDetourLimit

        public Shipment.Builder setPickupToDeliveryAbsoluteDetourLimit​(com.google.protobuf.Duration.Builder builderForValue)
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         t + pickup_to_delivery_absolute_detour_limit
         ```
        
         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;
      • mergePickupToDeliveryAbsoluteDetourLimit

        public Shipment.Builder mergePickupToDeliveryAbsoluteDetourLimit​(com.google.protobuf.Duration value)
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         t + pickup_to_delivery_absolute_detour_limit
         ```
        
         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;
      • clearPickupToDeliveryAbsoluteDetourLimit

        public Shipment.Builder clearPickupToDeliveryAbsoluteDetourLimit()
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         t + pickup_to_delivery_absolute_detour_limit
         ```
        
         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;
      • getPickupToDeliveryAbsoluteDetourLimitBuilder

        public com.google.protobuf.Duration.Builder getPickupToDeliveryAbsoluteDetourLimitBuilder()
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         t + pickup_to_delivery_absolute_detour_limit
         ```
        
         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;
      • getPickupToDeliveryAbsoluteDetourLimitOrBuilder

        public com.google.protobuf.DurationOrBuilder getPickupToDeliveryAbsoluteDetourLimitOrBuilder()
         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:
        
         ```
         start_time(delivery) - start_time(pickup) <=
         t + pickup_to_delivery_absolute_detour_limit
         ```
        
         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;
        Specified by:
        getPickupToDeliveryAbsoluteDetourLimitOrBuilder in interface ShipmentOrBuilder
      • hasPickupToDeliveryTimeLimit

        public boolean hasPickupToDeliveryTimeLimit()
         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;
        Specified by:
        hasPickupToDeliveryTimeLimit in interface ShipmentOrBuilder
        Returns:
        Whether the pickupToDeliveryTimeLimit field is set.
      • getPickupToDeliveryTimeLimit

        public com.google.protobuf.Duration getPickupToDeliveryTimeLimit()
         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;
        Specified by:
        getPickupToDeliveryTimeLimit in interface ShipmentOrBuilder
        Returns:
        The pickupToDeliveryTimeLimit.
      • setPickupToDeliveryTimeLimit

        public Shipment.Builder setPickupToDeliveryTimeLimit​(com.google.protobuf.Duration value)
         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;
      • setPickupToDeliveryTimeLimit

        public Shipment.Builder setPickupToDeliveryTimeLimit​(com.google.protobuf.Duration.Builder builderForValue)
         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;
      • mergePickupToDeliveryTimeLimit

        public Shipment.Builder mergePickupToDeliveryTimeLimit​(com.google.protobuf.Duration value)
         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;
      • clearPickupToDeliveryTimeLimit

        public Shipment.Builder clearPickupToDeliveryTimeLimit()
         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;
      • getPickupToDeliveryTimeLimitBuilder

        public com.google.protobuf.Duration.Builder getPickupToDeliveryTimeLimitBuilder()
         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;
      • getPickupToDeliveryTimeLimitOrBuilder

        public com.google.protobuf.DurationOrBuilder getPickupToDeliveryTimeLimitOrBuilder()
         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;
        Specified by:
        getPickupToDeliveryTimeLimitOrBuilder in interface ShipmentOrBuilder
      • getShipmentType

        public String getShipmentType()
         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;
        Specified by:
        getShipmentType in interface ShipmentOrBuilder
        Returns:
        The shipmentType.
      • getShipmentTypeBytes

        public com.google.protobuf.ByteString getShipmentTypeBytes()
         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;
        Specified by:
        getShipmentTypeBytes in interface ShipmentOrBuilder
        Returns:
        The bytes for shipmentType.
      • setShipmentType

        public Shipment.Builder setShipmentType​(String value)
         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;
        Parameters:
        value - The shipmentType to set.
        Returns:
        This builder for chaining.
      • clearShipmentType

        public Shipment.Builder clearShipmentType()
         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:
        This builder for chaining.
      • setShipmentTypeBytes

        public Shipment.Builder setShipmentTypeBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for shipmentType to set.
        Returns:
        This builder for chaining.
      • getLabel

        public String getLabel()
         Specifies a label for this shipment. This label is reported in the response
         in the `shipment_label` of the corresponding
         [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit].
         
        string label = 12;
        Specified by:
        getLabel in interface ShipmentOrBuilder
        Returns:
        The label.
      • getLabelBytes

        public com.google.protobuf.ByteString getLabelBytes()
         Specifies a label for this shipment. This label is reported in the response
         in the `shipment_label` of the corresponding
         [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit].
         
        string label = 12;
        Specified by:
        getLabelBytes in interface ShipmentOrBuilder
        Returns:
        The bytes for label.
      • setLabel

        public Shipment.Builder setLabel​(String value)
         Specifies a label for this shipment. This label is reported in the response
         in the `shipment_label` of the corresponding
         [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit].
         
        string label = 12;
        Parameters:
        value - The label to set.
        Returns:
        This builder for chaining.
      • clearLabel

        public Shipment.Builder clearLabel()
         Specifies a label for this shipment. This label is reported in the response
         in the `shipment_label` of the corresponding
         [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit].
         
        string label = 12;
        Returns:
        This builder for chaining.
      • setLabelBytes

        public Shipment.Builder setLabelBytes​(com.google.protobuf.ByteString value)
         Specifies a label for this shipment. This label is reported in the response
         in the `shipment_label` of the corresponding
         [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit].
         
        string label = 12;
        Parameters:
        value - The bytes for label to set.
        Returns:
        This builder for chaining.
      • getIgnore

        public boolean getIgnore()
         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;
        Specified by:
        getIgnore in interface ShipmentOrBuilder
        Returns:
        The ignore.
      • setIgnore

        public Shipment.Builder setIgnore​(boolean value)
         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;
        Parameters:
        value - The ignore to set.
        Returns:
        This builder for chaining.
      • clearIgnore

        public Shipment.Builder clearIgnore()
         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:
        This builder for chaining.
      • getDemandsList

        @Deprecated
        public List<CapacityQuantity> getDemandsList()
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
        Specified by:
        getDemandsList in interface ShipmentOrBuilder
      • getDemandsCount

        @Deprecated
        public int getDemandsCount()
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
        Specified by:
        getDemandsCount in interface ShipmentOrBuilder
      • getDemands

        @Deprecated
        public CapacityQuantity getDemands​(int index)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
        Specified by:
        getDemands in interface ShipmentOrBuilder
      • setDemands

        @Deprecated
        public Shipment.Builder setDemands​(int index,
                                           CapacityQuantity value)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • setDemands

        @Deprecated
        public Shipment.Builder setDemands​(int index,
                                           CapacityQuantity.Builder builderForValue)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • addDemands

        @Deprecated
        public Shipment.Builder addDemands​(CapacityQuantity value)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • addDemands

        @Deprecated
        public Shipment.Builder addDemands​(int index,
                                           CapacityQuantity value)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • addDemands

        @Deprecated
        public Shipment.Builder addDemands​(CapacityQuantity.Builder builderForValue)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • addDemands

        @Deprecated
        public Shipment.Builder addDemands​(int index,
                                           CapacityQuantity.Builder builderForValue)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • addAllDemands

        @Deprecated
        public Shipment.Builder addAllDemands​(Iterable<? extends CapacityQuantity> values)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • clearDemands

        @Deprecated
        public Shipment.Builder clearDemands()
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • removeDemands

        @Deprecated
        public Shipment.Builder removeDemands​(int index)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • getDemandsBuilder

        @Deprecated
        public CapacityQuantity.Builder getDemandsBuilder​(int index)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • getDemandsOrBuilder

        @Deprecated
        public CapacityQuantityOrBuilder getDemandsOrBuilder​(int index)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
        Specified by:
        getDemandsOrBuilder in interface ShipmentOrBuilder
      • addDemandsBuilder

        @Deprecated
        public CapacityQuantity.Builder addDemandsBuilder()
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • addDemandsBuilder

        @Deprecated
        public CapacityQuantity.Builder addDemandsBuilder​(int index)
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • getDemandsBuilderList

        @Deprecated
        public List<CapacityQuantity.Builder> getDemandsBuilderList()
        Deprecated.
         Deprecated: Use
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
      • setUnknownFields

        public final Shipment.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>
      • mergeUnknownFields

        public final Shipment.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Shipment.Builder>