Class ShipmentModel.DurationDistanceMatrix.Row.Builder (1.44.0)

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

Specifies a row of the duration and distance matrix.

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

Static Methods

getDescriptor()

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

Methods

addAllDurations(Iterable<? extends Duration> values)

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

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

Parameter
Name Description
values Iterable<? extends com.google.protobuf.Duration>
Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Row.Builder

addAllMeters(Iterable<? extends Double> values)

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

Distance values for a given row. If no costs or constraints refer to distances in the model, this can be left empty; otherwise it must have as many elements as durations.

repeated double meters = 2;

Parameter
Name Description
values Iterable<? extends java.lang.Double>

The meters to add.

Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Row.Builder

This builder for chaining.

addDurations(Duration value)

public ShipmentModel.DurationDistanceMatrix.Row.Builder addDurations(Duration value)

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

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

addDurations(Duration.Builder builderForValue)

public ShipmentModel.DurationDistanceMatrix.Row.Builder addDurations(Duration.Builder builderForValue)

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

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

addDurations(int index, Duration value)

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

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

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

addDurations(int index, Duration.Builder builderForValue)

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

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

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

addDurationsBuilder()

public Duration.Builder addDurationsBuilder()

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

Returns
Type Description
Builder

addDurationsBuilder(int index)

public Duration.Builder addDurationsBuilder(int index)

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

Parameter
Name Description
index int
Returns
Type Description
Builder

addMeters(double value)

public ShipmentModel.DurationDistanceMatrix.Row.Builder addMeters(double value)

Distance values for a given row. If no costs or constraints refer to distances in the model, this can be left empty; otherwise it must have as many elements as durations.

repeated double meters = 2;

Parameter
Name Description
value double

The meters to add.

Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Row.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

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

buildPartial()

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

clear()

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

clearDurations()

public ShipmentModel.DurationDistanceMatrix.Row.Builder clearDurations()

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Row.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearMeters()

public ShipmentModel.DurationDistanceMatrix.Row.Builder clearMeters()

Distance values for a given row. If no costs or constraints refer to distances in the model, this can be left empty; otherwise it must have as many elements as durations.

repeated double meters = 2;

Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Row.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

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

getDescriptorForType()

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

getDurations(int index)

public Duration getDurations(int index)

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

Parameter
Name Description
index int
Returns
Type Description
Duration

getDurationsBuilder(int index)

public Duration.Builder getDurationsBuilder(int index)

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

Parameter
Name Description
index int
Returns
Type Description
Builder

getDurationsBuilderList()

public List<Duration.Builder> getDurationsBuilderList()

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

Returns
Type Description
List<Builder>

getDurationsCount()

public int getDurationsCount()

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

Returns
Type Description
int

getDurationsList()

public List<Duration> getDurationsList()

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

Returns
Type Description
List<Duration>

getDurationsOrBuilder(int index)

public DurationOrBuilder getDurationsOrBuilder(int index)

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

Parameter
Name Description
index int
Returns
Type Description
DurationOrBuilder

getDurationsOrBuilderList()

public List<? extends DurationOrBuilder> getDurationsOrBuilderList()

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

Returns
Type Description
List<? extends com.google.protobuf.DurationOrBuilder>

getMeters(int index)

public double getMeters(int index)

Distance values for a given row. If no costs or constraints refer to distances in the model, this can be left empty; otherwise it must have as many elements as durations.

repeated double meters = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
double

The meters at the given index.

getMetersCount()

public int getMetersCount()

Distance values for a given row. If no costs or constraints refer to distances in the model, this can be left empty; otherwise it must have as many elements as durations.

repeated double meters = 2;

Returns
Type Description
int

The count of meters.

getMetersList()

public List<Double> getMetersList()

Distance values for a given row. If no costs or constraints refer to distances in the model, this can be left empty; otherwise it must have as many elements as durations.

repeated double meters = 2;

Returns
Type Description
List<Double>

A list containing the meters.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ShipmentModel.DurationDistanceMatrix.Row other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeDurations(int index)

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

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

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

setDurations(int index, Duration value)

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

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

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

setDurations(int index, Duration.Builder builderForValue)

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

Duration values for a given row. It must have as many elements as ShipmentModel.duration_distance_matrix_dst_tags.

repeated .google.protobuf.Duration durations = 1;

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setMeters(int index, double value)

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

Distance values for a given row. If no costs or constraints refer to distances in the model, this can be left empty; otherwise it must have as many elements as durations.

repeated double meters = 2;

Parameters
Name Description
index int

The index to set the value at.

value double

The meters to set.

Returns
Type Description
ShipmentModel.DurationDistanceMatrix.Row.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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