tuix-timesheets-api
Version:
This package facilitates the client request to tuix timesheets api
105 lines (94 loc) • 2.71 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 { GlobalTimesheetEntryDTO } from './GlobalTimesheetEntryDTO';
import {
GlobalTimesheetEntryDTOFromJSON,
GlobalTimesheetEntryDTOFromJSONTyped,
GlobalTimesheetEntryDTOToJSON,
} from './GlobalTimesheetEntryDTO';
/**
*
* @export
* @interface GlobalTimesheetDTO
*/
export interface GlobalTimesheetDTO {
/**
*
* @type {Array<GlobalTimesheetEntryDTO>}
* @memberof GlobalTimesheetDTO
*/
entries?: Array<GlobalTimesheetEntryDTO>;
/**
*
* @type {string}
* @memberof GlobalTimesheetDTO
*/
id?: string;
/**
*
* @type {string}
* @memberof GlobalTimesheetDTO
*/
month?: string;
/**
*
* @type {string}
* @memberof GlobalTimesheetDTO
*/
projectID?: string;
/**
*
* @type {string}
* @memberof GlobalTimesheetDTO
*/
status?: string;
}
/**
* Check if a given object implements the GlobalTimesheetDTO interface.
*/
export function instanceOfGlobalTimesheetDTO(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function GlobalTimesheetDTOFromJSON(json: any): GlobalTimesheetDTO {
return GlobalTimesheetDTOFromJSONTyped(json, false);
}
export function GlobalTimesheetDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): GlobalTimesheetDTO {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'entries': !exists(json, 'entries') ? undefined : ((json['entries'] as Array<any>).map(GlobalTimesheetEntryDTOFromJSON)),
'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'],
};
}
export function GlobalTimesheetDTOToJSON(value?: GlobalTimesheetDTO | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'entries': value.entries === undefined ? undefined : ((value.entries as Array<any>).map(GlobalTimesheetEntryDTOToJSON)),
'id': value.id,
'month': value.month,
'projectID': value.projectID,
'status': value.status,
};
}