@geoapify/route-planner-sdk
Version:
TypeScript SDK for the Geoapify Route Planner API. Supports route optimization, delivery planning, and timeline visualization in browser and Node.js
47 lines (46 loc) • 944 B
JavaScript
export class RouteAction {
constructor(raw) {
if (raw) {
this.raw = raw;
}
else {
throw new Error("ActionResponseData is undefined");
}
}
getRaw() {
return this.raw;
}
getType() {
return this.raw.type;
}
getStartTime() {
return this.raw.start_time;
}
getDuration() {
return this.raw.duration;
}
getShipmentIndex() {
return this.raw.shipment_index;
}
getShipmentId() {
return this.raw.shipment_id;
}
getLocationIndex() {
return this.raw.location_index;
}
getLocationId() {
return this.raw.location_id;
}
getJobIndex() {
return this.raw.job_index;
}
getJobId() {
return this.raw.job_id;
}
getActionIndex() {
return this.raw.index;
}
getWaypointIndex() {
return this.raw.waypoint_index;
}
}