AI-generated Key Takeaways
-
GMTSTask represents an immutable unit of work completed at a vehicle stop, containing information like task ID, provider ID, and vehicle ID.
-
The task's current status is tracked through properties like
taskType,taskState, andtaskOutcome, reflecting its type, execution state, and result. -
Each task has timestamps and location data associated with its outcome, such as
taskOutcomeTimestampandtaskOutcomeWaypoint, and is linked with a source. -
A
trackingIDis provided for easier mapping, allowing users to avoid complex workarounds, and also it holds ataskDuration, which is extra time to perform the task at the location. -
Tasks can be created with specific details using the
initWithTaskIDinitializer, which requires parameters like the task's ID, provider, type, state, outcome, timestamps, location, tracking ID, vehicle, planned location and duration.
GMTSTask
@interface GMTSTask : GMTSImmutableDataAn immutable object representing a unit of work that is completed at a vehicle stop.
-
The ID of the task.
Declaration
Swift
var taskID: String? { get }Objective-C
@property (nonatomic, readonly, nullable) GMTDFleetEngineIDString *taskID; -
The ID associated with the provider.
Declaration
Swift
var providerID: String? { get }Objective-C
@property (nonatomic, readonly, nullable) NSString *providerID; -
The type of current task.
Declaration
Swift
var taskType: GMTSTaskType { get }Objective-C
@property (nonatomic, readonly) GMTSTaskType taskType; -
The current execution state of the task.
Declaration
Swift
var taskState: GMTSTaskState { get }Objective-C
@property (nonatomic, readonly) GMTSTaskState taskState; -
The outcome of the task.
Declaration
Swift
var taskOutcome: GMTSTaskOutcome { get }Objective-C
@property (nonatomic, readonly) GMTSTaskOutcome taskOutcome; -
The timestamp of when the task’s outcome was updated (from server).
Declaration
Swift
var taskOutcomeTimestamp: TimeInterval { get }Objective-C
@property (nonatomic, readonly) NSTimeInterval taskOutcomeTimestamp; -
Waypoint where the task’s outcome was set.
Declaration
Swift
var taskOutcomeWaypoint: GMSNavigationWaypoint? { get }Objective-C
@property (nonatomic, readonly, nullable) GMSNavigationWaypoint *taskOutcomeWaypoint; -
Indicates the source of the location information in the taskOutcomeWaypoint.
Declaration
Swift
var taskOutcomeLocationSource: GMTSTaskOutcomeLocationSource { get }Objective-C
@property (nonatomic, readonly) GMTSTaskOutcomeLocationSource taskOutcomeLocationSource; -
Lets you store an ID so that the customer can avoid unnecessary or complicated mapping.
Declaration
Swift
var trackingID: String? { get }Objective-C
@property (nonatomic, readonly, nullable) GMTDFleetEngineIDString *trackingID; -
The ID of the vehicle performing this task.
Declaration
Swift
var vehicleID: String? { get }Objective-C
@property (nonatomic, readonly, nullable) GMTDFleetEngineIDString *vehicleID; -
The waypoint where the task is to be completed.
Declaration
Swift
var plannedWaypoint: GMSNavigationWaypoint? { get }Objective-C
@property (nonatomic, readonly, nullable) GMSNavigationWaypoint *plannedWaypoint; -
Additional time to perform an action at this location.
Declaration
Swift
var taskDuration: TimeInterval { get }Objective-C
@property (nonatomic, readonly) NSTimeInterval taskDuration; -
-initWithTaskID:providerID:taskType:taskState:taskOutcome:taskOutcomeTimestamp:taskOutcomeWaypoint:taskOutcomeLocationSource:trackingID:vehicleID:plannedWaypoint:taskDuration:
Instantiates an instance of this class.
Declaration
Swift
init(taskID: String?, providerID: String?, taskType: GMTSTaskType, taskState: GMTSTaskState, taskOutcome: GMTSTaskOutcome, taskOutcomeTimestamp: TimeInterval, taskOutcomeWaypoint: GMSNavigationWaypoint?, taskOutcomeLocationSource: GMTSTaskOutcomeLocationSource, trackingID: String?, vehicleID: String?, plannedWaypoint: GMSNavigationWaypoint?, taskDuration: TimeInterval)Objective-C
- (nonnull instancetype) initWithTaskID:(nullable GMTDFleetEngineIDString *)taskID providerID:(nullable NSString *)providerID taskType:(GMTSTaskType)taskType taskState:(GMTSTaskState)taskState taskOutcome:(GMTSTaskOutcome)taskOutcome taskOutcomeTimestamp:(NSTimeInterval)taskOutcomeTimestamp taskOutcomeWaypoint: (nullable GMSNavigationWaypoint *)taskOutcomeWaypoint taskOutcomeLocationSource: (GMTSTaskOutcomeLocationSource)taskOutcomeLocationSource trackingID:(nullable GMTDFleetEngineIDString *)trackingID vehicleID:(nullable GMTDFleetEngineIDString *)vehicleID plannedWaypoint:(nullable GMSNavigationWaypoint *)plannedWaypoint taskDuration:(NSTimeInterval)taskDuration;Parameters
taskIDThe ID of a task.
providerIDThe ID associated with the provider.
taskTypeThe type of task.
taskStateThe current execution state of the task.
taskOutcomeThe outcome of the task.
taskOutcomeTimestampThe time when the task’s outcome was set.
taskOutcomeWaypointWaypoint where the task’s outcome was set.
taskOutcomeLocationSourceIndicates whether the value of the task_outcome_location came from unnecessary or complicated mapping.
trackingIDLets you store an ID so that the customer can avoid an unnecessary or complicated mapping.
vehicleIDThe ID of the vehicle performing this Task.
plannedWaypointThe waypoint where the task will be completed.
taskDurationAdditional time to perform an action at this location.
-
Unavailable
Use the designated initializer instead.
Declaration
Objective-C
- (nonnull instancetype)init;