| GET,OPTIONS | /v1/Equipment/{EquipmentID}/usage |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class EquipmentUsageRequest
{
public Integer EquipmentID = null;
public Integer getEquipmentID() { return EquipmentID; }
public EquipmentUsageRequest setEquipmentID(Integer value) { this.EquipmentID = value; return this; }
}
public static class EquipmentUsageResponse
{
public ResponseStatus ResponseStatus = null;
public ArrayList<EquipmentUsageEntry> Usage = new ArrayList<EquipmentUsageEntry>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public EquipmentUsageResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ArrayList<EquipmentUsageEntry> getUsage() { return Usage; }
public EquipmentUsageResponse setUsage(ArrayList<EquipmentUsageEntry> value) { this.Usage = value; return this; }
}
public static class EquipmentUsageEntry
{
public Integer ProjectJobEquipmentID = null;
public Integer ProjectID = null;
public String ProjectName = null;
public Integer JobID = null;
public String JobName = null;
public Integer StatusID = null;
public Date StartDate = null;
public Date EndDate = null;
public Integer BookingCount = null;
public Integer getProjectJobEquipmentID() { return ProjectJobEquipmentID; }
public EquipmentUsageEntry setProjectJobEquipmentID(Integer value) { this.ProjectJobEquipmentID = value; return this; }
public Integer getProjectID() { return ProjectID; }
public EquipmentUsageEntry setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getProjectName() { return ProjectName; }
public EquipmentUsageEntry setProjectName(String value) { this.ProjectName = value; return this; }
public Integer getJobID() { return JobID; }
public EquipmentUsageEntry setJobID(Integer value) { this.JobID = value; return this; }
public String getJobName() { return JobName; }
public EquipmentUsageEntry setJobName(String value) { this.JobName = value; return this; }
public Integer getStatusID() { return StatusID; }
public EquipmentUsageEntry setStatusID(Integer value) { this.StatusID = value; return this; }
public Date getStartDate() { return StartDate; }
public EquipmentUsageEntry setStartDate(Date value) { this.StartDate = value; return this; }
public Date getEndDate() { return EndDate; }
public EquipmentUsageEntry setEndDate(Date value) { this.EndDate = value; return this; }
public Integer getBookingCount() { return BookingCount; }
public EquipmentUsageEntry setBookingCount(Integer value) { this.BookingCount = value; return this; }
}
}
Java EquipmentUsageRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/Equipment/{EquipmentID}/usage HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Usage:
[
{
ProjectJobEquipmentID: 0,
ProjectID: 0,
ProjectName: String,
JobID: 0,
JobName: String,
StatusID: 0,
StartDate: 0001-01-01,
EndDate: 0001-01-01,
BookingCount: 0
}
]
}