cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
54 lines (53 loc) • 2.07 kB
JavaScript
;
/* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const runtime_1 = require("../runtime");
const CwmsId_1 = require("./CwmsId");
const StreamLocationNode_1 = require("./StreamLocationNode");
function StreamReachFromJSON(json) {
return StreamReachFromJSONTyped(json, false);
}
exports.StreamReachFromJSON = StreamReachFromJSON;
function StreamReachFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'comment': !runtime_1.exists(json, 'comment') ? undefined : json['comment'],
'downstreamNode': StreamLocationNode_1.StreamLocationNodeFromJSON(json['downstream-node']),
'upstreamNode': StreamLocationNode_1.StreamLocationNodeFromJSON(json['upstream-node']),
'configurationId': !runtime_1.exists(json, 'configuration-id') ? undefined : CwmsId_1.CwmsIdFromJSON(json['configuration-id']),
'streamId': CwmsId_1.CwmsIdFromJSON(json['stream-id']),
'id': CwmsId_1.CwmsIdFromJSON(json['id']),
};
}
exports.StreamReachFromJSONTyped = StreamReachFromJSONTyped;
function StreamReachToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'comment': value.comment,
'downstream-node': StreamLocationNode_1.StreamLocationNodeToJSON(value.downstreamNode),
'upstream-node': StreamLocationNode_1.StreamLocationNodeToJSON(value.upstreamNode),
'configuration-id': CwmsId_1.CwmsIdToJSON(value.configurationId),
'stream-id': CwmsId_1.CwmsIdToJSON(value.streamId),
'id': CwmsId_1.CwmsIdToJSON(value.id),
};
}
exports.StreamReachToJSON = StreamReachToJSON;