/* 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 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; } /** * Check if a given object implements the Sync interface. */ export function instanceOfSync(value: object): boolean { let isInstance = true; isInstance = isInstance && "storage" in value; return isInstance; } 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': !exists(json, 'id') ? undefined : 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': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])), 'updatedAt': !exists(json, 'updated_at') ? undefined : (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()), }; }