Package com.google.cloud.optimization.v1
Class InjectedSolutionConstraint.ConstraintRelaxation.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
- com.google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Builder
-
- All Implemented Interfaces:
InjectedSolutionConstraint.ConstraintRelaxationOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- InjectedSolutionConstraint.ConstraintRelaxation
public static final class InjectedSolutionConstraint.ConstraintRelaxation.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder> implements InjectedSolutionConstraint.ConstraintRelaxationOrBuilder
For a group of vehicles, specifies at what threshold(s) constraints on visits will be relaxed and to which level. Shipments listed in the `skipped_shipment` field are constrained to be skipped; i.e., they cannot be performed.
Protobuf typegoogle.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InjectedSolutionConstraint.ConstraintRelaxation.Builder
addAllRelaxations(Iterable<? extends InjectedSolutionConstraint.ConstraintRelaxation.Relaxation> values)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Builder
addAllVehicleIndices(Iterable<? extends Integer> values)
Specifies the vehicle indices to which the visit constraint `relaxations` apply.InjectedSolutionConstraint.ConstraintRelaxation.Builder
addRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Relaxation value)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Builder
addRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder builderForValue)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Builder
addRelaxations(InjectedSolutionConstraint.ConstraintRelaxation.Relaxation value)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Builder
addRelaxations(InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder builderForValue)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder
addRelaxationsBuilder()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder
addRelaxationsBuilder(int index)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
InjectedSolutionConstraint.ConstraintRelaxation.Builder
addVehicleIndices(int value)
Specifies the vehicle indices to which the visit constraint `relaxations` apply.InjectedSolutionConstraint.ConstraintRelaxation
build()
InjectedSolutionConstraint.ConstraintRelaxation
buildPartial()
InjectedSolutionConstraint.ConstraintRelaxation.Builder
clear()
InjectedSolutionConstraint.ConstraintRelaxation.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
InjectedSolutionConstraint.ConstraintRelaxation.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
InjectedSolutionConstraint.ConstraintRelaxation.Builder
clearRelaxations()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Builder
clearVehicleIndices()
Specifies the vehicle indices to which the visit constraint `relaxations` apply.InjectedSolutionConstraint.ConstraintRelaxation.Builder
clone()
InjectedSolutionConstraint.ConstraintRelaxation
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
InjectedSolutionConstraint.ConstraintRelaxation.Relaxation
getRelaxations(int index)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder
getRelaxationsBuilder(int index)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.List<InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder>
getRelaxationsBuilderList()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.int
getRelaxationsCount()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.List<InjectedSolutionConstraint.ConstraintRelaxation.Relaxation>
getRelaxationsList()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.RelaxationOrBuilder
getRelaxationsOrBuilder(int index)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.List<? extends InjectedSolutionConstraint.ConstraintRelaxation.RelaxationOrBuilder>
getRelaxationsOrBuilderList()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.int
getVehicleIndices(int index)
Specifies the vehicle indices to which the visit constraint `relaxations` apply.int
getVehicleIndicesCount()
Specifies the vehicle indices to which the visit constraint `relaxations` apply.List<Integer>
getVehicleIndicesList()
Specifies the vehicle indices to which the visit constraint `relaxations` apply.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
InjectedSolutionConstraint.ConstraintRelaxation.Builder
mergeFrom(InjectedSolutionConstraint.ConstraintRelaxation other)
InjectedSolutionConstraint.ConstraintRelaxation.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
InjectedSolutionConstraint.ConstraintRelaxation.Builder
mergeFrom(com.google.protobuf.Message other)
InjectedSolutionConstraint.ConstraintRelaxation.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
InjectedSolutionConstraint.ConstraintRelaxation.Builder
removeRelaxations(int index)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
InjectedSolutionConstraint.ConstraintRelaxation.Builder
setRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Relaxation value)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Builder
setRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder builderForValue)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.InjectedSolutionConstraint.ConstraintRelaxation.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
InjectedSolutionConstraint.ConstraintRelaxation.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
InjectedSolutionConstraint.ConstraintRelaxation.Builder
setVehicleIndices(int index, int value)
Specifies the vehicle indices to which the visit constraint `relaxations` apply.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
clear
public InjectedSolutionConstraint.ConstraintRelaxation.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
getDefaultInstanceForType
public InjectedSolutionConstraint.ConstraintRelaxation getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public InjectedSolutionConstraint.ConstraintRelaxation build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public InjectedSolutionConstraint.ConstraintRelaxation buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public InjectedSolutionConstraint.ConstraintRelaxation.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
setField
public InjectedSolutionConstraint.ConstraintRelaxation.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
clearField
public InjectedSolutionConstraint.ConstraintRelaxation.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
clearOneof
public InjectedSolutionConstraint.ConstraintRelaxation.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
setRepeatedField
public InjectedSolutionConstraint.ConstraintRelaxation.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
addRepeatedField
public InjectedSolutionConstraint.ConstraintRelaxation.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
mergeFrom
public InjectedSolutionConstraint.ConstraintRelaxation.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
mergeFrom
public InjectedSolutionConstraint.ConstraintRelaxation.Builder mergeFrom(InjectedSolutionConstraint.ConstraintRelaxation other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
mergeFrom
public InjectedSolutionConstraint.ConstraintRelaxation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
- Throws:
IOException
-
getRelaxationsList
public List<InjectedSolutionConstraint.ConstraintRelaxation.Relaxation> getRelaxationsList()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
- Specified by:
getRelaxationsList
in interfaceInjectedSolutionConstraint.ConstraintRelaxationOrBuilder
-
getRelaxationsCount
public int getRelaxationsCount()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
- Specified by:
getRelaxationsCount
in interfaceInjectedSolutionConstraint.ConstraintRelaxationOrBuilder
-
getRelaxations
public InjectedSolutionConstraint.ConstraintRelaxation.Relaxation getRelaxations(int index)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
- Specified by:
getRelaxations
in interfaceInjectedSolutionConstraint.ConstraintRelaxationOrBuilder
-
setRelaxations
public InjectedSolutionConstraint.ConstraintRelaxation.Builder setRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Relaxation value)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
setRelaxations
public InjectedSolutionConstraint.ConstraintRelaxation.Builder setRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder builderForValue)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
addRelaxations
public InjectedSolutionConstraint.ConstraintRelaxation.Builder addRelaxations(InjectedSolutionConstraint.ConstraintRelaxation.Relaxation value)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
addRelaxations
public InjectedSolutionConstraint.ConstraintRelaxation.Builder addRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Relaxation value)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
addRelaxations
public InjectedSolutionConstraint.ConstraintRelaxation.Builder addRelaxations(InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder builderForValue)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
addRelaxations
public InjectedSolutionConstraint.ConstraintRelaxation.Builder addRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder builderForValue)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
addAllRelaxations
public InjectedSolutionConstraint.ConstraintRelaxation.Builder addAllRelaxations(Iterable<? extends InjectedSolutionConstraint.ConstraintRelaxation.Relaxation> values)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
clearRelaxations
public InjectedSolutionConstraint.ConstraintRelaxation.Builder clearRelaxations()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
removeRelaxations
public InjectedSolutionConstraint.ConstraintRelaxation.Builder removeRelaxations(int index)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
getRelaxationsBuilder
public InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder getRelaxationsBuilder(int index)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
getRelaxationsOrBuilder
public InjectedSolutionConstraint.ConstraintRelaxation.RelaxationOrBuilder getRelaxationsOrBuilder(int index)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
- Specified by:
getRelaxationsOrBuilder
in interfaceInjectedSolutionConstraint.ConstraintRelaxationOrBuilder
-
getRelaxationsOrBuilderList
public List<? extends InjectedSolutionConstraint.ConstraintRelaxation.RelaxationOrBuilder> getRelaxationsOrBuilderList()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
- Specified by:
getRelaxationsOrBuilderList
in interfaceInjectedSolutionConstraint.ConstraintRelaxationOrBuilder
-
addRelaxationsBuilder
public InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder addRelaxationsBuilder()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
addRelaxationsBuilder
public InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder addRelaxationsBuilder(int index)
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
getRelaxationsBuilderList
public List<InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Builder> getRelaxationsBuilderList()
All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;
-
getVehicleIndicesList
public List<Integer> getVehicleIndicesList()
Specifies the vehicle indices to which the visit constraint `relaxations` apply. If empty, this is considered the default and the `relaxations` apply to all vehicles that are not specified in other `constraint_relaxations`. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty `vehicle_indices`. A vehicle index can only be listed once, even within several `constraint_relaxations`. A vehicle index is mapped the same as [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], if `interpret_injected_solutions_using_labels` is true (see `fields` comment).
repeated int32 vehicle_indices = 2;
- Specified by:
getVehicleIndicesList
in interfaceInjectedSolutionConstraint.ConstraintRelaxationOrBuilder
- Returns:
- A list containing the vehicleIndices.
-
getVehicleIndicesCount
public int getVehicleIndicesCount()
Specifies the vehicle indices to which the visit constraint `relaxations` apply. If empty, this is considered the default and the `relaxations` apply to all vehicles that are not specified in other `constraint_relaxations`. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty `vehicle_indices`. A vehicle index can only be listed once, even within several `constraint_relaxations`. A vehicle index is mapped the same as [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], if `interpret_injected_solutions_using_labels` is true (see `fields` comment).
repeated int32 vehicle_indices = 2;
- Specified by:
getVehicleIndicesCount
in interfaceInjectedSolutionConstraint.ConstraintRelaxationOrBuilder
- Returns:
- The count of vehicleIndices.
-
getVehicleIndices
public int getVehicleIndices(int index)
Specifies the vehicle indices to which the visit constraint `relaxations` apply. If empty, this is considered the default and the `relaxations` apply to all vehicles that are not specified in other `constraint_relaxations`. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty `vehicle_indices`. A vehicle index can only be listed once, even within several `constraint_relaxations`. A vehicle index is mapped the same as [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], if `interpret_injected_solutions_using_labels` is true (see `fields` comment).
repeated int32 vehicle_indices = 2;
- Specified by:
getVehicleIndices
in interfaceInjectedSolutionConstraint.ConstraintRelaxationOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The vehicleIndices at the given index.
-
setVehicleIndices
public InjectedSolutionConstraint.ConstraintRelaxation.Builder setVehicleIndices(int index, int value)
Specifies the vehicle indices to which the visit constraint `relaxations` apply. If empty, this is considered the default and the `relaxations` apply to all vehicles that are not specified in other `constraint_relaxations`. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty `vehicle_indices`. A vehicle index can only be listed once, even within several `constraint_relaxations`. A vehicle index is mapped the same as [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], if `interpret_injected_solutions_using_labels` is true (see `fields` comment).
repeated int32 vehicle_indices = 2;
- Parameters:
index
- The index to set the value at.value
- The vehicleIndices to set.- Returns:
- This builder for chaining.
-
addVehicleIndices
public InjectedSolutionConstraint.ConstraintRelaxation.Builder addVehicleIndices(int value)
Specifies the vehicle indices to which the visit constraint `relaxations` apply. If empty, this is considered the default and the `relaxations` apply to all vehicles that are not specified in other `constraint_relaxations`. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty `vehicle_indices`. A vehicle index can only be listed once, even within several `constraint_relaxations`. A vehicle index is mapped the same as [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], if `interpret_injected_solutions_using_labels` is true (see `fields` comment).
repeated int32 vehicle_indices = 2;
- Parameters:
value
- The vehicleIndices to add.- Returns:
- This builder for chaining.
-
addAllVehicleIndices
public InjectedSolutionConstraint.ConstraintRelaxation.Builder addAllVehicleIndices(Iterable<? extends Integer> values)
Specifies the vehicle indices to which the visit constraint `relaxations` apply. If empty, this is considered the default and the `relaxations` apply to all vehicles that are not specified in other `constraint_relaxations`. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty `vehicle_indices`. A vehicle index can only be listed once, even within several `constraint_relaxations`. A vehicle index is mapped the same as [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], if `interpret_injected_solutions_using_labels` is true (see `fields` comment).
repeated int32 vehicle_indices = 2;
- Parameters:
values
- The vehicleIndices to add.- Returns:
- This builder for chaining.
-
clearVehicleIndices
public InjectedSolutionConstraint.ConstraintRelaxation.Builder clearVehicleIndices()
Specifies the vehicle indices to which the visit constraint `relaxations` apply. If empty, this is considered the default and the `relaxations` apply to all vehicles that are not specified in other `constraint_relaxations`. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty `vehicle_indices`. A vehicle index can only be listed once, even within several `constraint_relaxations`. A vehicle index is mapped the same as [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], if `interpret_injected_solutions_using_labels` is true (see `fields` comment).
repeated int32 vehicle_indices = 2;
- Returns:
- This builder for chaining.
-
setUnknownFields
public final InjectedSolutionConstraint.ConstraintRelaxation.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
mergeUnknownFields
public final InjectedSolutionConstraint.ConstraintRelaxation.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
-