Class InjectedSolutionConstraint.Builder (1.58.0)

publicstaticfinalclass InjectedSolutionConstraint.BuilderextendsGeneratedMessageV3.Builder<InjectedSolutionConstraint.Builder>implementsInjectedSolutionConstraintOrBuilder

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

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addAllConstraintRelaxations(Iterable<? extends InjectedSolutionConstraint.ConstraintRelaxation> values)

publicInjectedSolutionConstraint.BuilderaddAllConstraintRelaxations(Iterable<?extendsInjectedSolutionConstraint.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
Type Description
InjectedSolutionConstraint.Builder

addAllRoutes(Iterable<? extends ShipmentRoute> values)

publicInjectedSolutionConstraint.BuilderaddAllRoutes(Iterable<?extendsShipmentRoute>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
Type Description
InjectedSolutionConstraint.Builder

addAllSkippedShipments(Iterable<? extends SkippedShipment> values)

publicInjectedSolutionConstraint.BuilderaddAllSkippedShipments(Iterable<?extendsSkippedShipment>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
Type Description
InjectedSolutionConstraint.Builder

addConstraintRelaxations(InjectedSolutionConstraint.ConstraintRelaxation value)

publicInjectedSolutionConstraint.BuilderaddConstraintRelaxations(InjectedSolutionConstraint.ConstraintRelaxationvalue)

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
value InjectedSolutionConstraint.ConstraintRelaxation
Returns
Type Description
InjectedSolutionConstraint.Builder

addConstraintRelaxations(InjectedSolutionConstraint.ConstraintRelaxation.Builder builderForValue)

publicInjectedSolutionConstraint.BuilderaddConstraintRelaxations(InjectedSolutionConstraint.ConstraintRelaxation.BuilderbuilderForValue)

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
builderForValue InjectedSolutionConstraint.ConstraintRelaxation.Builder
Returns
Type Description
InjectedSolutionConstraint.Builder

addConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation value)

publicInjectedSolutionConstraint.BuilderaddConstraintRelaxations(intindex,InjectedSolutionConstraint.ConstraintRelaxationvalue)

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
Name Description
index int
value InjectedSolutionConstraint.ConstraintRelaxation
Returns
Type Description
InjectedSolutionConstraint.Builder

addConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Builder builderForValue)

publicInjectedSolutionConstraint.BuilderaddConstraintRelaxations(intindex,InjectedSolutionConstraint.ConstraintRelaxation.BuilderbuilderForValue)

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
Name Description
index int
builderForValue InjectedSolutionConstraint.ConstraintRelaxation.Builder
Returns
Type Description
InjectedSolutionConstraint.Builder

addConstraintRelaxationsBuilder()

publicInjectedSolutionConstraint.ConstraintRelaxation.BuilderaddConstraintRelaxationsBuilder()

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
InjectedSolutionConstraint.ConstraintRelaxation.Builder

addConstraintRelaxationsBuilder(int index)

publicInjectedSolutionConstraint.ConstraintRelaxation.BuilderaddConstraintRelaxationsBuilder(intindex)

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
index int
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicInjectedSolutionConstraint.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
InjectedSolutionConstraint.Builder
Overrides

addRoutes(ShipmentRoute value)

publicInjectedSolutionConstraint.BuilderaddRoutes(ShipmentRoutevalue)

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
value ShipmentRoute
Returns
Type Description
InjectedSolutionConstraint.Builder

addRoutes(ShipmentRoute.Builder builderForValue)

publicInjectedSolutionConstraint.BuilderaddRoutes(ShipmentRoute.BuilderbuilderForValue)

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
builderForValue ShipmentRoute.Builder
Returns
Type Description
InjectedSolutionConstraint.Builder

addRoutes(int index, ShipmentRoute value)

publicInjectedSolutionConstraint.BuilderaddRoutes(intindex,ShipmentRoutevalue)

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
Name Description
index int
value ShipmentRoute
Returns
Type Description
InjectedSolutionConstraint.Builder

addRoutes(int index, ShipmentRoute.Builder builderForValue)

publicInjectedSolutionConstraint.BuilderaddRoutes(intindex,ShipmentRoute.BuilderbuilderForValue)

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
Name Description
index int
builderForValue ShipmentRoute.Builder
Returns
Type Description
InjectedSolutionConstraint.Builder

addRoutesBuilder()

publicShipmentRoute.BuilderaddRoutesBuilder()

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
ShipmentRoute.Builder

addRoutesBuilder(int index)

publicShipmentRoute.BuilderaddRoutesBuilder(intindex)

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
index int
Returns
Type Description
ShipmentRoute.Builder

addSkippedShipments(SkippedShipment value)

publicInjectedSolutionConstraint.BuilderaddSkippedShipments(SkippedShipmentvalue)

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
value SkippedShipment
Returns
Type Description
InjectedSolutionConstraint.Builder

addSkippedShipments(SkippedShipment.Builder builderForValue)

publicInjectedSolutionConstraint.BuilderaddSkippedShipments(SkippedShipment.BuilderbuilderForValue)

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
builderForValue SkippedShipment.Builder
Returns
Type Description
InjectedSolutionConstraint.Builder

addSkippedShipments(int index, SkippedShipment value)

publicInjectedSolutionConstraint.BuilderaddSkippedShipments(intindex,SkippedShipmentvalue)

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
Name Description
index int
value SkippedShipment
Returns
Type Description
InjectedSolutionConstraint.Builder

addSkippedShipments(int index, SkippedShipment.Builder builderForValue)

publicInjectedSolutionConstraint.BuilderaddSkippedShipments(intindex,SkippedShipment.BuilderbuilderForValue)

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
Name Description
index int
builderForValue SkippedShipment.Builder
Returns
Type Description
InjectedSolutionConstraint.Builder

addSkippedShipmentsBuilder()

publicSkippedShipment.BuilderaddSkippedShipmentsBuilder()

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
SkippedShipment.Builder

addSkippedShipmentsBuilder(int index)

publicSkippedShipment.BuilderaddSkippedShipmentsBuilder(intindex)

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
index int
Returns
Type Description
SkippedShipment.Builder

build()

publicInjectedSolutionConstraintbuild()
Returns
Type Description
InjectedSolutionConstraint

buildPartial()

publicInjectedSolutionConstraintbuildPartial()
Returns
Type Description
InjectedSolutionConstraint

clear()

publicInjectedSolutionConstraint.Builderclear()
Returns
Type Description
InjectedSolutionConstraint.Builder
Overrides

clearConstraintRelaxations()

publicInjectedSolutionConstraint.BuilderclearConstraintRelaxations()

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
InjectedSolutionConstraint.Builder

clearField(Descriptors.FieldDescriptor field)

publicInjectedSolutionConstraint.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
InjectedSolutionConstraint.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

publicInjectedSolutionConstraint.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
InjectedSolutionConstraint.Builder
Overrides

clearRoutes()

publicInjectedSolutionConstraint.BuilderclearRoutes()

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
InjectedSolutionConstraint.Builder

clearSkippedShipments()

publicInjectedSolutionConstraint.BuilderclearSkippedShipments()

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
InjectedSolutionConstraint.Builder

clone()

publicInjectedSolutionConstraint.Builderclone()
Returns
Type Description
InjectedSolutionConstraint.Builder
Overrides

getConstraintRelaxations(int index)

publicInjectedSolutionConstraint.ConstraintRelaxationgetConstraintRelaxations(intindex)

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
index int
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation

getConstraintRelaxationsBuilder(int index)

publicInjectedSolutionConstraint.ConstraintRelaxation.BuildergetConstraintRelaxationsBuilder(intindex)

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
index int
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation.Builder

getConstraintRelaxationsBuilderList()

publicList<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
Type Description
List<Builder>

getConstraintRelaxationsCount()

publicintgetConstraintRelaxationsCount()

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
int

getConstraintRelaxationsList()

publicList<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
Type Description
List<ConstraintRelaxation>

getConstraintRelaxationsOrBuilder(int index)

publicInjectedSolutionConstraint.ConstraintRelaxationOrBuildergetConstraintRelaxationsOrBuilder(intindex)

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
index int
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxationOrBuilder

getConstraintRelaxationsOrBuilderList()

publicList<?extendsInjectedSolutionConstraint.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()

publicInjectedSolutionConstraintgetDefaultInstanceForType()
Returns
Type Description
InjectedSolutionConstraint

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getRoutes(int index)

publicShipmentRoutegetRoutes(intindex)

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
index int
Returns
Type Description
ShipmentRoute

getRoutesBuilder(int index)

publicShipmentRoute.BuildergetRoutesBuilder(intindex)

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
index int
Returns
Type Description
ShipmentRoute.Builder

getRoutesBuilderList()

publicList<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
Type Description
List<Builder>

getRoutesCount()

publicintgetRoutesCount()

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
int

getRoutesList()

publicList<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
Type Description
List<ShipmentRoute>

getRoutesOrBuilder(int index)

publicShipmentRouteOrBuildergetRoutesOrBuilder(intindex)

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
index int
Returns
Type Description
ShipmentRouteOrBuilder

getRoutesOrBuilderList()

publicList<?extendsShipmentRouteOrBuilder>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)

