public static final class InjectedSolutionConstraint.Builder extends GeneratedMessageV3.Builder<InjectedSolutionConstraint.Builder> implements InjectedSolutionConstraintOrBuilder
Solution injected in the request including information about which visits
must be constrained and how they must be constrained.
Protobuf type google.cloud.optimization.v1.InjectedSolutionConstraint
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addAllConstraintRelaxations(Iterable<? extends InjectedSolutionConstraint.ConstraintRelaxation> values)
public InjectedSolutionConstraint.Builder addAllConstraintRelaxations(Iterable<? extends InjectedSolutionConstraint.ConstraintRelaxation> values)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameter
Name | Description |
values | Iterable<? extends com.google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation>
|
Returns
addAllRoutes(Iterable<? extends ShipmentRoute> values)
public InjectedSolutionConstraint.Builder addAllRoutes(Iterable<? extends ShipmentRoute> values)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameter
Name | Description |
values | Iterable<? extends com.google.cloud.optimization.v1.ShipmentRoute>
|
Returns
addAllSkippedShipments(Iterable<? extends SkippedShipment> values)
public InjectedSolutionConstraint.Builder addAllSkippedShipments(Iterable<? extends SkippedShipment> values)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameter
Name | Description |
values | Iterable<? extends com.google.cloud.optimization.v1.SkippedShipment>
|
Returns
addConstraintRelaxations(InjectedSolutionConstraint.ConstraintRelaxation value)
public InjectedSolutionConstraint.Builder addConstraintRelaxations(InjectedSolutionConstraint.ConstraintRelaxation value)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameter
Returns
addConstraintRelaxations(InjectedSolutionConstraint.ConstraintRelaxation.Builder builderForValue)
public InjectedSolutionConstraint.Builder addConstraintRelaxations(InjectedSolutionConstraint.ConstraintRelaxation.Builder builderForValue)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameter
Returns
addConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation value)
public InjectedSolutionConstraint.Builder addConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation value)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameters
Returns
addConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Builder builderForValue)
public InjectedSolutionConstraint.Builder addConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Builder builderForValue)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameters
Returns
addConstraintRelaxationsBuilder()
public InjectedSolutionConstraint.ConstraintRelaxation.Builder addConstraintRelaxationsBuilder()
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Returns
addConstraintRelaxationsBuilder(int index)
public InjectedSolutionConstraint.ConstraintRelaxation.Builder addConstraintRelaxationsBuilder(int index)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameter
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public InjectedSolutionConstraint.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
addRoutes(ShipmentRoute value)
public InjectedSolutionConstraint.Builder addRoutes(ShipmentRoute value)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameter
Returns
addRoutes(ShipmentRoute.Builder builderForValue)
public InjectedSolutionConstraint.Builder addRoutes(ShipmentRoute.Builder builderForValue)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameter
Returns
addRoutes(int index, ShipmentRoute value)
public InjectedSolutionConstraint.Builder addRoutes(int index, ShipmentRoute value)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameters
Returns
addRoutes(int index, ShipmentRoute.Builder builderForValue)
public InjectedSolutionConstraint.Builder addRoutes(int index, ShipmentRoute.Builder builderForValue)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameters
Returns
addRoutesBuilder()
public ShipmentRoute.Builder addRoutesBuilder()
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Returns
addRoutesBuilder(int index)
public ShipmentRoute.Builder addRoutesBuilder(int index)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameter
Returns
addSkippedShipments(SkippedShipment value)
public InjectedSolutionConstraint.Builder addSkippedShipments(SkippedShipment value)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameter
Returns
addSkippedShipments(SkippedShipment.Builder builderForValue)
public InjectedSolutionConstraint.Builder addSkippedShipments(SkippedShipment.Builder builderForValue)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameter
Returns
addSkippedShipments(int index, SkippedShipment value)
public InjectedSolutionConstraint.Builder addSkippedShipments(int index, SkippedShipment value)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameters
Returns
addSkippedShipments(int index, SkippedShipment.Builder builderForValue)
public InjectedSolutionConstraint.Builder addSkippedShipments(int index, SkippedShipment.Builder builderForValue)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameters
Returns
addSkippedShipmentsBuilder()
public SkippedShipment.Builder addSkippedShipmentsBuilder()
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Returns
addSkippedShipmentsBuilder(int index)
public SkippedShipment.Builder addSkippedShipmentsBuilder(int index)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameter
Returns
build()
public InjectedSolutionConstraint build()
Returns
buildPartial()
public InjectedSolutionConstraint buildPartial()
Returns
clear()
public InjectedSolutionConstraint.Builder clear()
Returns
Overrides
clearConstraintRelaxations()
public InjectedSolutionConstraint.Builder clearConstraintRelaxations()
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Returns
clearField(Descriptors.FieldDescriptor field)
public InjectedSolutionConstraint.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public InjectedSolutionConstraint.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearRoutes()
public InjectedSolutionConstraint.Builder clearRoutes()
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Returns
clearSkippedShipments()
public InjectedSolutionConstraint.Builder clearSkippedShipments()
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Returns
clone()
public InjectedSolutionConstraint.Builder clone()
Returns
Overrides
getConstraintRelaxations(int index)
public InjectedSolutionConstraint.ConstraintRelaxation getConstraintRelaxations(int index)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameter
Returns
getConstraintRelaxationsBuilder(int index)
public InjectedSolutionConstraint.ConstraintRelaxation.Builder getConstraintRelaxationsBuilder(int index)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameter
Returns
getConstraintRelaxationsBuilderList()
public List<InjectedSolutionConstraint.ConstraintRelaxation.Builder> getConstraintRelaxationsBuilderList()
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Returns
getConstraintRelaxationsCount()
public int getConstraintRelaxationsCount()
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Returns
getConstraintRelaxationsList()
public List<InjectedSolutionConstraint.ConstraintRelaxation> getConstraintRelaxationsList()
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Returns
getConstraintRelaxationsOrBuilder(int index)
public InjectedSolutionConstraint.ConstraintRelaxationOrBuilder getConstraintRelaxationsOrBuilder(int index)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameter
Returns
getConstraintRelaxationsOrBuilderList()
public List<? extends InjectedSolutionConstraint.ConstraintRelaxationOrBuilder> getConstraintRelaxationsOrBuilderList()
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Returns
Type | Description |
List<? extends com.google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxationOrBuilder> | |
getDefaultInstanceForType()
public InjectedSolutionConstraint getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getRoutes(int index)
public ShipmentRoute getRoutes(int index)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameter
Returns
getRoutesBuilder(int index)
public ShipmentRoute.Builder getRoutesBuilder(int index)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameter
Returns
getRoutesBuilderList()
public List<ShipmentRoute.Builder> getRoutesBuilderList()
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Returns
getRoutesCount()
public int getRoutesCount()
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Returns
getRoutesList()
public List<ShipmentRoute> getRoutesList()
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Returns
getRoutesOrBuilder(int index)
public ShipmentRouteOrBuilder getRoutesOrBuilder(int index)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameter
Returns
getRoutesOrBuilderList()
public List<? extends ShipmentRouteOrBuilder> getRoutesOrBuilderList()
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Returns
Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder> | |
getSkippedShipments(int index)
public SkippedShipment getSkippedShipments(int index)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameter
Returns
getSkippedShipmentsBuilder(int index)
public SkippedShipment.Builder getSkippedShipmentsBuilder(int index)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameter
Returns
getSkippedShipmentsBuilderList()
public List<SkippedShipment.Builder> getSkippedShipmentsBuilderList()
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Returns
getSkippedShipmentsCount()
public int getSkippedShipmentsCount()
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Returns
getSkippedShipmentsList()
public List<SkippedShipment> getSkippedShipmentsList()
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Returns
getSkippedShipmentsOrBuilder(int index)
public SkippedShipmentOrBuilder getSkippedShipmentsOrBuilder(int index)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameter
Returns
getSkippedShipmentsOrBuilderList()
public List<? extends SkippedShipmentOrBuilder> getSkippedShipmentsOrBuilderList()
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Returns
Type | Description |
List<? extends com.google.cloud.optimization.v1.SkippedShipmentOrBuilder> | |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(InjectedSolutionConstraint other)
public InjectedSolutionConstraint.Builder mergeFrom(InjectedSolutionConstraint other)
Parameter
Returns
public InjectedSolutionConstraint.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public InjectedSolutionConstraint.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final InjectedSolutionConstraint.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
removeConstraintRelaxations(int index)
public InjectedSolutionConstraint.Builder removeConstraintRelaxations(int index)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameter
Returns
removeRoutes(int index)
public InjectedSolutionConstraint.Builder removeRoutes(int index)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameter
Returns
removeSkippedShipments(int index)
public InjectedSolutionConstraint.Builder removeSkippedShipments(int index)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameter
Returns
setConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation value)
public InjectedSolutionConstraint.Builder setConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation value)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameters
Returns
setConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Builder builderForValue)
public InjectedSolutionConstraint.Builder setConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Builder builderForValue)
For zero or more groups of vehicles, specifies when and how much to relax
constraints. If this field is empty, all non-empty vehicle routes are
fully constrained.
repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3;
Parameters
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public InjectedSolutionConstraint.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public InjectedSolutionConstraint.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setRoutes(int index, ShipmentRoute value)
public InjectedSolutionConstraint.Builder setRoutes(int index, ShipmentRoute value)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameters
Returns
setRoutes(int index, ShipmentRoute.Builder builderForValue)
public InjectedSolutionConstraint.Builder setRoutes(int index, ShipmentRoute.Builder builderForValue)
Routes of the solution to inject. Some routes may be omitted from the
original solution. The routes and skipped shipments must satisfy the basic
validity assumptions listed for injected_first_solution_routes
.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameters
Returns
setSkippedShipments(int index, SkippedShipment value)
public InjectedSolutionConstraint.Builder setSkippedShipments(int index, SkippedShipment value)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameters
Returns
setSkippedShipments(int index, SkippedShipment.Builder builderForValue)
public InjectedSolutionConstraint.Builder setSkippedShipments(int index, SkippedShipment.Builder builderForValue)
Skipped shipments of the solution to inject. Some may be omitted from the
original solution. See the routes
field.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2;
Parameters
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final InjectedSolutionConstraint.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides