| Requires any of the permissions: | DISPATCH:HAUL:MANAGE, DISPATCH:JOB:MANAGE, DISPATCH:ONDEMAND:MANAGE |
| POST,OPTIONS | /v1/dispatch/holds |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class DispatchHoldCreateRequest
{
public String ScopeKind = null;
public String ScopeKey = null;
public String ScopeLabel = null;
public String Reason = null;
public String Note = null;
public String StartUtc = null;
public String EndUtc = null;
public String SuggestionDate = null;
public String SuggestionKind = null;
public String getScopeKind() { return ScopeKind; }
public DispatchHoldCreateRequest setScopeKind(String value) { this.ScopeKind = value; return this; }
public String getScopeKey() { return ScopeKey; }
public DispatchHoldCreateRequest setScopeKey(String value) { this.ScopeKey = value; return this; }
public String getScopeLabel() { return ScopeLabel; }
public DispatchHoldCreateRequest setScopeLabel(String value) { this.ScopeLabel = value; return this; }
public String getReason() { return Reason; }
public DispatchHoldCreateRequest setReason(String value) { this.Reason = value; return this; }
public String getNote() { return Note; }
public DispatchHoldCreateRequest setNote(String value) { this.Note = value; return this; }
public String getStartUtc() { return StartUtc; }
public DispatchHoldCreateRequest setStartUtc(String value) { this.StartUtc = value; return this; }
public String getEndUtc() { return EndUtc; }
public DispatchHoldCreateRequest setEndUtc(String value) { this.EndUtc = value; return this; }
public String getSuggestionDate() { return SuggestionDate; }
public DispatchHoldCreateRequest setSuggestionDate(String value) { this.SuggestionDate = value; return this; }
public String getSuggestionKind() { return SuggestionKind; }
public DispatchHoldCreateRequest setSuggestionKind(String value) { this.SuggestionKind = value; return this; }
}
public static class DispatchHoldsResponse
{
public ArrayList<DispatchHoldView> Holds = new ArrayList<DispatchHoldView>();
public ArrayList<DispatchOfflineWindowView> Windows = new ArrayList<DispatchOfflineWindowView>();
public ArrayList<DispatchHoldScopeView> Scopes = new ArrayList<DispatchHoldScopeView>();
public DispatchHoldSuggestionView Suggestion = null;
public ResponseStatus ResponseStatus = null;
public ArrayList<DispatchHoldView> getHolds() { return Holds; }
public DispatchHoldsResponse setHolds(ArrayList<DispatchHoldView> value) { this.Holds = value; return this; }
public ArrayList<DispatchOfflineWindowView> getWindows() { return Windows; }
public DispatchHoldsResponse setWindows(ArrayList<DispatchOfflineWindowView> value) { this.Windows = value; return this; }
public ArrayList<DispatchHoldScopeView> getScopes() { return Scopes; }
public DispatchHoldsResponse setScopes(ArrayList<DispatchHoldScopeView> value) { this.Scopes = value; return this; }
public DispatchHoldSuggestionView getSuggestion() { return Suggestion; }
public DispatchHoldsResponse setSuggestion(DispatchHoldSuggestionView value) { this.Suggestion = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public DispatchHoldsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class DispatchHoldView
{
public Integer HoldId = null;
public String Code = null;
public String ScopeKind = null;
public String ScopeKey = null;
public String ScopeLabel = null;
public String Reason = null;
public String Note = null;
public Date StartUtc = null;
public Date EndUtc = null;
public String Source = null;
public String IncidentRef = null;
public Date LiftedUtc = null;
public String LiftedBy = null;
public Date CreatedUtc = null;
public String CreatedBy = null;
public String Status = null;
public Integer getHoldId() { return HoldId; }
public DispatchHoldView setHoldId(Integer value) { this.HoldId = value; return this; }
public String getCode() { return Code; }
public DispatchHoldView setCode(String value) { this.Code = value; return this; }
public String getScopeKind() { return ScopeKind; }
public DispatchHoldView setScopeKind(String value) { this.ScopeKind = value; return this; }
public String getScopeKey() { return ScopeKey; }
public DispatchHoldView setScopeKey(String value) { this.ScopeKey = value; return this; }
public String getScopeLabel() { return ScopeLabel; }
public DispatchHoldView setScopeLabel(String value) { this.ScopeLabel = value; return this; }
public String getReason() { return Reason; }
public DispatchHoldView setReason(String value) { this.Reason = value; return this; }
public String getNote() { return Note; }
public DispatchHoldView setNote(String value) { this.Note = value; return this; }
public Date getStartUtc() { return StartUtc; }
public DispatchHoldView setStartUtc(Date value) { this.StartUtc = value; return this; }
public Date getEndUtc() { return EndUtc; }
public DispatchHoldView setEndUtc(Date value) { this.EndUtc = value; return this; }
public String getSource() { return Source; }
public DispatchHoldView setSource(String value) { this.Source = value; return this; }
public String getIncidentRef() { return IncidentRef; }
public DispatchHoldView setIncidentRef(String value) { this.IncidentRef = value; return this; }
public Date getLiftedUtc() { return LiftedUtc; }
public DispatchHoldView setLiftedUtc(Date value) { this.LiftedUtc = value; return this; }
public String getLiftedBy() { return LiftedBy; }
public DispatchHoldView setLiftedBy(String value) { this.LiftedBy = value; return this; }
public Date getCreatedUtc() { return CreatedUtc; }
public DispatchHoldView setCreatedUtc(Date value) { this.CreatedUtc = value; return this; }
public String getCreatedBy() { return CreatedBy; }
public DispatchHoldView setCreatedBy(String value) { this.CreatedBy = value; return this; }
public String getStatus() { return Status; }
public DispatchHoldView setStatus(String value) { this.Status = value; return this; }
}
public static class DispatchOfflineWindowView
{
public Integer OfflineWindowId = null;
public String FromHour = null;
public String ToHour = null;
public Integer getOfflineWindowId() { return OfflineWindowId; }
public DispatchOfflineWindowView setOfflineWindowId(Integer value) { this.OfflineWindowId = value; return this; }
public String getFromHour() { return FromHour; }
public DispatchOfflineWindowView setFromHour(String value) { this.FromHour = value; return this; }
public String getToHour() { return ToHour; }
public DispatchOfflineWindowView setToHour(String value) { this.ToHour = value; return this; }
}
public static class DispatchHoldScopeView
{
public String Kind = null;
public String Key = null;
public String Label = null;
public String getKind() { return Kind; }
public DispatchHoldScopeView setKind(String value) { this.Kind = value; return this; }
public String getKey() { return Key; }
public DispatchHoldScopeView setKey(String value) { this.Key = value; return this; }
public String getLabel() { return Label; }
public DispatchHoldScopeView setLabel(String value) { this.Label = value; return this; }
}
public static class DispatchHoldSuggestionView
{
public String ForDate = null;
public String Kind = null;
public Integer Severity = null;
public String Headline = null;
public String DayLabel = null;
public String ScopeKind = null;
public String ScopeLabel = null;
public String Reason = null;
public Date StartUtc = null;
public Date EndUtc = null;
public String WindowLocal = null;
public String Text = null;
public String getForDate() { return ForDate; }
public DispatchHoldSuggestionView setForDate(String value) { this.ForDate = value; return this; }
public String getKind() { return Kind; }
public DispatchHoldSuggestionView setKind(String value) { this.Kind = value; return this; }
public Integer getSeverity() { return Severity; }
public DispatchHoldSuggestionView setSeverity(Integer value) { this.Severity = value; return this; }
public String getHeadline() { return Headline; }
public DispatchHoldSuggestionView setHeadline(String value) { this.Headline = value; return this; }
public String getDayLabel() { return DayLabel; }
public DispatchHoldSuggestionView setDayLabel(String value) { this.DayLabel = value; return this; }
public String getScopeKind() { return ScopeKind; }
public DispatchHoldSuggestionView setScopeKind(String value) { this.ScopeKind = value; return this; }
public String getScopeLabel() { return ScopeLabel; }
public DispatchHoldSuggestionView setScopeLabel(String value) { this.ScopeLabel = value; return this; }
public String getReason() { return Reason; }
public DispatchHoldSuggestionView setReason(String value) { this.Reason = value; return this; }
public Date getStartUtc() { return StartUtc; }
public DispatchHoldSuggestionView setStartUtc(Date value) { this.StartUtc = value; return this; }
public Date getEndUtc() { return EndUtc; }
public DispatchHoldSuggestionView setEndUtc(Date value) { this.EndUtc = value; return this; }
public String getWindowLocal() { return WindowLocal; }
public DispatchHoldSuggestionView setWindowLocal(String value) { this.WindowLocal = value; return this; }
public String getText() { return Text; }
public DispatchHoldSuggestionView setText(String value) { this.Text = value; return this; }
}
}
Java DispatchHoldCreateRequest 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/dispatch/holds HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ScopeKind: String,
ScopeKey: String,
ScopeLabel: String,
Reason: String,
Note: String,
StartUtc: String,
EndUtc: String,
SuggestionDate: String,
SuggestionKind: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Holds:
[
{
HoldId: 0,
Code: String,
ScopeKind: String,
ScopeKey: String,
ScopeLabel: String,
Reason: String,
Note: String,
StartUtc: 0001-01-01,
EndUtc: 0001-01-01,
Source: String,
IncidentRef: String,
LiftedUtc: 0001-01-01,
LiftedBy: String,
CreatedUtc: 0001-01-01,
CreatedBy: String,
Status: String
}
],
Windows:
[
{
OfflineWindowId: 0,
FromHour: String,
ToHour: String
}
],
Scopes:
[
{
Kind: String,
Key: String,
Label: String
}
],
Suggestion:
{
ForDate: String,
Kind: String,
Severity: 0,
Headline: String,
DayLabel: String,
ScopeKind: String,
ScopeLabel: String,
Reason: String,
StartUtc: 0001-01-01,
EndUtc: 0001-01-01,
WindowLocal: String,
Text: String
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}