BenutzerKennwort.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { JavaObject, cast_java_lang_Object } from '../../java/lang/JavaObject';
  2. import { JavaString, cast_java_lang_String } from '../../java/lang/JavaString';
  3. export class BenutzerKennwort extends JavaObject {
  4. public user : String | null = null;
  5. public password : String | null = null;
  6. public constructor() {
  7. super();
  8. }
  9. isTranspiledInstanceOf(name : string): boolean {
  10. return ['de.nrw.schule.svws.core.data.BenutzerKennwort'].includes(name);
  11. }
  12. public static transpilerFromJSON(json : string): BenutzerKennwort {
  13. const obj = JSON.parse(json);
  14. const result = new BenutzerKennwort();
  15. result.user = typeof obj.user === "undefined" ? null : obj.user;
  16. result.password = typeof obj.password === "undefined" ? null : obj.password;
  17. return result;
  18. }
  19. public static transpilerToJSON(obj : BenutzerKennwort) : string {
  20. let result = '{';
  21. result += '"user" : ' + ((!obj.user) ? 'null' : '"' + obj.user.valueOf() + '"') + ',';
  22. result += '"password" : ' + ((!obj.password) ? 'null' : '"' + obj.password.valueOf() + '"') + ',';
  23. result = result.slice(0, -1);
  24. result += '}';
  25. return result;
  26. }
  27. public static transpilerToJSONPatch(obj : Partial<BenutzerKennwort>) : string {
  28. let result = '{';
  29. if (typeof obj.user !== "undefined") {
  30. result += '"user" : ' + ((!obj.user) ? 'null' : '"' + obj.user.valueOf() + '"') + ',';
  31. }
  32. if (typeof obj.password !== "undefined") {
  33. result += '"password" : ' + ((!obj.password) ? 'null' : '"' + obj.password.valueOf() + '"') + ',';
  34. }
  35. result = result.slice(0, -1);
  36. result += '}';
  37. return result;
  38. }
  39. }
  40. export function cast_de_nrw_schule_svws_core_data_BenutzerKennwort(obj : unknown) : BenutzerKennwort {
  41. return obj as BenutzerKennwort;
  42. }