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

com.symphony.api.model.V2Message Maven / Gradle / Ivy

There is a newer version: 8.0.5
Show newest version
package com.symphony.api.model;

import com.symphony.api.model.AttachmentInfo;
import com.symphony.api.model.V2BaseMessage;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;

import io.swagger.v3.oas.annotations.media.Schema;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonCreator;

/**
  * A representation of a message sent by a user of Symphony.
 **/
@Schema(description="A representation of a message sent by a user of Symphony.")
public class V2Message extends V2BaseMessage  {
  
  @Schema(required = true, description = "Message text in MessageML")
 /**
   * Message text in MessageML  
  **/
  private String message = null;
  
  @Schema(required = true, description = "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).")
 /**
   * 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).  
  **/
  private Long fromUserId = null;
  
  @Schema(description = "")
  private List attachments = null;
 /**
   * Message text in MessageML
   * @return message
  **/
  @JsonProperty("message")
  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }

  public V2Message message(String message) {
    this.message = message;
    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
  **/
  @JsonProperty("fromUserId")
  public Long getFromUserId() {
    return fromUserId;
  }

  public void setFromUserId(Long fromUserId) {
    this.fromUserId = fromUserId;
  }

  public V2Message fromUserId(Long fromUserId) {
    this.fromUserId = fromUserId;
    return this;
  }

 /**
   * Get attachments
   * @return attachments
  **/
  @JsonProperty("attachments")
  public List getAttachments() {
    return attachments;
  }

  public void setAttachments(List attachments) {
    this.attachments = attachments;
  }

  public V2Message attachments(List attachments) {
    this.attachments = attachments;
    return this;
  }

  public V2Message addAttachmentsItem(AttachmentInfo attachmentsItem) {
    this.attachments.add(attachmentsItem);
    return this;
  }


  @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 static String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy