GostSchuelerFachwahl.ts 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import { JavaObject, cast_java_lang_Object } from '../../../java/lang/JavaObject';
  2. import { JavaInteger, cast_java_lang_Integer } from '../../../java/lang/JavaInteger';
  3. import { JavaString, cast_java_lang_String } from '../../../java/lang/JavaString';
  4. export class GostSchuelerFachwahl extends JavaObject {
  5. public EF1 : String | null = null;
  6. public EF2 : String | null = null;
  7. public Q11 : String | null = null;
  8. public Q12 : String | null = null;
  9. public Q21 : String | null = null;
  10. public Q22 : String | null = null;
  11. public abiturFach : Number | null = null;
  12. public constructor() {
  13. super();
  14. }
  15. isTranspiledInstanceOf(name : string): boolean {
  16. return ['de.nrw.schule.svws.core.data.gost.GostSchuelerFachwahl'].includes(name);
  17. }
  18. public static transpilerFromJSON(json : string): GostSchuelerFachwahl {
  19. const obj = JSON.parse(json);
  20. const result = new GostSchuelerFachwahl();
  21. result.EF1 = typeof obj.EF1 === "undefined" ? null : obj.EF1;
  22. result.EF2 = typeof obj.EF2 === "undefined" ? null : obj.EF2;
  23. result.Q11 = typeof obj.Q11 === "undefined" ? null : obj.Q11;
  24. result.Q12 = typeof obj.Q12 === "undefined" ? null : obj.Q12;
  25. result.Q21 = typeof obj.Q21 === "undefined" ? null : obj.Q21;
  26. result.Q22 = typeof obj.Q22 === "undefined" ? null : obj.Q22;
  27. result.abiturFach = typeof obj.abiturFach === "undefined" ? null : obj.abiturFach;
  28. return result;
  29. }
  30. public static transpilerToJSON(obj : GostSchuelerFachwahl) : string {
  31. let result = '{';
  32. result += '"EF1" : ' + ((!obj.EF1) ? 'null' : '"' + obj.EF1.valueOf() + '"') + ',';
  33. result += '"EF2" : ' + ((!obj.EF2) ? 'null' : '"' + obj.EF2.valueOf() + '"') + ',';
  34. result += '"Q11" : ' + ((!obj.Q11) ? 'null' : '"' + obj.Q11.valueOf() + '"') + ',';
  35. result += '"Q12" : ' + ((!obj.Q12) ? 'null' : '"' + obj.Q12.valueOf() + '"') + ',';
  36. result += '"Q21" : ' + ((!obj.Q21) ? 'null' : '"' + obj.Q21.valueOf() + '"') + ',';
  37. result += '"Q22" : ' + ((!obj.Q22) ? 'null' : '"' + obj.Q22.valueOf() + '"') + ',';
  38. result += '"abiturFach" : ' + ((!obj.abiturFach) ? 'null' : obj.abiturFach.valueOf()) + ',';
  39. result = result.slice(0, -1);
  40. result += '}';
  41. return result;
  42. }
  43. public static transpilerToJSONPatch(obj : Partial<GostSchuelerFachwahl>) : string {
  44. let result = '{';
  45. if (typeof obj.EF1 !== "undefined") {
  46. result += '"EF1" : ' + ((!obj.EF1) ? 'null' : '"' + obj.EF1.valueOf() + '"') + ',';
  47. }
  48. if (typeof obj.EF2 !== "undefined") {
  49. result += '"EF2" : ' + ((!obj.EF2) ? 'null' : '"' + obj.EF2.valueOf() + '"') + ',';
  50. }
  51. if (typeof obj.Q11 !== "undefined") {
  52. result += '"Q11" : ' + ((!obj.Q11) ? 'null' : '"' + obj.Q11.valueOf() + '"') + ',';
  53. }
  54. if (typeof obj.Q12 !== "undefined") {
  55. result += '"Q12" : ' + ((!obj.Q12) ? 'null' : '"' + obj.Q12.valueOf() + '"') + ',';
  56. }
  57. if (typeof obj.Q21 !== "undefined") {
  58. result += '"Q21" : ' + ((!obj.Q21) ? 'null' : '"' + obj.Q21.valueOf() + '"') + ',';
  59. }
  60. if (typeof obj.Q22 !== "undefined") {
  61. result += '"Q22" : ' + ((!obj.Q22) ? 'null' : '"' + obj.Q22.valueOf() + '"') + ',';
  62. }
  63. if (typeof obj.abiturFach !== "undefined") {
  64. result += '"abiturFach" : ' + ((!obj.abiturFach) ? 'null' : obj.abiturFach.valueOf()) + ',';
  65. }
  66. result = result.slice(0, -1);
  67. result += '}';
  68. return result;
  69. }
  70. }
  71. export function cast_de_nrw_schule_svws_core_data_gost_GostSchuelerFachwahl(obj : unknown) : GostSchuelerFachwahl {
  72. return obj as GostSchuelerFachwahl;
  73. }