Files
recipes/vue3/models/SupermarketCategoryRelation.ts
2024-02-21 20:18:54 +01:00

98 lines
2.9 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 { ShoppingListSupermarketCategoryToSupermarketInnerCategory } from './ShoppingListSupermarketCategoryToSupermarketInnerCategory';
import {
ShoppingListSupermarketCategoryToSupermarketInnerCategoryFromJSON,
ShoppingListSupermarketCategoryToSupermarketInnerCategoryFromJSONTyped,
ShoppingListSupermarketCategoryToSupermarketInnerCategoryToJSON,
} from './ShoppingListSupermarketCategoryToSupermarketInnerCategory';
/**
*
* @export
* @interface SupermarketCategoryRelation
*/
export interface SupermarketCategoryRelation {
/**
*
* @type {number}
* @memberof SupermarketCategoryRelation
*/
readonly id?: number;
/**
*
* @type {ShoppingListSupermarketCategoryToSupermarketInnerCategory}
* @memberof SupermarketCategoryRelation
*/
category: ShoppingListSupermarketCategoryToSupermarketInnerCategory;
/**
*
* @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 {
let isInstance = true;
isInstance = isInstance && "category" in value;
isInstance = isInstance && "supermarket" in value;
return isInstance;
}
export function SupermarketCategoryRelationFromJSON(json: any): SupermarketCategoryRelation {
return SupermarketCategoryRelationFromJSONTyped(json, false);
}
export function SupermarketCategoryRelationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupermarketCategoryRelation {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'category': ShoppingListSupermarketCategoryToSupermarketInnerCategoryFromJSON(json['category']),
'supermarket': json['supermarket'],
'order': !exists(json, 'order') ? undefined : json['order'],
};
}
export function SupermarketCategoryRelationToJSON(value?: SupermarketCategoryRelation | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'category': ShoppingListSupermarketCategoryToSupermarketInnerCategoryToJSON(value.category),
'supermarket': value.supermarket,
'order': value.order,
};
}