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

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

export function ContractResponseFromJSON(json: any): ContractResponse {
    return ContractResponseFromJSONTyped(json, false);
}

export function ContractResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContractResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'] == null ? undefined : json['id'],
        '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 ContractResponseToJSON(json: any): ContractResponse {
    return ContractResponseToJSONTyped(json, false);
}

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

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

