"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cast_de_nrw_schule_svws_core_data_kataloge_NationalitaetKatalogEintrag = exports.NationalitaetKatalogEintrag = void 0;
const JavaObject_1 = require("../../../java/lang/JavaObject");
class NationalitaetKatalogEintrag extends JavaObject_1.JavaObject {
    id = null;
    land = null;
    staatsangehoerigkeit = null;
    constructor() {
        super();
    }
    isTranspiledInstanceOf(name) {
        return ['de.nrw.schule.svws.core.data.kataloge.NationalitaetKatalogEintrag'].includes(name);
    }
    static transpilerFromJSON(json) {
        const obj = JSON.parse(json);
        const result = new NationalitaetKatalogEintrag();
        result.id = typeof obj.id === "undefined" ? null : obj.id;
        result.land = typeof obj.land === "undefined" ? null : obj.land;
        result.staatsangehoerigkeit = typeof obj.staatsangehoerigkeit === "undefined" ? null : obj.staatsangehoerigkeit;
        return result;
    }
    static transpilerToJSON(obj) {
        let result = '{';
        result += '"id" : ' + ((!obj.id) ? 'null' : '"' + obj.id.valueOf() + '"') + ',';
        result += '"land" : ' + ((!obj.land) ? 'null' : '"' + obj.land.valueOf() + '"') + ',';
        result += '"staatsangehoerigkeit" : ' + ((!obj.staatsangehoerigkeit) ? 'null' : '"' + obj.staatsangehoerigkeit.valueOf() + '"') + ',';
        result = result.slice(0, -1);
        result += '}';
        return result;
    }
    static transpilerToJSONPatch(obj) {
        let result = '{';
        if (typeof obj.id !== "undefined") {
            result += '"id" : ' + ((!obj.id) ? 'null' : '"' + obj.id.valueOf() + '"') + ',';
        }
        if (typeof obj.land !== "undefined") {
            result += '"land" : ' + ((!obj.land) ? 'null' : '"' + obj.land.valueOf() + '"') + ',';
        }
        if (typeof obj.staatsangehoerigkeit !== "undefined") {
            result += '"staatsangehoerigkeit" : ' + ((!obj.staatsangehoerigkeit) ? 'null' : '"' + obj.staatsangehoerigkeit.valueOf() + '"') + ',';
        }
        result = result.slice(0, -1);
        result += '}';
        return result;
    }
}
exports.NationalitaetKatalogEintrag = NationalitaetKatalogEintrag;
function cast_de_nrw_schule_svws_core_data_kataloge_NationalitaetKatalogEintrag(obj) {
    return obj;
}
exports.cast_de_nrw_schule_svws_core_data_kataloge_NationalitaetKatalogEintrag = cast_de_nrw_schule_svws_core_data_kataloge_NationalitaetKatalogEintrag;
//# sourceMappingURL=NationalitaetKatalogEintrag.js.map