All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.symphonyoss.symphony.agent.model.V2ImportedMessage 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;

/**
 * A historic message to be imported into the system. The importing user must have the Content Management role. Also, the importing user must be a member of the conversation it is importing into. The user that the message is intended to have come from must also be present in the conversation. The intended message timestamp must be a valid time from the past. It cannot be a future timestamp. By design, imported messages do not stream to datafeed or firehose endpoints. 
 */
@ApiModel(description = "A historic message to be imported into the system. The importing user must have the Content Management role. Also, the importing user must be a member of the conversation it is importing into. The user that the message is intended to have come from must also be present in the conversation. The intended message timestamp must be a valid time from the past. It cannot be a future timestamp. By design, imported messages do not stream to datafeed or firehose endpoints. ")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-03-13T13:44:51.568-04:00")
public class V2ImportedMessage {
  @JsonProperty("message")
  private String message = null;

  /**
   * Gets or Sets format
   */
  public enum FormatEnum {
    TEXT("TEXT"),
    
    MESSAGEML("MESSAGEML");

    private String value;

    FormatEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static FormatEnum fromValue(String text) {
      for (FormatEnum b : FormatEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }
  }

  @JsonProperty("format")
  private FormatEnum format = null;

  @JsonProperty("intendedMessageTimestamp")
  private Long intendedMessageTimestamp = null;

  @JsonProperty("intendedMessageFromUserId")
  private Long intendedMessageFromUserId = null;

  @JsonProperty("originatingSystemId")
  private String originatingSystemId = null;

  @JsonProperty("originalMessageId")
  private String originalMessageId = null;

  @JsonProperty("streamId")
  private String streamId = null;

  public V2ImportedMessage 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 V2ImportedMessage format(FormatEnum format) {
    this.format = format;
    return this;
  }

   /**
   * Get format
   * @return format
  **/
  @ApiModelProperty(value = "")
  public FormatEnum getFormat() {
    return format;
  }

  public void setFormat(FormatEnum format) {
    this.format = format;
  }

  public V2ImportedMessage intendedMessageTimestamp(Long intendedMessageTimestamp) {
    this.intendedMessageTimestamp = intendedMessageTimestamp;
    return this;
  }

   /**
   * The timestamp representing the time when the message was sent in the original system in milliseconds since Jan 1st 1970. 
   * @return intendedMessageTimestamp
  **/
  @ApiModelProperty(required = true, value = "The timestamp representing the time when the message was sent in the original system in milliseconds since Jan 1st 1970. ")
  public Long getIntendedMessageTimestamp() {
    return intendedMessageTimestamp;
  }

  public void setIntendedMessageTimestamp(Long intendedMessageTimestamp) {
    this.intendedMessageTimestamp = intendedMessageTimestamp;
  }

  public V2ImportedMessage intendedMessageFromUserId(Long intendedMessageFromUserId) {
    this.intendedMessageFromUserId = intendedMessageFromUserId;
    return this;
  }

   /**
   * The long integer userid of the Symphony user who you intend to show sent the message. 
   * @return intendedMessageFromUserId
  **/
  @ApiModelProperty(required = true, value = "The long integer userid of the Symphony user who you intend to show sent the message. ")
  public Long getIntendedMessageFromUserId() {
    return intendedMessageFromUserId;
  }

  public void setIntendedMessageFromUserId(Long intendedMessageFromUserId) {
    this.intendedMessageFromUserId = intendedMessageFromUserId;
  }

  public V2ImportedMessage originatingSystemId(String originatingSystemId) {
    this.originatingSystemId = originatingSystemId;
    return this;
  }

   /**
   * The ID of the system through which the message was originally sent. 
   * @return originatingSystemId
  **/
  @ApiModelProperty(required = true, value = "The ID of the system through which the message was originally sent. ")
  public String getOriginatingSystemId() {
    return originatingSystemId;
  }

  public void setOriginatingSystemId(String originatingSystemId) {
    this.originatingSystemId = originatingSystemId;
  }

  public V2ImportedMessage originalMessageId(String originalMessageId) {
    this.originalMessageId = originalMessageId;
    return this;
  }

   /**
   * The ID of the message in the original system. 
   * @return originalMessageId
  **/
  @ApiModelProperty(value = "The ID of the message in the original system. ")
  public String getOriginalMessageId() {
    return originalMessageId;
  }

  public void setOriginalMessageId(String originalMessageId) {
    this.originalMessageId = originalMessageId;
  }

  public V2ImportedMessage streamId(String streamId) {
    this.streamId = streamId;
    return this;
  }

   /**
   * Get streamId
   * @return streamId
  **/
  @ApiModelProperty(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;
    }
    V2ImportedMessage v2ImportedMessage = (V2ImportedMessage) o;
    return Objects.equals(this.message, v2ImportedMessage.message) &&
        Objects.equals(this.format, v2ImportedMessage.format) &&
        Objects.equals(this.intendedMessageTimestamp, v2ImportedMessage.intendedMessageTimestamp) &&
        Objects.equals(this.intendedMessageFromUserId, v2ImportedMessage.intendedMessageFromUserId) &&
        Objects.equals(this.originatingSystemId, v2ImportedMessage.originatingSystemId) &&
        Objects.equals(this.originalMessageId, v2ImportedMessage.originalMessageId) &&
        Objects.equals(this.streamId, v2ImportedMessage.streamId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(message, format, intendedMessageTimestamp, intendedMessageFromUserId, originatingSystemId, originalMessageId, streamId);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V2ImportedMessage {\n");
    
    sb.append("    message: ").append(toIndentedString(message)).append("\n");
    sb.append("    format: ").append(toIndentedString(format)).append("\n");
    sb.append("    intendedMessageTimestamp: ").append(toIndentedString(intendedMessageTimestamp)).append("\n");
    sb.append("    intendedMessageFromUserId: ").append(toIndentedString(intendedMessageFromUserId)).append("\n");
    sb.append("    originatingSystemId: ").append(toIndentedString(originatingSystemId)).append("\n");
    sb.append("    originalMessageId: ").append(toIndentedString(originalMessageId)).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    ");
  }
  
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy