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
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()
public static final Descriptors.Descriptor getDescriptor()
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>
|
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.
|
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
|
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
|
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;
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
|
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;
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
|
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.
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ShipmentModel.DurationDistanceMatrix.Row.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public ShipmentModel.DurationDistanceMatrix.Row build()
buildPartial()
public ShipmentModel.DurationDistanceMatrix.Row buildPartial()
clear()
public ShipmentModel.DurationDistanceMatrix.Row.Builder clear()
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;
clearField(Descriptors.FieldDescriptor field)
public ShipmentModel.DurationDistanceMatrix.Row.Builder clearField(Descriptors.FieldDescriptor field)
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;
clearOneof(Descriptors.OneofDescriptor oneof)
public ShipmentModel.DurationDistanceMatrix.Row.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public ShipmentModel.DurationDistanceMatrix.Row.Builder clone()
Overrides
getDefaultInstanceForType()
public ShipmentModel.DurationDistanceMatrix.Row getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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
|
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
|
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;
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;
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
|
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()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(ShipmentModel.DurationDistanceMatrix.Row other)
public ShipmentModel.DurationDistanceMatrix.Row.Builder mergeFrom(ShipmentModel.DurationDistanceMatrix.Row other)
public ShipmentModel.DurationDistanceMatrix.Row.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public ShipmentModel.DurationDistanceMatrix.Row.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ShipmentModel.DurationDistanceMatrix.Row.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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
|
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;
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
|
setField(Descriptors.FieldDescriptor field, Object value)
public ShipmentModel.DurationDistanceMatrix.Row.Builder setField(Descriptors.FieldDescriptor field, Object value)
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.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ShipmentModel.DurationDistanceMatrix.Row.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final ShipmentModel.DurationDistanceMatrix.Row.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides