// 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 Action */ export interface Action { /** * * @type {string} * @memberof Action */ name: ActionNameEnum; /** * Only valid for name=\'start\'. Run simulation for given duration (in seconds) and pause * @type {number} * @memberof Action */ duration?: number; /** * Only valid for name=\'pause\'. Remove simulation after given timeout (in seconds). Defaults to 300 seconds * @type {number} * @memberof Action */ timeout?: number; /** * Only valid for name=\'start\'. Limit maximum speed of the simulation. The max_rate is a multiplier relative to real time For example max_rate \'60\' means max 60 simulation seconds in 1 real second * @type {number} * @memberof Action */ maxRate?: number; /** * The name of the compute cluster that runs/has run the simulation. * @type {string} * @memberof Action */ computeCluster?: string; } export function ActionFromJSON(json: any): Action { return { 'name': json['name'], 'duration': !exists(json, 'duration') ? undefined : json['duration'], 'timeout': !exists(json, 'timeout') ? undefined : json['timeout'], 'maxRate': !exists(json, 'max_rate') ? undefined : json['max_rate'], 'computeCluster': !exists(json, 'compute_cluster') ? undefined : json['compute_cluster'], }; } export function ActionToJSON(value?: Action): any { if (value === undefined) { return undefined; } return { 'name': value.name, 'duration': value.duration, 'timeout': value.timeout, 'max_rate': value.maxRate, 'compute_cluster': value.computeCluster, }; } /** * @export * @enum {string} */ export enum ActionNameEnum { Initialize = 'initialize', Start = 'start', Pause = 'pause', Shutdown = 'shutdown', Queue = 'queue' }