# Google Maps FleetEngine V1 Client - Class VehicleMatch (0.5.3)

0.5.3 (latest) 0.5.2 0.4.1 0.3.1 0.2.0 0.1.6 Reference documentation and code samples for the Google Maps FleetEngine V1 Client class VehicleMatch.

Contains the vehicle and related estimates for a vehicle that match the
points of active trips for the vehicle `SearchVehiclesRequest`.

Generated from protobuf message `maps.fleetengine.v1.VehicleMatch`

## Namespace

Google \\ Maps \\ FleetEngine \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ vehicle` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Vehicle` Required. A vehicle that matches the request. |
| `↳ vehicle_pickup_eta` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The vehicle's driving ETA to the pickup point specified in the request. An empty value indicates a failure in calculating ETA for the vehicle. If `SearchVehiclesRequest.include_back_to_back` was `true` and this vehicle has an active trip, `vehicle_pickup_eta` includes the time required to complete the current active trip. |
| `↳ vehicle_pickup_distance_meters` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` The distance from the Vehicle's current location to the pickup point specified in the request, including any intermediate pickup or dropoff points for existing trips. This distance comprises the calculated driving (route) distance, plus the straight line distance between the navigation end point and the requested pickup point. (The distance between the navigation end point and the requested pickup point is typically small.) An empty value indicates an error in calculating the distance. |
| `↳ vehicle_pickup_straight_line_distance_meters` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` Required. The straight-line distance between the vehicle and the pickup point specified in the request. |
| `↳ vehicle_dropoff_eta` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The complete vehicle's driving ETA to the drop off point specified in the request. The ETA includes stopping at any waypoints before the `dropoff_point` specified in the request. The value will only be populated when a drop off point is specified in the request. An empty value indicates an error calculating the ETA. |
| `↳ vehicle_pickup_to_dropoff_distance_meters` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` The vehicle's driving distance (in meters) from the pickup point to the drop off point specified in the request. The distance is only between the two points and does not include the vehicle location or any other points that must be visited before the vehicle visits either the pickup point or dropoff point. The value will only be populated when a `dropoff_point` is specified in the request. An empty value indicates a failure in calculating the distance from the pickup to drop off point specified in the request. |
| `↳ trip_type` | `int` Required. The trip type of the request that was used to calculate the ETA to the pickup point. |
| `↳ vehicle_trips_waypoints` | `array<https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Waypoint>` The ordered list of waypoints used to calculate the ETA. The list includes vehicle location, the pickup points of active trips for the vehicle, and the pickup points provided in the request. An empty list indicates a failure in calculating ETA for the vehicle. |
| `↳ vehicle_match_type` | `int` Type of the vehicle match. |
| `↳ requested_ordered_by` | `int` The order requested for sorting vehicle matches. Equivalent to `ordered_by`. |
| `↳ ordered_by` | `int` The order requested for sorting vehicle matches. Equivalent to `requested_ordered_by`. |

### getVehicle

Required. A vehicle that matches the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Vehicle|null` |   |

### hasVehicle

### clearVehicle

### setVehicle

Required. A vehicle that matches the request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Vehicle` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVehiclePickupEta

The vehicle's driving ETA to the pickup point specified in the
request. An empty value indicates a failure in calculating ETA for the
vehicle. If `SearchVehiclesRequest.include_back_to_back` was `true` and
this vehicle has an active trip, `vehicle_pickup_eta` includes the time
required to complete the current active trip.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasVehiclePickupEta

### clearVehiclePickupEta

### setVehiclePickupEta

The vehicle's driving ETA to the pickup point specified in the
request. An empty value indicates a failure in calculating ETA for the
vehicle. If `SearchVehiclesRequest.include_back_to_back` was `true` and
this vehicle has an active trip, `vehicle_pickup_eta` includes the time
required to complete the current active trip.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVehiclePickupDistanceMeters

The distance from the Vehicle's current location to the pickup point
specified in the request, including any intermediate pickup or dropoff
points for existing trips. This distance comprises the calculated driving
(route) distance, plus the straight line distance between the navigation
end point and the requested pickup point. (The distance between the
navigation end point and the requested pickup point is typically small.) An
empty value indicates an error in calculating the distance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value|null` |   |

### hasVehiclePickupDistanceMeters

### clearVehiclePickupDistanceMeters

### getVehiclePickupDistanceMetersUnwrapped

Returns the unboxed value from `getVehiclePickupDistanceMeters()`

The distance from the Vehicle's current location to the pickup point
specified in the request, including any intermediate pickup or dropoff
points for existing trips. This distance comprises the calculated driving
(route) distance, plus the straight line distance between the navigation
end point and the requested pickup point. (The distance between the
navigation end point and the requested pickup point is typically small.) An
empty value indicates an error in calculating the distance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|null` |   |

### setVehiclePickupDistanceMeters

The distance from the Vehicle's current location to the pickup point
specified in the request, including any intermediate pickup or dropoff
points for existing trips. This distance comprises the calculated driving
(route) distance, plus the straight line distance between the navigation
end point and the requested pickup point. (The distance between the
navigation end point and the requested pickup point is typically small.) An
empty value indicates an error in calculating the distance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### setVehiclePickupDistanceMetersUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\Int32Value object.

The distance from the Vehicle's current location to the pickup point
specified in the request, including any intermediate pickup or dropoff
points for existing trips. This distance comprises the calculated driving
(route) distance, plus the straight line distance between the navigation
end point and the requested pickup point. (The distance between the
navigation end point and the requested pickup point is typically small.) An
empty value indicates an error in calculating the distance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|null` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVehiclePickupStraightLineDistanceMeters

