mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-07 23:28:16 -05:00
94 lines
2.4 KiB
TypeScript
94 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 { mapValues } from '../runtime';
|
|
import type { SupermarketCategory } from './SupermarketCategory';
|
|
import {
|
|
SupermarketCategoryFromJSON,
|
|
SupermarketCategoryFromJSONTyped,
|
|
SupermarketCategoryToJSON,
|
|
} from './SupermarketCategory';
|
|
|
|
/**
|
|
* Adds nested create feature
|
|
* @export
|
|
* @interface SupermarketCategoryRelation
|
|
*/
|
|
export interface SupermarketCategoryRelation {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof SupermarketCategoryRelation
|
|
*/
|
|
readonly id: number;
|
|
/**
|
|
*
|
|
* @type {SupermarketCategory}
|
|
* @memberof SupermarketCategoryRelation
|
|
*/
|
|
category: SupermarketCategory;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof SupermarketCategoryRelation
|
|
*/
|
|
supermarket: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof SupermarketCategoryRelation
|
|
*/
|
|
order?: number;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the SupermarketCategoryRelation interface.
|
|
*/
|
|
export function instanceOfSupermarketCategoryRelation(value: object): boolean {
|
|
if (!('id' in value)) return false;
|
|
if (!('category' in value)) return false;
|
|
if (!('supermarket' in value)) return false;
|
|
return true;
|
|
}
|
|
|
|
export function SupermarketCategoryRelationFromJSON(json: any): SupermarketCategoryRelation {
|
|
return SupermarketCategoryRelationFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function SupermarketCategoryRelationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupermarketCategoryRelation {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'],
|
|
'category': SupermarketCategoryFromJSON(json['category']),
|
|
'supermarket': json['supermarket'],
|
|
'order': json['order'] == null ? undefined : json['order'],
|
|
};
|
|
}
|
|
|
|
export function SupermarketCategoryRelationToJSON(value?: Omit<SupermarketCategoryRelation, 'id'> | null): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
return {
|
|
|
|
'category': SupermarketCategoryToJSON(value['category']),
|
|
'supermarket': value['supermarket'],
|
|
'order': value['order'],
|
|
};
|
|
}
|
|
|