Files
recipes/vue3/src/openapi/models/OpenDataStore.ts
2024-03-11 19:46:37 +01:00

126 lines
3.2 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 { OpenDataStoreCategory } from './OpenDataStoreCategory';
import {
OpenDataStoreCategoryFromJSON,
OpenDataStoreCategoryFromJSONTyped,
OpenDataStoreCategoryToJSON,
} from './OpenDataStoreCategory';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
} from './OpenDataVersion';
/**
* Adds nested create feature
* @export
* @interface OpenDataStore
*/
export interface OpenDataStore {
/**
*
* @type {number}
* @memberof OpenDataStore
*/
readonly id: number;
/**
*
* @type {OpenDataVersion}
* @memberof OpenDataStore
*/
version: OpenDataVersion;
/**
*
* @type {string}
* @memberof OpenDataStore
*/
slug: string;
/**
*
* @type {string}
* @memberof OpenDataStore
*/
name: string;
/**
*
* @type {Array<OpenDataStoreCategory>}
* @memberof OpenDataStore
*/
categoryToStore: Array<OpenDataStoreCategory> | null;
/**
*
* @type {string}
* @memberof OpenDataStore
*/
comment?: string;
/**
*
* @type {string}
* @memberof OpenDataStore
*/
readonly createdBy: string;
}
/**
* Check if a given object implements the OpenDataStore interface.
*/
export function instanceOfOpenDataStore(value: object): boolean {
if (!('id' in value)) return false;
if (!('version' in value)) return false;
if (!('slug' in value)) return false;
if (!('name' in value)) return false;
if (!('categoryToStore' in value)) return false;
if (!('createdBy' in value)) return false;
return true;
}
export function OpenDataStoreFromJSON(json: any): OpenDataStore {
return OpenDataStoreFromJSONTyped(json, false);
}
export function OpenDataStoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataStore {
if (json == null) {
return json;
}
return {
'id': json['id'],
'version': OpenDataVersionFromJSON(json['version']),
'slug': json['slug'],
'name': json['name'],
'categoryToStore': (json['category_to_store'] == null ? null : (json['category_to_store'] as Array<any>).map(OpenDataStoreCategoryFromJSON)),
'comment': json['comment'] == null ? undefined : json['comment'],
'createdBy': json['created_by'],
};
}
export function OpenDataStoreToJSON(value?: OpenDataStore | null): any {
if (value == null) {
return value;
}
return {
'version': OpenDataVersionToJSON(value['version']),
'slug': value['slug'],
'name': value['name'],
'category_to_store': (value['categoryToStore'] == null ? null : (value['categoryToStore'] as Array<any>).map(OpenDataStoreCategoryToJSON)),
'comment': value['comment'],
};
}