mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
125 lines
2.7 KiB
TypeScript
125 lines
2.7 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 Storage
|
|
*/
|
|
export interface Storage {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Storage
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Storage
|
|
*/
|
|
name: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Storage
|
|
*/
|
|
method?: StorageMethodEnum;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Storage
|
|
*/
|
|
username?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Storage
|
|
*/
|
|
password?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Storage
|
|
*/
|
|
token?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Storage
|
|
*/
|
|
readonly createdBy?: string;
|
|
}
|
|
|
|
|
|
/**
|
|
* @export
|
|
*/
|
|
export const StorageMethodEnum = {
|
|
Db: 'DB',
|
|
Nextcloud: 'NEXTCLOUD',
|
|
Local: 'LOCAL'
|
|
} as const;
|
|
export type StorageMethodEnum = typeof StorageMethodEnum[keyof typeof StorageMethodEnum];
|
|
|
|
|
|
/**
|
|
* Check if a given object implements the Storage interface.
|
|
*/
|
|
export function instanceOfStorage(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "name" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function StorageFromJSON(json: any): Storage {
|
|
return StorageFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function StorageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Storage {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'name': json['name'],
|
|
'method': !exists(json, 'method') ? undefined : json['method'],
|
|
'username': !exists(json, 'username') ? undefined : json['username'],
|
|
'password': !exists(json, 'password') ? undefined : json['password'],
|
|
'token': !exists(json, 'token') ? undefined : json['token'],
|
|
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
|
};
|
|
}
|
|
|
|
export function StorageToJSON(value?: Storage | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'name': value.name,
|
|
'method': value.method,
|
|
'username': value.username,
|
|
'password': value.password,
|
|
'token': value.token,
|
|
};
|
|
}
|
|
|