| GET,OPTIONS | /v1/pm/resources |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class PmResourcesRequest
{
public Integer Days = null;
public Integer getDays() { return Days; }
public PmResourcesRequest setDays(Integer value) { this.Days = value; return this; }
}
public static class PmResourcesResponse
{
public String FromDate = null;
public String ToDate = null;
public Integer OverbookedCount = null;
public Integer CommittedCount = null;
public Integer ShortfallCount = null;
public ArrayList<PmResEquipment> Equipment = new ArrayList<PmResEquipment>();
public ArrayList<PmResMaterial> Materials = new ArrayList<PmResMaterial>();
public ResponseStatus ResponseStatus = null;
public String getFromDate() { return FromDate; }
public PmResourcesResponse setFromDate(String value) { this.FromDate = value; return this; }
public String getToDate() { return ToDate; }
public PmResourcesResponse setToDate(String value) { this.ToDate = value; return this; }
public Integer getOverbookedCount() { return OverbookedCount; }
public PmResourcesResponse setOverbookedCount(Integer value) { this.OverbookedCount = value; return this; }
public Integer getCommittedCount() { return CommittedCount; }
public PmResourcesResponse setCommittedCount(Integer value) { this.CommittedCount = value; return this; }
public Integer getShortfallCount() { return ShortfallCount; }
public PmResourcesResponse setShortfallCount(Integer value) { this.ShortfallCount = value; return this; }
public ArrayList<PmResEquipment> getEquipment() { return Equipment; }
public PmResourcesResponse setEquipment(ArrayList<PmResEquipment> value) { this.Equipment = value; return this; }
public ArrayList<PmResMaterial> getMaterials() { return Materials; }
public PmResourcesResponse setMaterials(ArrayList<PmResMaterial> value) { this.Materials = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public PmResourcesResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class PmResEquipment
{
public Integer EquipmentID = null;
public String Name = null;
public String EquipmentType = null;
public String SerialNumber = null;
public Integer JobCount = null;
public Boolean Overbooked = null;
public String MaintenanceState = null;
public ArrayList<PmResCommitment> Commitments = new ArrayList<PmResCommitment>();
public Integer getEquipmentID() { return EquipmentID; }
public PmResEquipment setEquipmentID(Integer value) { this.EquipmentID = value; return this; }
public String getName() { return Name; }
public PmResEquipment setName(String value) { this.Name = value; return this; }
public String getEquipmentType() { return EquipmentType; }
public PmResEquipment setEquipmentType(String value) { this.EquipmentType = value; return this; }
public String getSerialNumber() { return SerialNumber; }
public PmResEquipment setSerialNumber(String value) { this.SerialNumber = value; return this; }
public Integer getJobCount() { return JobCount; }
public PmResEquipment setJobCount(Integer value) { this.JobCount = value; return this; }
public Boolean isOverbooked() { return Overbooked; }
public PmResEquipment setOverbooked(Boolean value) { this.Overbooked = value; return this; }
public String getMaintenanceState() { return MaintenanceState; }
public PmResEquipment setMaintenanceState(String value) { this.MaintenanceState = value; return this; }
public ArrayList<PmResCommitment> getCommitments() { return Commitments; }
public PmResEquipment setCommitments(ArrayList<PmResCommitment> value) { this.Commitments = value; return this; }
}
public static class PmResCommitment
{
public String ProjectName = null;
public String JobName = null;
public String StartDate = null;
public String EndDate = null;
public String getProjectName() { return ProjectName; }
public PmResCommitment setProjectName(String value) { this.ProjectName = value; return this; }
public String getJobName() { return JobName; }
public PmResCommitment setJobName(String value) { this.JobName = value; return this; }
public String getStartDate() { return StartDate; }
public PmResCommitment setStartDate(String value) { this.StartDate = value; return this; }
public String getEndDate() { return EndDate; }
public PmResCommitment setEndDate(String value) { this.EndDate = value; return this; }
}
public static class PmResMaterial
{
public Integer MaterialID = null;
public String Name = null;
public String MaterialType = null;
public Integer OnHand = null;
public Integer NeededByJobs = null;
public Integer QtyNeeded = null;
public Boolean Shortfall = null;
public Integer getMaterialID() { return MaterialID; }
public PmResMaterial setMaterialID(Integer value) { this.MaterialID = value; return this; }
public String getName() { return Name; }
public PmResMaterial setName(String value) { this.Name = value; return this; }
public String getMaterialType() { return MaterialType; }
public PmResMaterial setMaterialType(String value) { this.MaterialType = value; return this; }
public Integer getOnHand() { return OnHand; }
public PmResMaterial setOnHand(Integer value) { this.OnHand = value; return this; }
public Integer getNeededByJobs() { return NeededByJobs; }
public PmResMaterial setNeededByJobs(Integer value) { this.NeededByJobs = value; return this; }
public Integer getQtyNeeded() { return QtyNeeded; }
public PmResMaterial setQtyNeeded(Integer value) { this.QtyNeeded = value; return this; }
public Boolean isShortfall() { return Shortfall; }
public PmResMaterial setShortfall(Boolean value) { this.Shortfall = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/pm/resources HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"FromDate":"String","ToDate":"String","OverbookedCount":0,"CommittedCount":0,"ShortfallCount":0,"Equipment":[{"EquipmentID":0,"Name":"String","EquipmentType":"String","SerialNumber":"String","JobCount":0,"Overbooked":false,"MaintenanceState":"String","Commitments":[{"ProjectName":"String","JobName":"String","StartDate":"String","EndDate":"String"}]}],"Materials":[{"MaterialID":0,"Name":"String","MaterialType":"String","OnHand":0,"NeededByJobs":0,"QtyNeeded":0,"Shortfall":false}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}