| POST,OPTIONS | /v1/safety/incidents/{SafetyIncidentID}/status |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class SafetyIncidentStatusRequest
{
public Integer SafetyIncidentID = null;
public String Status = null;
public Integer getSafetyIncidentID() { return SafetyIncidentID; }
public SafetyIncidentStatusRequest setSafetyIncidentID(Integer value) { this.SafetyIncidentID = value; return this; }
public String getStatus() { return Status; }
public SafetyIncidentStatusRequest setStatus(String value) { this.Status = value; return this; }
}
public static class SafetyIncidentResponse
{
public ResponseStatus ResponseStatus = null;
public SafetyIncident Incident = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public SafetyIncidentResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public SafetyIncident getIncident() { return Incident; }
public SafetyIncidentResponse setIncident(SafetyIncident value) { this.Incident = value; return this; }
}
public static class SafetyIncident
{
public Integer SafetyIncidentID = null;
public UUID SafetyIncidentUID = null;
public UUID BranchId = null;
public Integer ProjectID = null;
public String IncidentNo = null;
public String IncidentType = null;
public String Severity = null;
public String Status = null;
public String Title = null;
public String Location = null;
public String CrewLabel = null;
public String Description = null;
public String ReportedBy = null;
public Boolean IsRecordable = null;
public Date OccurredAt = null;
public Date ClosedAt = null;
public String SourceRef = null;
public String CreatedBy = null;
public Date CreatedAt = null;
public Date UpdatedAt = null;
public Integer DaysAgo = null;
public Integer getSafetyIncidentID() { return SafetyIncidentID; }
public SafetyIncident setSafetyIncidentID(Integer value) { this.SafetyIncidentID = value; return this; }
public UUID getSafetyIncidentUID() { return SafetyIncidentUID; }
public SafetyIncident setSafetyIncidentUID(UUID value) { this.SafetyIncidentUID = value; return this; }
public UUID getBranchId() { return BranchId; }
public SafetyIncident setBranchId(UUID value) { this.BranchId = value; return this; }
public Integer getProjectID() { return ProjectID; }
public SafetyIncident setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getIncidentNo() { return IncidentNo; }
public SafetyIncident setIncidentNo(String value) { this.IncidentNo = value; return this; }
public String getIncidentType() { return IncidentType; }
public SafetyIncident setIncidentType(String value) { this.IncidentType = value; return this; }
public String getSeverity() { return Severity; }
public SafetyIncident setSeverity(String value) { this.Severity = value; return this; }
public String getStatus() { return Status; }
public SafetyIncident setStatus(String value) { this.Status = value; return this; }
public String getTitle() { return Title; }
public SafetyIncident setTitle(String value) { this.Title = value; return this; }
public String getLocation() { return Location; }
public SafetyIncident setLocation(String value) { this.Location = value; return this; }
public String getCrewLabel() { return CrewLabel; }
public SafetyIncident setCrewLabel(String value) { this.CrewLabel = value; return this; }
public String getDescription() { return Description; }
public SafetyIncident setDescription(String value) { this.Description = value; return this; }
public String getReportedBy() { return ReportedBy; }
public SafetyIncident setReportedBy(String value) { this.ReportedBy = value; return this; }
public Boolean getIsRecordable() { return IsRecordable; }
public SafetyIncident setIsRecordable(Boolean value) { this.IsRecordable = value; return this; }
public Date getOccurredAt() { return OccurredAt; }
public SafetyIncident setOccurredAt(Date value) { this.OccurredAt = value; return this; }
public Date getClosedAt() { return ClosedAt; }
public SafetyIncident setClosedAt(Date value) { this.ClosedAt = value; return this; }
public String getSourceRef() { return SourceRef; }
public SafetyIncident setSourceRef(String value) { this.SourceRef = value; return this; }
public String getCreatedBy() { return CreatedBy; }
public SafetyIncident setCreatedBy(String value) { this.CreatedBy = value; return this; }
public Date getCreatedAt() { return CreatedAt; }
public SafetyIncident setCreatedAt(Date value) { this.CreatedAt = value; return this; }
public Date getUpdatedAt() { return UpdatedAt; }
public SafetyIncident setUpdatedAt(Date value) { this.UpdatedAt = value; return this; }
public Integer getDaysAgo() { return DaysAgo; }
public SafetyIncident setDaysAgo(Integer value) { this.DaysAgo = value; return this; }
}
}
Java SafetyIncidentStatusRequest 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.
POST /v1/safety/incidents/{SafetyIncidentID}/status HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
SafetyIncidentID: 0,
Status: String
}
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
}
},
Incident:
{
SafetyIncidentID: 0,
SafetyIncidentUID: 00000000000000000000000000000000,
BranchId: 00000000000000000000000000000000,
ProjectID: 0,
IncidentNo: String,
IncidentType: String,
Severity: String,
Status: String,
Title: String,
Location: String,
CrewLabel: String,
Description: String,
ReportedBy: String,
IsRecordable: False,
OccurredAt: 0001-01-01,
ClosedAt: 0001-01-01,
SourceRef: String,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01,
DaysAgo: 0
}
}