| GET,POST,OPTIONS | /v1/worker/messages |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class WorkerMessagesRequest
{
public Integer CrewID = null;
public String Body = null;
public Boolean IsAlert = null;
public Integer getCrewID() { return CrewID; }
public WorkerMessagesRequest setCrewID(Integer value) { this.CrewID = value; return this; }
public String getBody() { return Body; }
public WorkerMessagesRequest setBody(String value) { this.Body = value; return this; }
public Boolean getIsAlert() { return IsAlert; }
public WorkerMessagesRequest setIsAlert(Boolean value) { this.IsAlert = value; return this; }
}
public static class WorkerMessagesResponse
{
public ResponseStatus ResponseStatus = null;
public ArrayList<WorkerCrew> Crews = new ArrayList<WorkerCrew>();
public ArrayList<WorkerCrewMessage> Messages = new ArrayList<WorkerCrewMessage>();
public Boolean Sent = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public WorkerMessagesResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ArrayList<WorkerCrew> getCrews() { return Crews; }
public WorkerMessagesResponse setCrews(ArrayList<WorkerCrew> value) { this.Crews = value; return this; }
public ArrayList<WorkerCrewMessage> getMessages() { return Messages; }
public WorkerMessagesResponse setMessages(ArrayList<WorkerCrewMessage> value) { this.Messages = value; return this; }
public Boolean isSent() { return Sent; }
public WorkerMessagesResponse setSent(Boolean value) { this.Sent = value; return this; }
}
public static class WorkerCrew
{
public Integer CrewID = null;
public String CrewName = null;
public Boolean IsManager = null;
public Integer getCrewID() { return CrewID; }
public WorkerCrew setCrewID(Integer value) { this.CrewID = value; return this; }
public String getCrewName() { return CrewName; }
public WorkerCrew setCrewName(String value) { this.CrewName = value; return this; }
public Boolean getIsManager() { return IsManager; }
public WorkerCrew setIsManager(Boolean value) { this.IsManager = value; return this; }
}
public static class WorkerCrewMessage
{
public Integer CrewMessageID = null;
public Integer CrewID = null;
public String CrewName = null;
public Integer SenderContactID = null;
public String SenderName = null;
public String Body = null;
public Boolean IsAlert = null;
public String CreatedAtLabel = null;
public Boolean Mine = null;
public Integer getCrewMessageID() { return CrewMessageID; }
public WorkerCrewMessage setCrewMessageID(Integer value) { this.CrewMessageID = value; return this; }
public Integer getCrewID() { return CrewID; }
public WorkerCrewMessage setCrewID(Integer value) { this.CrewID = value; return this; }
public String getCrewName() { return CrewName; }
public WorkerCrewMessage setCrewName(String value) { this.CrewName = value; return this; }
public Integer getSenderContactID() { return SenderContactID; }
public WorkerCrewMessage setSenderContactID(Integer value) { this.SenderContactID = value; return this; }
public String getSenderName() { return SenderName; }
public WorkerCrewMessage setSenderName(String value) { this.SenderName = value; return this; }
public String getBody() { return Body; }
public WorkerCrewMessage setBody(String value) { this.Body = value; return this; }
public Boolean getIsAlert() { return IsAlert; }
public WorkerCrewMessage setIsAlert(Boolean value) { this.IsAlert = value; return this; }
public String getCreatedAtLabel() { return CreatedAtLabel; }
public WorkerCrewMessage setCreatedAtLabel(String value) { this.CreatedAtLabel = value; return this; }
public Boolean isMine() { return Mine; }
public WorkerCrewMessage setMine(Boolean value) { this.Mine = value; return this; }
}
}
Java WorkerMessagesRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/worker/messages HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"CrewID":0,"Body":"String","IsAlert":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Crews":[{"CrewID":0,"CrewName":"String","IsManager":false}],"Messages":[{"CrewMessageID":0,"CrewID":0,"CrewName":"String","SenderContactID":0,"SenderName":"String","Body":"String","IsAlert":false,"CreatedAtLabel":"String","Mine":false}],"Sent":false}