mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 04:39:54 -05:00
more basics
This commit is contained in:
126
vue3/src/openapi/models/RecipeBook.ts
Normal file
126
vue3/src/openapi/models/RecipeBook.ts
Normal file
@@ -0,0 +1,126 @@
|
||||
/* 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';
|
||||
import type { CustomFilterSharedInner } from './CustomFilterSharedInner';
|
||||
import {
|
||||
CustomFilterSharedInnerFromJSON,
|
||||
CustomFilterSharedInnerFromJSONTyped,
|
||||
CustomFilterSharedInnerToJSON,
|
||||
} from './CustomFilterSharedInner';
|
||||
import type { RecipeBookFilter } from './RecipeBookFilter';
|
||||
import {
|
||||
RecipeBookFilterFromJSON,
|
||||
RecipeBookFilterFromJSONTyped,
|
||||
RecipeBookFilterToJSON,
|
||||
} from './RecipeBookFilter';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface RecipeBook
|
||||
*/
|
||||
export interface RecipeBook {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof RecipeBook
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof RecipeBook
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof RecipeBook
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<CustomFilterSharedInner>}
|
||||
* @memberof RecipeBook
|
||||
*/
|
||||
shared: Array<CustomFilterSharedInner>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof RecipeBook
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
/**
|
||||
*
|
||||
* @type {RecipeBookFilter}
|
||||
* @memberof RecipeBook
|
||||
*/
|
||||
filter?: RecipeBookFilter | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof RecipeBook
|
||||
*/
|
||||
order?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the RecipeBook interface.
|
||||
*/
|
||||
export function instanceOfRecipeBook(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
isInstance = isInstance && "shared" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function RecipeBookFromJSON(json: any): RecipeBook {
|
||||
return RecipeBookFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function RecipeBookFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeBook {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'shared': ((json['shared'] as Array<any>).map(CustomFilterSharedInnerFromJSON)),
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
'filter': !exists(json, 'filter') ? undefined : RecipeBookFilterFromJSON(json['filter']),
|
||||
'order': !exists(json, 'order') ? undefined : json['order'],
|
||||
};
|
||||
}
|
||||
|
||||
export function RecipeBookToJSON(value?: RecipeBook | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'description': value.description,
|
||||
'shared': ((value.shared as Array<any>).map(CustomFilterSharedInnerToJSON)),
|
||||
'filter': RecipeBookFilterToJSON(value.filter),
|
||||
'order': value.order,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user