export namespace models {
	
	export class Agent {
	    matricule: string;
	    nom: string;
	    prenom: string;
	    display: string;
	
	    static createFrom(source: any = {}) {
	        return new Agent(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.matricule = source["matricule"];
	        this.nom = source["nom"];
	        this.prenom = source["prenom"];
	        this.display = source["display"];
	    }
	}
	export class AgentTotals {
	    matricule: string;
	    q471: number;
	    q456: number;
	    q459: number;
	    q458: number;
	    nbDimFerie: number;
	
	    static createFrom(source: any = {}) {
	        return new AgentTotals(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.matricule = source["matricule"];
	        this.q471 = source["q471"];
	        this.q456 = source["q456"];
	        this.q459 = source["q459"];
	        this.q458 = source["q458"];
	        this.nbDimFerie = source["nbDimFerie"];
	    }
	}
	export class CalculateRequest {
	    profileId: string;
	    q456: number;
	    q458: number;
	    q459: number;
	    q471: number;
	    nbDimFerie: number;
	
	    static createFrom(source: any = {}) {
	        return new CalculateRequest(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.profileId = source["profileId"];
	        this.q456 = source["q456"];
	        this.q458 = source["q458"];
	        this.q459 = source["q459"];
	        this.q471 = source["q471"];
	        this.nbDimFerie = source["nbDimFerie"];
	    }
	}
	export class Line {
	    code: string;
	    label: string;
	    rate: number;
	    quantity: number;
	    amount: number;
	    unit: string;
	
	    static createFrom(source: any = {}) {
	        return new Line(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.code = source["code"];
	        this.label = source["label"];
	        this.rate = source["rate"];
	        this.quantity = source["quantity"];
	        this.amount = source["amount"];
	        this.unit = source["unit"];
	    }
	}
	export class CalculateResponse {
	    lines: Line[];
	    total: number;
	
	    static createFrom(source: any = {}) {
	        return new CalculateResponse(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.lines = this.convertValues(source["lines"], Line);
	        this.total = source["total"];
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class ExportPDFMeta {
	    yearMonth: string;
	    nom: string;
	    prenom: string;
	    matricule: string;
	
	    static createFrom(source: any = {}) {
	        return new ExportPDFMeta(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.yearMonth = source["yearMonth"];
	        this.nom = source["nom"];
	        this.prenom = source["prenom"];
	        this.matricule = source["matricule"];
	    }
	}
	export class ExportPDFRequest {
	    meta: ExportPDFMeta;
	    request: CalculateRequest;
	
	    static createFrom(source: any = {}) {
	        return new ExportPDFRequest(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.meta = this.convertValues(source["meta"], ExportPDFMeta);
	        this.request = this.convertValues(source["request"], CalculateRequest);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class ExportPDFResponse {
	    path: string;
	
	    static createFrom(source: any = {}) {
	        return new ExportPDFResponse(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.path = source["path"];
	    }
	}
	
	export class ProfileListItem {
	    id: string;
	    label: string;
	    matricule?: string;
	
	    static createFrom(source: any = {}) {
	        return new ProfileListItem(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.id = source["id"];
	        this.label = source["label"];
	        this.matricule = source["matricule"];
	    }
	}

}

