mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
104 lines
2.3 KiB
TypeScript
104 lines
2.3 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Django Recipes
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document:
|
|
*
|
|
*
|
|
* 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';
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface UserFile
|
|
*/
|
|
export interface UserFile {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof UserFile
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof UserFile
|
|
*/
|
|
name: string;
|
|
/**
|
|
*
|
|
* @type {Blob}
|
|
* @memberof UserFile
|
|
*/
|
|
file: Blob;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof UserFile
|
|
*/
|
|
readonly fileDownload?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof UserFile
|
|
*/
|
|
readonly preview?: string;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof UserFile
|
|
*/
|
|
readonly fileSizeKb?: number;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the UserFile interface.
|
|
*/
|
|
export function instanceOfUserFile(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "name" in value;
|
|
isInstance = isInstance && "file" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function UserFileFromJSON(json: any): UserFile {
|
|
return UserFileFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function UserFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserFile {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'name': json['name'],
|
|
'file': json['file'],
|
|
'fileDownload': !exists(json, 'file_download') ? undefined : json['file_download'],
|
|
'preview': !exists(json, 'preview') ? undefined : json['preview'],
|
|
'fileSizeKb': !exists(json, 'file_size_kb') ? undefined : json['file_size_kb'],
|
|
};
|
|
}
|
|
|
|
export function UserFileToJSON(value?: UserFile | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'name': value.name,
|
|
'file': value.file,
|
|
};
|
|
}
|
|
|