# Cloud Optimization V1 API - Class Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix (v0.16.0)

0.16.0 (latest) 0.15.0 0.14.1 0.13.0 0.12.0 0.11.1 0.10.0 0.9.2 0.8.2 0.7.0 0.6.0 0.5.0 0.4.1 0.3.0 0.2.1 0.1.1 Reference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix.

Specifies a duration and distance matrix from visit and vehicle start
locations to visit and vehicle end locations.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #rows

    def rows() -> ::Array<::Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix::Row>

**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix::Row](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix-Row)\>) --- Specifies the rows of the duration and distance matrix. It must have as many elements as [ShipmentModel.duration_distance_matrix_src_tags](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentModel#Google__Cloud__Optimization__V1__ShipmentModel_duration_distance_matrix_src_tags_instance_ "Google::Cloud::Optimization::V1::ShipmentModel#duration_distance_matrix_src_tags (method)").

### #rows=

    def rows=(value) -> ::Array<::Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix::Row>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix::Row](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix-Row)\>) --- Specifies the rows of the duration and distance matrix. It must have as many elements as [ShipmentModel.duration_distance_matrix_src_tags](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentModel#Google__Cloud__Optimization__V1__ShipmentModel_duration_distance_matrix_src_tags_instance_ "Google::Cloud::Optimization::V1::ShipmentModel#duration_distance_matrix_src_tags (method)").
**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix::Row](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix-Row)\>) --- Specifies the rows of the duration and distance matrix. It must have as many elements as [ShipmentModel.duration_distance_matrix_src_tags](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentModel#Google__Cloud__Optimization__V1__ShipmentModel_duration_distance_matrix_src_tags_instance_ "Google::Cloud::Optimization::V1::ShipmentModel#duration_distance_matrix_src_tags (method)").

### #vehicle_start_tag

    def vehicle_start_tag() -> ::String

**Returns**

- (::String) --- Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.

  Each vehicle start must match exactly one matrix, i.e. exactly one of
  their `start_tags` field must match the `vehicle_start_tag` of a matrix
  (and of that matrix only).

  All matrices must have a different `vehicle_start_tag`.

### #vehicle_start_tag=

    def vehicle_start_tag=(value) -> ::String

**Parameter**

- **value** (::String) --- Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.


  Each vehicle start must match exactly one matrix, i.e. exactly one of
  their `start_tags` field must match the `vehicle_start_tag` of a matrix
  (and of that matrix only).

  All matrices must have a different `vehicle_start_tag`.
**Returns**

- (::String) --- Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.

  Each vehicle start must match exactly one matrix, i.e. exactly one of
  their `start_tags` field must match the `vehicle_start_tag` of a matrix
  (and of that matrix only).

  All matrices must have a different `vehicle_start_tag`.