mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 04:39:54 -05:00
108 lines
2.8 KiB
TypeScript
108 lines
2.8 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Tandoor
|
|
* Tandoor API Docs
|
|
*
|
|
* 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 { mapValues } from '../runtime';
|
|
import type { UserFile } from './UserFile';
|
|
import {
|
|
UserFileFromJSON,
|
|
UserFileFromJSONTyped,
|
|
UserFileToJSON,
|
|
UserFileToJSONTyped,
|
|
} from './UserFile';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface PaginatedUserFileList
|
|
*/
|
|
export interface PaginatedUserFileList {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof PaginatedUserFileList
|
|
*/
|
|
count: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PaginatedUserFileList
|
|
*/
|
|
next?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof PaginatedUserFileList
|
|
*/
|
|
previous?: string | null;
|
|
/**
|
|
*
|
|
* @type {Array<UserFile>}
|
|
* @memberof PaginatedUserFileList
|
|
*/
|
|
results: Array<UserFile>;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof PaginatedUserFileList
|
|
*/
|
|
timestamp?: Date;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the PaginatedUserFileList interface.
|
|
*/
|
|
export function instanceOfPaginatedUserFileList(value: object): value is PaginatedUserFileList {
|
|
if (!('count' in value) || value['count'] === undefined) return false;
|
|
if (!('results' in value) || value['results'] === undefined) return false;
|
|
return true;
|
|
}
|
|
|
|
export function PaginatedUserFileListFromJSON(json: any): PaginatedUserFileList {
|
|
return PaginatedUserFileListFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function PaginatedUserFileListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserFileList {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'count': json['count'],
|
|
'next': json['next'] == null ? undefined : json['next'],
|
|
'previous': json['previous'] == null ? undefined : json['previous'],
|
|
'results': ((json['results'] as Array<any>).map(UserFileFromJSON)),
|
|
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
|
|
};
|
|
}
|
|
|
|
export function PaginatedUserFileListToJSON(json: any): PaginatedUserFileList {
|
|
return PaginatedUserFileListToJSONTyped(json, false);
|
|
}
|
|
|
|
export function PaginatedUserFileListToJSONTyped(value?: PaginatedUserFileList | null, ignoreDiscriminator: boolean = false): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
|
|
return {
|
|
|
|
'count': value['count'],
|
|
'next': value['next'],
|
|
'previous': value['previous'],
|
|
'results': ((value['results'] as Array<any>).map(UserFileToJSON)),
|
|
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
|
|
};
|
|
}
|
|
|