mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 12:49:02 -05:00
97 lines
2.5 KiB
TypeScript
97 lines
2.5 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';
|
|
import type { RecipeOverview } from './RecipeOverview';
|
|
import {
|
|
RecipeOverviewFromJSON,
|
|
RecipeOverviewFromJSONTyped,
|
|
RecipeOverviewToJSON,
|
|
} from './RecipeOverview';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface ListRecipes200Response
|
|
*/
|
|
export interface ListRecipes200Response {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof ListRecipes200Response
|
|
*/
|
|
count?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ListRecipes200Response
|
|
*/
|
|
next?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ListRecipes200Response
|
|
*/
|
|
previous?: string | null;
|
|
/**
|
|
*
|
|
* @type {Array<RecipeOverview>}
|
|
* @memberof ListRecipes200Response
|
|
*/
|
|
results?: Array<RecipeOverview>;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the ListRecipes200Response interface.
|
|
*/
|
|
export function instanceOfListRecipes200Response(value: object): boolean {
|
|
let isInstance = true;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function ListRecipes200ResponseFromJSON(json: any): ListRecipes200Response {
|
|
return ListRecipes200ResponseFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function ListRecipes200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListRecipes200Response {
|
|
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(RecipeOverviewFromJSON)),
|
|
};
|
|
}
|
|
|
|
export function ListRecipes200ResponseToJSON(value?: ListRecipes200Response | 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(RecipeOverviewToJSON)),
|
|
};
|
|
}
|
|
|