| 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 .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PmResourcesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<CommittedCount>0</CommittedCount>
<Equipment>
<PmResEquipment>
<Commitments>
<PmResCommitment>
<EndDate>String</EndDate>
<JobName>String</JobName>
<ProjectName>String</ProjectName>
<StartDate>String</StartDate>
</PmResCommitment>
</Commitments>
<EquipmentID>0</EquipmentID>
<EquipmentType>String</EquipmentType>
<JobCount>0</JobCount>
<MaintenanceState>String</MaintenanceState>
<Name>String</Name>
<Overbooked>false</Overbooked>
<SerialNumber>String</SerialNumber>
</PmResEquipment>
</Equipment>
<FromDate>String</FromDate>
<Materials>
<PmResMaterial>
<MaterialID>0</MaterialID>
<MaterialType>String</MaterialType>
<Name>String</Name>
<NeededByJobs>0</NeededByJobs>
<OnHand>0</OnHand>
<QtyNeeded>0</QtyNeeded>
<Shortfall>false</Shortfall>
</PmResMaterial>
</Materials>
<OverbookedCount>0</OverbookedCount>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<ShortfallCount>0</ShortfallCount>
<ToDate>String</ToDate>
</PmResourcesResponse>