mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-30 21:49:50 -05:00
107 lines
2.4 KiB
TypeScript
107 lines
2.4 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 { exists, mapValues } from '../runtime';
|
|
import type { User } from './User';
|
|
import {
|
|
UserFromJSON,
|
|
UserFromJSONTyped,
|
|
UserToJSON,
|
|
} from './User';
|
|
|
|
/**
|
|
* Adds nested create feature
|
|
* @export
|
|
* @interface CustomFilter
|
|
*/
|
|
export interface CustomFilter {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof CustomFilter
|
|
*/
|
|
readonly id: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof CustomFilter
|
|
*/
|
|
name: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof CustomFilter
|
|
*/
|
|
search: string;
|
|
/**
|
|
*
|
|
* @type {Array<User>}
|
|
* @memberof CustomFilter
|
|
*/
|
|
shared?: Array<User>;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof CustomFilter
|
|
*/
|
|
readonly createdBy: number;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the CustomFilter interface.
|
|
*/
|
|
export function instanceOfCustomFilter(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "id" in value;
|
|
isInstance = isInstance && "name" in value;
|
|
isInstance = isInstance && "search" in value;
|
|
isInstance = isInstance && "createdBy" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function CustomFilterFromJSON(json: any): CustomFilter {
|
|
return CustomFilterFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function CustomFilterFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomFilter {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'],
|
|
'name': json['name'],
|
|
'search': json['search'],
|
|
'shared': !exists(json, 'shared') ? undefined : ((json['shared'] as Array<any>).map(UserFromJSON)),
|
|
'createdBy': json['created_by'],
|
|
};
|
|
}
|
|
|
|
export function CustomFilterToJSON(value?: CustomFilter | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'name': value.name,
|
|
'search': value.search,
|
|
'shared': value.shared === undefined ? undefined : ((value.shared as Array<any>).map(UserToJSON)),
|
|
};
|
|
}
|
|
|