/* 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 UpdateTimeEntryRequest
 */
export interface UpdateTimeEntryRequest {
    /**
     * 
     * @type {string}
     * @memberof UpdateTimeEntryRequest
     */
    orderId?: string;
    /**
     * 
     * @type {Date}
     * @memberof UpdateTimeEntryRequest
     */
    date?: Date;
    /**
     * 
     * @type {string}
     * @memberof UpdateTimeEntryRequest
     */
    start?: string;
    /**
     * 
     * @type {string}
     * @memberof UpdateTimeEntryRequest
     */
    end?: string;
    /**
     * 
     * @type {string}
     * @memberof UpdateTimeEntryRequest
     */
    breakDuration?: string;
    /**
     * 
     * @type {number}
     * @memberof UpdateTimeEntryRequest
     */
    nightHours?: number;
    /**
     * 
     * @type {number}
     * @memberof UpdateTimeEntryRequest
     */
    saturdayHours?: number;
    /**
     * 
     * @type {number}
     * @memberof UpdateTimeEntryRequest
     */
    sundayHours?: number;
    /**
     * 
     * @type {number}
     * @memberof UpdateTimeEntryRequest
     */
    holidayHours?: number;
}

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

export function UpdateTimeEntryRequestFromJSON(json: any): UpdateTimeEntryRequest {
    return UpdateTimeEntryRequestFromJSONTyped(json, false);
}

export function UpdateTimeEntryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateTimeEntryRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'orderId': json['orderId'] == null ? undefined : json['orderId'],
        'date': json['date'] == null ? undefined : (new Date(json['date'])),
        'start': json['start'] == null ? undefined : json['start'],
        'end': json['end'] == null ? undefined : json['end'],
        'breakDuration': json['breakDuration'] == null ? undefined : json['breakDuration'],
        'nightHours': json['nightHours'] == null ? undefined : json['nightHours'],
        'saturdayHours': json['saturdayHours'] == null ? undefined : json['saturdayHours'],
        'sundayHours': json['sundayHours'] == null ? undefined : json['sundayHours'],
        'holidayHours': json['holidayHours'] == null ? undefined : json['holidayHours'],
    };
}

export function UpdateTimeEntryRequestToJSON(json: any): UpdateTimeEntryRequest {
    return UpdateTimeEntryRequestToJSONTyped(json, false);
}

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

    return {
        
        'orderId': value['orderId'],
        'date': value['date'] == null ? undefined : ((value['date']).toISOString().substring(0,10)),
        'start': value['start'],
        'end': value['end'],
        'breakDuration': value['breakDuration'],
        'nightHours': value['nightHours'],
        'saturdayHours': value['saturdayHours'],
        'sundayHours': value['sundayHours'],
        'holidayHours': value['holidayHours'],
    };
}

