tuix-timesheets-api
Version:
This package facilitates the client request to tuix timesheets api
110 lines (99 loc) • 2.83 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 { GlobalTimesheetDTO } from './GlobalTimesheetDTO';
import {
GlobalTimesheetDTOFromJSON,
GlobalTimesheetDTOFromJSONTyped,
GlobalTimesheetDTOToJSON,
} from './GlobalTimesheetDTO';
/**
*
* @export
* @interface PaginatedGlobalTimesheets
*/
export interface PaginatedGlobalTimesheets {
/**
*
* @type {Array<GlobalTimesheetDTO>}
* @memberof PaginatedGlobalTimesheets
*/
items: Array<GlobalTimesheetDTO>;
/**
*
* @type {number}
* @memberof PaginatedGlobalTimesheets
*/
page: number;
/**
*
* @type {number}
* @memberof PaginatedGlobalTimesheets
*/
pageSize: number;
/**
*
* @type {number}
* @memberof PaginatedGlobalTimesheets
*/
totalItems: number;
/**
*
* @type {number}
* @memberof PaginatedGlobalTimesheets
*/
totalPages: number;
}
/**
* Check if a given object implements the PaginatedGlobalTimesheets interface.
*/
export function instanceOfPaginatedGlobalTimesheets(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "items" in value;
isInstance = isInstance && "page" in value;
isInstance = isInstance && "pageSize" in value;
isInstance = isInstance && "totalItems" in value;
isInstance = isInstance && "totalPages" in value;
return isInstance;
}
export function PaginatedGlobalTimesheetsFromJSON(json: any): PaginatedGlobalTimesheets {
return PaginatedGlobalTimesheetsFromJSONTyped(json, false);
}
export function PaginatedGlobalTimesheetsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedGlobalTimesheets {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'items': ((json['items'] as Array<any>).map(GlobalTimesheetDTOFromJSON)),
'page': json['page'],
'pageSize': json['pageSize'],
'totalItems': json['totalItems'],
'totalPages': json['totalPages'],
};
}
export function PaginatedGlobalTimesheetsToJSON(value?: PaginatedGlobalTimesheets | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'items': ((value.items as Array<any>).map(GlobalTimesheetDTOToJSON)),
'page': value.page,
'pageSize': value.pageSize,
'totalItems': value.totalItems,
'totalPages': value.totalPages,
};
}