// 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 Simulation */ export interface Simulation { /** * * @type {string} * @memberof Simulation */ readonly url?: string; /** * * @type {string} * @memberof Simulation */ readonly slug?: string; /** * * @type {string} * @memberof Simulation */ readonly uuid?: string; /** * * @type {string} * @memberof Simulation */ name: string; /** * tags provided as a list of strings * @type {Array} * @memberof Simulation */ tags?: Array; /** * * @type {string} * @memberof Simulation */ readonly created?: string; /** * The id of a threedimodel * @type {string} * @memberof Simulation */ threedimodel: string; /** * The unique_id of an organisation * @type {string} * @memberof Simulation */ organisation: string; /** * * @type {string} * @memberof Simulation */ readonly organisationName?: string; /** * The username of a user * @type {string} * @memberof Simulation */ readonly user?: string; /** * * @type {Date} * @memberof Simulation */ startDatetime: Date; /** * * @type {Date} * @memberof Simulation */ endDatetime?: Date; /** * * @type {number} * @memberof Simulation */ duration?: number; /** * * @type {string} * @memberof Simulation */ readonly durationHumanized?: string; /** * * @type {number} * @memberof Simulation */ readonly threedimodelId?: number; /** * * @type {number} * @memberof Simulation */ readonly id?: number; /** * * @type {string} * @memberof Simulation */ readonly threedicoreVersion?: string; /** * * @type {string} * @memberof Simulation */ readonly clonedFrom?: string; /** * The name of the compute cluster that runs/has run the simulation. * @type {string} * @memberof Simulation */ readonly computeCluster?: string; } export function SimulationFromJSON(json: any): Simulation { return { 'url': !exists(json, 'url') ? undefined : json['url'], 'slug': !exists(json, 'slug') ? undefined : json['slug'], 'uuid': !exists(json, 'uuid') ? undefined : json['uuid'], 'name': json['name'], 'tags': !exists(json, 'tags') ? undefined : json['tags'], 'created': !exists(json, 'created') ? undefined : json['created'], 'threedimodel': json['threedimodel'], 'organisation': json['organisation'], 'organisationName': !exists(json, 'organisation_name') ? undefined : json['organisation_name'], 'user': !exists(json, 'user') ? undefined : json['user'], 'startDatetime': new Date(json['start_datetime']), 'endDatetime': !exists(json, 'end_datetime') ? undefined : new Date(json['end_datetime']), 'duration': !exists(json, 'duration') ? undefined : json['duration'], 'durationHumanized': !exists(json, 'duration_humanized') ? undefined : json['duration_humanized'], 'threedimodelId': !exists(json, 'threedimodel_id') ? undefined : json['threedimodel_id'], 'id': !exists(json, 'id') ? undefined : json['id'], 'threedicoreVersion': !exists(json, 'threedicore_version') ? undefined : json['threedicore_version'], 'clonedFrom': !exists(json, 'cloned_from') ? undefined : json['cloned_from'], 'computeCluster': !exists(json, 'compute_cluster') ? undefined : json['compute_cluster'], }; } export function SimulationToJSON(value?: Simulation): any { if (value === undefined) { return undefined; } return { 'name': value.name, 'tags': value.tags, 'threedimodel': value.threedimodel, 'organisation': value.organisation, 'start_datetime': value.startDatetime.toISOString(), 'end_datetime': value.endDatetime === undefined ? undefined : value.endDatetime.toISOString(), 'duration': value.duration, }; }