Class ShipmentModel.DurationDistanceMatrix.Builder (1.1.1)

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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row>
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ShipmentModel.DurationDistanceMatrix.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueShipmentModel.DurationDistanceMatrix.Row
Returns
TypeDescription
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
NameDescription
builderForValueShipmentModel.DurationDistanceMatrix.Row.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueShipmentModel.DurationDistanceMatrix.Row
Returns
TypeDescription
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
NameDescription
indexint
builderForValueShipmentModel.DurationDistanceMatrix.Row.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Row.Builder

build()

public ShipmentModel.DurationDistanceMatrix build()
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix

buildPartial()

public ShipmentModel.DurationDistanceMatrix buildPartial()
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix

clear()

public ShipmentModel.DurationDistanceMatrix.Builder clear()
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ShipmentModel.DurationDistanceMatrix.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public ShipmentModel.DurationDistanceMatrix.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ShipmentModel.DurationDistanceMatrix.Builder

This builder for chaining.

clone()

public ShipmentModel.DurationDistanceMatrix.Builder clone()
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

getDefaultInstanceForType()

public ShipmentModel.DurationDistanceMatrix getDefaultInstanceForType()
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for vehicleStartTag.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ShipmentModel.DurationDistanceMatrix other)

public ShipmentModel.DurationDistanceMatrix.Builder mergeFrom(ShipmentModel.DurationDistanceMatrix other)
Parameter
NameDescription
otherShipmentModel.DurationDistanceMatrix
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ShipmentModel.DurationDistanceMatrix.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ShipmentModel.DurationDistanceMatrix.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ShipmentModel.DurationDistanceMatrix.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ShipmentModel.DurationDistanceMatrix.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueShipmentModel.DurationDistanceMatrix.Row
Returns
TypeDescription
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
NameDescription
indexint
builderForValueShipmentModel.DurationDistanceMatrix.Row.Builder
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final ShipmentModel.DurationDistanceMatrix.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The vehicleStartTag to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for vehicleStartTag to set.

Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Builder

This builder for chaining.