Required. The straight-line distance between the vehicle and the pickup
point specified in the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value|null` |   |

### hasVehiclePickupStraightLineDistanceMeters

### clearVehiclePickupStraightLineDistanceMeters

### getVehiclePickupStraightLineDistanceMetersUnwrapped

Returns the unboxed value from `getVehiclePickupStraightLineDistanceMeters()`

Required. The straight-line distance between the vehicle and the pickup
point specified in the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|null` |   |

### setVehiclePickupStraightLineDistanceMeters

Required. The straight-line distance between the vehicle and the pickup
point specified in the request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### setVehiclePickupStraightLineDistanceMetersUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\Int32Value object.

Required. The straight-line distance between the vehicle and the pickup
point specified in the request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|null` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVehicleDropoffEta

The complete vehicle's driving ETA to the drop off point specified in the
request. The ETA includes stopping at any waypoints before the
`dropoff_point` specified in the request. The value will only be populated
when a drop off point is specified in the request. An empty value indicates
an error calculating the ETA.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasVehicleDropoffEta

### clearVehicleDropoffEta

### setVehicleDropoffEta

The complete vehicle's driving ETA to the drop off point specified in the
request. The ETA includes stopping at any waypoints before the
`dropoff_point` specified in the request. The value will only be populated
when a drop off point is specified in the request. An empty value indicates
an error calculating the ETA.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVehiclePickupToDropoffDistanceMeters

The vehicle's driving distance (in meters) from the pickup point
to the drop off point specified in the request. The distance is only
between the two points and does not include the vehicle location or any
other points that must be visited before the vehicle visits either the
pickup point or dropoff point. The value will only be populated when a
`dropoff_point` is specified in the request. An empty value indicates
a failure in calculating the distance from the pickup to
drop off point specified in the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value|null` |   |

### hasVehiclePickupToDropoffDistanceMeters

### clearVehiclePickupToDropoffDistanceMeters

### getVehiclePickupToDropoffDistanceMetersUnwrapped

Returns the unboxed value from `getVehiclePickupToDropoffDistanceMeters()`

The vehicle's driving distance (in meters) from the pickup point
to the drop off point specified in the request. The distance is only
between the two points and does not include the vehicle location or any
other points that must be visited before the vehicle visits either the
pickup point or dropoff point. The value will only be populated when a
`dropoff_point` is specified in the request. An empty value indicates
a failure in calculating the distance from the pickup to
drop off point specified in the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|null` |   |

### setVehiclePickupToDropoffDistanceMeters

The vehicle's driving distance (in meters) from the pickup point
to the drop off point specified in the request. The distance is only
between the two points and does not include the vehicle location or any
other points that must be visited before the vehicle visits either the
pickup point or dropoff point. The value will only be populated when a
`dropoff_point` is specified in the request. An empty value indicates
a failure in calculating the distance from the pickup to
drop off point specified in the request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### setVehiclePickupToDropoffDistanceMetersUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\Int32Value object.

The vehicle's driving distance (in meters) from the pickup point
to the drop off point specified in the request. The distance is only
between the two points and does not include the vehicle location or any
other points that must be visited before the vehicle visits either the
pickup point or dropoff point. The value will only be populated when a
`dropoff_point` is specified in the request. An empty value indicates
a failure in calculating the distance from the pickup to
drop off point specified in the request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|null` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTripType

Required. The trip type of the request that was used to calculate the ETA
to the pickup point.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setTripType

Required. The trip type of the request that was used to calculate the ETA
to the pickup point.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVehicleTripsWaypoints

The ordered list of waypoints used to calculate the ETA. The list
includes vehicle location, the pickup points of active
trips for the vehicle, and the pickup points provided in the
request. An empty list indicates a failure in calculating ETA for the
vehicle.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Waypoint>` |   |

### setVehicleTripsWaypoints

The ordered list of waypoints used to calculate the ETA. The list
includes vehicle location, the pickup points of active
trips for the vehicle, and the pickup points provided in the
request. An empty list indicates a failure in calculating ETA for the
vehicle.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.Waypoint>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVehicleMatchType

Type of the vehicle match.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setVehicleMatchType

Type of the vehicle match.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRequestedOrderedBy

The order requested for sorting vehicle matches. Equivalent to
`ordered_by`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setRequestedOrderedBy

The order requested for sorting vehicle matches. Equivalent to
`ordered_by`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOrderedBy

The order requested for sorting vehicle matches. Equivalent to
`requested_ordered_by`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setOrderedBy

The order requested for sorting vehicle matches. Equivalent to
`requested_ordered_by`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |