/* 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 CreateContractRequest
 */
export interface CreateContractRequest {
    /**
     * 
     * @type {string}
     * @memberof CreateContractRequest
     */
    contractType?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateContractRequest
     */
    employeeId?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateContractRequest
     */
    facilityId?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof CreateContractRequest
     */
    startDate?: Date;
    /**
     * 
     * @type {Date}
     * @memberof CreateContractRequest
     */
    endDate?: Date | null;
    /**
     * 
     * @type {number}
     * @memberof CreateContractRequest
     */
    weeklyHours?: number | null;
    /**
     * 
     * @type {number}
     * @memberof CreateContractRequest
     */
    hourlyWage?: number | null;
    /**
     * 
     * @type {string}
     * @memberof CreateContractRequest
     */
    allowancesDescription?: string | null;
    /**
     * 
     * @type {string}
     * @memberof CreateContractRequest
     */
    overtimeRules?: string | null;
    /**
     * 
     * @type {number}
     * @memberof CreateContractRequest
     */
    vacationDaysPerYear?: number | null;
    /**
     * 
     * @type {number}
     * @memberof CreateContractRequest
     */
    probationPeriodMonths?: number | null;
}

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

export function CreateContractRequestFromJSON(json: any): CreateContractRequest {
    return CreateContractRequestFromJSONTyped(json, false);
}

export function CreateContractRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateContractRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'contractType': json['contractType'] == null ? undefined : json['contractType'],
        'employeeId': json['employeeId'] == null ? undefined : json['employeeId'],
        'facilityId': json['facilityId'] == null ? undefined : json['facilityId'],
        'startDate': json['startDate'] == null ? undefined : (new Date(json['startDate'])),
        'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
        'weeklyHours': json['weeklyHours'] == null ? undefined : json['weeklyHours'],
        'hourlyWage': json['hourlyWage'] == null ? undefined : json['hourlyWage'],
        'allowancesDescription': json['allowancesDescription'] == null ? undefined : json['allowancesDescription'],
        'overtimeRules': json['overtimeRules'] == null ? undefined : json['overtimeRules'],
        'vacationDaysPerYear': json['vacationDaysPerYear'] == null ? undefined : json['vacationDaysPerYear'],
        'probationPeriodMonths': json['probationPeriodMonths'] == null ? undefined : json['probationPeriodMonths'],
    };
}

export function CreateContractRequestToJSON(json: any): CreateContractRequest {
    return CreateContractRequestToJSONTyped(json, false);
}

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

    return {
        
        'contractType': value['contractType'],
        'employeeId': value['employeeId'],
        'facilityId': value['facilityId'],
        'startDate': value['startDate'] == null ? undefined : ((value['startDate']).toISOString().substring(0,10)),
        'endDate': value['endDate'] === null ? null : ((value['endDate'] as any)?.toISOString().substring(0,10)),
        'weeklyHours': value['weeklyHours'],
        'hourlyWage': value['hourlyWage'],
        'allowancesDescription': value['allowancesDescription'],
        'overtimeRules': value['overtimeRules'],
        'vacationDaysPerYear': value['vacationDaysPerYear'],
        'probationPeriodMonths': value['probationPeriodMonths'],
    };
}

