| GET,OPTIONS | /v1/pm/project/{Uid} |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class PmProjectDetailRequest
{
public String Uid = null;
public String getUid() { return Uid; }
public PmProjectDetailRequest setUid(String value) { this.Uid = value; return this; }
}
public static class PmProjectDetail
{
public Integer ProjectID = null;
public String ProjectUID = null;
public String Name = null;
public String Client = null;
public String ProjectType = null;
public String Status = null;
public String Branch = null;
public String StartDate = null;
public String EndDate = null;
public String Description = null;
public PmFinance Finance = null;
public PmReadiness Readiness = null;
public ArrayList<PmJob> Jobs = new ArrayList<PmJob>();
public ArrayList<PmEquipmentRow> Equipment = new ArrayList<PmEquipmentRow>();
public ArrayList<PmMaterialRow> Materials = new ArrayList<PmMaterialRow>();
public ArrayList<PmCalendarBar> Calendar = new ArrayList<PmCalendarBar>();
public ArrayList<PmCatalogItem> ProjectStatuses = new ArrayList<PmCatalogItem>();
public ResponseStatus ResponseStatus = null;
public Integer getProjectID() { return ProjectID; }
public PmProjectDetail setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getProjectUID() { return ProjectUID; }
public PmProjectDetail setProjectUID(String value) { this.ProjectUID = value; return this; }
public String getName() { return Name; }
public PmProjectDetail setName(String value) { this.Name = value; return this; }
public String getClient() { return Client; }
public PmProjectDetail setClient(String value) { this.Client = value; return this; }
public String getProjectType() { return ProjectType; }
public PmProjectDetail setProjectType(String value) { this.ProjectType = value; return this; }
public String getStatus() { return Status; }
public PmProjectDetail setStatus(String value) { this.Status = value; return this; }
public String getBranch() { return Branch; }
public PmProjectDetail setBranch(String value) { this.Branch = value; return this; }
public String getStartDate() { return StartDate; }
public PmProjectDetail setStartDate(String value) { this.StartDate = value; return this; }
public String getEndDate() { return EndDate; }
public PmProjectDetail setEndDate(String value) { this.EndDate = value; return this; }
public String getDescription() { return Description; }
public PmProjectDetail setDescription(String value) { this.Description = value; return this; }
public PmFinance getFinance() { return Finance; }
public PmProjectDetail setFinance(PmFinance value) { this.Finance = value; return this; }
public PmReadiness getReadiness() { return Readiness; }
public PmProjectDetail setReadiness(PmReadiness value) { this.Readiness = value; return this; }
public ArrayList<PmJob> getJobs() { return Jobs; }
public PmProjectDetail setJobs(ArrayList<PmJob> value) { this.Jobs = value; return this; }
public ArrayList<PmEquipmentRow> getEquipment() { return Equipment; }
public PmProjectDetail setEquipment(ArrayList<PmEquipmentRow> value) { this.Equipment = value; return this; }
public ArrayList<PmMaterialRow> getMaterials() { return Materials; }
public PmProjectDetail setMaterials(ArrayList<PmMaterialRow> value) { this.Materials = value; return this; }
public ArrayList<PmCalendarBar> getCalendar() { return Calendar; }
public PmProjectDetail setCalendar(ArrayList<PmCalendarBar> value) { this.Calendar = value; return this; }
public ArrayList<PmCatalogItem> getProjectStatuses() { return ProjectStatuses; }
public PmProjectDetail setProjectStatuses(ArrayList<PmCatalogItem> value) { this.ProjectStatuses = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public PmProjectDetail setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class PmFinance
{
public Double Budget = null;
public Double Spent = null;
public Double EstimatedCost = null;
public Double CrewCost = null;
public Double EquipCost = null;
public Double MatCost = null;
public Double Variance = null;
public Integer HealthPct = null;
public Integer SpentPct = null;
public Integer ProgressPct = null;
public Double getBudget() { return Budget; }
public PmFinance setBudget(Double value) { this.Budget = value; return this; }
public Double getSpent() { return Spent; }
public PmFinance setSpent(Double value) { this.Spent = value; return this; }
public Double getEstimatedCost() { return EstimatedCost; }
public PmFinance setEstimatedCost(Double value) { this.EstimatedCost = value; return this; }
public Double getCrewCost() { return CrewCost; }
public PmFinance setCrewCost(Double value) { this.CrewCost = value; return this; }
public Double getEquipCost() { return EquipCost; }
public PmFinance setEquipCost(Double value) { this.EquipCost = value; return this; }
public Double getMatCost() { return MatCost; }
public PmFinance setMatCost(Double value) { this.MatCost = value; return this; }
public Double getVariance() { return Variance; }
public PmFinance setVariance(Double value) { this.Variance = value; return this; }
public Integer getHealthPct() { return HealthPct; }
public PmFinance setHealthPct(Integer value) { this.HealthPct = value; return this; }
public Integer getSpentPct() { return SpentPct; }
public PmFinance setSpentPct(Integer value) { this.SpentPct = value; return this; }
public Integer getProgressPct() { return ProgressPct; }
public PmFinance setProgressPct(Integer value) { this.ProgressPct = value; return this; }
}
public static class PmReadiness
{
public Integer JobsNoCrew = null;
public Integer OpenRoles = null;
public Integer EquipmentConflicts = null;
public Integer MaterialGaps = null;
public Integer TotalGaps = null;
public Integer ReadyPct = null;
public Integer getJobsNoCrew() { return JobsNoCrew; }
public PmReadiness setJobsNoCrew(Integer value) { this.JobsNoCrew = value; return this; }
public Integer getOpenRoles() { return OpenRoles; }
public PmReadiness setOpenRoles(Integer value) { this.OpenRoles = value; return this; }
public Integer getEquipmentConflicts() { return EquipmentConflicts; }
public PmReadiness setEquipmentConflicts(Integer value) { this.EquipmentConflicts = value; return this; }
public Integer getMaterialGaps() { return MaterialGaps; }
public PmReadiness setMaterialGaps(Integer value) { this.MaterialGaps = value; return this; }
public Integer getTotalGaps() { return TotalGaps; }
public PmReadiness setTotalGaps(Integer value) { this.TotalGaps = value; return this; }
public Integer getReadyPct() { return ReadyPct; }
public PmReadiness setReadyPct(Integer value) { this.ReadyPct = 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 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 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 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 static class PmEquipmentRow
{
public Integer EquipmentID = null;
public String Name = null;
public String EquipmentType = null;
public String SerialNumber = null;
public String UsedByJobs = null;
public Boolean Available = null;
public ArrayList<PmConflict> Conflicts = new ArrayList<PmConflict>();
public Integer MaintenanceIntervalDays = null;
public String LastServiceDate = null;
public String NextServiceDate = null;
public String MaintenanceState = null;
public Integer getEquipmentID() { return EquipmentID; }
public PmEquipmentRow setEquipmentID(Integer value) { this.EquipmentID = value; return this; }
public String getName() { return Name; }
public PmEquipmentRow setName(String value) { this.Name = value; return this; }
public String getEquipmentType() { return EquipmentType; }
public PmEquipmentRow setEquipmentType(String value) { this.EquipmentType = value; return this; }
public String getSerialNumber() { return SerialNumber; }
public PmEquipmentRow setSerialNumber(String value) { this.SerialNumber = value; return this; }
public String getUsedByJobs() { return UsedByJobs; }
public PmEquipmentRow setUsedByJobs(String value) { this.UsedByJobs = value; return this; }
public Boolean isAvailable() { return Available; }
public PmEquipmentRow setAvailable(Boolean value) { this.Available = value; return this; }
public ArrayList<PmConflict> getConflicts() { return Conflicts; }
public PmEquipmentRow setConflicts(ArrayList<PmConflict> value) { this.Conflicts = value; return this; }
public Integer getMaintenanceIntervalDays() { return MaintenanceIntervalDays; }
public PmEquipmentRow setMaintenanceIntervalDays(Integer value) { this.MaintenanceIntervalDays = value; return this; }
public String getLastServiceDate() { return LastServiceDate; }
public PmEquipmentRow setLastServiceDate(String value) { this.LastServiceDate = value; return this; }
public String getNextServiceDate() { return NextServiceDate; }
public PmEquipmentRow setNextServiceDate(String value) { this.NextServiceDate = value; return this; }
public String getMaintenanceState() { return MaintenanceState; }
public PmEquipmentRow setMaintenanceState(String value) { this.MaintenanceState = value; return this; }
}
public static class PmConflict
{
public String ProjectName = null;
public String JobName = null;
public String StartDate = null;
public String EndDate = null;
public String getProjectName() { return ProjectName; }
public PmConflict setProjectName(String value) { this.ProjectName = value; return this; }
public String getJobName() { return JobName; }
public PmConflict setJobName(String value) { this.JobName = value; return this; }
public String getStartDate() { return StartDate; }
public PmConflict setStartDate(String value) { this.StartDate = value; return this; }
public String getEndDate() { return EndDate; }
public PmConflict setEndDate(String value) { this.EndDate = value; return this; }
}
public static class PmMaterialRow
{
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 Integer ToOrder = null;
public Double UnitCost = null;
public Double LineCost = null;
public Integer ProjectMaterialID = null;
public Integer StatusID = null;
public String Status = null;
public String Supplier = null;
public String OrderDate = null;
public String DeliveryDate = null;
public Boolean Shortfall = null;
public Integer getMaterialID() { return MaterialID; }
public PmMaterialRow setMaterialID(Integer value) { this.MaterialID = value; return this; }
public String getName() { return Name; }
public PmMaterialRow setName(String value) { this.Name = value; return this; }
public String getMaterialType() { return MaterialType; }
public PmMaterialRow setMaterialType(String value) { this.MaterialType = value; return this; }
public Integer getOnHand() { return OnHand; }
public PmMaterialRow setOnHand(Integer value) { this.OnHand = value; return this; }
public Integer getNeededByJobs() { return NeededByJobs; }
public PmMaterialRow setNeededByJobs(Integer value) { this.NeededByJobs = value; return this; }
public Integer getQtyNeeded() { return QtyNeeded; }
public PmMaterialRow setQtyNeeded(Integer value) { this.QtyNeeded = value; return this; }
public Integer getToOrder() { return ToOrder; }
public PmMaterialRow setToOrder(Integer value) { this.ToOrder = value; return this; }
public Double getUnitCost() { return UnitCost; }
public PmMaterialRow setUnitCost(Double value) { this.UnitCost = value; return this; }
public Double getLineCost() { return LineCost; }
public PmMaterialRow setLineCost(Double value) { this.LineCost = value; return this; }
public Integer getProjectMaterialID() { return ProjectMaterialID; }
public PmMaterialRow setProjectMaterialID(Integer value) { this.ProjectMaterialID = value; return this; }
public Integer getStatusID() { return StatusID; }
public PmMaterialRow setStatusID(Integer value) { this.StatusID = value; return this; }
public String getStatus() { return Status; }
public PmMaterialRow setStatus(String value) { this.Status = value; return this; }
public String getSupplier() { return Supplier; }
public PmMaterialRow setSupplier(String value) { this.Supplier = value; return this; }
public String getOrderDate() { return OrderDate; }
public PmMaterialRow setOrderDate(String value) { this.OrderDate = value; return this; }
public String getDeliveryDate() { return DeliveryDate; }
public PmMaterialRow setDeliveryDate(String value) { this.DeliveryDate = value; return this; }
public Boolean isShortfall() { return Shortfall; }
public PmMaterialRow setShortfall(Boolean value) { this.Shortfall = value; return this; }
}
public static class PmCalendarBar
{
public Integer JobID = null;
public String Name = null;
public String StartDate = null;
public String EndDate = null;
public String Status = null;
public Integer getJobID() { return JobID; }
public PmCalendarBar setJobID(Integer value) { this.JobID = value; return this; }
public String getName() { return Name; }
public PmCalendarBar setName(String value) { this.Name = value; return this; }
public String getStartDate() { return StartDate; }
public PmCalendarBar setStartDate(String value) { this.StartDate = value; return this; }
public String getEndDate() { return EndDate; }
public PmCalendarBar setEndDate(String value) { this.EndDate = value; return this; }
public String getStatus() { return Status; }
public PmCalendarBar setStatus(String value) { this.Status = value; return this; }
}
public static class PmCatalogItem
{
public Integer Id = null;
public String Name = null;
public Double Amount = null;
public Integer getId() { return Id; }
public PmCatalogItem setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public PmCatalogItem setName(String value) { this.Name = value; return this; }
public Double getAmount() { return Amount; }
public PmCatalogItem setAmount(Double value) { this.Amount = value; return this; }
}
}
Java PmProjectDetailRequest DTOs
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/project/{Uid} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PmProjectDetail xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Branch>String</Branch>
<Calendar>
<PmCalendarBar>
<EndDate>String</EndDate>
<JobID>0</JobID>
<Name>String</Name>
<StartDate>String</StartDate>
<Status>String</Status>
</PmCalendarBar>
</Calendar>
<Client>String</Client>
<Description>String</Description>
<EndDate>String</EndDate>
<Equipment>
<PmEquipmentRow>
<Available>false</Available>
<Conflicts>
<PmConflict>
<EndDate>String</EndDate>
<JobName>String</JobName>
<ProjectName>String</ProjectName>
<StartDate>String</StartDate>
</PmConflict>
</Conflicts>
<EquipmentID>0</EquipmentID>
<EquipmentType>String</EquipmentType>
<LastServiceDate>String</LastServiceDate>
<MaintenanceIntervalDays>0</MaintenanceIntervalDays>
<MaintenanceState>String</MaintenanceState>
<Name>String</Name>
<NextServiceDate>String</NextServiceDate>
<SerialNumber>String</SerialNumber>
<UsedByJobs>String</UsedByJobs>
</PmEquipmentRow>
</Equipment>
<Finance>
<Budget>0</Budget>
<CrewCost>0</CrewCost>
<EquipCost>0</EquipCost>
<EstimatedCost>0</EstimatedCost>
<HealthPct>0</HealthPct>
<MatCost>0</MatCost>
<ProgressPct>0</ProgressPct>
<Spent>0</Spent>
<SpentPct>0</SpentPct>
<Variance>0</Variance>
</Finance>
<Jobs>
<PmJob>
<BudgetedHours>0</BudgetedHours>
<Cost>0</Cost>
<Crew>
<PmJobCrew>
<BudgetedHours>0</BudgetedHours>
<ContactID>0</ContactID>
<IsOpen>false</IsOpen>
<Name>String</Name>
<Rate>0</Rate>
</PmJobCrew>
</Crew>
<CrewCost>0</CrewCost>
<CrewCount>0</CrewCount>
<Description>String</Description>
<EndDate>String</EndDate>
<EquipConflict>false</EquipConflict>
<EquipCost>0</EquipCost>
<Equipment>
<PmJobResource>
<Amount>0</Amount>
<Id>0</Id>
<Name>String</Name>
<Qty>0</Qty>
</PmJobResource>
</Equipment>
<EquipmentCount>0</EquipmentCount>
<JobID>0</JobID>
<MatCost>0</MatCost>
<MaterialCount>0</MaterialCount>
<MaterialGap>false</MaterialGap>
<Materials>
<PmJobResource>
<Amount>0</Amount>
<Id>0</Id>
<Name>String</Name>
<Qty>0</Qty>
</PmJobResource>
</Materials>
<Name>String</Name>
<NoCrew>false</NoCrew>
<ReadyPct>0</ReadyPct>
<StartDate>String</StartDate>
<Status>String</Status>
</PmJob>
</Jobs>
<Materials>
<PmMaterialRow>
<DeliveryDate>String</DeliveryDate>
<LineCost>0</LineCost>
<MaterialID>0</MaterialID>
<MaterialType>String</MaterialType>
<Name>String</Name>
<NeededByJobs>0</NeededByJobs>
<OnHand>0</OnHand>
<OrderDate>String</OrderDate>
<ProjectMaterialID>0</ProjectMaterialID>
<QtyNeeded>0</QtyNeeded>
<Shortfall>false</Shortfall>
<Status>String</Status>
<StatusID>0</StatusID>
<Supplier>String</Supplier>
<ToOrder>0</ToOrder>
<UnitCost>0</UnitCost>
</PmMaterialRow>
</Materials>
<Name>String</Name>
<ProjectID>0</ProjectID>
<ProjectStatuses>
<PmCatalogItem>
<Amount>0</Amount>
<Id>0</Id>
<Name>String</Name>
</PmCatalogItem>
</ProjectStatuses>
<ProjectType>String</ProjectType>
<ProjectUID>String</ProjectUID>
<Readiness>
<EquipmentConflicts>0</EquipmentConflicts>
<JobsNoCrew>0</JobsNoCrew>
<MaterialGaps>0</MaterialGaps>
<OpenRoles>0</OpenRoles>
<ReadyPct>0</ReadyPct>
<TotalGaps>0</TotalGaps>
</Readiness>
<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>
<StartDate>String</StartDate>
<Status>String</Status>
</PmProjectDetail>