KursblockungInputSchueler.js 2.5 KB

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