/* tslint:disable */ /* eslint-disable */ /** * ELEMENTS API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 2 * * * 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'; import { TaskInfo, TaskInfoFromJSON, TaskInfoFromJSONTyped, TaskInfoToJSON, } from './'; /** * * @export * @interface DownloadArchive */ export interface DownloadArchive { /** * * @type {string} * @memberof DownloadArchive */ id: string; /** * * @type {TaskInfo} * @memberof DownloadArchive */ taskInfo: TaskInfo; /** * * @type {number} * @memberof DownloadArchive */ readonly uncompressedSize: number; /** * * @type {number} * @memberof DownloadArchive */ readonly size: number; /** * * @type {string} * @memberof DownloadArchive */ readonly expires: string; /** * * @type {Array} * @memberof DownloadArchive */ readonly files: Array; /** * * @type {string} * @memberof DownloadArchive */ name: string; /** * * @type {string} * @memberof DownloadArchive */ path: string; /** * * @type {Date} * @memberof DownloadArchive */ readonly createdAt: Date; /** * * @type {number} * @memberof DownloadArchive */ progressUnit?: DownloadArchiveProgressUnitEnum; /** * * @type {number} * @memberof DownloadArchive */ user?: number | null; } /** * @export * @enum {string} */ export enum DownloadArchiveProgressUnitEnum { NUMBER_0 = 0, NUMBER_1 = 1 } export function DownloadArchiveFromJSON(json: any): DownloadArchive { return DownloadArchiveFromJSONTyped(json, false); } export function DownloadArchiveFromJSONTyped(json: any, ignoreDiscriminator: boolean): DownloadArchive { if ((json === undefined) || (json === null)) { return json; } return { 'id': json['id'], 'taskInfo': TaskInfoFromJSON(json['task_info']), 'uncompressedSize': json['uncompressed_size'], 'size': json['size'], 'expires': json['expires'], 'files': json['files'], 'name': json['name'], 'path': json['path'], 'createdAt': (new Date(json['created_at'])), 'progressUnit': !exists(json, 'progress_unit') ? undefined : json['progress_unit'], 'user': !exists(json, 'user') ? undefined : json['user'], }; } export function DownloadArchiveToJSON(value?: DownloadArchive | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'task_info': TaskInfoToJSON(value.taskInfo), 'name': value.name, 'path': value.path, 'progress_unit': value.progressUnit, 'user': value.user, }; }