com.symphony.api.model.V2MessageSubmission Maven / Gradle / Ivy
package com.symphony.api.model;
import com.symphony.api.model.AttachmentInfo;
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;
public class V2MessageSubmission {
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;
}
}
@Schema(description = "")
private FormatEnum format = null;
@Schema(description = "")
private String message = null;
@Schema(description = "")
private List attachments = null;
/**
* Get format
* @return format
**/
@JsonProperty("format")
public String getFormat() {
if (format == null) {
return null;
}
return format.getValue();
}
public void setFormat(FormatEnum format) {
this.format = format;
}
public V2MessageSubmission format(FormatEnum format) {
this.format = format;
return this;
}
/**
* Get message
* @return message
**/
@JsonProperty("message")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public V2MessageSubmission message(String message) {
this.message = message;
return this;
}
/**
* Get attachments
* @return attachments
**/
@JsonProperty("attachments")
public List getAttachments() {
return attachments;
}
public void setAttachments(List attachments) {
this.attachments = attachments;
}
public V2MessageSubmission attachments(List attachments) {
this.attachments = attachments;
return this;
}
public V2MessageSubmission addAttachmentsItem(AttachmentInfo attachmentsItem) {
this.attachments.add(attachmentsItem);
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V2MessageSubmission {\n");
sb.append(" format: ").append(toIndentedString(format)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).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