Class ShipmentModel.DurationDistanceMatrix.Builder (1.46.0)

public static final class ShipmentModel.DurationDistanceMatrix.Builder extends GeneratedMessageV3.Builder<ShipmentModel.DurationDistanceMatrix.Builder> implements ShipmentModel.DurationDistanceMatrixOrBuilder

Specifies a duration and distance matrix from visit and vehicle start locations to visit and vehicle end locations.

Protobuf type google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllRows(Iterable<? extends ShipmentModel.DurationDistanceMatrix.Row> values)

public ShipmentModel.DurationDistanceMatrix.Builder addAllRows(Iterable<? extends ShipmentModel.DurationDistanceMatrix.Row> values)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row>
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ShipmentModel.DurationDistanceMatrix.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

addRows(ShipmentModel.DurationDistanceMatrix.Row value)

public ShipmentModel.DurationDistanceMatrix.Builder addRows(ShipmentModel.DurationDistanceMatrix.Row value)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameter
Name Description
value ShipmentModel.DurationDistanceMatrix.Row
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

addRows(ShipmentModel.DurationDistanceMatrix.Row.Builder builderForValue)

public ShipmentModel.DurationDistanceMatrix.Builder addRows(ShipmentModel.DurationDistanceMatrix.Row.Builder builderForValue)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameter
Name Description
builderForValue ShipmentModel.DurationDistanceMatrix.Row.Builder
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

addRows(int index, ShipmentModel.DurationDistanceMatrix.Row value)

public ShipmentModel.DurationDistanceMatrix.Builder addRows(int index, ShipmentModel.DurationDistanceMatrix.Row value)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameters
Name Description
index int
value ShipmentModel.DurationDistanceMatrix.Row
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

addRows(int index, ShipmentModel.DurationDistanceMatrix.Row.Builder builderForValue)

public ShipmentModel.DurationDistanceMatrix.Builder addRows(int index, ShipmentModel.DurationDistanceMatrix.Row.Builder builderForValue)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameters
Name Description
index int
builderForValue ShipmentModel.DurationDistanceMatrix.Row.Builder
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

addRowsBuilder()

public ShipmentModel.DurationDistanceMatrix.Row.Builder addRowsBuilder()

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Row.Builder

addRowsBuilder(int index)

public ShipmentModel.DurationDistanceMatrix.Row.Builder addRowsBuilder(int index)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameter
Name Description
index int
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Row.Builder

build()

public ShipmentModel.DurationDistanceMatrix build()
Returns
Type Description
ShipmentModel.DurationDistanceMatrix

buildPartial()

public ShipmentModel.DurationDistanceMatrix buildPartial()
Returns
Type Description
ShipmentModel.DurationDistanceMatrix

clear()

public ShipmentModel.DurationDistanceMatrix.Builder clear()
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ShipmentModel.DurationDistanceMatrix.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public ShipmentModel.DurationDistanceMatrix.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

clearRows()

public ShipmentModel.DurationDistanceMatrix.Builder clearRows()

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

clearVehicleStartTag()

public ShipmentModel.DurationDistanceMatrix.Builder clearVehicleStartTag()

Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.

Each vehicle start must match exactly one matrix, i.e. exactly one of their start_tags field must match the vehicle_start_tag of a matrix (and of that matrix only).

All matrices must have a different vehicle_start_tag.

string vehicle_start_tag = 2;

Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

This builder for chaining.

clone()

public ShipmentModel.DurationDistanceMatrix.Builder clone()
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

getDefaultInstanceForType()

public ShipmentModel.DurationDistanceMatrix getDefaultInstanceForType()
Returns
Type Description
ShipmentModel.DurationDistanceMatrix

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getRows(int index)

public ShipmentModel.DurationDistanceMatrix.Row getRows(int index)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameter
Name Description
index int
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Row

getRowsBuilder(int index)

public ShipmentModel.DurationDistanceMatrix.Row.Builder getRowsBuilder(int index)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameter
Name Description
index int
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Row.Builder

getRowsBuilderList()

