mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
110 lines
2.4 KiB
TypeScript
110 lines
2.4 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';
|
|
/**
|
|
*
|
|
* @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;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Sync
|
|
*/
|
|
readonly createdAt: Date;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof Sync
|
|
*/
|
|
readonly updatedAt: Date;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the Sync interface.
|
|
*/
|
|
export function instanceOfSync(value: object): boolean {
|
|
if (!('id' in value)) return false;
|
|
if (!('storage' in value)) return false;
|
|
if (!('createdAt' in value)) return false;
|
|
if (!('updatedAt' in value)) return false;
|
|
return true;
|
|
}
|
|
|
|
export function SyncFromJSON(json: any): Sync {
|
|
return SyncFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function SyncFromJSONTyped(json: any, ignoreDiscriminator: boolean): Sync {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'],
|
|
'storage': json['storage'],
|
|
'path': json['path'] == null ? undefined : json['path'],
|
|
'active': json['active'] == null ? undefined : json['active'],
|
|
'lastChecked': json['last_checked'] == null ? undefined : (new Date(json['last_checked'])),
|
|
'createdAt': (new Date(json['created_at'])),
|
|
'updatedAt': (new Date(json['updated_at'])),
|
|
};
|
|
}
|
|
|
|
export function SyncToJSON(value?: Omit<Sync, 'id'|'created_at'|'updated_at'> | null): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
return {
|
|
|
|
'storage': value['storage'],
|
|
'path': value['path'],
|
|
'active': value['active'],
|
|
'last_checked': value['lastChecked'] == null ? undefined : ((value['lastChecked'] as any).toISOString()),
|
|
};
|
|
}
|
|
|