| POST,OPTIONS | /v1/fieldlog/submit |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class FieldLogSubmitRequest
{
public Integer ProjectId = null;
public Integer JobId = null;
public String LogDate = null;
public String Notes = null;
public String Weather = null;
public Integer TempF = null;
public Double WeatherDelayHours = null;
public String ToolboxTalk = null;
public Boolean IncidentOccurred = null;
public String IncidentType = null;
public String IncidentNote = null;
public Integer IncidentPhotoCount = null;
public ArrayList<FieldLogCrew> Crew = new ArrayList<FieldLogCrew>();
public ArrayList<FieldLogEquipment> Equipment = new ArrayList<FieldLogEquipment>();
public ArrayList<FieldLogSub> Subs = new ArrayList<FieldLogSub>();
public ArrayList<FieldLogQuantity> Quantities = new ArrayList<FieldLogQuantity>();
public ArrayList<FieldLogDelivery> Deliveries = new ArrayList<FieldLogDelivery>();
public ArrayList<FieldLogConsumed> Consumed = new ArrayList<FieldLogConsumed>();
public Integer getProjectId() { return ProjectId; }
public FieldLogSubmitRequest setProjectId(Integer value) { this.ProjectId = value; return this; }
public Integer getJobId() { return JobId; }
public FieldLogSubmitRequest setJobId(Integer value) { this.JobId = value; return this; }
public String getLogDate() { return LogDate; }
public FieldLogSubmitRequest setLogDate(String value) { this.LogDate = value; return this; }
public String getNotes() { return Notes; }
public FieldLogSubmitRequest setNotes(String value) { this.Notes = value; return this; }
public String getWeather() { return Weather; }
public FieldLogSubmitRequest setWeather(String value) { this.Weather = value; return this; }
public Integer getTempF() { return TempF; }
public FieldLogSubmitRequest setTempF(Integer value) { this.TempF = value; return this; }
public Double getWeatherDelayHours() { return WeatherDelayHours; }
public FieldLogSubmitRequest setWeatherDelayHours(Double value) { this.WeatherDelayHours = value; return this; }
public String getToolboxTalk() { return ToolboxTalk; }
public FieldLogSubmitRequest setToolboxTalk(String value) { this.ToolboxTalk = value; return this; }
public Boolean isIncidentOccurred() { return IncidentOccurred; }
public FieldLogSubmitRequest setIncidentOccurred(Boolean value) { this.IncidentOccurred = value; return this; }
public String getIncidentType() { return IncidentType; }
public FieldLogSubmitRequest setIncidentType(String value) { this.IncidentType = value; return this; }
public String getIncidentNote() { return IncidentNote; }
public FieldLogSubmitRequest setIncidentNote(String value) { this.IncidentNote = value; return this; }
public Integer getIncidentPhotoCount() { return IncidentPhotoCount; }
public FieldLogSubmitRequest setIncidentPhotoCount(Integer value) { this.IncidentPhotoCount = value; return this; }
public ArrayList<FieldLogCrew> getCrew() { return Crew; }
public FieldLogSubmitRequest setCrew(ArrayList<FieldLogCrew> value) { this.Crew = value; return this; }
public ArrayList<FieldLogEquipment> getEquipment() { return Equipment; }
public FieldLogSubmitRequest setEquipment(ArrayList<FieldLogEquipment> value) { this.Equipment = value; return this; }
public ArrayList<FieldLogSub> getSubs() { return Subs; }
public FieldLogSubmitRequest setSubs(ArrayList<FieldLogSub> value) { this.Subs = value; return this; }
public ArrayList<FieldLogQuantity> getQuantities() { return Quantities; }
public FieldLogSubmitRequest setQuantities(ArrayList<FieldLogQuantity> value) { this.Quantities = value; return this; }
public ArrayList<FieldLogDelivery> getDeliveries() { return Deliveries; }
public FieldLogSubmitRequest setDeliveries(ArrayList<FieldLogDelivery> value) { this.Deliveries = value; return this; }
public ArrayList<FieldLogConsumed> getConsumed() { return Consumed; }
public FieldLogSubmitRequest setConsumed(ArrayList<FieldLogConsumed> value) { this.Consumed = value; return this; }
}
public static class FieldLogCrew
{
public Integer ContactId = null;
public String StatusCode = null;
public Double Hours = null;
public String CostCode = null;
public String SplitCostCode = null;
public Double SplitHours = null;
public Integer getContactId() { return ContactId; }
public FieldLogCrew setContactId(Integer value) { this.ContactId = value; return this; }
public String getStatusCode() { return StatusCode; }
public FieldLogCrew setStatusCode(String value) { this.StatusCode = value; return this; }
public Double getHours() { return Hours; }
public FieldLogCrew setHours(Double value) { this.Hours = value; return this; }
public String getCostCode() { return CostCode; }
public FieldLogCrew setCostCode(String value) { this.CostCode = value; return this; }
public String getSplitCostCode() { return SplitCostCode; }
public FieldLogCrew setSplitCostCode(String value) { this.SplitCostCode = value; return this; }
public Double getSplitHours() { return SplitHours; }
public FieldLogCrew setSplitHours(Double value) { this.SplitHours = value; return this; }
}
public static class FieldLogEquipment
{
public Integer EquipmentId = null;
public String EquipmentKey = null;
public String StatusCode = null;
public Double EngineHours = null;
public Double FuelGallons = null;
public String IdleReason = null;
public String DownNote = null;
public Integer getEquipmentId() { return EquipmentId; }
public FieldLogEquipment setEquipmentId(Integer value) { this.EquipmentId = value; return this; }
public String getEquipmentKey() { return EquipmentKey; }
public FieldLogEquipment setEquipmentKey(String value) { this.EquipmentKey = value; return this; }
public String getStatusCode() { return StatusCode; }
public FieldLogEquipment setStatusCode(String value) { this.StatusCode = value; return this; }
public Double getEngineHours() { return EngineHours; }
public FieldLogEquipment setEngineHours(Double value) { this.EngineHours = value; return this; }
public Double getFuelGallons() { return FuelGallons; }
public FieldLogEquipment setFuelGallons(Double value) { this.FuelGallons = value; return this; }
public String getIdleReason() { return IdleReason; }
public FieldLogEquipment setIdleReason(String value) { this.IdleReason = value; return this; }
public String getDownNote() { return DownNote; }
public FieldLogEquipment setDownNote(String value) { this.DownNote = value; return this; }
}
public static class FieldLogSub
{
public Integer ContactId = null;
public String Name = null;
public String Trade = null;
public Integer HeadCount = null;
public Double HoursPer = null;
public String SourceCode = null;
public String Reporter = null;
public String Note = null;
public Boolean Verified = null;
public String StateCode = null;
public Integer getContactId() { return ContactId; }
public FieldLogSub setContactId(Integer value) { this.ContactId = value; return this; }
public String getName() { return Name; }
public FieldLogSub setName(String value) { this.Name = value; return this; }
public String getTrade() { return Trade; }
public FieldLogSub setTrade(String value) { this.Trade = value; return this; }
public Integer getHeadCount() { return HeadCount; }
public FieldLogSub setHeadCount(Integer value) { this.HeadCount = value; return this; }
public Double getHoursPer() { return HoursPer; }
public FieldLogSub setHoursPer(Double value) { this.HoursPer = value; return this; }
public String getSourceCode() { return SourceCode; }
public FieldLogSub setSourceCode(String value) { this.SourceCode = value; return this; }
public String getReporter() { return Reporter; }
public FieldLogSub setReporter(String value) { this.Reporter = value; return this; }
public String getNote() { return Note; }
public FieldLogSub setNote(String value) { this.Note = value; return this; }
public Boolean isVerified() { return Verified; }
public FieldLogSub setVerified(Boolean value) { this.Verified = value; return this; }
public String getStateCode() { return StateCode; }
public FieldLogSub setStateCode(String value) { this.StateCode = value; return this; }
}
public static class FieldLogQuantity
{
public String PayItemCode = null;
public String Name = null;
public String Unit = null;
public Double TodayQty = null;
public String getPayItemCode() { return PayItemCode; }
public FieldLogQuantity setPayItemCode(String value) { this.PayItemCode = value; return this; }
public String getName() { return Name; }
public FieldLogQuantity setName(String value) { this.Name = value; return this; }
public String getUnit() { return Unit; }
public FieldLogQuantity setUnit(String value) { this.Unit = value; return this; }
public Double getTodayQty() { return TodayQty; }
public FieldLogQuantity setTodayQty(Double value) { this.TodayQty = value; return this; }
}
public static class FieldLogDelivery
{
public String Po = null;
public String Material = null;
public String StatusCode = null;
public String QtyReceived = null;
public String getPo() { return Po; }
public FieldLogDelivery setPo(String value) { this.Po = value; return this; }
public String getMaterial() { return Material; }
public FieldLogDelivery setMaterial(String value) { this.Material = value; return this; }
public String getStatusCode() { return StatusCode; }
public FieldLogDelivery setStatusCode(String value) { this.StatusCode = value; return this; }
public String getQtyReceived() { return QtyReceived; }
public FieldLogDelivery setQtyReceived(String value) { this.QtyReceived = value; return this; }
}
public static class FieldLogConsumed
{
public String Name = null;
public String Qty = null;
public String Use = null;
public String getName() { return Name; }
public FieldLogConsumed setName(String value) { this.Name = value; return this; }
public String getQty() { return Qty; }
public FieldLogConsumed setQty(String value) { this.Qty = value; return this; }
public String getUse() { return Use; }
public FieldLogConsumed setUse(String value) { this.Use = value; return this; }
}
public static class FieldLogSubmitResponse
{
public ResponseStatus ResponseStatus = null;
public Integer FieldLogId = null;
public UUID FieldLogUID = null;
public String Status = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public FieldLogSubmitResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public Integer getFieldLogId() { return FieldLogId; }
public FieldLogSubmitResponse setFieldLogId(Integer value) { this.FieldLogId = value; return this; }
public UUID getFieldLogUID() { return FieldLogUID; }
public FieldLogSubmitResponse setFieldLogUID(UUID value) { this.FieldLogUID = value; return this; }
public String getStatus() { return Status; }
public FieldLogSubmitResponse setStatus(String value) { this.Status = value; return this; }
}
}
Java FieldLogSubmitRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/fieldlog/submit HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ProjectId":0,"JobId":0,"LogDate":"String","Notes":"String","Weather":"String","TempF":0,"WeatherDelayHours":0,"ToolboxTalk":"String","IncidentOccurred":false,"IncidentType":"String","IncidentNote":"String","IncidentPhotoCount":0,"Crew":[{"ContactId":0,"StatusCode":"String","Hours":0,"CostCode":"String","SplitCostCode":"String","SplitHours":0}],"Equipment":[{"EquipmentId":0,"EquipmentKey":"String","StatusCode":"String","EngineHours":0,"FuelGallons":0,"IdleReason":"String","DownNote":"String"}],"Subs":[{"ContactId":0,"Name":"String","Trade":"String","HeadCount":0,"HoursPer":0,"SourceCode":"String","Reporter":"String","Note":"String","Verified":false,"StateCode":"String"}],"Quantities":[{"PayItemCode":"String","Name":"String","Unit":"String","TodayQty":0}],"Deliveries":[{"Po":"String","Material":"String","StatusCode":"String","QtyReceived":"String"}],"Consumed":[{"Name":"String","Qty":"String","Use":"String"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"FieldLogId":0,"FieldLogUID":"00000000000000000000000000000000","Status":"String"}