/* 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 CreateEmployeeRequest
 */
export interface CreateEmployeeRequest {
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    firstName?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    lastName?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof CreateEmployeeRequest
     */
    dateOfBirth?: Date | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    street?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    postalCode?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    city?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    country?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    phoneNumber?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    email?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof CreateEmployeeRequest
     */
    entryDate?: Date | null;
    /**
     * 
     * @type {Date}
     * @memberof CreateEmployeeRequest
     */
    exitDate?: Date | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    emergencyContactName?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    emergencyContactPhone?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    emergencyContactRelation?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    employmentType?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateEmployeeRequest
     */
    qualification?: string | null;
}

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

export function CreateEmployeeRequestFromJSON(json: any): CreateEmployeeRequest {
    return CreateEmployeeRequestFromJSONTyped(json, false);
}

export function CreateEmployeeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateEmployeeRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'firstName': json['firstName'] == null ? undefined : json['firstName'],
        'lastName': json['lastName'] == null ? undefined : json['lastName'],
        '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'],
    };
}

export function CreateEmployeeRequestToJSON(json: any): CreateEmployeeRequest {
    return CreateEmployeeRequestToJSONTyped(json, false);
}

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

    return {
        
        'firstName': value['firstName'],
        'lastName': value['lastName'],
        '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'],
    };
}

