| GET,OPTIONS | /v1/pm/job/{JobID} |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class PmJobRequest
{
public Integer JobID = null;
public Integer getJobID() { return JobID; }
public PmJobRequest setJobID(Integer value) { this.JobID = value; return this; }
}
public static class PmJobResponse
{
public PmJob Job = null;
public ResponseStatus ResponseStatus = null;
public PmJob getJob() { return Job; }
public PmJobResponse setJob(PmJob value) { this.Job = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public PmJobResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class PmJob
{
public Integer JobID = null;
public String Name = null;
public String Description = null;
public String Status = null;
public String StartDate = null;
public String EndDate = null;
public Integer CrewCount = null;
public Double BudgetedHours = null;
public Integer EquipmentCount = null;
public Integer MaterialCount = null;
public Double CrewCost = null;
public Double EquipCost = null;
public Double MatCost = null;
public Double Cost = null;
public Boolean NoCrew = null;
public Boolean EquipConflict = null;
public Boolean MaterialGap = null;
public Integer ReadyPct = null;
public String Priority = null;
public ArrayList<String> Tags = new ArrayList<String>();
public ArrayList<PmJobCrew> Crew = new ArrayList<PmJobCrew>();
public ArrayList<PmJobResource> Equipment = new ArrayList<PmJobResource>();
public ArrayList<PmJobResource> Materials = new ArrayList<PmJobResource>();
public Integer getJobID() { return JobID; }
public PmJob setJobID(Integer value) { this.JobID = value; return this; }
public String getName() { return Name; }
public PmJob setName(String value) { this.Name = value; return this; }
public String getDescription() { return Description; }
public PmJob setDescription(String value) { this.Description = value; return this; }
public String getStatus() { return Status; }
public PmJob setStatus(String value) { this.Status = value; return this; }
public String getStartDate() { return StartDate; }
public PmJob setStartDate(String value) { this.StartDate = value; return this; }
public String getEndDate() { return EndDate; }
public PmJob setEndDate(String value) { this.EndDate = value; return this; }
public Integer getCrewCount() { return CrewCount; }
public PmJob setCrewCount(Integer value) { this.CrewCount = value; return this; }
public Double getBudgetedHours() { return BudgetedHours; }
public PmJob setBudgetedHours(Double value) { this.BudgetedHours = value; return this; }
public Integer getEquipmentCount() { return EquipmentCount; }
public PmJob setEquipmentCount(Integer value) { this.EquipmentCount = value; return this; }
public Integer getMaterialCount() { return MaterialCount; }
public PmJob setMaterialCount(Integer value) { this.MaterialCount = value; return this; }
public Double getCrewCost() { return CrewCost; }
public PmJob setCrewCost(Double value) { this.CrewCost = value; return this; }
public Double getEquipCost() { return EquipCost; }
public PmJob setEquipCost(Double value) { this.EquipCost = value; return this; }
public Double getMatCost() { return MatCost; }
public PmJob setMatCost(Double value) { this.MatCost = value; return this; }
public Double getCost() { return Cost; }
public PmJob setCost(Double value) { this.Cost = value; return this; }
public Boolean isNoCrew() { return NoCrew; }
public PmJob setNoCrew(Boolean value) { this.NoCrew = value; return this; }
public Boolean isEquipConflict() { return EquipConflict; }
public PmJob setEquipConflict(Boolean value) { this.EquipConflict = value; return this; }
public Boolean isMaterialGap() { return MaterialGap; }
public PmJob setMaterialGap(Boolean value) { this.MaterialGap = value; return this; }
public Integer getReadyPct() { return ReadyPct; }
public PmJob setReadyPct(Integer value) { this.ReadyPct = value; return this; }
public String getPriority() { return Priority; }
public PmJob setPriority(String value) { this.Priority = value; return this; }
public ArrayList<String> getTags() { return Tags; }
public PmJob setTags(ArrayList<String> value) { this.Tags = value; return this; }
public ArrayList<PmJobCrew> getCrew() { return Crew; }
public PmJob setCrew(ArrayList<PmJobCrew> value) { this.Crew = value; return this; }
public ArrayList<PmJobResource> getEquipment() { return Equipment; }
public PmJob setEquipment(ArrayList<PmJobResource> value) { this.Equipment = value; return this; }
public ArrayList<PmJobResource> getMaterials() { return Materials; }
public PmJob setMaterials(ArrayList<PmJobResource> value) { this.Materials = value; return this; }
}
public static class PmJobCrew
{
public Integer ContactID = null;
public String Name = null;
public Double Rate = null;
public Double BudgetedHours = null;
public Boolean IsOpen = null;
public Integer getContactID() { return ContactID; }
public PmJobCrew setContactID(Integer value) { this.ContactID = value; return this; }
public String getName() { return Name; }
public PmJobCrew setName(String value) { this.Name = value; return this; }
public Double getRate() { return Rate; }
public PmJobCrew setRate(Double value) { this.Rate = value; return this; }
public Double getBudgetedHours() { return BudgetedHours; }
public PmJobCrew setBudgetedHours(Double value) { this.BudgetedHours = value; return this; }
public Boolean getIsOpen() { return IsOpen; }
public PmJobCrew setIsOpen(Boolean value) { this.IsOpen = value; return this; }
}
public static class PmJobResource
{
public Integer Id = null;
public String Name = null;
public Double Amount = null;
public Integer Qty = null;
public String Unit = null;
public Integer getId() { return Id; }
public PmJobResource setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public PmJobResource setName(String value) { this.Name = value; return this; }
public Double getAmount() { return Amount; }
public PmJobResource setAmount(Double value) { this.Amount = value; return this; }
public Integer getQty() { return Qty; }
public PmJobResource setQty(Integer value) { this.Qty = value; return this; }
public String getUnit() { return Unit; }
public PmJobResource setUnit(String value) { this.Unit = value; return this; }
}
}
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.
GET /v1/pm/job/{JobID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Job":{"JobID":0,"Name":"String","Description":"String","Status":"String","StartDate":"String","EndDate":"String","CrewCount":0,"BudgetedHours":0,"EquipmentCount":0,"MaterialCount":0,"CrewCost":0,"EquipCost":0,"MatCost":0,"Cost":0,"NoCrew":false,"EquipConflict":false,"MaterialGap":false,"ReadyPct":0,"Priority":"String","Tags":["String"],"Crew":[{"ContactID":0,"Name":"String","Rate":0,"BudgetedHours":0,"IsOpen":false}],"Equipment":[{"Id":0,"Name":"String","Amount":0,"Qty":0,"Unit":"String"}],"Materials":[{"Id":0,"Name":"String","Amount":0,"Qty":0,"Unit":"String"}]},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}