| 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 .xml suffix or ?format=xml
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/xml
Content-Type: application/xml
Content-Length: length
<WorkerMessagesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Body>String</Body>
<CrewID>0</CrewID>
<IsAlert>false</IsAlert>
</WorkerMessagesRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<WorkerMessagesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Crews>
<WorkerCrew>
<CrewID>0</CrewID>
<CrewName>String</CrewName>
<IsManager>false</IsManager>
</WorkerCrew>
</Crews>
<Messages>
<WorkerCrewMessage>
<Body>String</Body>
<CreatedAtLabel>String</CreatedAtLabel>
<CrewID>0</CrewID>
<CrewMessageID>0</CrewMessageID>
<CrewName>String</CrewName>
<IsAlert>false</IsAlert>
<Mine>false</Mine>
<SenderContactID>0</SenderContactID>
<SenderName>String</SenderName>
</WorkerCrewMessage>
</Messages>
<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>
<Sent>false</Sent>
</WorkerMessagesResponse>