| GET,POST,DELETE | /{Workspace}/Route/{ObjectId} | ||
|---|---|---|---|
| GET | /{Workspace}/Route/{UserId}/{Date} |
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* Contains the data for a route within the system.
*/
public static class Route
{
public String Workspace = null;
public String AssignedWorkspace = null;
public String ObjectId = null;
public String VersionId = null;
public String BasedOn = null;
public String Created = null;
public String LastUpdated = null;
public String Date = null;
public String StartTime = null;
public String EndTime = null;
public String UserId = null;
public String Name = null;
public String Type = null;
public ArrayList<RouteSegment> Segments = null;
public Integer TotalTime = null;
public Double TotalDistance = null;
public ArrayList<RouteNode> Nodes = null;
public String getWorkspace() { return Workspace; }
public Route setWorkspace(String value) { this.Workspace = value; return this; }
public String getAssignedWorkspace() { return AssignedWorkspace; }
public Route setAssignedWorkspace(String value) { this.AssignedWorkspace = value; return this; }
public String getObjectId() { return ObjectId; }
public Route setObjectId(String value) { this.ObjectId = value; return this; }
public String getVersionId() { return VersionId; }
public Route setVersionId(String value) { this.VersionId = value; return this; }
public String getBasedOn() { return BasedOn; }
public Route setBasedOn(String value) { this.BasedOn = value; return this; }
public String getCreated() { return Created; }
public Route setCreated(String value) { this.Created = value; return this; }
public String getLastUpdated() { return LastUpdated; }
public Route setLastUpdated(String value) { this.LastUpdated = value; return this; }
public String getDate() { return Date; }
public Route setDate(String value) { this.Date = value; return this; }
public String getStartTime() { return StartTime; }
public Route setStartTime(String value) { this.StartTime = value; return this; }
public String getEndTime() { return EndTime; }
public Route setEndTime(String value) { this.EndTime = value; return this; }
public String getUserId() { return UserId; }
public Route setUserId(String value) { this.UserId = value; return this; }
public String getName() { return Name; }
public Route setName(String value) { this.Name = value; return this; }
public String getType() { return Type; }
public Route setType(String value) { this.Type = value; return this; }
public ArrayList<RouteSegment> getSegments() { return Segments; }
public Route setSegments(ArrayList<RouteSegment> value) { this.Segments = value; return this; }
public Integer getTotalTime() { return TotalTime; }
public Route setTotalTime(Integer value) { this.TotalTime = value; return this; }
public Double getTotalDistance() { return TotalDistance; }
public Route setTotalDistance(Double value) { this.TotalDistance = value; return this; }
public ArrayList<RouteNode> getNodes() { return Nodes; }
public Route setNodes(ArrayList<RouteNode> value) { this.Nodes = value; return this; }
}
public static class RouteSegment
{
public Integer Time = null;
public Double Distance = null;
public String Start = null;
public String End = null;
public ArrayList<Location> Geometry = null;
public ArrayList<String> DrivingDirections = null;
public RouteNode EndNode = null;
public Integer getTime() { return Time; }
public RouteSegment setTime(Integer value) { this.Time = value; return this; }
public Double getDistance() { return Distance; }
public RouteSegment setDistance(Double value) { this.Distance = value; return this; }
public String getStart() { return Start; }
public RouteSegment setStart(String value) { this.Start = value; return this; }
public String getEnd() { return End; }
public RouteSegment setEnd(String value) { this.End = value; return this; }
public ArrayList<Location> getGeometry() { return Geometry; }
public RouteSegment setGeometry(ArrayList<Location> value) { this.Geometry = value; return this; }
public ArrayList<String> getDrivingDirections() { return DrivingDirections; }
public RouteSegment setDrivingDirections(ArrayList<String> value) { this.DrivingDirections = value; return this; }
public RouteNode getEndNode() { return EndNode; }
public RouteSegment setEndNode(RouteNode value) { this.EndNode = 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 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 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 .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/Route/{ObjectId} HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<Route xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.MapRoute">
<AssignedWorkspace>String</AssignedWorkspace>
<BasedOn>String</BasedOn>
<Created>String</Created>
<Date>String</Date>
<EndTime>String</EndTime>
<LastUpdated>String</LastUpdated>
<Name>String</Name>
<Nodes>
<RouteNode>
<Ancestors xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
<d4p1:string>String</d4p1:string>
</Ancestors>
<Class xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</Class>
<ObjectId xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</ObjectId>
<Type xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</Type>
<VersionId xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</VersionId>
<Location xmlns:d4p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">
<d4p1:x>0</d4p1:x>
<d4p1:y>0</d4p1:y>
</Location>
<Name>String</Name>
<Schedule xmlns:d4p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Schedules">
<d4p1:BasedOn>String</d4p1:BasedOn>
<d4p1:Data xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringanyType>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value />
</d5p1:KeyValueOfstringanyType>
</d4p1:Data>
<d4p1:End>String</d4p1:End>
<d4p1:ObjectId>String</d4p1:ObjectId>
<d4p1:Start>String</d4p1:Start>
<d4p1:Teams xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</d4p1:Teams>
<d4p1:TimeZone>String</d4p1:TimeZone>
<d4p1:Users xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</d4p1:Users>
<d4p1:VersionId>String</d4p1:VersionId>
<d4p1:Workspace>String</d4p1:Workspace>
</Schedule>
<StopTime>0</StopTime>
</RouteNode>
</Nodes>
<ObjectId>String</ObjectId>
<Segments>
<RouteSegment>
<Distance>0</Distance>
<DrivingDirections xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</DrivingDirections>
<End>String</End>
<EndNode>
<Ancestors xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
<d5p1:string>String</d5p1:string>
</Ancestors>
<Class xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</Class>
<ObjectId xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</ObjectId>
<Type xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</Type>
<VersionId xmlns="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">String</VersionId>
<Location xmlns:d5p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">
<d5p1:x>0</d5p1:x>
<d5p1:y>0</d5p1:y>
</Location>
<Name>String</Name>
<Schedule xmlns:d5p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Schedules">
<d5p1:BasedOn>String</d5p1:BasedOn>
<d5p1:Data xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:KeyValueOfstringanyType>
<d6p1:Key>String</d6p1:Key>
<d6p1:Value />
</d6p1:KeyValueOfstringanyType>
</d5p1:Data>
<d5p1:End>String</d5p1:End>
<d5p1:ObjectId>String</d5p1:ObjectId>
<d5p1:Start>String</d5p1:Start>
<d5p1:Teams xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:string>String</d6p1:string>
</d5p1:Teams>
<d5p1:TimeZone>String</d5p1:TimeZone>
<d5p1:Users xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:string>String</d6p1:string>
</d5p1:Users>
<d5p1:VersionId>String</d5p1:VersionId>
<d5p1:Workspace>String</d5p1:Workspace>
</Schedule>
<StopTime>0</StopTime>
</EndNode>
<Geometry xmlns:d4p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">
<d4p1:Location>
<d4p1:x>0</d4p1:x>
<d4p1:y>0</d4p1:y>
</d4p1:Location>
</Geometry>
<Start>String</Start>
<Time>0</Time>
</RouteSegment>
</Segments>
<StartTime>String</StartTime>
<Type>String</Type>
<UserId>String</UserId>
<VersionId>String</VersionId>
<Workspace>String</Workspace>
</Route>