org.symphonyoss.symphony.agent.model.V2Message Maven / Gradle / Ivy
The newest version!
/*
* 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.50.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 com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.symphonyoss.symphony.agent.model.AttachmentInfo;
import org.symphonyoss.symphony.agent.model.V2BaseMessage;
/**
* 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 = "2018-03-13T13:44:51.568-04:00")
public class V2Message extends V2BaseMessage {
@JsonProperty("message")
private String message = null;
@JsonProperty("fromUserId")
private Long fromUserId = null;
@JsonProperty("attachments")
private List attachments = null;
public V2Message message(String message) {
this.message = message;
return this;
}
/**
* Message text in MessageML
* @return message
**/
@ApiModelProperty(required = true, value = "Message text in MessageML")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public V2Message fromUserId(Long fromUserId) {
this.fromUserId = fromUserId;
return this;
}
/**
* the Symphony userId of the user who sent the message. This will be populated by the server (and actually ignored if included when sending a message).
* @return fromUserId
**/
@ApiModelProperty(required = true, value = "the Symphony userId of the user who sent the message. This will be populated by the server (and actually ignored if included when sending a message).")
public Long getFromUserId() {
return fromUserId;
}
public void setFromUserId(Long fromUserId) {
this.fromUserId = fromUserId;
}
public V2Message attachments(List attachments) {
this.attachments = attachments;
return this;
}
public V2Message addAttachmentsItem(AttachmentInfo attachmentsItem) {
if (this.attachments == null) {
this.attachments = new ArrayList();
}
this.attachments.add(attachmentsItem);
return this;
}
/**
* Get attachments
* @return attachments
**/
@ApiModelProperty(value = "")
public List getAttachments() {
return attachments;
}
public void setAttachments(List attachments) {
this.attachments = attachments;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V2Message v2Message = (V2Message) o;
return Objects.equals(this.message, v2Message.message) &&
Objects.equals(this.fromUserId, v2Message.fromUserId) &&
Objects.equals(this.attachments, v2Message.attachments) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(message, fromUserId, attachments, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V2Message {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" fromUserId: ").append(toIndentedString(fromUserId)).append("\n");
sb.append(" attachments: ").append(toIndentedString(attachments)).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 ");
}
}