cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
110 lines (101 loc) • 2.69 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';
import {
StreamLocationNode,
StreamLocationNodeFromJSON,
StreamLocationNodeFromJSONTyped,
StreamLocationNodeToJSON,
} from './StreamLocationNode';
/**
*
* @export
* @interface StreamReach
*/
export interface StreamReach {
/**
*
* @type {string}
* @memberof StreamReach
*/
comment?: string;
/**
*
* @type {StreamLocationNode}
* @memberof StreamReach
*/
downstreamNode: StreamLocationNode;
/**
*
* @type {StreamLocationNode}
* @memberof StreamReach
*/
upstreamNode: StreamLocationNode;
/**
*
* @type {CwmsId}
* @memberof StreamReach
*/
configurationId?: CwmsId;
/**
*
* @type {CwmsId}
* @memberof StreamReach
*/
streamId: CwmsId;
/**
*
* @type {CwmsId}
* @memberof StreamReach
*/
id: CwmsId;
}
export function StreamReachFromJSON(json: any): StreamReach {
return StreamReachFromJSONTyped(json, false);
}
export function StreamReachFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamReach {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'comment': !exists(json, 'comment') ? undefined : json['comment'],
'downstreamNode': StreamLocationNodeFromJSON(json['downstream-node']),
'upstreamNode': StreamLocationNodeFromJSON(json['upstream-node']),
'configurationId': !exists(json, 'configuration-id') ? undefined : CwmsIdFromJSON(json['configuration-id']),
'streamId': CwmsIdFromJSON(json['stream-id']),
'id': CwmsIdFromJSON(json['id']),
};
}
export function StreamReachToJSON(value?: StreamReach | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'comment': value.comment,
'downstream-node': StreamLocationNodeToJSON(value.downstreamNode),
'upstream-node': StreamLocationNodeToJSON(value.upstreamNode),
'configuration-id': CwmsIdToJSON(value.configurationId),
'stream-id': CwmsIdToJSON(value.streamId),
'id': CwmsIdToJSON(value.id),
};
}