mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 12:49:02 -05:00
103 lines
2.2 KiB
TypeScript
103 lines
2.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 { exists, mapValues } from '../runtime';
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface Sync
|
|
*/
|
|
export interface Sync {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Sync
|
|
*/
|
|
readonly id: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Sync
|
|
*/
|
|
storage: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Sync
|
|
*/
|
|
path?: string;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof Sync
|
|
*/
|
|
active?: boolean;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Sync
|
|
*/
|
|
lastChecked?: Date | null;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Sync
|
|
*/
|
|
readonly createdAt: Date;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Sync
|
|
*/
|
|
readonly updatedAt: Date;
|
|
}
|
|
|
|
export function SyncFromJSON(json: any): Sync {
|
|
return SyncFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function SyncFromJSONTyped(json: any, ignoreDiscriminator: boolean): Sync {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'],
|
|
'storage': json['storage'],
|
|
'path': !exists(json, 'path') ? undefined : json['path'],
|
|
'active': !exists(json, 'active') ? undefined : json['active'],
|
|
'lastChecked': !exists(json, 'last_checked') ? undefined : (json['last_checked'] === null ? null : new Date(json['last_checked'])),
|
|
'createdAt': (new Date(json['created_at'])),
|
|
'updatedAt': (new Date(json['updated_at'])),
|
|
};
|
|
}
|
|
|
|
export function SyncToJSON(value?: Sync | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'storage': value.storage,
|
|
'path': value.path,
|
|
'active': value.active,
|
|
'last_checked': value.lastChecked === undefined ? undefined : (value.lastChecked === null ? null : value.lastChecked.toISOString()),
|
|
};
|
|
}
|
|
|
|
|