import WarpError from "../errors/WarpError.js";
/** Runtime-backed source blob fact needed by migration planning. */
export default class GraphModelMigrationContentSource {
    legacyContentKey;
    contentOid;
    constructor(fields) {
        const checkedFields = requireFields(fields);
        this.legacyContentKey = requireNonEmptyString(checkedFields.legacyContentKey, 'legacyContentKey');
        this.contentOid = requireNonEmptyString(checkedFields.contentOid, 'contentOid');
        Object.freeze(this);
    }
}
/** Validates the constructor envelope. */
function requireFields(fields) {
    if (fields === null || fields === undefined) {
        throw new WarpError('GraphModelMigrationContentSource fields must be provided', 'E_VALIDATION');
    }
    return fields;
}
/** Validates a required non-empty string. */
function requireNonEmptyString(value, name) {
    if (typeof value !== 'string' || value.length === 0) {
        throw new WarpError(`${name} must be a non-empty string`, 'E_VALIDATION');
    }
    return value;
}
