Files
recipes/vue3/models/RecipeImage.ts
2024-03-27 08:34:19 -05:00

74 lines
1.6 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';
/**
*
* @export
* @interface RecipeImage
*/
export interface RecipeImage {
/**
*
* @type {Blob}
* @memberof RecipeImage
*/
image?: Blob | null;
/**
*
* @type {string}
* @memberof RecipeImage
*/
imageUrl?: string | null;
}
/**
* Check if a given object implements the RecipeImage interface.
*/
export function instanceOfRecipeImage(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function RecipeImageFromJSON(json: any): RecipeImage {
return RecipeImageFromJSONTyped(json, false);
}
export function RecipeImageFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeImage {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'image': !exists(json, 'image') ? undefined : json['image'],
'imageUrl': !exists(json, 'image_url') ? undefined : json['image_url'],
};
}
export function RecipeImageToJSON(value?: RecipeImage | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'image': value.image,
'image_url': value.imageUrl,
};
}