Class ShipmentModel.DurationDistanceMatrix.Row.Builder (1.22.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.protobuf.Duration>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends java.lang.Double>

The meters to add.

Returns
TypeDescription
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
NameDescription
valueDuration
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
indexint
valueDuration
Returns
TypeDescription
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
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valuedouble

The meters to add.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Row.Builder
Overrides

build()

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

buildPartial()

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

clear()

public ShipmentModel.DurationDistanceMatrix.Row.Builder clear()
Returns
TypeDescription
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
TypeDescription
ShipmentModel.DurationDistanceMatrix.Row.Builder

clearField(Descriptors.FieldDescriptor field)

public ShipmentModel.DurationDistanceMatrix.Row.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
ShipmentModel.DurationDistanceMatrix.Row.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ShipmentModel.DurationDistanceMatrix.Row.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Row.Builder
Overrides

clone()

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

getDefaultInstanceForType()

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

getDescriptorForType()

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

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
List<Double>

A list containing the meters.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ShipmentModel.DurationDistanceMatrix.Row other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

The index to set the value at.

valuedouble

The meters to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Row.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ShipmentModel.DurationDistanceMatrix.Row.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix.Row.Builder
Overrides