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