Reference documentation and code samples for the Google Maps FleetEngine V1 Client class Vehicle.
Vehicle metadata.
Generated from protobuf message maps.fleetengine.v1.Vehicle
Namespace
Google \ Maps \ FleetEngine \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. The unique name for this vehicle. The format is providers/{provider}/vehicles/{vehicle}
.
↳ vehicle_state
int
The vehicle state.
↳ supported_trip_types
array
Trip types supported by this vehicle.
↳ current_trips
array
Output only. List of trip_id
's for trips currently assigned to this vehicle.
↳ last_location
↳ past_locations
array< VehicleLocation
>
Input only. Locations where this vehicle has been in the past that haven't yet been reported to Fleet Engine. This is used in UpdateVehicleRequest
to record locations which were previously unable to be sent to the server. Typically this happens when the vehicle does not have internet connectivity.
↳ maximum_capacity
int
The total numbers of riders this vehicle can carry. The driver is not considered in this value. This value must be greater than or equal to one.
↳ attributes
array< VehicleAttribute
>
List of vehicle attributes. A vehicle can have at most 100 attributes, and each attribute must have a unique key.
↳ vehicle_type
Vehicle\VehicleType
Required. The type of this vehicle. Can be used to filter vehicles in SearchVehicles
results. Also influences ETA and route calculations.
↳ license_plate
↳ route
↳ current_route_segment
string
The polyline specifying the route the driver app intends to take to the next waypoint. This list is also returned in Trip.current_route_segment
for all active trips assigned to the vehicle. Note: This field is intended only for use by the Driver SDK. Decoding is not yet supported.
↳ current_route_segment_traffic
TrafficPolylineData
Input only. Fleet Engine uses this information to improve journey sharing. Note: This field is intended only for use by the Driver SDK.
↳ current_route_segment_version
Google\Protobuf\Timestamp
Output only. Time when current_route_segment
was set. It can be stored by the client and passed in future GetVehicle
requests to prevent returning routes that haven't changed.
↳ current_route_segment_end_point
TripWaypoint
The waypoint where current_route_segment
ends. This can be supplied by drivers on UpdateVehicle
calls either as a full trip waypoint, a waypoint LatLng
, or as the last LatLng
of the current_route_segment
. Fleet Engine will then do its best to interpolate to an actual waypoint if it is not fully specified. This field is ignored in UpdateVehicle
calls unless current_route_segment
is also specified.
↳ remaining_distance_meters
Google\Protobuf\Int32Value
The remaining driving distance for the current_route_segment
. This value is also returned in Trip.remaining_distance_meters
for all active trips assigned to the vehicle. The value is unspecified if the current_route_segment
field is empty.
↳ eta_to_first_waypoint
Google\Protobuf\Timestamp
The ETA to the first entry in the waypoints
field. The value is unspecified if the waypoints
field is empty or the Vehicle.current_route_segment
field is empty. When updating a vehicle, remaining_time_seconds
takes precedence over eta_to_first_waypoint
in the same request.
↳ remaining_time_seconds
Google\Protobuf\Int32Value
Input only. The remaining driving time for the current_route_segment
. The value is unspecified if the waypoints
field is empty or the Vehicle.current_route_segment
field is empty. This value should match eta_to_first_waypoint
- current_time
if all parties are using the same clock. When updating a vehicle, remaining_time_seconds
takes precedence over eta_to_first_waypoint
in the same request.
↳ waypoints
↳ waypoints_version
Google\Protobuf\Timestamp
Output only. Last time the waypoints
field was updated. Clients should cache this value and pass it in GetVehicleRequest
to ensure the waypoints
field is only returned if it is updated.
↳ back_to_back_enabled
bool
Indicates if the driver accepts back-to-back trips. If true
, SearchVehicles
may include the vehicle even if it is currently assigned to a trip. The default value is false
.
↳ navigation_status
int
The vehicle's navigation status.
↳ device_settings
DeviceSettings
Input only. Information about settings in the mobile device being used by the driver.
getName
Output only. The unique name for this vehicle.
The format is providers/{provider}/vehicles/{vehicle}
.
string
setName
Output only. The unique name for this vehicle.
The format is providers/{provider}/vehicles/{vehicle}
.
var
string
$this
getVehicleState
The vehicle state.
int
setVehicleState
The vehicle state.
var
int
$this
getSupportedTripTypes
Trip types supported by this vehicle.
setSupportedTripTypes
Trip types supported by this vehicle.
var
int[]
$this
getCurrentTrips
Output only. List of trip_id
's for trips currently assigned to this
vehicle.
setCurrentTrips
Output only. List of trip_id
's for trips currently assigned to this
vehicle.
var
string[]
$this
getLastLocation
Last reported location of the vehicle.
hasLastLocation
clearLastLocation
setLastLocation
Last reported location of the vehicle.
$this
getPastLocations
Input only. Locations where this vehicle has been in the past that haven't
yet been reported to Fleet Engine. This is used in UpdateVehicleRequest
to record locations which were previously unable to be sent to the server.
Typically this happens when the vehicle does not have internet connectivity.
setPastLocations
Input only. Locations where this vehicle has been in the past that haven't
yet been reported to Fleet Engine. This is used in UpdateVehicleRequest
to record locations which were previously unable to be sent to the server.
Typically this happens when the vehicle does not have internet connectivity.
$this
getMaximumCapacity
The total numbers of riders this vehicle can carry. The driver is not considered in this value. This value must be greater than or equal to one.
int
setMaximumCapacity
The total numbers of riders this vehicle can carry. The driver is not considered in this value. This value must be greater than or equal to one.
var
int
$this
getAttributes
List of vehicle attributes. A vehicle can have at most 100 attributes, and each attribute must have a unique key.
setAttributes
List of vehicle attributes. A vehicle can have at most 100 attributes, and each attribute must have a unique key.
$this
getVehicleType
Required. The type of this vehicle. Can be used to filter vehicles in SearchVehicles
results. Also influences ETA and route calculations.
hasVehicleType
clearVehicleType
setVehicleType
Required. The type of this vehicle. Can be used to filter vehicles in SearchVehicles
results. Also influences ETA and route calculations.
$this
getLicensePlate
License plate information for the vehicle.
hasLicensePlate
clearLicensePlate
setLicensePlate
License plate information for the vehicle.
$this
getRoute
Deprecated: Use Vehicle.waypoints
instead.
setRoute
Deprecated: Use Vehicle.waypoints
instead.
$this
getCurrentRouteSegment
The polyline specifying the route the driver app intends to take to
the next waypoint. This list is also returned in Trip.current_route_segment
for all active trips assigned to the vehicle.
Note: This field is intended only for use by the Driver SDK. Decoding is not yet supported.
string
setCurrentRouteSegment
The polyline specifying the route the driver app intends to take to
the next waypoint. This list is also returned in Trip.current_route_segment
for all active trips assigned to the vehicle.
Note: This field is intended only for use by the Driver SDK. Decoding is not yet supported.
var
string
$this
getCurrentRouteSegmentTraffic
Input only. Fleet Engine uses this information to improve journey sharing.
Note: This field is intended only for use by the Driver SDK.
hasCurrentRouteSegmentTraffic
clearCurrentRouteSegmentTraffic
setCurrentRouteSegmentTraffic
Input only. Fleet Engine uses this information to improve journey sharing.
Note: This field is intended only for use by the Driver SDK.
$this
getCurrentRouteSegmentVersion
Output only. Time when current_route_segment
was set. It can be stored by
the client and passed in future GetVehicle
requests to prevent returning
routes that haven't changed.
hasCurrentRouteSegmentVersion
clearCurrentRouteSegmentVersion
setCurrentRouteSegmentVersion
Output only. Time when current_route_segment
was set. It can be stored by
the client and passed in future GetVehicle
requests to prevent returning
routes that haven't changed.
$this
getCurrentRouteSegmentEndPoint
The waypoint where current_route_segment
ends. This can be supplied by
drivers on UpdateVehicle
calls either as a full trip waypoint, a waypoint LatLng
, or as the last LatLng
of the current_route_segment
. Fleet
Engine will then do its best to interpolate to an actual waypoint if it is
not fully specified. This field is ignored in UpdateVehicle
calls unless current_route_segment
is also specified.
hasCurrentRouteSegmentEndPoint
clearCurrentRouteSegmentEndPoint
setCurrentRouteSegmentEndPoint
The waypoint where current_route_segment
ends. This can be supplied by
drivers on UpdateVehicle
calls either as a full trip waypoint, a waypoint LatLng
, or as the last LatLng
of the current_route_segment
. Fleet
Engine will then do its best to interpolate to an actual waypoint if it is
not fully specified. This field is ignored in UpdateVehicle
calls unless current_route_segment
is also specified.
$this
getRemainingDistanceMeters
The remaining driving distance for the current_route_segment
.
This value is also returned in Trip.remaining_distance_meters
for all
active trips assigned to the vehicle. The value is unspecified if the current_route_segment
field is empty.
hasRemainingDistanceMeters
clearRemainingDistanceMeters
getRemainingDistanceMetersUnwrapped
Returns the unboxed value from getRemainingDistanceMeters()
The remaining driving distance for the current_route_segment
.
This value is also returned in Trip.remaining_distance_meters
for all
active trips assigned to the vehicle. The value is unspecified if the current_route_segment
field is empty.
int|null
setRemainingDistanceMeters
The remaining driving distance for the current_route_segment
.
This value is also returned in Trip.remaining_distance_meters
for all
active trips assigned to the vehicle. The value is unspecified if the current_route_segment
field is empty.
$this
setRemainingDistanceMetersUnwrapped
Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.
The remaining driving distance for the current_route_segment
.
This value is also returned in Trip.remaining_distance_meters
for all
active trips assigned to the vehicle. The value is unspecified if the current_route_segment
field is empty.
var
int|null
$this
getEtaToFirstWaypoint
The ETA to the first entry in the waypoints
field. The value is
unspecified if the waypoints
field is empty or the Vehicle.current_route_segment
field is empty.
When updating a vehicle, remaining_time_seconds
takes precedence over eta_to_first_waypoint
in the same request.
hasEtaToFirstWaypoint
clearEtaToFirstWaypoint
setEtaToFirstWaypoint
The ETA to the first entry in the waypoints
field. The value is
unspecified if the waypoints
field is empty or the Vehicle.current_route_segment
field is empty.
When updating a vehicle, remaining_time_seconds
takes precedence over eta_to_first_waypoint
in the same request.
$this
getRemainingTimeSeconds
Input only. The remaining driving time for the current_route_segment
. The
value is unspecified if the waypoints
field is empty or the Vehicle.current_route_segment
field is empty. This value should match eta_to_first_waypoint
- current_time
if all parties are using the same
clock.
When updating a vehicle, remaining_time_seconds
takes precedence over eta_to_first_waypoint
in the same request.
hasRemainingTimeSeconds
clearRemainingTimeSeconds
getRemainingTimeSecondsUnwrapped
Returns the unboxed value from getRemainingTimeSeconds()
Input only. The remaining driving time for the current_route_segment
. The
value is unspecified if the waypoints
field is empty or the Vehicle.current_route_segment
field is empty. This value should match eta_to_first_waypoint
- current_time
if all parties are using the same
clock.
When updating a vehicle, remaining_time_seconds
takes precedence over eta_to_first_waypoint
in the same request.
int|null
setRemainingTimeSeconds
Input only. The remaining driving time for the current_route_segment
. The
value is unspecified if the waypoints
field is empty or the Vehicle.current_route_segment
field is empty. This value should match eta_to_first_waypoint
- current_time
if all parties are using the same
clock.
When updating a vehicle, remaining_time_seconds
takes precedence over eta_to_first_waypoint
in the same request.
$this
setRemainingTimeSecondsUnwrapped
Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.
Input only. The remaining driving time for the current_route_segment
. The
value is unspecified if the waypoints
field is empty or the Vehicle.current_route_segment
field is empty. This value should match eta_to_first_waypoint
- current_time
if all parties are using the same
clock.
When updating a vehicle, remaining_time_seconds
takes precedence over eta_to_first_waypoint
in the same request.
var
int|null
$this
getWaypoints
The remaining waypoints assigned to this Vehicle.
setWaypoints
The remaining waypoints assigned to this Vehicle.
$this
getWaypointsVersion
Output only. Last time the waypoints
field was updated. Clients should
cache this value and pass it in GetVehicleRequest
to ensure the waypoints
field is only returned if it is updated.
hasWaypointsVersion
clearWaypointsVersion
setWaypointsVersion
Output only. Last time the waypoints
field was updated. Clients should
cache this value and pass it in GetVehicleRequest
to ensure the waypoints
field is only returned if it is updated.
$this
getBackToBackEnabled
Indicates if the driver accepts back-to-back trips. If true
, SearchVehicles
may include the vehicle even if it is currently assigned
to a trip. The default value is false
.
bool
setBackToBackEnabled
Indicates if the driver accepts back-to-back trips. If true
, SearchVehicles
may include the vehicle even if it is currently assigned
to a trip. The default value is false
.
var
bool
$this
getNavigationStatus
The vehicle's navigation status.
int
setNavigationStatus
The vehicle's navigation status.
var
int
$this
getDeviceSettings
Input only. Information about settings in the mobile device being used by the driver.
hasDeviceSettings
clearDeviceSettings
setDeviceSettings
Input only. Information about settings in the mobile device being used by the driver.
$this