UNPKG

tuix-timesheets-api

Version:

This package facilitates the client request to tuix timesheets api

135 lines (124 loc) 3.63 kB
/* 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 { TimesheetEmployeeInfo } from './TimesheetEmployeeInfo'; import { TimesheetEmployeeInfoFromJSON, TimesheetEmployeeInfoFromJSONTyped, TimesheetEmployeeInfoToJSON, } from './TimesheetEmployeeInfo'; import type { TimesheetEntryDTO } from './TimesheetEntryDTO'; import { TimesheetEntryDTOFromJSON, TimesheetEntryDTOFromJSONTyped, TimesheetEntryDTOToJSON, } from './TimesheetEntryDTO'; /** * * @export * @interface TimesheetDTO */ export interface TimesheetDTO { /** * * @type {TimesheetEmployeeInfo} * @memberof TimesheetDTO */ employeeData?: TimesheetEmployeeInfo; /** * * @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 { 'employeeData': !exists(json, 'employeeData') ? undefined : TimesheetEmployeeInfoFromJSON(json['employeeData']), '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 { 'employeeData': TimesheetEmployeeInfoToJSON(value.employeeData), '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)), }; }