Reference documentation and code samples for the Google Maps FleetEngine V1 Client class Trip.
Trip metadata.
Generated from protobuf message maps.fleetengine.v1.Trip
Namespace
Google \ Maps \ FleetEngine \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. In the format "providers/{provider}/trips/{trip}"
↳ vehicle_id
string
ID of the vehicle making this trip.
↳ trip_status
int
Current status of the trip.
↳ trip_type
int
The type of the trip.
↳ pickup_point
↳ actual_pickup_point
StopLocation
Input only. The actual location when and where customer was picked up. This field is for provider to provide feedback on actual pickup information.
↳ actual_pickup_arrival_point
StopLocation
Input only. The actual time and location of the driver arrival at the pickup point. This field is for provider to provide feedback on actual arrival information at the pickup point.
↳ pickup_time
Google\Protobuf\Timestamp
Output only. Either the estimated future time when the rider(s) will be picked up, or the actual time when they were picked up.
↳ intermediate_destinations
array< TerminalLocation
>
Intermediate stops in order that the trip requests (in addition to pickup and dropoff). Initially this will not be supported for shared trips.
↳ intermediate_destinations_version
Google\Protobuf\Timestamp
Indicates the last time the intermediate_destinations
was modified. Your server should cache this value and pass it in UpdateTripRequest
when update intermediate_destination_index
to ensure the intermediate_destinations
is not changed.
↳ intermediate_destination_index
int
When TripStatus
is ENROUTE_TO_INTERMEDIATE_DESTINATION
, a number between [0..N-1] indicating which intermediate destination the vehicle will cross next. When TripStatus
is ARRIVED_AT_INTERMEDIATE_DESTINATION
, a number between [0..N-1] indicating which intermediate destination the vehicle is at. The provider sets this value. If there are no intermediate_destinations
, this field is ignored.
↳ actual_intermediate_destination_arrival_points
array< StopLocation
>
Input only. The actual time and location of the driver's arrival at an intermediate destination. This field is for provider to provide feedback on actual arrival information at intermediate destinations.
↳ actual_intermediate_destinations
array< StopLocation
>
Input only. The actual time and location when and where the customer was picked up from an intermediate destination. This field is for provider to provide feedback on actual pickup information at intermediate destinations.
↳ dropoff_point
↳ actual_dropoff_point
StopLocation
Input only. The actual time and location when and where customer was dropped off. This field is for provider to provide feedback on actual dropoff information.
↳ dropoff_time
Google\Protobuf\Timestamp
Output only. Either the estimated future time when the rider(s) will be dropped off at the final destination, or the actual time when they were dropped off.
↳ remaining_waypoints
array< TripWaypoint
>
Output only. The full path from the current location to the dropoff point, inclusive. This path could include waypoints from other trips.
↳ vehicle_waypoints
array< TripWaypoint
>
This field supports manual ordering of the waypoints for the trip. It contains all of the remaining waypoints for the assigned vehicle, as well as the pickup and drop-off waypoints for this trip. If the trip hasn't been assigned to a vehicle, then Fleet Engine ignores this field. For privacy reasons, this field is only populated by the server on UpdateTrip
and CreateTrip
calls, NOT on GetTrip
calls.
↳ route
array< Google\Type\LatLng
>
Output only. Anticipated route for this trip to the first entry in remaining_waypoints. Note that the first waypoint may belong to a different trip.
↳ current_route_segment
string
Output only. An encoded path to the next waypoint. Note: This field is intended only for use by the Driver SDK and Consumer SDK. Decoding is not yet supported.
↳ current_route_segment_version
Google\Protobuf\Timestamp
Output only. Indicates the last time the route was modified. Note: This field is intended only for use by the Driver SDK and Consumer SDK.
↳ current_route_segment_traffic
ConsumableTrafficPolyline
Output only. Indicates the traffic conditions along the current_route_segment
when they're available. Note: This field is intended only for use by the Driver SDK and Consumer SDK.
↳ current_route_segment_traffic_version
Google\Protobuf\Timestamp
Output only. Indicates the last time the current_route_segment_traffic
was modified. Note: This field is intended only for use by the Driver SDK and Consumer SDK.
↳ current_route_segment_end_point
↳ remaining_distance_meters
Google\Protobuf\Int32Value
Output only. The remaining driving distance in the current_route_segment
field. The value is unspecified if the trip is not assigned to a vehicle, or the trip is completed or cancelled.
↳ eta_to_first_waypoint
Google\Protobuf\Timestamp
Output only. The ETA to the next waypoint (the first entry in the remaining_waypoints
field). The value is unspecified if the trip is not assigned to a vehicle, or the trip is inactive (completed or cancelled).
↳ remaining_time_to_first_waypoint
Google\Protobuf\Duration
Output only. The duration from when the Trip data is returned to the time in Trip.eta_to_first_waypoint
. The value is unspecified if the trip is not assigned to a vehicle, or the trip is inactive (completed or cancelled).
↳ remaining_waypoints_version
Google\Protobuf\Timestamp
Output only. Indicates the last time that remaining_waypoints
was changed (a waypoint was added, removed, or changed).
↳ remaining_waypoints_route_version
Google\Protobuf\Timestamp
Output only. Indicates the last time the remaining_waypoints.path_to_waypoint
and remaining_waypoints.traffic_to_waypoint
were modified. Your client app should cache this value and pass it in GetTripRequest
to ensure the paths and traffic for remaining_waypoints
are only returned if updated.
↳ number_of_passengers
int
Immutable. Indicates the number of passengers on this trip and does not include the driver. A vehicle must have available capacity to be returned in a SearchVehicles
response.
↳ last_location
↳ last_location_snappable
bool
Output only. Indicates whether the vehicle's last_location
can be snapped to the current_route_segment. False if last_location
or current_route_segment
doesn't exist. It is computed by Fleet Engine. Any update from clients will be ignored.
↳ view
int
The subset of Trip fields that are populated and how they should be interpreted.
↳ attributes
getName
Output only. In the format "providers/{provider}/trips/{trip}"
string
setName
Output only. In the format "providers/{provider}/trips/{trip}"
var
string
$this
getVehicleId
ID of the vehicle making this trip.
string
setVehicleId
ID of the vehicle making this trip.
var
string
$this
getTripStatus
Current status of the trip.
int
setTripStatus
Current status of the trip.
var
int
$this
getTripType
The type of the trip.
int
setTripType
The type of the trip.
var
int
$this
getPickupPoint
Location where customer indicates they will be picked up.
hasPickupPoint
clearPickupPoint
setPickupPoint
Location where customer indicates they will be picked up.
$this
getActualPickupPoint
Input only. The actual location when and where customer was picked up.
This field is for provider to provide feedback on actual pickup information.
hasActualPickupPoint
clearActualPickupPoint
setActualPickupPoint
Input only. The actual location when and where customer was picked up.
This field is for provider to provide feedback on actual pickup information.
$this
getActualPickupArrivalPoint
Input only. The actual time and location of the driver arrival at the pickup point.
This field is for provider to provide feedback on actual arrival information at the pickup point.
hasActualPickupArrivalPoint
clearActualPickupArrivalPoint
setActualPickupArrivalPoint
Input only. The actual time and location of the driver arrival at the pickup point.
This field is for provider to provide feedback on actual arrival information at the pickup point.
$this
getPickupTime
Output only. Either the estimated future time when the rider(s) will be picked up, or the actual time when they were picked up.
hasPickupTime
clearPickupTime
setPickupTime
Output only. Either the estimated future time when the rider(s) will be picked up, or the actual time when they were picked up.
$this
getIntermediateDestinations
Intermediate stops in order that the trip requests (in addition to pickup and dropoff). Initially this will not be supported for shared trips.
setIntermediateDestinations
Intermediate stops in order that the trip requests (in addition to pickup and dropoff). Initially this will not be supported for shared trips.
$this
getIntermediateDestinationsVersion
Indicates the last time the intermediate_destinations
was modified.
Your server should cache this value and pass it in UpdateTripRequest
when update intermediate_destination_index
to ensure the intermediate_destinations
is not changed.
hasIntermediateDestinationsVersion
clearIntermediateDestinationsVersion
setIntermediateDestinationsVersion
Indicates the last time the intermediate_destinations
was modified.
Your server should cache this value and pass it in UpdateTripRequest
when update intermediate_destination_index
to ensure the intermediate_destinations
is not changed.
$this
getIntermediateDestinationIndex
When TripStatus
is ENROUTE_TO_INTERMEDIATE_DESTINATION
, a number
between [0..N-1] indicating which intermediate destination the vehicle will
cross next. When TripStatus
is ARRIVED_AT_INTERMEDIATE_DESTINATION
, a
number between [0..N-1] indicating which intermediate destination the
vehicle is at. The provider sets this value. If there are no intermediate_destinations
, this field is ignored.
int
setIntermediateDestinationIndex
When TripStatus
is ENROUTE_TO_INTERMEDIATE_DESTINATION
, a number
between [0..N-1] indicating which intermediate destination the vehicle will
cross next. When TripStatus
is ARRIVED_AT_INTERMEDIATE_DESTINATION
, a
number between [0..N-1] indicating which intermediate destination the
vehicle is at. The provider sets this value. If there are no intermediate_destinations
, this field is ignored.
var
int
$this
getActualIntermediateDestinationArrivalPoints
Input only. The actual time and location of the driver's arrival at an intermediate destination.
This field is for provider to provide feedback on actual arrival information at intermediate destinations.
setActualIntermediateDestinationArrivalPoints
Input only. The actual time and location of the driver's arrival at an intermediate destination.
This field is for provider to provide feedback on actual arrival information at intermediate destinations.
$this
getActualIntermediateDestinations
Input only. The actual time and location when and where the customer was picked up from an intermediate destination. This field is for provider to provide feedback on actual pickup information at intermediate destinations.
setActualIntermediateDestinations
Input only. The actual time and location when and where the customer was picked up from an intermediate destination. This field is for provider to provide feedback on actual pickup information at intermediate destinations.
$this
getDropoffPoint
Location where customer indicates they will be dropped off.
hasDropoffPoint
clearDropoffPoint
setDropoffPoint
Location where customer indicates they will be dropped off.
$this
getActualDropoffPoint
Input only. The actual time and location when and where customer was dropped off. This field is for provider to provide feedback on actual dropoff information.
hasActualDropoffPoint
clearActualDropoffPoint
setActualDropoffPoint
Input only. The actual time and location when and where customer was dropped off. This field is for provider to provide feedback on actual dropoff information.
$this
getDropoffTime
Output only. Either the estimated future time when the rider(s) will be dropped off at the final destination, or the actual time when they were dropped off.
hasDropoffTime
clearDropoffTime
setDropoffTime
Output only. Either the estimated future time when the rider(s) will be dropped off at the final destination, or the actual time when they were dropped off.
$this
getRemainingWaypoints
Output only. The full path from the current location to the dropoff point, inclusive. This path could include waypoints from other trips.
setRemainingWaypoints
Output only. The full path from the current location to the dropoff point, inclusive. This path could include waypoints from other trips.
$this
getVehicleWaypoints
This field supports manual ordering of the waypoints for the trip. It
contains all of the remaining waypoints for the assigned vehicle, as well
as the pickup and drop-off waypoints for this trip. If the trip hasn't been
assigned to a vehicle, then Fleet Engine ignores this field. For privacy
reasons, this field is only populated by the server on UpdateTrip
and CreateTrip
calls, NOT on GetTrip
calls.
setVehicleWaypoints
This field supports manual ordering of the waypoints for the trip. It
contains all of the remaining waypoints for the assigned vehicle, as well
as the pickup and drop-off waypoints for this trip. If the trip hasn't been
assigned to a vehicle, then Fleet Engine ignores this field. For privacy
reasons, this field is only populated by the server on UpdateTrip
and CreateTrip
calls, NOT on GetTrip
calls.
$this
getRoute
Output only. Anticipated route for this trip to the first entry in remaining_waypoints. Note that the first waypoint may belong to a different trip.
setRoute
Output only. Anticipated route for this trip to the first entry in remaining_waypoints. Note that the first waypoint may belong to a different trip.
$this
getCurrentRouteSegment
Output only. An encoded path to the next waypoint.
Note: This field is intended only for use by the Driver SDK and Consumer SDK. Decoding is not yet supported.
string
setCurrentRouteSegment
Output only. An encoded path to the next waypoint.
Note: This field is intended only for use by the Driver SDK and Consumer SDK. Decoding is not yet supported.
var
string
$this
getCurrentRouteSegmentVersion
Output only. Indicates the last time the route was modified.
Note: This field is intended only for use by the Driver SDK and Consumer SDK.
hasCurrentRouteSegmentVersion
clearCurrentRouteSegmentVersion
setCurrentRouteSegmentVersion
Output only. Indicates the last time the route was modified.
Note: This field is intended only for use by the Driver SDK and Consumer SDK.
$this
getCurrentRouteSegmentTraffic
Output only. Indicates the traffic conditions along the current_route_segment
when they're available.
Note: This field is intended only for use by the Driver SDK and Consumer SDK.
hasCurrentRouteSegmentTraffic
clearCurrentRouteSegmentTraffic
setCurrentRouteSegmentTraffic
Output only. Indicates the traffic conditions along the current_route_segment
when they're available.
Note: This field is intended only for use by the Driver SDK and Consumer SDK.
$this
getCurrentRouteSegmentTrafficVersion
Output only. Indicates the last time the current_route_segment_traffic
was modified.
Note: This field is intended only for use by the Driver SDK and Consumer SDK.
hasCurrentRouteSegmentTrafficVersion
clearCurrentRouteSegmentTrafficVersion
setCurrentRouteSegmentTrafficVersion
Output only. Indicates the last time the current_route_segment_traffic
was modified.
Note: This field is intended only for use by the Driver SDK and Consumer SDK.
$this
getCurrentRouteSegmentEndPoint
Output only. The waypoint where current_route_segment
ends.
hasCurrentRouteSegmentEndPoint
clearCurrentRouteSegmentEndPoint
setCurrentRouteSegmentEndPoint
Output only. The waypoint where current_route_segment
ends.
$this
getRemainingDistanceMeters
Output only. The remaining driving distance in the current_route_segment
field. The value is unspecified if the trip is not assigned to a vehicle,
or the trip is completed or cancelled.
hasRemainingDistanceMeters
clearRemainingDistanceMeters
getRemainingDistanceMetersUnwrapped
Returns the unboxed value from getRemainingDistanceMeters()
Output only. The remaining driving distance in the current_route_segment
field. The value is unspecified if the trip is not assigned to a vehicle,
or the trip is completed or cancelled.
int|null
setRemainingDistanceMeters
Output only. The remaining driving distance in the current_route_segment
field. The value is unspecified if the trip is not assigned to a vehicle,
or the trip is completed or cancelled.
$this
setRemainingDistanceMetersUnwrapped
Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.
Output only. The remaining driving distance in the current_route_segment
field. The value is unspecified if the trip is not assigned to a vehicle,
or the trip is completed or cancelled.
var
int|null
$this
getEtaToFirstWaypoint
Output only. The ETA to the next waypoint (the first entry in the remaining_waypoints
field). The value is unspecified if the trip is not
assigned to a vehicle, or the trip is inactive (completed or cancelled).
hasEtaToFirstWaypoint
clearEtaToFirstWaypoint
setEtaToFirstWaypoint
Output only. The ETA to the next waypoint (the first entry in the remaining_waypoints
field). The value is unspecified if the trip is not
assigned to a vehicle, or the trip is inactive (completed or cancelled).
$this
getRemainingTimeToFirstWaypoint
Output only. The duration from when the Trip data is returned to the time
in Trip.eta_to_first_waypoint
. The value is unspecified if the trip is
not assigned to a vehicle, or the trip is inactive (completed or
cancelled).
hasRemainingTimeToFirstWaypoint
clearRemainingTimeToFirstWaypoint
setRemainingTimeToFirstWaypoint
Output only. The duration from when the Trip data is returned to the time
in Trip.eta_to_first_waypoint
. The value is unspecified if the trip is
not assigned to a vehicle, or the trip is inactive (completed or
cancelled).
$this
getRemainingWaypointsVersion
Output only. Indicates the last time that remaining_waypoints
was changed
(a waypoint was added, removed, or changed).
hasRemainingWaypointsVersion
clearRemainingWaypointsVersion
setRemainingWaypointsVersion
Output only. Indicates the last time that remaining_waypoints
was changed
(a waypoint was added, removed, or changed).
$this
getRemainingWaypointsRouteVersion
Output only. Indicates the last time the remaining_waypoints.path_to_waypoint
and remaining_waypoints.traffic_to_waypoint
were modified. Your client app
should cache this value and pass it in GetTripRequest
to ensure the
paths and traffic for remaining_waypoints
are only returned if updated.
hasRemainingWaypointsRouteVersion
clearRemainingWaypointsRouteVersion
setRemainingWaypointsRouteVersion
Output only. Indicates the last time the remaining_waypoints.path_to_waypoint
and remaining_waypoints.traffic_to_waypoint
were modified. Your client app
should cache this value and pass it in GetTripRequest
to ensure the
paths and traffic for remaining_waypoints
are only returned if updated.
$this
getNumberOfPassengers
Immutable. Indicates the number of passengers on this trip and does not
include the driver. A vehicle must have available capacity to be returned
in a SearchVehicles
response.
int
setNumberOfPassengers
Immutable. Indicates the number of passengers on this trip and does not
include the driver. A vehicle must have available capacity to be returned
in a SearchVehicles
response.
var
int
$this
getLastLocation
Output only. Indicates the last reported location of the vehicle along the route.
hasLastLocation
clearLastLocation
setLastLocation
Output only. Indicates the last reported location of the vehicle along the route.
$this
getLastLocationSnappable
Output only. Indicates whether the vehicle's last_location
can be snapped
to the current_route_segment. False if last_location
or current_route_segment
doesn't exist.
It is computed by Fleet Engine. Any update from clients will be ignored.
bool
setLastLocationSnappable
Output only. Indicates whether the vehicle's last_location
can be snapped
to the current_route_segment. False if last_location
or current_route_segment
doesn't exist.
It is computed by Fleet Engine. Any update from clients will be ignored.
var
bool
$this
getView
The subset of Trip fields that are populated and how they should be interpreted.
int
setView
The subset of Trip fields that are populated and how they should be interpreted.
var
int
$this
getAttributes
A list of custom Trip attributes. Each attribute must have a unique key.
setAttributes
A list of custom Trip attributes. Each attribute must have a unique key.
$this