// tslint:disable /** * 3Di API * 3Di simulation API (latest stable version: v3) Framework release: 3.0.1 3Di core release: 2.3.0.dev0 deployed on: 10:42AM (UTC) on October 04, 2022 * * The version of the OpenAPI document: v3 * Contact: info@nelen-schuurmans.nl * * 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 SimulationStatus */ export interface SimulationStatus { /** * * @type {string} * @memberof SimulationStatus */ readonly url?: string; /** * * @type {string} * @memberof SimulationStatus */ name: SimulationStatusNameEnum; /** * * @type {string} * @memberof SimulationStatus */ readonly simulation?: string; /** * * @type {number} * @memberof SimulationStatus */ readonly simulationId?: number; /** * * @type {string} * @memberof SimulationStatus */ readonly simulationName?: string; /** * * @type {Array} * @memberof SimulationStatus */ readonly simulationTags?: Array; /** * * @type {string} * @memberof SimulationStatus */ readonly threedimodelSlug?: string; /** * * @type {number} * @memberof SimulationStatus */ readonly threedimodelId?: number; /** * * @type {boolean} * @memberof SimulationStatus */ readonly hasResults?: boolean | null; /** * * @type {Date} * @memberof SimulationStatus */ readonly created?: Date; /** * * @type {Date} * @memberof SimulationStatus */ readonly expiry?: Date | null; /** * simulation time in seconds * @type {number} * @memberof SimulationStatus */ time?: number | null; /** * * @type {boolean} * @memberof SimulationStatus */ paused?: boolean | null; /** * * @type {object} * @memberof SimulationStatus */ detail?: object | null; /** * only available for final statuses like \'finished\' or \'crashed\'. Gives detailed insight to the application state when the simulation finished * @type {number} * @memberof SimulationStatus */ exitCode?: number | null; /** * * @type {number} * @memberof SimulationStatus */ readonly id?: number; } export function SimulationStatusFromJSON(json: any): SimulationStatus { return { 'url': !exists(json, 'url') ? undefined : json['url'], 'name': json['name'], 'simulation': !exists(json, 'simulation') ? undefined : json['simulation'], 'simulationId': !exists(json, 'simulation_id') ? undefined : json['simulation_id'], 'simulationName': !exists(json, 'simulation_name') ? undefined : json['simulation_name'], 'simulationTags': !exists(json, 'simulation_tags') ? undefined : json['simulation_tags'], 'threedimodelSlug': !exists(json, 'threedimodel_slug') ? undefined : json['threedimodel_slug'], 'threedimodelId': !exists(json, 'threedimodel_id') ? undefined : json['threedimodel_id'], 'hasResults': !exists(json, 'has_results') ? undefined : json['has_results'], 'created': !exists(json, 'created') ? undefined : new Date(json['created']), 'expiry': !exists(json, 'expiry') ? undefined : new Date(json['expiry']), 'time': !exists(json, 'time') ? undefined : json['time'], 'paused': !exists(json, 'paused') ? undefined : json['paused'], 'detail': !exists(json, 'detail') ? undefined : json['detail'], 'exitCode': !exists(json, 'exit_code') ? undefined : json['exit_code'], 'id': !exists(json, 'id') ? undefined : json['id'], }; } export function SimulationStatusToJSON(value?: SimulationStatus): any { if (value === undefined) { return undefined; } return { 'name': value.name, 'time': value.time, 'paused': value.paused, 'detail': value.detail, 'exit_code': value.exitCode, }; } /** * @export * @enum {string} */ export enum SimulationStatusNameEnum { Created = 'created', Starting = 'starting', Initialized = 'initialized', Queued = 'queued', Ended = 'ended', Postprocessing = 'postprocessing', Finished = 'finished', Crashed = 'crashed' }