org.symphonyoss.symphony.agent.model.V4Message Maven / Gradle / Ivy
/*
* Agent API
* This document refers to Symphony API calls to send and receive messages and content. They need the on-premise Agent installed to perform decryption/encryption of content. - sessionToken and keyManagerToken can be obtained by calling the authenticationAPI on the symphony back end and the key manager respectively. Refer to the methods described in authenticatorAPI.yaml. - Actions are defined to be atomic, ie will succeed in their entirety or fail and have changed nothing. - If it returns a 40X status then it will have sent no message to any stream even if a request to aome subset of the requested streams would have succeeded. - If this contract cannot be met for any reason then this is an error and the response code will be 50X. - MessageML is a markup language for messages. See reference here: https://developers.symphony.com/documentation/message_format_reference
*
* OpenAPI spec version: 1.48.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package org.symphonyoss.symphony.agent.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.symphonyoss.symphony.agent.model.V4AttachmentInfo;
import org.symphonyoss.symphony.agent.model.V4Stream;
import org.symphonyoss.symphony.agent.model.V4User;
/**
* A representation of a message sent by a user of Symphony
*/
@ApiModel(description = "A representation of a message sent by a user of Symphony")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-10-14T03:33:40.723-04:00")
public class V4Message {
@JsonProperty("messageId")
private String messageId = null;
@JsonProperty("timestamp")
private Long timestamp = null;
@JsonProperty("message")
private String message = null;
@JsonProperty("data")
private String data = null;
@JsonProperty("attachments")
private List attachments = new ArrayList();
@JsonProperty("user")
private V4User user = null;
@JsonProperty("stream")
private V4Stream stream = null;
@JsonProperty("externalRecipients")
private Boolean externalRecipients = null;
public V4Message messageId(String messageId) {
this.messageId = messageId;
return this;
}
/**
* Id of the message
* @return messageId
**/
@ApiModelProperty(example = "null", value = "Id of the message")
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public V4Message timestamp(Long timestamp) {
this.timestamp = timestamp;
return this;
}
/**
* Timestamp of the message in milliseconds since Jan 1 1970
* @return timestamp
**/
@ApiModelProperty(example = "null", value = "Timestamp of the message in milliseconds since Jan 1 1970")
public Long getTimestamp() {
return timestamp;
}
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
public V4Message message(String message) {
this.message = message;
return this;
}
/**
* Message content in MessageMLV2
* @return message
**/
@ApiModelProperty(example = "null", value = "Message content in MessageMLV2")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public V4Message data(String data) {
this.data = data;
return this;
}
/**
* Message data in EntityJSON
* @return data
**/
@ApiModelProperty(example = "null", value = "Message data in EntityJSON")
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public V4Message attachments(List attachments) {
this.attachments = attachments;
return this;
}
public V4Message addAttachmentsItem(V4AttachmentInfo attachmentsItem) {
this.attachments.add(attachmentsItem);
return this;
}
/**
* Message attachments
* @return attachments
**/
@ApiModelProperty(example = "null", value = "Message attachments")
public List getAttachments() {
return attachments;
}
public void setAttachments(List attachments) {
this.attachments = attachments;
}
public V4Message user(V4User user) {
this.user = user;
return this;
}
/**
* Message author
* @return user
**/
@ApiModelProperty(example = "null", value = "Message author")
public V4User getUser() {
return user;
}
public void setUser(V4User user) {
this.user = user;
}
public V4Message stream(V4Stream stream) {
this.stream = stream;
return this;
}
/**
* Message destination
* @return stream
**/
@ApiModelProperty(example = "null", value = "Message destination")
public V4Stream getStream() {
return stream;
}
public void setStream(V4Stream stream) {
this.stream = stream;
}
public V4Message externalRecipients(Boolean externalRecipients) {
this.externalRecipients = externalRecipients;
return this;
}
/**
* Indicates if the message have external recipients. Only present on real time messaging.
* @return externalRecipients
**/
@ApiModelProperty(example = "null", value = "Indicates if the message have external recipients. Only present on real time messaging.")
public Boolean getExternalRecipients() {
return externalRecipients;
}
public void setExternalRecipients(Boolean externalRecipients) {
this.externalRecipients = externalRecipients;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V4Message v4Message = (V4Message) o;
return Objects.equals(this.messageId, v4Message.messageId) &&
Objects.equals(this.timestamp, v4Message.timestamp) &&
Objects.equals(this.message, v4Message.message) &&
Objects.equals(this.data, v4Message.data) &&
Objects.equals(this.attachments, v4Message.attachments) &&
Objects.equals(this.user, v4Message.user) &&
Objects.equals(this.stream, v4Message.stream) &&
Objects.equals(this.externalRecipients, v4Message.externalRecipients);
}
@Override
public int hashCode() {
return Objects.hash(messageId, timestamp, message, data, attachments, user, stream, externalRecipients);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V4Message {\n");
sb.append(" messageId: ").append(toIndentedString(messageId)).append("\n");
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" data: ").append(toIndentedString(data)).append("\n");
sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n");
sb.append(" user: ").append(toIndentedString(user)).append("\n");
sb.append(" stream: ").append(toIndentedString(stream)).append("\n");
sb.append(" externalRecipients: ").append(toIndentedString(externalRecipients)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}