// 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 { FileReadOnly, FileReadOnlyFromJSON, FileReadOnlyToJSON, Threshold, ThresholdFromJSON, ThresholdToJSON, } from './'; /** * * @export * @interface StableThresholdSavedState */ export interface StableThresholdSavedState { /** * * @type {string} * @memberof StableThresholdSavedState */ readonly url?: string; /** * * @type {string} * @memberof StableThresholdSavedState */ name?: string; /** * * @type {string} * @memberof StableThresholdSavedState */ readonly simulation?: string; /** * * @type {Date} * @memberof StableThresholdSavedState */ readonly created?: Date; /** * tags provided as a list of strings * @type {Array} * @memberof StableThresholdSavedState */ tags?: Array; /** * * @type {Date} * @memberof StableThresholdSavedState */ expiry?: Date | null; /** * * @type {Array} * @memberof StableThresholdSavedState */ thresholds: Array; /** * * @type {FileReadOnly} * @memberof StableThresholdSavedState */ file?: FileReadOnly; /** * * @type {string} * @memberof StableThresholdSavedState */ uuid?: string; } export function StableThresholdSavedStateFromJSON(json: any): StableThresholdSavedState { return { 'url': !exists(json, 'url') ? undefined : json['url'], 'name': !exists(json, 'name') ? undefined : json['name'], 'simulation': !exists(json, 'simulation') ? undefined : json['simulation'], 'created': !exists(json, 'created') ? undefined : new Date(json['created']), 'tags': !exists(json, 'tags') ? undefined : json['tags'], 'expiry': !exists(json, 'expiry') ? undefined : new Date(json['expiry']), 'thresholds': (json['thresholds'] as Array).map(ThresholdFromJSON), 'file': !exists(json, 'file') ? undefined : FileReadOnlyFromJSON(json['file']), 'uuid': !exists(json, 'uuid') ? undefined : json['uuid'], }; } export function StableThresholdSavedStateToJSON(value?: StableThresholdSavedState): any { if (value === undefined) { return undefined; } return { 'name': value.name, 'tags': value.tags, 'expiry': value.expiry === undefined ? undefined : value.expiry.toISOString(), 'thresholds': (value.thresholds as Array).map(ThresholdToJSON), 'file': FileReadOnlyToJSON(value.file), 'uuid': value.uuid, }; }