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.GeneratedMessage.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.GeneratedMessage.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 type
google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation-
Method Summary
Modifier and TypeMethodDescriptionaddAllRelaxations(Iterable<? extends InjectedSolutionConstraint.ConstraintRelaxation.Relaxation> values) All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.addAllVehicleIndices(Iterable<? extends Integer> values) Specifies the vehicle indices to which the visit constraint `relaxations` apply.addRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Relaxation value) All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.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`.All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.addRelaxationsBuilder(int index) All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.addVehicleIndices(int value) Specifies the vehicle indices to which the visit constraint `relaxations` apply.build()clear()All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.Specifies the vehicle indices to which the visit constraint `relaxations` apply.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetRelaxations(int index) All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.getRelaxationsBuilder(int index) All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.intAll the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.getRelaxationsOrBuilder(int index) All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.intgetVehicleIndices(int index) Specifies the vehicle indices to which the visit constraint `relaxations` apply.intSpecifies the vehicle indices to which the visit constraint `relaxations` apply.Specifies the vehicle indices to which the visit constraint `relaxations` apply.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeRelaxations(int index) All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.setRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Relaxation value) All the visit constraint relaxations that will apply to visits on routes with vehicles in `vehicle_indices`.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`.setVehicleIndices(int index, int value) Specifies the vehicle indices to which the visit constraint `relaxations` apply.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
public InjectedSolutionConstraint.ConstraintRelaxation.Builder mergeFrom(com.google.protobuf.Message other) - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>
-
mergeFrom
public InjectedSolutionConstraint.ConstraintRelaxation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<InjectedSolutionConstraint.ConstraintRelaxation.Builder>- Throws:
IOException
-
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:
getRelaxationsListin 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:
getRelaxationsCountin interfaceInjectedSolutionConstraint.ConstraintRelaxationOrBuilder
-
getRelaxations
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:
getRelaxationsin 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
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
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:
getRelaxationsOrBuilderin 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:
getRelaxationsOrBuilderListin interfaceInjectedSolutionConstraint.ConstraintRelaxationOrBuilder
-
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
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:
getVehicleIndicesListin 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:
getVehicleIndicesCountin 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:
getVehicleIndicesin 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
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
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.
-