tuix-timesheets-api
Version:
This package facilitates the client request to tuix timesheets api
126 lines (115 loc) • 3.3 kB
text/typescript
/* 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 { AdjustedTimesheetEntryDTO } from './AdjustedTimesheetEntryDTO';
import {
AdjustedTimesheetEntryDTOFromJSON,
AdjustedTimesheetEntryDTOFromJSONTyped,
AdjustedTimesheetEntryDTOToJSON,
} from './AdjustedTimesheetEntryDTO';
/**
*
* @export
* @interface AdjustedTimesheetDTO
*/
export interface AdjustedTimesheetDTO {
/**
*
* @type {string}
* @memberof AdjustedTimesheetDTO
*/
employeeID: string;
/**
*
* @type {Array<AdjustedTimesheetEntryDTO>}
* @memberof AdjustedTimesheetDTO
*/
entries?: Array<AdjustedTimesheetEntryDTO>;
/**
*
* @type {number}
* @memberof AdjustedTimesheetDTO
*/
expectedHours?: number;
/**
*
* @type {string}
* @memberof AdjustedTimesheetDTO
*/
id: string;
/**
*
* @type {string}
* @memberof AdjustedTimesheetDTO
*/
month: string;
/**
*
* @type {string}
* @memberof AdjustedTimesheetDTO
*/
projectID: string;
/**
*
* @type {string}
* @memberof AdjustedTimesheetDTO
*/
status: string;
}
/**
* Check if a given object implements the AdjustedTimesheetDTO interface.
*/
export function instanceOfAdjustedTimesheetDTO(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "employeeID" in value;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "month" in value;
isInstance = isInstance && "projectID" in value;
isInstance = isInstance && "status" in value;
return isInstance;
}
export function AdjustedTimesheetDTOFromJSON(json: any): AdjustedTimesheetDTO {
return AdjustedTimesheetDTOFromJSONTyped(json, false);
}
export function AdjustedTimesheetDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdjustedTimesheetDTO {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'employeeID': json['employeeID'],
'entries': !exists(json, 'entries') ? undefined : ((json['entries'] as Array<any>).map(AdjustedTimesheetEntryDTOFromJSON)),
'expectedHours': !exists(json, 'expectedHours') ? undefined : json['expectedHours'],
'id': json['id'],
'month': json['month'],
'projectID': json['projectID'],
'status': json['status'],
};
}
export function AdjustedTimesheetDTOToJSON(value?: AdjustedTimesheetDTO | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'employeeID': value.employeeID,
'entries': value.entries === undefined ? undefined : ((value.entries as Array<any>).map(AdjustedTimesheetEntryDTOToJSON)),
'expectedHours': value.expectedHours,
'id': value.id,
'month': value.month,
'projectID': value.projectID,
'status': value.status,
};
}