cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
97 lines (87 loc) • 2.04 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* CWMS Data API
* CWMS REST API for Data Retrieval
*
* The version of the OpenAPI document: 2.4.0-2026.3.16
*
*
* 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 {
CwmsId,
CwmsIdFromJSON,
CwmsIdFromJSONTyped,
CwmsIdToJSON,
} from './CwmsId';
/**
*
* @export
* @interface StreamNode
*/
export interface StreamNode {
/**
*
* @type {CwmsId}
* @memberof StreamNode
*/
streamId: CwmsId;
/**
*
* @type {string}
* @memberof StreamNode
*/
bank?: StreamNodeBankEnum;
/**
*
* @type {number}
* @memberof StreamNode
*/
station?: number;
/**
*
* @type {string}
* @memberof StreamNode
*/
stationUnits?: string;
}
/**
* @export
* @enum {string}
*/
export enum StreamNodeBankEnum {
L = 'L',
R = 'R'
}
export function StreamNodeFromJSON(json: any): StreamNode {
return StreamNodeFromJSONTyped(json, false);
}
export function StreamNodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamNode {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'streamId': CwmsIdFromJSON(json['stream-id']),
'bank': !exists(json, 'bank') ? undefined : json['bank'],
'station': !exists(json, 'station') ? undefined : json['station'],
'stationUnits': !exists(json, 'station-units') ? undefined : json['station-units'],
};
}
export function StreamNodeToJSON(value?: StreamNode | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'stream-id': CwmsIdToJSON(value.streamId),
'bank': value.bank,
'station': value.station,
'station-units': value.stationUnits,
};
}