# Google Maps FleetEngine Delivery V1 Client - Class JourneySharingInfo (0.5.3)

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

Journey sharing specific fields.

Generated from protobuf message `maps.fleetengine.delivery.v1.Task.JourneySharingInfo`

## Namespace

Google \\ Maps \\ FleetEngine \\ Delivery \\ V1 \\ Task

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ remaining_vehicle_journey_segments` | `array<https://docs.cloud.google.com/php/docs/reference/maps-fleetengine-delivery/latest/V1.VehicleJourneySegment>` Tracking information for the stops that the assigned vehicle will make before it completes this Task. Note that this list can contain stops from other tasks. The first segment, `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), contains route information from the driver's last known location to the upcoming `VehicleStop`. Current route information usually comes from the driver app, except for some cases noted in the documentation for [DeliveryVehicle.current_route_segment](https://docs.cloud.google.com/php/docs/reference/maps-fleetengine-delivery/latest/V1.DeliveryVehicle#_Google_Maps_FleetEngine_Delivery_V1_DeliveryVehicle__getCurrentRouteSegment__). The other segments in `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are populated by Fleet Engine. They provide route information between the remaining `VehicleStops`. |
| `↳ last_location` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine-delivery/latest/V1.DeliveryVehicleLocation` Indicates the vehicle's last reported location of the assigned vehicle. |
| `↳ last_location_snappable` | `bool` Indicates whether the vehicle's lastLocation can be snapped to the `current_route_segment`. This value is False if either `last_location` or `current_route_segment` don't exist. This value is computed by Fleet Engine. Updates from clients are ignored. |

### getRemainingVehicleJourneySegments

Tracking information for the stops that the assigned vehicle will make
before it completes this Task. Note that this list can contain stops
from other tasks.

The first segment,
`Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
contains route information from the driver's last known location to the
upcoming `VehicleStop`. Current route information usually comes from the
driver app, except for some cases noted in the documentation for
[DeliveryVehicle.current_route_segment](https://docs.cloud.google.com/php/docs/reference/maps-fleetengine-delivery/latest/V1.DeliveryVehicle#_Google_Maps_FleetEngine_Delivery_V1_DeliveryVehicle__getCurrentRouteSegment__).
The other segments in
`Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
`Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
populated by Fleet Engine. They provide route information between the
remaining `VehicleStops`.

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

### setRemainingVehicleJourneySegments

Tracking information for the stops that the assigned vehicle will make
before it completes this Task. Note that this list can contain stops
from other tasks.

The first segment,
`Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC)
or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST),
contains route information from the driver's last known location to the
upcoming `VehicleStop`. Current route information usually comes from the
driver app, except for some cases noted in the documentation for
[DeliveryVehicle.current_route_segment](https://docs.cloud.google.com/php/docs/reference/maps-fleetengine-delivery/latest/V1.DeliveryVehicle#_Google_Maps_FleetEngine_Delivery_V1_DeliveryVehicle__getCurrentRouteSegment__).
The other segments in
`Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or
`Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are
populated by Fleet Engine. They provide route information between the
remaining `VehicleStops`.

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

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

### getLastLocation

Indicates the vehicle's last reported location of the assigned vehicle.

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

### hasLastLocation

### clearLastLocation

### setLastLocation

Indicates the vehicle's last reported location of the assigned vehicle.

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

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

### getLastLocationSnappable

Indicates whether the vehicle's lastLocation can be snapped to
the `current_route_segment`. This value is False if either
`last_location` or `current_route_segment` don't exist. This value is
computed by Fleet Engine. Updates from clients are ignored.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setLastLocationSnappable

Indicates whether the vehicle's lastLocation can be snapped to
the `current_route_segment`. This value is False if either
`last_location` or `current_route_segment` don't exist. This value is
computed by Fleet Engine. Updates from clients are ignored.

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

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