"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cast_de_nrw_schule_svws_core_data_db_SchemaListeEintrag = exports.SchemaListeEintrag = void 0;
const JavaObject_1 = require("../../../java/lang/JavaObject");
class SchemaListeEintrag extends JavaObject_1.JavaObject {
    name = null;
    revision = 0;
    isTainted = false;
    constructor() {
        super();
    }
    isTranspiledInstanceOf(name) {
        return ['de.nrw.schule.svws.core.data.db.SchemaListeEintrag'].includes(name);
    }
    static transpilerFromJSON(json) {
        const obj = JSON.parse(json);
        const result = new SchemaListeEintrag();
        result.name = typeof obj.name === "undefined" ? null : obj.name;
        if (typeof obj.revision === "undefined")
            throw new Error('invalid json format, missing attribute revision');
        result.revision = obj.revision;
        if (typeof obj.isTainted === "undefined")
            throw new Error('invalid json format, missing attribute isTainted');
        result.isTainted = obj.isTainted;
        return result;
    }
    static transpilerToJSON(obj) {
        let result = '{';
        result += '"name" : ' + ((!obj.name) ? 'null' : '"' + obj.name.valueOf() + '"') + ',';
        result += '"revision" : ' + obj.revision + ',';
        result += '"isTainted" : ' + obj.isTainted + ',';
        result = result.slice(0, -1);
        result += '}';
        return result;
    }
    static transpilerToJSONPatch(obj) {
        let result = '{';
        if (typeof obj.name !== "undefined") {
            result += '"name" : ' + ((!obj.name) ? 'null' : '"' + obj.name.valueOf() + '"') + ',';
        }
        if (typeof obj.revision !== "undefined") {
            result += '"revision" : ' + obj.revision + ',';
        }
        if (typeof obj.isTainted !== "undefined") {
            result += '"isTainted" : ' + obj.isTainted + ',';
        }
        result = result.slice(0, -1);
        result += '}';
        return result;
    }
}
exports.SchemaListeEintrag = SchemaListeEintrag;
function cast_de_nrw_schule_svws_core_data_db_SchemaListeEintrag(obj) {
    return obj;
}
exports.cast_de_nrw_schule_svws_core_data_db_SchemaListeEintrag = cast_de_nrw_schule_svws_core_data_db_SchemaListeEintrag;
//# sourceMappingURL=SchemaListeEintrag.js.map