mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 12:49:02 -05:00
more basics
This commit is contained in:
123
vue3/src/openapi/models/Keyword.ts
Normal file
123
vue3/src/openapi/models/Keyword.ts
Normal file
@@ -0,0 +1,123 @@
|
||||
/* 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 Keyword
|
||||
*/
|
||||
export interface Keyword {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Keyword
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Keyword
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Keyword
|
||||
*/
|
||||
readonly label?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Keyword
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Keyword
|
||||
*/
|
||||
readonly parent?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Keyword
|
||||
*/
|
||||
readonly numchild?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof Keyword
|
||||
*/
|
||||
readonly createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof Keyword
|
||||
*/
|
||||
readonly updatedAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Keyword
|
||||
*/
|
||||
readonly fullName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the Keyword interface.
|
||||
*/
|
||||
export function instanceOfKeyword(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "name" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function KeywordFromJSON(json: any): Keyword {
|
||||
return KeywordFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function KeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): Keyword {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'label': !exists(json, 'label') ? undefined : json['label'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
'parent': !exists(json, 'parent') ? undefined : json['parent'],
|
||||
'numchild': !exists(json, 'numchild') ? undefined : json['numchild'],
|
||||
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
||||
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
|
||||
'fullName': !exists(json, 'full_name') ? undefined : json['full_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function KeywordToJSON(value?: Keyword | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'name': value.name,
|
||||
'description': value.description,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user