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

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

export function UpdateContractRequestFromJSON(json: any): UpdateContractRequest {
    return UpdateContractRequestFromJSONTyped(json, false);
}

export function UpdateContractRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateContractRequest {
    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'])),
        'status': json['status'] == null ? undefined : json['status'],
        '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 UpdateContractRequestToJSON(json: any): UpdateContractRequest {
    return UpdateContractRequestToJSONTyped(json, false);
}

export function UpdateContractRequestToJSONTyped(value?: UpdateContractRequest | 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)),
        'status': value['status'],
        'weeklyHours': value['weeklyHours'],
        'hourlyWage': value['hourlyWage'],
        'allowancesDescription': value['allowancesDescription'],
        'overtimeRules': value['overtimeRules'],
        'vacationDaysPerYear': value['vacationDaysPerYear'],
        'probationPeriodMonths': value['probationPeriodMonths'],
    };
}

