"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "IndexStruct", {
    enumerable: true,
    get: function() {
        return IndexStruct;
    }
});
const _env = require("@llamaindex/env");
class IndexStruct {
    indexId;
    summary;
    constructor(indexId = (0, _env.randomUUID)(), summary = undefined){
        this.indexId = indexId;
        this.summary = summary;
    }
    toJson() {
        return {
            indexId: this.indexId,
            summary: this.summary
        };
    }
    getSummary() {
        if (this.summary === undefined) {
            throw new Error("summary field of the index dict is not set");
        }
        return this.summary;
    }
}
