org.symphonyoss.symphony.agent.model.BaseMessage 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 com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* BaseMessage
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-10-14T03:33:40.723-04:00")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "messageType", visible = true )
@JsonSubTypes({
@JsonSubTypes.Type(value = Message.class, name = "Message"),
})
public class BaseMessage {
@JsonProperty("id")
private String id = null;
@JsonProperty("timestamp")
private String timestamp = null;
@JsonProperty("messageType")
private String messageType = null;
@JsonProperty("streamId")
private String streamId = null;
public BaseMessage id(String id) {
this.id = id;
return this;
}
/**
* The messageId is assigned by the ingestor service when a message is sent.
* @return id
**/
@ApiModelProperty(example = "null", value = "The messageId is assigned by the ingestor service when a message is sent.")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public BaseMessage timestamp(String timestamp) {
this.timestamp = timestamp;
return this;
}
/**
* Get timestamp
* @return timestamp
**/
@ApiModelProperty(example = "null", required = true, value = "")
public String getTimestamp() {
return timestamp;
}
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
public BaseMessage messageType(String messageType) {
this.messageType = messageType;
return this;
}
/**
* Get messageType
* @return messageType
**/
@ApiModelProperty(example = "null", required = true, value = "")
public String getMessageType() {
return messageType;
}
public void setMessageType(String messageType) {
this.messageType = messageType;
}
public BaseMessage streamId(String streamId) {
this.streamId = streamId;
return this;
}
/**
* Get streamId
* @return streamId
**/
@ApiModelProperty(example = "null", required = true, value = "")
public String getStreamId() {
return streamId;
}
public void setStreamId(String streamId) {
this.streamId = streamId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BaseMessage baseMessage = (BaseMessage) o;
return Objects.equals(this.id, baseMessage.id) &&
Objects.equals(this.timestamp, baseMessage.timestamp) &&
Objects.equals(this.messageType, baseMessage.messageType) &&
Objects.equals(this.streamId, baseMessage.streamId);
}
@Override
public int hashCode() {
return Objects.hash(id, timestamp, messageType, streamId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BaseMessage {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
sb.append(" messageType: ").append(toIndentedString(messageType)).append("\n");
sb.append(" streamId: ").append(toIndentedString(streamId)).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 ");
}
}