package tech.easyflow.ai.chattime.availability;

/**
 * 聊天时工具可用性判定结果。
 */
public class ChatTimeToolAvailabilityDecision {

    private boolean available;

    private String reasonCode;

    private String reasonMessage;

    /**
     * 创建可用判定。
     *
     * @return 可用判定
     */
    public static ChatTimeToolAvailabilityDecision available() {
        ChatTimeToolAvailabilityDecision decision = new ChatTimeToolAvailabilityDecision();
        decision.setAvailable(true);
        return decision;
    }

    /**
     * 创建不可用判定。
     *
     * @param reasonCode 原因编码
     * @param reasonMessage 原因说明
     * @return 不可用判定
     */
    public static ChatTimeToolAvailabilityDecision unavailable(String reasonCode, String reasonMessage) {
        ChatTimeToolAvailabilityDecision decision = new ChatTimeToolAvailabilityDecision();
        decision.setAvailable(false);
        decision.setReasonCode(reasonCode);
        decision.setReasonMessage(reasonMessage);
        return decision;
    }

    public boolean isAvailable() {
        return available;
    }

    public void setAvailable(boolean available) {
        this.available = available;
    }

    public String getReasonCode() {
        return reasonCode;
    }

    public void setReasonCode(String reasonCode) {
        this.reasonCode = reasonCode;
    }

    public String getReasonMessage() {
        return reasonMessage;
    }

    public void setReasonMessage(String reasonMessage) {
        this.reasonMessage = reasonMessage;
    }
}
