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

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

export function CreateTimeEntryRequestFromJSON(json: any): CreateTimeEntryRequest {
    return CreateTimeEntryRequestFromJSONTyped(json, false);
}

export function CreateTimeEntryRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTimeEntryRequest {
    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 CreateTimeEntryRequestToJSON(json: any): CreateTimeEntryRequest {
    return CreateTimeEntryRequestToJSONTyped(json, false);
}

export function CreateTimeEntryRequestToJSONTyped(value?: CreateTimeEntryRequest | 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'],
    };
}

