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