Google Cloud Optimization V1 Client - Class Row (0.5.1)

Reference documentation and code samples for the Google Cloud Optimization V1 Client class Row.

Specifies a row of the duration and distance matrix.

Generated from protobuf message google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row

Namespace

Google \ Cloud \ Optimization \ V1 \ ShipmentModel \ DurationDistanceMatrix

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ durations array<Google\Protobuf\Duration>

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

↳ meters array

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.

getDurations

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

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDurations

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

Parameter
NameDescription
var array<Google\Protobuf\Duration>
Returns
TypeDescription
$this

getMeters

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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setMeters

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.

Parameter
NameDescription
var float[]
Returns
TypeDescription
$this