/* 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 TimeEntryResponse
 */
export interface TimeEntryResponse {
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    id?: string;
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    employeeId?: string;
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    employeeName?: string | null;
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    orderId?: string;
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    facilityId?: string;
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    facilityName?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof TimeEntryResponse
     */
    date?: Date;
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    start?: string;
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    end?: string;
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    breakDuration?: string;
    /**
     * 
     * @type {number}
     * @memberof TimeEntryResponse
     */
    nightHours?: number;
    /**
     * 
     * @type {number}
     * @memberof TimeEntryResponse
     */
    saturdayHours?: number;
    /**
     * 
     * @type {number}
     * @memberof TimeEntryResponse
     */
    sundayHours?: number;
    /**
     * 
     * @type {number}
     * @memberof TimeEntryResponse
     */
    holidayHours?: number;
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    statusId?: string;
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    statusName?: string | null;
    /**
     * 
     * @type {boolean}
     * @memberof TimeEntryResponse
     */
    isEditableByOwner?: boolean;
    /**
     * 
     * @type {string}
     * @memberof TimeEntryResponse
     */
    adminNote?: string | null;
    /**
     * 
     * @type {Date}
     * @memberof TimeEntryResponse
     */
    createdAt?: Date;
}

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

export function TimeEntryResponseFromJSON(json: any): TimeEntryResponse {
    return TimeEntryResponseFromJSONTyped(json, false);
}

export function TimeEntryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimeEntryResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'] == null ? undefined : json['id'],
        'employeeId': json['employeeId'] == null ? undefined : json['employeeId'],
        'employeeName': json['employeeName'] == null ? undefined : json['employeeName'],
        'orderId': json['orderId'] == null ? undefined : json['orderId'],
        'facilityId': json['facilityId'] == null ? undefined : json['facilityId'],
        'facilityName': json['facilityName'] == null ? undefined : json['facilityName'],
        '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'],
        'statusId': json['statusId'] == null ? undefined : json['statusId'],
        'statusName': json['statusName'] == null ? undefined : json['statusName'],
        'isEditableByOwner': json['isEditableByOwner'] == null ? undefined : json['isEditableByOwner'],
        'adminNote': json['adminNote'] == null ? undefined : json['adminNote'],
        'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
    };
}

export function TimeEntryResponseToJSON(json: any): TimeEntryResponse {
    return TimeEntryResponseToJSONTyped(json, false);
}

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

    return {
        
        'id': value['id'],
        'employeeId': value['employeeId'],
        'employeeName': value['employeeName'],
        'orderId': value['orderId'],
        'facilityId': value['facilityId'],
        'facilityName': value['facilityName'],
        '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'],
        'statusId': value['statusId'],
        'statusName': value['statusName'],
        'isEditableByOwner': value['isEditableByOwner'],
        'adminNote': value['adminNote'],
        'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
    };
}