public List<ShipmentModel.DurationDistanceMatrix.Row.Builder> getRowsBuilderList()

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Returns
Type Description
List<Builder>

getRowsCount()

public int getRowsCount()

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Returns
Type Description
int

getRowsList()

public List<ShipmentModel.DurationDistanceMatrix.Row> getRowsList()

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Returns
Type Description
List<Row>

getRowsOrBuilder(int index)

public ShipmentModel.DurationDistanceMatrix.RowOrBuilder getRowsOrBuilder(int index)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameter
Name Description
index int
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.RowOrBuilder

getRowsOrBuilderList()

public List<? extends ShipmentModel.DurationDistanceMatrix.RowOrBuilder> getRowsOrBuilderList()

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.RowOrBuilder>

getVehicleStartTag()

public String getVehicleStartTag()

Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.

Each vehicle start must match exactly one matrix, i.e. exactly one of their start_tags field must match the vehicle_start_tag of a matrix (and of that matrix only).

All matrices must have a different vehicle_start_tag.

string vehicle_start_tag = 2;

Returns
Type Description
String

The vehicleStartTag.

getVehicleStartTagBytes()

public ByteString getVehicleStartTagBytes()

Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.

Each vehicle start must match exactly one matrix, i.e. exactly one of their start_tags field must match the vehicle_start_tag of a matrix (and of that matrix only).

All matrices must have a different vehicle_start_tag.

string vehicle_start_tag = 2;

Returns
Type Description
ByteString

The bytes for vehicleStartTag.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ShipmentModel.DurationDistanceMatrix other)

public ShipmentModel.DurationDistanceMatrix.Builder mergeFrom(ShipmentModel.DurationDistanceMatrix other)
Parameter
Name Description
other ShipmentModel.DurationDistanceMatrix
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ShipmentModel.DurationDistanceMatrix.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ShipmentModel.DurationDistanceMatrix.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ShipmentModel.DurationDistanceMatrix.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

removeRows(int index)

public ShipmentModel.DurationDistanceMatrix.Builder removeRows(int index)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameter
Name Description
index int
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ShipmentModel.DurationDistanceMatrix.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

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

public ShipmentModel.DurationDistanceMatrix.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

setRows(int index, ShipmentModel.DurationDistanceMatrix.Row value)

public ShipmentModel.DurationDistanceMatrix.Builder setRows(int index, ShipmentModel.DurationDistanceMatrix.Row value)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameters
Name Description
index int
value ShipmentModel.DurationDistanceMatrix.Row
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

setRows(int index, ShipmentModel.DurationDistanceMatrix.Row.Builder builderForValue)

public ShipmentModel.DurationDistanceMatrix.Builder setRows(int index, ShipmentModel.DurationDistanceMatrix.Row.Builder builderForValue)

Specifies the rows of the duration and distance matrix. It must have as many elements as ShipmentModel.duration_distance_matrix_src_tags.

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;

Parameters
Name Description
index int
builderForValue ShipmentModel.DurationDistanceMatrix.Row.Builder
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final ShipmentModel.DurationDistanceMatrix.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

setVehicleStartTag(String value)

public ShipmentModel.DurationDistanceMatrix.Builder setVehicleStartTag(String value)

Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.

Each vehicle start must match exactly one matrix, i.e. exactly one of their start_tags field must match the vehicle_start_tag of a matrix (and of that matrix only).

All matrices must have a different vehicle_start_tag.

string vehicle_start_tag = 2;

Parameter
Name Description
value String

The vehicleStartTag to set.

Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

This builder for chaining.

setVehicleStartTagBytes(ByteString value)

public ShipmentModel.DurationDistanceMatrix.Builder setVehicleStartTagBytes(ByteString value)

Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.

Each vehicle start must match exactly one matrix, i.e. exactly one of their start_tags field must match the vehicle_start_tag of a matrix (and of that matrix only).

All matrices must have a different vehicle_start_tag.

string vehicle_start_tag = 2;

Parameter
Name Description
value ByteString

The bytes for vehicleStartTag to set.

Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Builder

This builder for chaining.