package com.easyagents.skill.codec;

import com.easyagents.skill.model.SkillPackageLayout;

/**
 * Skill 包编码结果。
 */
public final class SkillPackageWriteResult {

    private final String packageHash;
    private final long size;
    private final int entryCount;
    private final SkillPackageLayout layout;

    /**
     * 创建带包形态的编码结果。
     *
     * @param packageHash 输出 ZIP SHA-256
     * @param size 输出字节数
     * @param entryCount 输出 entry 数
     * @param layout 输出包形态
     */
    public SkillPackageWriteResult(String packageHash, long size, int entryCount,
                                   SkillPackageLayout layout) {
        this.packageHash = packageHash;
        this.size = size;
        this.entryCount = entryCount;
        this.layout = layout == null ? SkillPackageLayout.SINGLE_DIRECTORY : layout;
    }

    /** @return 输出 ZIP SHA-256 */
    public String getPackageHash() {
        return packageHash;
    }

    /** @return 输出字节数 */
    public long getSize() {
        return size;
    }

    /** @return 输出 entry 数 */
    public int getEntryCount() {
        return entryCount;
    }

    /** @return 输出包形态 */
    public SkillPackageLayout getLayout() {
        return layout;
    }
}
