| POST | /{Workspace}/DriveTimeBatch |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class DriveTimeBatch
{
public ArrayList<DriveTime> DriveTimes = null;
public String Workspace = null;
public ArrayList<DriveTime> getDriveTimes() { return DriveTimes; }
public DriveTimeBatch setDriveTimes(ArrayList<DriveTime> value) { this.DriveTimes = value; return this; }
public String getWorkspace() { return Workspace; }
public DriveTimeBatch setWorkspace(String value) { this.Workspace = value; return this; }
}
public static class DriveTime
{
public String Workspace = null;
public Location StartLoc = null;
public Location EndLoc = null;
public Double Duration = null;
public Double Distance = null;
public String Error = null;
public String UserId = null;
public String EndScheduleId = null;
public Integer TimeBetweenSchedules = null;
public String getWorkspace() { return Workspace; }
public DriveTime setWorkspace(String value) { this.Workspace = value; return this; }
public Location getStartLoc() { return StartLoc; }
public DriveTime setStartLoc(Location value) { this.StartLoc = value; return this; }
public Location getEndLoc() { return EndLoc; }
public DriveTime setEndLoc(Location value) { this.EndLoc = value; return this; }
public Double getDuration() { return Duration; }
public DriveTime setDuration(Double value) { this.Duration = value; return this; }
public Double getDistance() { return Distance; }
public DriveTime setDistance(Double value) { this.Distance = value; return this; }
public String getError() { return Error; }
public DriveTime setError(String value) { this.Error = value; return this; }
public String getUserId() { return UserId; }
public DriveTime setUserId(String value) { this.UserId = value; return this; }
public String getEndScheduleId() { return EndScheduleId; }
public DriveTime setEndScheduleId(String value) { this.EndScheduleId = value; return this; }
public Integer getTimeBetweenSchedules() { return TimeBetweenSchedules; }
public DriveTime setTimeBetweenSchedules(Integer value) { this.TimeBetweenSchedules = 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; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/DriveTimeBatch HTTP/1.1
Host: dev.fieldsquared.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
DriveTimes:
[
{
Workspace: String,
StartLoc:
{
y: 0,
x: 0
},
EndLoc:
{
y: 0,
x: 0
},
Duration: 0,
Distance: 0,
Error: String,
UserId: String,
EndScheduleId: String,
TimeBetweenSchedules: 0
}
],
Workspace: String
}