| POST | /{Workspace}/ProposeRoute |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class ProposeRouteRequest
{
public String Workspace = null;
public ArrayList<RouteNode> Nodes = null;
public Boolean AllowReorder = null;
public Location StartLocation = null;
public Location EndLocation = null;
public Boolean ShortestDistance = null;
public String StartTime = null;
public Boolean StartClockAtFirstNode = null;
public Integer RoundStartTimes = null;
public Integer TransitionTime = null;
public String LunchStart = null;
public Integer LunchDuration = null;
public Integer Time = null;
public Integer RealTime = null;
public Double Distance = null;
public String getWorkspace() { return Workspace; }
public ProposeRouteRequest setWorkspace(String value) { this.Workspace = value; return this; }
public ArrayList<RouteNode> getNodes() { return Nodes; }
public ProposeRouteRequest setNodes(ArrayList<RouteNode> value) { this.Nodes = value; return this; }
public Boolean isAllowReorder() { return AllowReorder; }
public ProposeRouteRequest setAllowReorder(Boolean value) { this.AllowReorder = value; return this; }
public Location getStartLocation() { return StartLocation; }
public ProposeRouteRequest setStartLocation(Location value) { this.StartLocation = value; return this; }
public Location getEndLocation() { return EndLocation; }
public ProposeRouteRequest setEndLocation(Location value) { this.EndLocation = value; return this; }
public Boolean isShortestDistance() { return ShortestDistance; }
public ProposeRouteRequest setShortestDistance(Boolean value) { this.ShortestDistance = value; return this; }
public String getStartTime() { return StartTime; }
public ProposeRouteRequest setStartTime(String value) { this.StartTime = value; return this; }
public Boolean isStartClockAtFirstNode() { return StartClockAtFirstNode; }
public ProposeRouteRequest setStartClockAtFirstNode(Boolean value) { this.StartClockAtFirstNode = value; return this; }
public Integer getRoundStartTimes() { return RoundStartTimes; }
public ProposeRouteRequest setRoundStartTimes(Integer value) { this.RoundStartTimes = value; return this; }
public Integer getTransitionTime() { return TransitionTime; }
public ProposeRouteRequest setTransitionTime(Integer value) { this.TransitionTime = value; return this; }
public String getLunchStart() { return LunchStart; }
public ProposeRouteRequest setLunchStart(String value) { this.LunchStart = value; return this; }
public Integer getLunchDuration() { return LunchDuration; }
public ProposeRouteRequest setLunchDuration(Integer value) { this.LunchDuration = value; return this; }
public Integer getTime() { return Time; }
public ProposeRouteRequest setTime(Integer value) { this.Time = value; return this; }
public Integer getRealTime() { return RealTime; }
public ProposeRouteRequest setRealTime(Integer value) { this.RealTime = value; return this; }
public Double getDistance() { return Distance; }
public ProposeRouteRequest setDistance(Double value) { this.Distance = value; return this; }
}
public static class RouteNode extends ClassedItem
{
public Location Location = null;
public Integer StopTime = null;
public Schedule Schedule = null;
public String Name = null;
public Location getLocation() { return Location; }
public RouteNode setLocation(Location value) { this.Location = value; return this; }
public Integer getStopTime() { return StopTime; }
public RouteNode setStopTime(Integer value) { this.StopTime = value; return this; }
public Schedule getSchedule() { return Schedule; }
public RouteNode setSchedule(Schedule value) { this.Schedule = value; return this; }
public String getName() { return Name; }
public RouteNode setName(String value) { this.Name = value; return this; }
}
public static class ClassedItem
{
public String ObjectId = null;
public String Class = null;
public String VersionId = null;
public ArrayList<String> Ancestors = null;
public String Type = null;
public String getObjectId() { return ObjectId; }
public ClassedItem setObjectId(String value) { this.ObjectId = value; return this; }
public String getClass() { return Class; }
public ClassedItem setClass(String value) { this.Class = value; return this; }
public String getVersionId() { return VersionId; }
public ClassedItem setVersionId(String value) { this.VersionId = value; return this; }
public ArrayList<String> getAncestors() { return Ancestors; }
public ClassedItem setAncestors(ArrayList<String> value) { this.Ancestors = value; return this; }
public String getType() { return Type; }
public ClassedItem setType(String value) { this.Type = value; return this; }
}
public static class Location
{
public Double y = null;
public Double x = null;
public Double getY() { return y; }
public Location setY(Double value) { this.y = value; return this; }
public Double getX() { return x; }
public Location setX(Double value) { this.x = value; return this; }
}
public static class Schedule
{
public String Workspace = null;
public String ObjectId = null;
public String VersionId = null;
public String BasedOn = null;
public String Start = null;
public String End = null;
public String TimeZone = null;
public ArrayList<String> Users = null;
public ArrayList<String> Teams = null;
public HashMap<String,Object> Data = null;
public String getWorkspace() { return Workspace; }
public Schedule setWorkspace(String value) { this.Workspace = value; return this; }
public String getObjectId() { return ObjectId; }
public Schedule setObjectId(String value) { this.ObjectId = value; return this; }
public String getVersionId() { return VersionId; }
public Schedule setVersionId(String value) { this.VersionId = value; return this; }
public String getBasedOn() { return BasedOn; }
public Schedule setBasedOn(String value) { this.BasedOn = value; return this; }
public String getStart() { return Start; }
public Schedule setStart(String value) { this.Start = value; return this; }
public String getEnd() { return End; }
public Schedule setEnd(String value) { this.End = value; return this; }
public String getTimeZone() { return TimeZone; }
public Schedule setTimeZone(String value) { this.TimeZone = value; return this; }
public ArrayList<String> getUsers() { return Users; }
public Schedule setUsers(ArrayList<String> value) { this.Users = value; return this; }
public ArrayList<String> getTeams() { return Teams; }
public Schedule setTeams(ArrayList<String> value) { this.Teams = value; return this; }
public HashMap<String,Object> getData() { return Data; }
public Schedule setData(HashMap<String,Object> value) { this.Data = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/ProposeRoute HTTP/1.1
Host: dev.fieldsquared.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Workspace":"String","Nodes":[{"Location":{"y":0,"x":0},"StopTime":0,"Schedule":{"Workspace":"String","ObjectId":"String","VersionId":"String","BasedOn":"String","Start":"String","End":"String","TimeZone":"String","Users":["String"],"Teams":["String"],"Data":{"String":{}}},"Name":"String","ObjectId":"String","Class":"String","VersionId":"String","Ancestors":["String"],"Type":"String"}],"AllowReorder":false,"StartLocation":{"y":0,"x":0},"EndLocation":{"y":0,"x":0},"ShortestDistance":false,"StartTime":"String","StartClockAtFirstNode":false,"RoundStartTimes":0,"TransitionTime":0,"LunchStart":"String","LunchDuration":0,"Time":0,"RealTime":0,"Distance":0}