org.symphonyoss.symphony.agent.model.V4Event 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 org.symphonyoss.symphony.agent.model.V4Initiator;
import org.symphonyoss.symphony.agent.model.V4Payload;
/**
* V4Event
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-10-14T03:33:40.723-04:00")
public class V4Event {
@JsonProperty("id")
private String id = null;
@JsonProperty("timestamp")
private Long timestamp = null;
@JsonProperty("type")
private String type = null;
@JsonProperty("initiator")
private V4Initiator initiator = null;
@JsonProperty("payload")
private V4Payload payload = null;
public V4Event id(String id) {
this.id = id;
return this;
}
/**
* Event ID
* @return id
**/
@ApiModelProperty(example = "null", value = "Event ID")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public V4Event timestamp(Long timestamp) {
this.timestamp = timestamp;
return this;
}
/**
* Timestamp of event
* @return timestamp
**/
@ApiModelProperty(example = "null", value = "Timestamp of event")
public Long getTimestamp() {
return timestamp;
}
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
public V4Event type(String type) {
this.type = type;
return this;
}
/**
* Event type, possible events are: - MESSAGESENT - SHAREDPOST - INSTANTMESSAGECREATED - ROOMCREATED - ROOMUPDATED - ROOMDEACTIVATED - ROOMREACTIVATED - USERJOINEDROOM - USERLEFTROOM - ROOMMEMBERPROMOTEDTOOWNER - ROOMMEMBERDEMOTEDFROMOWNER - CONNECTIONREQUESTED - CONNECTIONACCEPTED - MESSAGESUPPRESSED
* @return type
**/
@ApiModelProperty(example = "null", value = "Event type, possible events are: - MESSAGESENT - SHAREDPOST - INSTANTMESSAGECREATED - ROOMCREATED - ROOMUPDATED - ROOMDEACTIVATED - ROOMREACTIVATED - USERJOINEDROOM - USERLEFTROOM - ROOMMEMBERPROMOTEDTOOWNER - ROOMMEMBERDEMOTEDFROMOWNER - CONNECTIONREQUESTED - CONNECTIONACCEPTED - MESSAGESUPPRESSED ")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public V4Event initiator(V4Initiator initiator) {
this.initiator = initiator;
return this;
}
/**
* Actor who initiated the event
* @return initiator
**/
@ApiModelProperty(example = "null", value = "Actor who initiated the event")
public V4Initiator getInitiator() {
return initiator;
}
public void setInitiator(V4Initiator initiator) {
this.initiator = initiator;
}
public V4Event payload(V4Payload payload) {
this.payload = payload;
return this;
}
/**
* Holds payload for all event types
* @return payload
**/
@ApiModelProperty(example = "null", value = "Holds payload for all event types")
public V4Payload getPayload() {
return payload;
}
public void setPayload(V4Payload payload) {
this.payload = payload;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V4Event v4Event = (V4Event) o;
return Objects.equals(this.id, v4Event.id) &&
Objects.equals(this.timestamp, v4Event.timestamp) &&
Objects.equals(this.type, v4Event.type) &&
Objects.equals(this.initiator, v4Event.initiator) &&
Objects.equals(this.payload, v4Event.payload);
}
@Override
public int hashCode() {
return Objects.hash(id, timestamp, type, initiator, payload);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V4Event {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" initiator: ").append(toIndentedString(initiator)).append("\n");
sb.append(" payload: ").append(toIndentedString(payload)).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 ");
}
}