/* tslint:disable */
/* eslint-disable */
/**
 * Tuix Services
 * Tuix Services API
 *
 * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime';
import type { TimesheetEntryDTO } from './TimesheetEntryDTO';
import {
    TimesheetEntryDTOFromJSON,
    TimesheetEntryDTOFromJSONTyped,
    TimesheetEntryDTOToJSON,
} from './TimesheetEntryDTO';

/**
 * 
 * @export
 * @interface TimesheetDTO
 */
export interface TimesheetDTO {
    /**
     * 
     * @type {string}
     * @memberof TimesheetDTO
     */
    employeeID?: string;
    /**
     * 
     * @type {number}
     * @memberof TimesheetDTO
     */
    expectedHours?: number;
    /**
     * 
     * @type {string}
     * @memberof TimesheetDTO
     */
    id?: string;
    /**
     * 
     * @type {string}
     * @memberof TimesheetDTO
     */
    month?: string;
    /**
     * 
     * @type {string}
     * @memberof TimesheetDTO
     */
    projectID?: string;
    /**
     * 
     * @type {string}
     * @memberof TimesheetDTO
     */
    status?: string;
    /**
     * 
     * @type {Array<TimesheetEntryDTO>}
     * @memberof TimesheetDTO
     */
    timesheetEntries?: Array<TimesheetEntryDTO>;
}

/**
 * Check if a given object implements the TimesheetDTO interface.
 */
export function instanceOfTimesheetDTO(value: object): boolean {
    let isInstance = true;

    return isInstance;
}

export function TimesheetDTOFromJSON(json: any): TimesheetDTO {
    return TimesheetDTOFromJSONTyped(json, false);
}

export function TimesheetDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimesheetDTO {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'employeeID': !exists(json, 'employeeID') ? undefined : json['employeeID'],
        'expectedHours': !exists(json, 'expectedHours') ? undefined : json['expectedHours'],
        'id': !exists(json, 'id') ? undefined : json['id'],
        'month': !exists(json, 'month') ? undefined : json['month'],
        'projectID': !exists(json, 'projectID') ? undefined : json['projectID'],
        'status': !exists(json, 'status') ? undefined : json['status'],
        'timesheetEntries': !exists(json, 'timesheet_entries') ? undefined : ((json['timesheet_entries'] as Array<any>).map(TimesheetEntryDTOFromJSON)),
    };
}

export function TimesheetDTOToJSON(value?: TimesheetDTO | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'employeeID': value.employeeID,
        'expectedHours': value.expectedHours,
        'id': value.id,
        'month': value.month,
        'projectID': value.projectID,
        'status': value.status,
        'timesheet_entries': value.timesheetEntries === undefined ? undefined : ((value.timesheetEntries as Array<any>).map(TimesheetEntryDTOToJSON)),
    };
}

