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

org.teamapps.dto.UiChatDisplay Maven / Gradle / Ivy

There is a newer version: 0.9.194
Show newest version
package org.teamapps.dto;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Supplier;
import java.util.stream.Collectors;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver;

/**
 * THIS IS GENERATED CODE!
 * PLEASE DO NOT MODIFY - ALL YOUR WORK WOULD BE LOST!
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, property = "_type")
@JsonTypeIdResolver(TeamAppsJacksonTypeIdResolver.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UiChatDisplay extends UiComponent implements UiObject {


	protected List messages;
	protected boolean includesFirstMessage;

	public UiChatDisplay() {
		super();
	}

	@com.fasterxml.jackson.annotation.JsonIgnore
	public UiObjectType getUiObjectType() {
		return UiObjectType.UI_CHAT_DISPLAY;
	}

	@SuppressWarnings("unchecked")
	public String toString() {
		return new StringBuilder(getClass().getSimpleName()).append(": ")
				.append("id=" + id).append(", ")
				.append("visible=" + visible).append(", ")
				.append("stylesBySelector=" + stylesBySelector).append(", ")
				.append("includesFirstMessage=" + includesFirstMessage).append(", ")
				.append(messages != null ? "messages={" + messages.toString() + "}" : "")
				.toString();
	}

	@com.fasterxml.jackson.annotation.JsonGetter("messages")
	public List getMessages() {
		return messages;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("includesFirstMessage")
	public boolean getIncludesFirstMessage() {
		return includesFirstMessage;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("id")
	public UiChatDisplay setId(String id) {
		this.id = id;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("visible")
	public UiChatDisplay setVisible(boolean visible) {
		this.visible = visible;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("stylesBySelector")
	public UiChatDisplay setStylesBySelector(Map> stylesBySelector) {
		this.stylesBySelector = stylesBySelector;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("messages")
	public UiChatDisplay setMessages(List messages) {
		this.messages = messages;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("includesFirstMessage")
	public UiChatDisplay setIncludesFirstMessage(boolean includesFirstMessage) {
		this.includesFirstMessage = includesFirstMessage;
		return this;
	}

	public static class PreviousMessagesRequestedEvent implements UiEvent {

		@UiComponentId protected String componentId;
		protected String earliestKnownMessageId;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public PreviousMessagesRequestedEvent() {
			// default constructor for Jackson
		}

		public PreviousMessagesRequestedEvent(String componentId, String earliestKnownMessageId) {
			this.componentId = componentId;
			this.earliestKnownMessageId = earliestKnownMessageId;
		}

		public UiEventType getUiEventType() {
			return UiEventType.UI_CHAT_DISPLAY_PREVIOUS_MESSAGES_REQUESTED;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("earliestKnownMessageId=" + earliestKnownMessageId)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("earliestKnownMessageId")
		public String getEarliestKnownMessageId() {
			return earliestKnownMessageId;
		}

	}

	public static class AddChatMessagesCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected List chatMessages;
		protected boolean prepend;
		protected boolean includesFirstMessage;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public AddChatMessagesCommand() {
			// default constructor for Jackson
		}

		public AddChatMessagesCommand(String componentId, List chatMessages, boolean prepend, boolean includesFirstMessage) {
			this.componentId = componentId;
			this.chatMessages = chatMessages;
			this.prepend = prepend;
			this.includesFirstMessage = includesFirstMessage;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("prepend=" + prepend).append(", ")
					.append("includesFirstMessage=" + includesFirstMessage).append(", ")
					.append(chatMessages != null ? "chatMessages={" + chatMessages.toString() + "}" : "")
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("chatMessages")
		public List getChatMessages() {
			return chatMessages;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("prepend")
		public boolean getPrepend() {
			return prepend;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("includesFirstMessage")
		public boolean getIncludesFirstMessage() {
			return includesFirstMessage;
		}

	}

	public static class ReplaceChatMessagesCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected List chatMessages;
		protected boolean includesFirstMessage;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public ReplaceChatMessagesCommand() {
			// default constructor for Jackson
		}

		public ReplaceChatMessagesCommand(String componentId, List chatMessages, boolean includesFirstMessage) {
			this.componentId = componentId;
			this.chatMessages = chatMessages;
			this.includesFirstMessage = includesFirstMessage;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("includesFirstMessage=" + includesFirstMessage).append(", ")
					.append(chatMessages != null ? "chatMessages={" + chatMessages.toString() + "}" : "")
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("chatMessages")
		public List getChatMessages() {
			return chatMessages;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("includesFirstMessage")
		public boolean getIncludesFirstMessage() {
			return includesFirstMessage;
		}

	}




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy