UNPKG

tuix-timesheets-api

Version:

This package facilitates the client request to tuix timesheets api

110 lines (99 loc) 2.67 kB
/* 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 { HolidayDTO } from './HolidayDTO'; import { HolidayDTOFromJSON, HolidayDTOFromJSONTyped, HolidayDTOToJSON, } from './HolidayDTO'; /** * * @export * @interface PaginatedHolidaysDTO */ export interface PaginatedHolidaysDTO { /** * * @type {Array<HolidayDTO>} * @memberof PaginatedHolidaysDTO */ items: Array<HolidayDTO>; /** * * @type {number} * @memberof PaginatedHolidaysDTO */ page: number; /** * * @type {number} * @memberof PaginatedHolidaysDTO */ pageSize: number; /** * * @type {number} * @memberof PaginatedHolidaysDTO */ totalItems: number; /** * * @type {number} * @memberof PaginatedHolidaysDTO */ totalPages: number; } /** * Check if a given object implements the PaginatedHolidaysDTO interface. */ export function instanceOfPaginatedHolidaysDTO(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 PaginatedHolidaysDTOFromJSON(json: any): PaginatedHolidaysDTO { return PaginatedHolidaysDTOFromJSONTyped(json, false); } export function PaginatedHolidaysDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedHolidaysDTO { if ((json === undefined) || (json === null)) { return json; } return { 'items': ((json['items'] as Array<any>).map(HolidayDTOFromJSON)), 'page': json['page'], 'pageSize': json['pageSize'], 'totalItems': json['totalItems'], 'totalPages': json['totalPages'], }; } export function PaginatedHolidaysDTOToJSON(value?: PaginatedHolidaysDTO | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'items': ((value.items as Array<any>).map(HolidayDTOToJSON)), 'page': value.page, 'pageSize': value.pageSize, 'totalItems': value.totalItems, 'totalPages': value.totalPages, }; }