| GET | /v1/schedule/lookups |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class ScheduleLookupsRequest
{
}
public static class WorkerScheduleResponse
{
public ArrayList<WorkerScheduleItem> Items = new ArrayList<WorkerScheduleItem>();
public ArrayList<SchedulableJob> SchedulableJobs = new ArrayList<SchedulableJob>();
public ArrayList<ScheduleWorker> Workers = new ArrayList<ScheduleWorker>();
public ArrayList<Crew> Crews = new ArrayList<Crew>();
public ArrayList<ScheduleWorker> BudgetedCrew = new ArrayList<ScheduleWorker>();
public ScheduleLastAssignment LastAssignment = null;
public ScheduleAutoFillResult AutoFill = null;
public Integer DatesScheduled = null;
public Integer WorkersScheduled = null;
public Integer ItemsRemoved = null;
public ResponseStatus ResponseStatus = null;
public ArrayList<WorkerScheduleItem> getItems() { return Items; }
public WorkerScheduleResponse setItems(ArrayList<WorkerScheduleItem> value) { this.Items = value; return this; }
public ArrayList<SchedulableJob> getSchedulableJobs() { return SchedulableJobs; }
public WorkerScheduleResponse setSchedulableJobs(ArrayList<SchedulableJob> value) { this.SchedulableJobs = value; return this; }
public ArrayList<ScheduleWorker> getWorkers() { return Workers; }
public WorkerScheduleResponse setWorkers(ArrayList<ScheduleWorker> value) { this.Workers = value; return this; }
public ArrayList<Crew> getCrews() { return Crews; }
public WorkerScheduleResponse setCrews(ArrayList<Crew> value) { this.Crews = value; return this; }
public ArrayList<ScheduleWorker> getBudgetedCrew() { return BudgetedCrew; }
public WorkerScheduleResponse setBudgetedCrew(ArrayList<ScheduleWorker> value) { this.BudgetedCrew = value; return this; }
public ScheduleLastAssignment getLastAssignment() { return LastAssignment; }
public WorkerScheduleResponse setLastAssignment(ScheduleLastAssignment value) { this.LastAssignment = value; return this; }
public ScheduleAutoFillResult getAutoFill() { return AutoFill; }
public WorkerScheduleResponse setAutoFill(ScheduleAutoFillResult value) { this.AutoFill = value; return this; }
public Integer getDatesScheduled() { return DatesScheduled; }
public WorkerScheduleResponse setDatesScheduled(Integer value) { this.DatesScheduled = value; return this; }
public Integer getWorkersScheduled() { return WorkersScheduled; }
public WorkerScheduleResponse setWorkersScheduled(Integer value) { this.WorkersScheduled = value; return this; }
public Integer getItemsRemoved() { return ItemsRemoved; }
public WorkerScheduleResponse setItemsRemoved(Integer value) { this.ItemsRemoved = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public WorkerScheduleResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class WorkerScheduleItem
{
public Integer WorkerScheduleItemID = null;
public Integer JobID = null;
public Integer ProjectID = null;
public Integer ContactID = null;
public Date ScheduledDate = null;
public Integer SortOrder = null;
public Integer SourceCrewID = null;
public String Status = null;
public Date StartedAt = null;
public Date CompletedAt = null;
public String WorkerNotes = null;
public String JobName = null;
public String ProjectName = null;
public String FirstName = null;
public String LastName = null;
public String WorkerName = null;
public String SourceCrewName = null;
public Integer ProjectLocationID = null;
public String ProjectLocationName = null;
public String LocationZip = null;
public String LocationCity = null;
public BigDecimal LocationLatitude = null;
public BigDecimal LocationLongitude = null;
public String JobStatusName = null;
public UUID BranchId = null;
public String BranchName = null;
public UUID WorkerHomeBranchId = null;
public String WorkerHomeBranchName = null;
public Integer getWorkerScheduleItemID() { return WorkerScheduleItemID; }
public WorkerScheduleItem setWorkerScheduleItemID(Integer value) { this.WorkerScheduleItemID = value; return this; }
public Integer getJobID() { return JobID; }
public WorkerScheduleItem setJobID(Integer value) { this.JobID = value; return this; }
public Integer getProjectID() { return ProjectID; }
public WorkerScheduleItem setProjectID(Integer value) { this.ProjectID = value; return this; }
public Integer getContactID() { return ContactID; }
public WorkerScheduleItem setContactID(Integer value) { this.ContactID = value; return this; }
public Date getScheduledDate() { return ScheduledDate; }
public WorkerScheduleItem setScheduledDate(Date value) { this.ScheduledDate = value; return this; }
public Integer getSortOrder() { return SortOrder; }
public WorkerScheduleItem setSortOrder(Integer value) { this.SortOrder = value; return this; }
public Integer getSourceCrewID() { return SourceCrewID; }
public WorkerScheduleItem setSourceCrewID(Integer value) { this.SourceCrewID = value; return this; }
public String getStatus() { return Status; }
public WorkerScheduleItem setStatus(String value) { this.Status = value; return this; }
public Date getStartedAt() { return StartedAt; }
public WorkerScheduleItem setStartedAt(Date value) { this.StartedAt = value; return this; }
public Date getCompletedAt() { return CompletedAt; }
public WorkerScheduleItem setCompletedAt(Date value) { this.CompletedAt = value; return this; }
public String getWorkerNotes() { return WorkerNotes; }
public WorkerScheduleItem setWorkerNotes(String value) { this.WorkerNotes = value; return this; }
public String getJobName() { return JobName; }
public WorkerScheduleItem setJobName(String value) { this.JobName = value; return this; }
public String getProjectName() { return ProjectName; }
public WorkerScheduleItem setProjectName(String value) { this.ProjectName = value; return this; }
public String getFirstName() { return FirstName; }
public WorkerScheduleItem setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public WorkerScheduleItem setLastName(String value) { this.LastName = value; return this; }
public String getWorkerName() { return WorkerName; }
public WorkerScheduleItem setWorkerName(String value) { this.WorkerName = value; return this; }
public String getSourceCrewName() { return SourceCrewName; }
public WorkerScheduleItem setSourceCrewName(String value) { this.SourceCrewName = value; return this; }
public Integer getProjectLocationID() { return ProjectLocationID; }
public WorkerScheduleItem setProjectLocationID(Integer value) { this.ProjectLocationID = value; return this; }
public String getProjectLocationName() { return ProjectLocationName; }
public WorkerScheduleItem setProjectLocationName(String value) { this.ProjectLocationName = value; return this; }
public String getLocationZip() { return LocationZip; }
public WorkerScheduleItem setLocationZip(String value) { this.LocationZip = value; return this; }
public String getLocationCity() { return LocationCity; }
public WorkerScheduleItem setLocationCity(String value) { this.LocationCity = value; return this; }
public BigDecimal getLocationLatitude() { return LocationLatitude; }
public WorkerScheduleItem setLocationLatitude(BigDecimal value) { this.LocationLatitude = value; return this; }
public BigDecimal getLocationLongitude() { return LocationLongitude; }
public WorkerScheduleItem setLocationLongitude(BigDecimal value) { this.LocationLongitude = value; return this; }
public String getJobStatusName() { return JobStatusName; }
public WorkerScheduleItem setJobStatusName(String value) { this.JobStatusName = value; return this; }
public UUID getBranchId() { return BranchId; }
public WorkerScheduleItem setBranchId(UUID value) { this.BranchId = value; return this; }
public String getBranchName() { return BranchName; }
public WorkerScheduleItem setBranchName(String value) { this.BranchName = value; return this; }
public UUID getWorkerHomeBranchId() { return WorkerHomeBranchId; }
public WorkerScheduleItem setWorkerHomeBranchId(UUID value) { this.WorkerHomeBranchId = value; return this; }
public String getWorkerHomeBranchName() { return WorkerHomeBranchName; }
public WorkerScheduleItem setWorkerHomeBranchName(String value) { this.WorkerHomeBranchName = value; return this; }
}
public static class SchedulableJob
{
public Integer JobID = null;
public String JobName = null;
public Integer ProjectID = null;
public String ProjectName = null;
public Integer StatusID = null;
public String StatusName = null;
public Integer ProjectLocationID = null;
public String ProjectLocationName = null;
public String LocationZip = null;
public String LocationCity = null;
public BigDecimal LocationLatitude = null;
public BigDecimal LocationLongitude = null;
public Date ExpectedStartDate = null;
public Date ExpectedCompletionDate = null;
public Boolean IsRecurring = null;
public ArrayList<String> OccurrenceDates = new ArrayList<String>();
public Integer getJobID() { return JobID; }
public SchedulableJob setJobID(Integer value) { this.JobID = value; return this; }
public String getJobName() { return JobName; }
public SchedulableJob setJobName(String value) { this.JobName = value; return this; }
public Integer getProjectID() { return ProjectID; }
public SchedulableJob setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getProjectName() { return ProjectName; }
public SchedulableJob setProjectName(String value) { this.ProjectName = value; return this; }
public Integer getStatusID() { return StatusID; }
public SchedulableJob setStatusID(Integer value) { this.StatusID = value; return this; }
public String getStatusName() { return StatusName; }
public SchedulableJob setStatusName(String value) { this.StatusName = value; return this; }
public Integer getProjectLocationID() { return ProjectLocationID; }
public SchedulableJob setProjectLocationID(Integer value) { this.ProjectLocationID = value; return this; }
public String getProjectLocationName() { return ProjectLocationName; }
public SchedulableJob setProjectLocationName(String value) { this.ProjectLocationName = value; return this; }
public String getLocationZip() { return LocationZip; }
public SchedulableJob setLocationZip(String value) { this.LocationZip = value; return this; }
public String getLocationCity() { return LocationCity; }
public SchedulableJob setLocationCity(String value) { this.LocationCity = value; return this; }
public BigDecimal getLocationLatitude() { return LocationLatitude; }
public SchedulableJob setLocationLatitude(BigDecimal value) { this.LocationLatitude = value; return this; }
public BigDecimal getLocationLongitude() { return LocationLongitude; }
public SchedulableJob setLocationLongitude(BigDecimal value) { this.LocationLongitude = value; return this; }
public Date getExpectedStartDate() { return ExpectedStartDate; }
public SchedulableJob setExpectedStartDate(Date value) { this.ExpectedStartDate = value; return this; }
public Date getExpectedCompletionDate() { return ExpectedCompletionDate; }
public SchedulableJob setExpectedCompletionDate(Date value) { this.ExpectedCompletionDate = value; return this; }
public Boolean getIsRecurring() { return IsRecurring; }
public SchedulableJob setIsRecurring(Boolean value) { this.IsRecurring = value; return this; }
public ArrayList<String> getOccurrenceDates() { return OccurrenceDates; }
public SchedulableJob setOccurrenceDates(ArrayList<String> value) { this.OccurrenceDates = value; return this; }
}
public static class ScheduleWorker
{
public Integer ContactId = null;
public String FirstName = null;
public String LastName = null;
public String Name = null;
public String Initials = null;
public BigDecimal Rate = null;
public String ImageUrl = null;
public UUID BranchId = null;
public String BranchName = null;
public Integer getContactId() { return ContactId; }
public ScheduleWorker setContactId(Integer value) { this.ContactId = value; return this; }
public String getFirstName() { return FirstName; }
public ScheduleWorker setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public ScheduleWorker setLastName(String value) { this.LastName = value; return this; }
public String getName() { return Name; }
public ScheduleWorker setName(String value) { this.Name = value; return this; }
public String getInitials() { return Initials; }
public ScheduleWorker setInitials(String value) { this.Initials = value; return this; }
public BigDecimal getRate() { return Rate; }
public ScheduleWorker setRate(BigDecimal value) { this.Rate = value; return this; }
public String getImageUrl() { return ImageUrl; }
public ScheduleWorker setImageUrl(String value) { this.ImageUrl = value; return this; }
public UUID getBranchId() { return BranchId; }
public ScheduleWorker setBranchId(UUID value) { this.BranchId = value; return this; }
public String getBranchName() { return BranchName; }
public ScheduleWorker setBranchName(String value) { this.BranchName = value; return this; }
}
public static class Crew
{
public Integer CrewID = null;
public String CrewName = null;
public String CrewNumber = null;
public Integer CrewManagerContactID = null;
public String CrewManagerContactName = null;
public String CrewColor = null;
public Date RecordCreatedDate = null;
public Boolean Active = null;
public UUID CreatedByUID = null;
public Integer ProjectID = null;
public Integer CrewMemberCount = null;
public Integer ProjectCrewID = null;
public String ProjectName = null;
public UUID BranchId = null;
public String BranchName = null;
public Integer getCrewID() { return CrewID; }
public Crew setCrewID(Integer value) { this.CrewID = value; return this; }
public String getCrewName() { return CrewName; }
public Crew setCrewName(String value) { this.CrewName = value; return this; }
public String getCrewNumber() { return CrewNumber; }
public Crew setCrewNumber(String value) { this.CrewNumber = value; return this; }
public Integer getCrewManagerContactID() { return CrewManagerContactID; }
public Crew setCrewManagerContactID(Integer value) { this.CrewManagerContactID = value; return this; }
public String getCrewManagerContactName() { return CrewManagerContactName; }
public Crew setCrewManagerContactName(String value) { this.CrewManagerContactName = value; return this; }
public String getCrewColor() { return CrewColor; }
public Crew setCrewColor(String value) { this.CrewColor = value; return this; }
public Date getRecordCreatedDate() { return RecordCreatedDate; }
public Crew setRecordCreatedDate(Date value) { this.RecordCreatedDate = value; return this; }
public Boolean isActive() { return Active; }
public Crew setActive(Boolean value) { this.Active = value; return this; }
public UUID getCreatedByUID() { return CreatedByUID; }
public Crew setCreatedByUID(UUID value) { this.CreatedByUID = value; return this; }
public Integer getProjectID() { return ProjectID; }
public Crew setProjectID(Integer value) { this.ProjectID = value; return this; }
public Integer getCrewMemberCount() { return CrewMemberCount; }
public Crew setCrewMemberCount(Integer value) { this.CrewMemberCount = value; return this; }
public Integer getProjectCrewID() { return ProjectCrewID; }
public Crew setProjectCrewID(Integer value) { this.ProjectCrewID = value; return this; }
public String getProjectName() { return ProjectName; }
public Crew setProjectName(String value) { this.ProjectName = value; return this; }
public UUID getBranchId() { return BranchId; }
public Crew setBranchId(UUID value) { this.BranchId = value; return this; }
public String getBranchName() { return BranchName; }
public Crew setBranchName(String value) { this.BranchName = value; return this; }
}
public static class ScheduleLastAssignment
{
public Integer JobID = null;
public ArrayList<Integer> ContactIds = new ArrayList<Integer>();
public Integer SourceCrewID = null;
public Integer getJobID() { return JobID; }
public ScheduleLastAssignment setJobID(Integer value) { this.JobID = value; return this; }
public ArrayList<Integer> getContactIds() { return ContactIds; }
public ScheduleLastAssignment setContactIds(ArrayList<Integer> value) { this.ContactIds = value; return this; }
public Integer getSourceCrewID() { return SourceCrewID; }
public ScheduleLastAssignment setSourceCrewID(Integer value) { this.SourceCrewID = value; return this; }
}
public static class ScheduleAutoFillResult
{
public Integer JobsFilled = null;
public Integer JobsSkipped = null;
public Integer VisitsScheduled = null;
public Integer getJobsFilled() { return JobsFilled; }
public ScheduleAutoFillResult setJobsFilled(Integer value) { this.JobsFilled = value; return this; }
public Integer getJobsSkipped() { return JobsSkipped; }
public ScheduleAutoFillResult setJobsSkipped(Integer value) { this.JobsSkipped = value; return this; }
public Integer getVisitsScheduled() { return VisitsScheduled; }
public ScheduleAutoFillResult setVisitsScheduled(Integer value) { this.VisitsScheduled = value; return this; }
}
}
Java ScheduleLookupsRequest 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/schedule/lookups HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<WorkerScheduleResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AutoFill>
<JobsFilled>0</JobsFilled>
<JobsSkipped>0</JobsSkipped>
<VisitsScheduled>0</VisitsScheduled>
</AutoFill>
<BudgetedCrew>
<ScheduleWorker>
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<BranchName>String</BranchName>
<ContactId>0</ContactId>
<FirstName>String</FirstName>
<ImageUrl>String</ImageUrl>
<Initials>String</Initials>
<LastName>String</LastName>
<Name>String</Name>
<Rate>0</Rate>
</ScheduleWorker>
</BudgetedCrew>
<Crews>
<Crew>
<Active>false</Active>
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<BranchName>String</BranchName>
<CreatedByUID>00000000-0000-0000-0000-000000000000</CreatedByUID>
<CrewColor>String</CrewColor>
<CrewID>0</CrewID>
<CrewManagerContactID>0</CrewManagerContactID>
<CrewManagerContactName>String</CrewManagerContactName>
<CrewMemberCount>0</CrewMemberCount>
<CrewName>String</CrewName>
<CrewNumber>String</CrewNumber>
<ProjectCrewID>0</ProjectCrewID>
<ProjectID>0</ProjectID>
<ProjectName>String</ProjectName>
<RecordCreatedDate>0001-01-01T00:00:00</RecordCreatedDate>
</Crew>
</Crews>
<DatesScheduled>0</DatesScheduled>
<Items>
<WorkerScheduleItem>
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<BranchName>String</BranchName>
<CompletedAt>0001-01-01T00:00:00</CompletedAt>
<ContactID>0</ContactID>
<FirstName>String</FirstName>
<JobID>0</JobID>
<JobName>String</JobName>
<JobStatusName>String</JobStatusName>
<LastName>String</LastName>
<LocationCity>String</LocationCity>
<LocationLatitude>0</LocationLatitude>
<LocationLongitude>0</LocationLongitude>
<LocationZip>String</LocationZip>
<ProjectID>0</ProjectID>
<ProjectLocationID>0</ProjectLocationID>
<ProjectLocationName>String</ProjectLocationName>
<ProjectName>String</ProjectName>
<ScheduledDate>0001-01-01T00:00:00</ScheduledDate>
<SortOrder>0</SortOrder>
<SourceCrewID>0</SourceCrewID>
<SourceCrewName>String</SourceCrewName>
<StartedAt>0001-01-01T00:00:00</StartedAt>
<Status>String</Status>
<WorkerHomeBranchId>00000000-0000-0000-0000-000000000000</WorkerHomeBranchId>
<WorkerHomeBranchName>String</WorkerHomeBranchName>
<WorkerName>String</WorkerName>
<WorkerNotes>String</WorkerNotes>
<WorkerScheduleItemID>0</WorkerScheduleItemID>
</WorkerScheduleItem>
</Items>
<ItemsRemoved>0</ItemsRemoved>
<LastAssignment>
<ContactIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</ContactIds>
<JobID>0</JobID>
<SourceCrewID>0</SourceCrewID>
</LastAssignment>
<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>
<SchedulableJobs>
<SchedulableJob>
<ExpectedCompletionDate>0001-01-01T00:00:00</ExpectedCompletionDate>
<ExpectedStartDate>0001-01-01T00:00:00</ExpectedStartDate>
<IsRecurring>false</IsRecurring>
<JobID>0</JobID>
<JobName>String</JobName>
<LocationCity>String</LocationCity>
<LocationLatitude>0</LocationLatitude>
<LocationLongitude>0</LocationLongitude>
<LocationZip>String</LocationZip>
<OccurrenceDates xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</OccurrenceDates>
<ProjectID>0</ProjectID>
<ProjectLocationID>0</ProjectLocationID>
<ProjectLocationName>String</ProjectLocationName>
<ProjectName>String</ProjectName>
<StatusID>0</StatusID>
<StatusName>String</StatusName>
</SchedulableJob>
</SchedulableJobs>
<Workers>
<ScheduleWorker>
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<BranchName>String</BranchName>
<ContactId>0</ContactId>
<FirstName>String</FirstName>
<ImageUrl>String</ImageUrl>
<Initials>String</Initials>
<LastName>String</LastName>
<Name>String</Name>
<Rate>0</Rate>
</ScheduleWorker>
</Workers>
<WorkersScheduled>0</WorkersScheduled>
</WorkerScheduleResponse>