Files
recipes/vue3/src/openapi/models/PaginatedUnitList.ts
2024-03-27 08:36:55 -05:00

97 lines
2.3 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.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 { Unit } from './Unit';
import {
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
} from './Unit';
/**
*
* @export
* @interface PaginatedUnitList
*/
export interface PaginatedUnitList {
/**
*
* @type {number}
* @memberof PaginatedUnitList
*/
count?: number;
/**
*
* @type {string}
* @memberof PaginatedUnitList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedUnitList
*/
previous?: string | null;
/**
*
* @type {Array<Unit>}
* @memberof PaginatedUnitList
*/
results?: Array<Unit>;
}
/**
* Check if a given object implements the PaginatedUnitList interface.
*/
export function instanceOfPaginatedUnitList(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function PaginatedUnitListFromJSON(json: any): PaginatedUnitList {
return PaginatedUnitListFromJSONTyped(json, false);
}
export function PaginatedUnitListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUnitList {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'count': !exists(json, 'count') ? undefined : json['count'],
'next': !exists(json, 'next') ? undefined : json['next'],
'previous': !exists(json, 'previous') ? undefined : json['previous'],
'results': !exists(json, 'results') ? undefined : ((json['results'] as Array<any>).map(UnitFromJSON)),
};
}
export function PaginatedUnitListToJSON(value?: PaginatedUnitList | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'count': value.count,
'next': value.next,
'previous': value.previous,
'results': value.results === undefined ? undefined : ((value.results as Array<any>).map(UnitToJSON)),
};
}