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