UNPKG

tuix-timesheets-api

Version:

This package facilitates the client request to tuix timesheets api

64 lines 2.56 kB
"use strict"; /* 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TimesheetDTOToJSON = exports.TimesheetDTOFromJSONTyped = exports.TimesheetDTOFromJSON = exports.instanceOfTimesheetDTO = void 0; const runtime_1 = require("../runtime"); const TimesheetEntryDTO_1 = require("./TimesheetEntryDTO"); /** * Check if a given object implements the TimesheetDTO interface. */ function instanceOfTimesheetDTO(value) { let isInstance = true; return isInstance; } exports.instanceOfTimesheetDTO = instanceOfTimesheetDTO; function TimesheetDTOFromJSON(json) { return TimesheetDTOFromJSONTyped(json, false); } exports.TimesheetDTOFromJSON = TimesheetDTOFromJSON; function TimesheetDTOFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'employeeID': !(0, runtime_1.exists)(json, 'employeeID') ? undefined : json['employeeID'], 'expectedHours': !(0, runtime_1.exists)(json, 'expectedHours') ? undefined : json['expectedHours'], 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'], 'month': !(0, runtime_1.exists)(json, 'month') ? undefined : json['month'], 'projectID': !(0, runtime_1.exists)(json, 'projectID') ? undefined : json['projectID'], 'status': !(0, runtime_1.exists)(json, 'status') ? undefined : json['status'], 'timesheetEntries': !(0, runtime_1.exists)(json, 'timesheet_entries') ? undefined : (json['timesheet_entries'].map(TimesheetEntryDTO_1.TimesheetEntryDTOFromJSON)), }; } exports.TimesheetDTOFromJSONTyped = TimesheetDTOFromJSONTyped; function TimesheetDTOToJSON(value) { 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.map(TimesheetEntryDTO_1.TimesheetEntryDTOToJSON)), }; } exports.TimesheetDTOToJSON = TimesheetDTOToJSON; //# sourceMappingURL=TimesheetDTO.js.map