publicSkippedShipmentgetSkippedShipments(intindex)

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
index int
Returns
Type Description
SkippedShipment

getSkippedShipmentsBuilder(int index)

publicSkippedShipment.BuildergetSkippedShipmentsBuilder(intindex)

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
index int
Returns
Type Description
SkippedShipment.Builder

getSkippedShipmentsBuilderList()

publicList<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
Type Description
List<Builder>

getSkippedShipmentsCount()

publicintgetSkippedShipmentsCount()

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
int

getSkippedShipmentsList()

publicList<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
Type Description
List<SkippedShipment>

getSkippedShipmentsOrBuilder(int index)

publicSkippedShipmentOrBuildergetSkippedShipmentsOrBuilder(intindex)

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
index int
Returns
Type Description
SkippedShipmentOrBuilder

getSkippedShipmentsOrBuilderList()

publicList<?extendsSkippedShipmentOrBuilder>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()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(InjectedSolutionConstraint other)

publicInjectedSolutionConstraint.BuildermergeFrom(InjectedSolutionConstraintother)
Parameter
Name Description
other InjectedSolutionConstraint
Returns
Type Description
InjectedSolutionConstraint.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicInjectedSolutionConstraint.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InjectedSolutionConstraint.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicInjectedSolutionConstraint.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
InjectedSolutionConstraint.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalInjectedSolutionConstraint.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
InjectedSolutionConstraint.Builder
Overrides

