// 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'; import { Simulation, SimulationFromJSON, SimulationToJSON, } from './'; /** * * @export * @interface Usage */ export interface Usage { /** * * @type {number} * @memberof Usage */ readonly id?: number; /** * * @type {Simulation} * @memberof Usage */ simulation?: Simulation; /** * * @type {Date} * @memberof Usage */ started?: Date | null; /** * * @type {Date} * @memberof Usage */ finished?: Date | null; /** * * @type {number} * @memberof Usage */ totalTime?: number | null; /** * * @type {string} * @memberof Usage */ readonly status?: string; /** * * @type {string} * @memberof Usage */ readonly simulationType?: string; /** * * @type {string} * @memberof Usage */ readonly userName?: string; /** * * @type {string} * @memberof Usage */ readonly organisationUuid?: string; } export function UsageFromJSON(json: any): Usage { return { 'id': !exists(json, 'id') ? undefined : json['id'], 'simulation': !exists(json, 'simulation') ? undefined : SimulationFromJSON(json['simulation']), 'started': !exists(json, 'started') ? undefined : new Date(json['started']), 'finished': !exists(json, 'finished') ? undefined : new Date(json['finished']), 'totalTime': !exists(json, 'total_time') ? undefined : json['total_time'], 'status': !exists(json, 'status') ? undefined : json['status'], 'simulationType': !exists(json, 'simulation_type') ? undefined : json['simulation_type'], 'userName': !exists(json, 'user_name') ? undefined : json['user_name'], 'organisationUuid': !exists(json, 'organisation_uuid') ? undefined : json['organisation_uuid'], }; } export function UsageToJSON(value?: Usage): any { if (value === undefined) { return undefined; } return { 'simulation': SimulationToJSON(value.simulation), 'started': value.started === undefined ? undefined : value.started.toISOString(), 'finished': value.finished === undefined ? undefined : value.finished.toISOString(), 'total_time': value.totalTime, }; }