// 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 { MeasureSpecification, MeasureSpecificationFromJSON, MeasureSpecificationToJSON, } from './'; /** * * @export * @interface MemoryStructureControl */ export interface MemoryStructureControl { /** * * @type {number} * @memberof MemoryStructureControl */ readonly id?: number; /** * * @type {string} * @memberof MemoryStructureControl */ readonly url?: string; /** * offset of event in simulation in seconds * @type {number} * @memberof MemoryStructureControl */ offset: number; /** * event duration in seconds. -9999 is the \'infinite duration\' value (only allowed in conjunction with infinite simulations * @type {number} * @memberof MemoryStructureControl */ duration?: number | null; /** * * @type {MeasureSpecification} * @memberof MemoryStructureControl */ measureSpecification: MeasureSpecification; /** * * @type {number} * @memberof MemoryStructureControl */ structureId?: number | null; /** * * @type {string} * @memberof MemoryStructureControl */ structureType: MemoryStructureControlStructureTypeEnum; /** * * @type {string} * @memberof MemoryStructureControl */ type: MemoryStructureControlTypeEnum; /** * list containing a single action values, e.g. [*action_value*]. For type set_discharge_coefficients two action values need to be provided, e.g. [*action_value*, *action_value*]. * @type {Array} * @memberof MemoryStructureControl */ value: Array; /** * * @type {string} * @memberof MemoryStructureControl */ readonly state?: MemoryStructureControlStateEnum; /** * * @type {object} * @memberof MemoryStructureControl */ readonly stateDetail?: object; /** * * @type {number} * @memberof MemoryStructureControl */ gridId?: number | null; /** * * @type {string} * @memberof MemoryStructureControl */ readonly uid?: string; /** * e.g. 0.3 * @type {number} * @memberof MemoryStructureControl */ upperThreshold?: number | null; /** * e.g. 0.3 * @type {number} * @memberof MemoryStructureControl */ lowerThreshold?: number | null; /** * when True the initial state of the target is active * @type {boolean} * @memberof MemoryStructureControl */ isActive?: boolean; /** * when True the target will become active when the lower threshold has been reached * @type {boolean} * @memberof MemoryStructureControl */ isInverse?: boolean; } export function MemoryStructureControlFromJSON(json: any): MemoryStructureControl { return { 'id': !exists(json, 'id') ? undefined : json['id'], 'url': !exists(json, 'url') ? undefined : json['url'], 'offset': json['offset'], 'duration': !exists(json, 'duration') ? undefined : json['duration'], 'measureSpecification': MeasureSpecificationFromJSON(json['measure_specification']), 'structureId': !exists(json, 'structure_id') ? undefined : json['structure_id'], 'structureType': json['structure_type'], 'type': json['type'], 'value': json['value'], 'state': !exists(json, 'state') ? undefined : json['state'], 'stateDetail': !exists(json, 'state_detail') ? undefined : json['state_detail'], 'gridId': !exists(json, 'grid_id') ? undefined : json['grid_id'], 'uid': !exists(json, 'uid') ? undefined : json['uid'], 'upperThreshold': !exists(json, 'upper_threshold') ? undefined : json['upper_threshold'], 'lowerThreshold': !exists(json, 'lower_threshold') ? undefined : json['lower_threshold'], 'isActive': !exists(json, 'is_active') ? undefined : json['is_active'], 'isInverse': !exists(json, 'is_inverse') ? undefined : json['is_inverse'], }; } export function MemoryStructureControlToJSON(value?: MemoryStructureControl): any { if (value === undefined) { return undefined; } return { 'offset': value.offset, 'duration': value.duration, 'measure_specification': MeasureSpecificationToJSON(value.measureSpecification), 'structure_id': value.structureId, 'structure_type': value.structureType, 'type': value.type, 'value': value.value, 'grid_id': value.gridId, 'upper_threshold': value.upperThreshold, 'lower_threshold': value.lowerThreshold, 'is_active': value.isActive, 'is_inverse': value.isInverse, }; } /** * @export * @enum {string} */ export enum MemoryStructureControlStructureTypeEnum { Pumpstation = 'v2_pumpstation', Pipe = 'v2_pipe', Orifice = 'v2_orifice', Culvert = 'v2_culvert', Weir = 'v2_weir', Channel = 'v2_channel' } /** * @export * @enum {string} */ export enum MemoryStructureControlTypeEnum { DischargeCoefficients = 'set_discharge_coefficients', CrestLevel = 'set_crest_level', PumpCapacity = 'set_pump_capacity' } /** * @export * @enum {string} */ export enum MemoryStructureControlStateEnum { Processing = 'processing', Valid = 'valid', Invalid = 'invalid' }