removeConstraintRelaxations(int index)

publicInjectedSolutionConstraint.BuilderremoveConstraintRelaxations(intindex)

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
index int
Returns
Type Description
InjectedSolutionConstraint.Builder

removeRoutes(int index)

publicInjectedSolutionConstraint.BuilderremoveRoutes(intindex)

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
index int
Returns
Type Description
InjectedSolutionConstraint.Builder

removeSkippedShipments(int index)

publicInjectedSolutionConstraint.BuilderremoveSkippedShipments(intindex)

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
index int
Returns
Type Description
InjectedSolutionConstraint.Builder

setConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation value)

publicInjectedSolutionConstraint.BuildersetConstraintRelaxations(intindex,InjectedSolutionConstraint.ConstraintRelaxationvalue)

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
Name Description
index int
value InjectedSolutionConstraint.ConstraintRelaxation
Returns
Type Description
InjectedSolutionConstraint.Builder

setConstraintRelaxations(int index, InjectedSolutionConstraint.ConstraintRelaxation.Builder builderForValue)

publicInjectedSolutionConstraint.BuildersetConstraintRelaxations(intindex,InjectedSolutionConstraint.ConstraintRelaxation.BuilderbuilderForValue)

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
Name Description
index int
builderForValue InjectedSolutionConstraint.ConstraintRelaxation.Builder
Returns
Type Description
InjectedSolutionConstraint.Builder

setField(Descriptors.FieldDescriptor field, Object value)

publicInjectedSolutionConstraint.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
InjectedSolutionConstraint.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicInjectedSolutionConstraint.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
InjectedSolutionConstraint.Builder
Overrides

setRoutes(int index, ShipmentRoute value)

publicInjectedSolutionConstraint.BuildersetRoutes(intindex,ShipmentRoutevalue)

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
Name Description
index int
value ShipmentRoute
Returns
Type Description
InjectedSolutionConstraint.Builder

setRoutes(int index, ShipmentRoute.Builder builderForValue)

publicInjectedSolutionConstraint.BuildersetRoutes(intindex,ShipmentRoute.BuilderbuilderForValue)

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
Name Description
index int
builderForValue ShipmentRoute.Builder
Returns
Type Description
InjectedSolutionConstraint.Builder

setSkippedShipments(int index, SkippedShipment value)

publicInjectedSolutionConstraint.BuildersetSkippedShipments(intindex,SkippedShipmentvalue)

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
Name Description
index int
value SkippedShipment
Returns
Type Description
InjectedSolutionConstraint.Builder

setSkippedShipments(int index, SkippedShipment.Builder builderForValue)

publicInjectedSolutionConstraint.BuildersetSkippedShipments(intindex,SkippedShipment.BuilderbuilderForValue)

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
Name Description
index int
builderForValue SkippedShipment.Builder
Returns
Type Description
InjectedSolutionConstraint.Builder

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalInjectedSolutionConstraint.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
InjectedSolutionConstraint.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.