package tech.easyflow.agent.runtime.composer;

import tech.easyflow.agent.runtime.media.AgentMediaUploadView;

import java.time.Instant;
import java.util.ArrayList;
import java.util.List;

/**
 * 可跨刷新恢复的 Agent 聊天输入草稿。
 */
public class AgentComposerDraft {

    private String mode;
    private String agentId;
    private String sessionId;
    private String text;
    private List<String> imageUploadIds = new ArrayList<>();
    private List<AgentMediaUploadView> images = new ArrayList<>();
    private long revision;
    private Instant expiresAt;

    /** @return 聊天模式 */
    public String getMode() { return mode; }
    /** @param mode 聊天模式 */
    public void setMode(String mode) { this.mode = mode; }
    /** @return Agent ID */
    public String getAgentId() { return agentId; }
    /** @param agentId Agent ID */
    public void setAgentId(String agentId) { this.agentId = agentId; }
    /** @return 会话 ID */
    public String getSessionId() { return sessionId; }
    /** @param sessionId 会话 ID */
    public void setSessionId(String sessionId) { this.sessionId = sessionId; }
    /** @return 输入文本 */
    public String getText() { return text; }
    /** @param text 输入文本 */
    public void setText(String text) { this.text = text; }
    /** @return 图片上传 ID */
    public List<String> getImageUploadIds() { return imageUploadIds; }
    /** @param imageUploadIds 图片上传 ID */
    public void setImageUploadIds(List<String> imageUploadIds) {
        this.imageUploadIds = imageUploadIds == null ? new ArrayList<>() : new ArrayList<>(imageUploadIds);
    }
    /** @return 图片展示信息 */
    public List<AgentMediaUploadView> getImages() { return images; }
    /** @param images 图片展示信息 */
    public void setImages(List<AgentMediaUploadView> images) {
        this.images = images == null ? new ArrayList<>() : new ArrayList<>(images);
    }
    /** @return 草稿修订号 */
    public long getRevision() { return revision; }
    /** @param revision 草稿修订号 */
    public void setRevision(long revision) { this.revision = revision; }
    /** @return 过期时间 */
    public Instant getExpiresAt() { return expiresAt; }
    /** @param expiresAt 过期时间 */
    public void setExpiresAt(Instant expiresAt) { this.expiresAt = expiresAt; }
}
