tuix-timesheets-api
Version:
This package facilitates the client request to tuix timesheets api
110 lines (99 loc) • 2.67 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 { TimesheetDTO } from './TimesheetDTO';
import {
TimesheetDTOFromJSON,
TimesheetDTOFromJSONTyped,
TimesheetDTOToJSON,
} from './TimesheetDTO';
/**
*
* @export
* @interface PaginatedTimesheets
*/
export interface PaginatedTimesheets {
/**
*
* @type {Array<TimesheetDTO>}
* @memberof PaginatedTimesheets
*/
items: Array<TimesheetDTO>;
/**
*
* @type {number}
* @memberof PaginatedTimesheets
*/
page: number;
/**
*
* @type {number}
* @memberof PaginatedTimesheets
*/
pageSize: number;
/**
*
* @type {number}
* @memberof PaginatedTimesheets
*/
totalItems: number;
/**
*
* @type {number}
* @memberof PaginatedTimesheets
*/
totalPages: number;
}
/**
* Check if a given object implements the PaginatedTimesheets interface.
*/
export function instanceOfPaginatedTimesheets(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 PaginatedTimesheetsFromJSON(json: any): PaginatedTimesheets {
return PaginatedTimesheetsFromJSONTyped(json, false);
}
export function PaginatedTimesheetsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTimesheets {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'items': ((json['items'] as Array<any>).map(TimesheetDTOFromJSON)),
'page': json['page'],
'pageSize': json['pageSize'],
'totalItems': json['totalItems'],
'totalPages': json['totalPages'],
};
}
export function PaginatedTimesheetsToJSON(value?: PaginatedTimesheets | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'items': ((value.items as Array<any>).map(TimesheetDTOToJSON)),
'page': value.page,
'pageSize': value.pageSize,
'totalItems': value.totalItems,
'totalPages': value.totalPages,
};
}