KursblockungInputKurs.js 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.cast_de_nrw_schule_svws_core_data_kursblockung_KursblockungInputKurs = exports.KursblockungInputKurs = void 0;
  4. const JavaObject_1 = require("../../../java/lang/JavaObject");
  5. class KursblockungInputKurs extends JavaObject_1.JavaObject {
  6. enmRevision = -1;
  7. id = 0;
  8. fach = 0;
  9. kursart = 0;
  10. schienen = 0;
  11. representation = "";
  12. constructor() {
  13. super();
  14. }
  15. isTranspiledInstanceOf(name) {
  16. return ['de.nrw.schule.svws.core.data.kursblockung.KursblockungInputKurs'].includes(name);
  17. }
  18. static transpilerFromJSON(json) {
  19. const obj = JSON.parse(json);
  20. const result = new KursblockungInputKurs();
  21. if (typeof obj.enmRevision === "undefined")
  22. throw new Error('invalid json format, missing attribute enmRevision');
  23. result.enmRevision = obj.enmRevision;
  24. if (typeof obj.id === "undefined")
  25. throw new Error('invalid json format, missing attribute id');
  26. result.id = obj.id;
  27. if (typeof obj.fach === "undefined")
  28. throw new Error('invalid json format, missing attribute fach');
  29. result.fach = obj.fach;
  30. if (typeof obj.kursart === "undefined")
  31. throw new Error('invalid json format, missing attribute kursart');
  32. result.kursart = obj.kursart;
  33. if (typeof obj.schienen === "undefined")
  34. throw new Error('invalid json format, missing attribute schienen');
  35. result.schienen = obj.schienen;
  36. if (typeof obj.representation === "undefined")
  37. throw new Error('invalid json format, missing attribute representation');
  38. result.representation = obj.representation;
  39. return result;
  40. }
  41. static transpilerToJSON(obj) {
  42. let result = '{';
  43. result += '"enmRevision" : ' + obj.enmRevision + ',';
  44. result += '"id" : ' + obj.id + ',';
  45. result += '"fach" : ' + obj.fach + ',';
  46. result += '"kursart" : ' + obj.kursart + ',';
  47. result += '"schienen" : ' + obj.schienen + ',';
  48. result += '"representation" : ' + '"' + obj.representation.valueOf() + '"' + ',';
  49. result = result.slice(0, -1);
  50. result += '}';
  51. return result;
  52. }
  53. static transpilerToJSONPatch(obj) {
  54. let result = '{';
  55. if (typeof obj.enmRevision !== "undefined") {
  56. result += '"enmRevision" : ' + obj.enmRevision + ',';
  57. }
  58. if (typeof obj.id !== "undefined") {
  59. result += '"id" : ' + obj.id + ',';
  60. }
  61. if (typeof obj.fach !== "undefined") {
  62. result += '"fach" : ' + obj.fach + ',';
  63. }
  64. if (typeof obj.kursart !== "undefined") {
  65. result += '"kursart" : ' + obj.kursart + ',';
  66. }
  67. if (typeof obj.schienen !== "undefined") {
  68. result += '"schienen" : ' + obj.schienen + ',';
  69. }
  70. if (typeof obj.representation !== "undefined") {
  71. result += '"representation" : ' + '"' + obj.representation.valueOf() + '"' + ',';
  72. }
  73. result = result.slice(0, -1);
  74. result += '}';
  75. return result;
  76. }
  77. }
  78. exports.KursblockungInputKurs = KursblockungInputKurs;
  79. function cast_de_nrw_schule_svws_core_data_kursblockung_KursblockungInputKurs(obj) {
  80. return obj;
  81. }
  82. exports.cast_de_nrw_schule_svws_core_data_kursblockung_KursblockungInputKurs = cast_de_nrw_schule_svws_core_data_kursblockung_KursblockungInputKurs;
  83. //# sourceMappingURL=KursblockungInputKurs.js.map