Google Cloud Optimization V1 Client - Class Row (1.0.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
Name Description
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
Type Description
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
Name Description
var array<Google\Protobuf\Duration>
Returns
Type Description
$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
Type Description
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
Name Description
var float[]
Returns
Type Description
$this