/* tslint:disable */
/* eslint-disable */
/**
 * OmsorgCore.Api
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { mapValues } from '../runtime';
/**
 * 
 * @export
 * @interface EmployeeResponse
 */
export interface EmployeeResponse {
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    id?: string;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    firstName?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    lastName?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    status?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof EmployeeResponse
     */
    dateOfBirth?: Date | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    street?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    postalCode?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    city?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    country?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    phoneNumber?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    email?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof EmployeeResponse
     */
    entryDate?: Date | null;
    /**
     * 
     * @type {Date}
     * @memberof EmployeeResponse
     */
    exitDate?: Date | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    emergencyContactName?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    emergencyContactPhone?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    emergencyContactRelation?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    employmentType?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    qualification?: string | null;
    /**
     * 
     * @type {string}
     * @memberof EmployeeResponse
     */
    avatarFileName?: string | null;
}

/**
 * Check if a given object implements the EmployeeResponse interface.
 */
export function instanceOfEmployeeResponse(value: object): value is EmployeeResponse {
    return true;
}

export function EmployeeResponseFromJSON(json: any): EmployeeResponse {
    return EmployeeResponseFromJSONTyped(json, false);
}

export function EmployeeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmployeeResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'] == null ? undefined : json['id'],
        'firstName': json['firstName'] == null ? undefined : json['firstName'],
        'lastName': json['lastName'] == null ? undefined : json['lastName'],
        'status': json['status'] == null ? undefined : json['status'],
        'dateOfBirth': json['dateOfBirth'] == null ? undefined : (new Date(json['dateOfBirth'])),
        'street': json['street'] == null ? undefined : json['street'],
        'postalCode': json['postalCode'] == null ? undefined : json['postalCode'],
        'city': json['city'] == null ? undefined : json['city'],
        'country': json['country'] == null ? undefined : json['country'],
        'phoneNumber': json['phoneNumber'] == null ? undefined : json['phoneNumber'],
        'email': json['email'] == null ? undefined : json['email'],
        'entryDate': json['entryDate'] == null ? undefined : (new Date(json['entryDate'])),
        'exitDate': json['exitDate'] == null ? undefined : (new Date(json['exitDate'])),
        'emergencyContactName': json['emergencyContactName'] == null ? undefined : json['emergencyContactName'],
        'emergencyContactPhone': json['emergencyContactPhone'] == null ? undefined : json['emergencyContactPhone'],
        'emergencyContactRelation': json['emergencyContactRelation'] == null ? undefined : json['emergencyContactRelation'],
        'employmentType': json['employmentType'] == null ? undefined : json['employmentType'],
        'qualification': json['qualification'] == null ? undefined : json['qualification'],
        'avatarFileName': json['avatarFileName'] == null ? undefined : json['avatarFileName'],
    };
}

export function EmployeeResponseToJSON(json: any): EmployeeResponse {
    return EmployeeResponseToJSONTyped(json, false);
}

export function EmployeeResponseToJSONTyped(value?: EmployeeResponse | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'id': value['id'],
        'firstName': value['firstName'],
        'lastName': value['lastName'],
        'status': value['status'],
        'dateOfBirth': value['dateOfBirth'] === null ? null : ((value['dateOfBirth'] as any)?.toISOString().substring(0,10)),
        'street': value['street'],
        'postalCode': value['postalCode'],
        'city': value['city'],
        'country': value['country'],
        'phoneNumber': value['phoneNumber'],
        'email': value['email'],
        'entryDate': value['entryDate'] === null ? null : ((value['entryDate'] as any)?.toISOString().substring(0,10)),
        'exitDate': value['exitDate'] === null ? null : ((value['exitDate'] as any)?.toISOString().substring(0,10)),
        'emergencyContactName': value['emergencyContactName'],
        'emergencyContactPhone': value['emergencyContactPhone'],
        'emergencyContactRelation': value['emergencyContactRelation'],
        'employmentType': value['employmentType'],
        'qualification': value['qualification'],
        'avatarFileName': value['avatarFileName'],
    };
}

