UNPKG

cwmsjs

Version:

CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps

66 lines (65 loc) 3.24 kB
"use strict"; /* 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"); function SupplementalStreamflowMeasurementFromJSON(json) { return SupplementalStreamflowMeasurementFromJSONTyped(json, false); } exports.SupplementalStreamflowMeasurementFromJSON = SupplementalStreamflowMeasurementFromJSON; function SupplementalStreamflowMeasurementFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'channelFlow': !runtime_1.exists(json, 'channel-flow') ? undefined : json['channel-flow'], 'overbankFlow': !runtime_1.exists(json, 'overbank-flow') ? undefined : json['overbank-flow'], 'overbankMaxDepth': !runtime_1.exists(json, 'overbank-max-depth') ? undefined : json['overbank-max-depth'], 'channelMaxDepth': !runtime_1.exists(json, 'channel-max-depth') ? undefined : json['channel-max-depth'], 'avgVelocity': !runtime_1.exists(json, 'avg-velocity') ? undefined : json['avg-velocity'], 'surfaceVelocity': !runtime_1.exists(json, 'surface-velocity') ? undefined : json['surface-velocity'], 'maxVelocity': !runtime_1.exists(json, 'max-velocity') ? undefined : json['max-velocity'], 'effectiveFlowArea': !runtime_1.exists(json, 'effective-flow-area') ? undefined : json['effective-flow-area'], 'crossSectionalArea': !runtime_1.exists(json, 'cross-sectional-area') ? undefined : json['cross-sectional-area'], 'meanGage': !runtime_1.exists(json, 'mean-gage') ? undefined : json['mean-gage'], 'topWidth': !runtime_1.exists(json, 'top-width') ? undefined : json['top-width'], 'mainChannelArea': !runtime_1.exists(json, 'main-channel-area') ? undefined : json['main-channel-area'], 'overbankArea': !runtime_1.exists(json, 'overbank-area') ? undefined : json['overbank-area'], }; } exports.SupplementalStreamflowMeasurementFromJSONTyped = SupplementalStreamflowMeasurementFromJSONTyped; function SupplementalStreamflowMeasurementToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'channel-flow': value.channelFlow, 'overbank-flow': value.overbankFlow, 'overbank-max-depth': value.overbankMaxDepth, 'channel-max-depth': value.channelMaxDepth, 'avg-velocity': value.avgVelocity, 'surface-velocity': value.surfaceVelocity, 'max-velocity': value.maxVelocity, 'effective-flow-area': value.effectiveFlowArea, 'cross-sectional-area': value.crossSectionalArea, 'mean-gage': value.meanGage, 'top-width': value.topWidth, 'main-channel-area': value.mainChannelArea, 'overbank-area': value.overbankArea, }; } exports.SupplementalStreamflowMeasurementToJSON = SupplementalStreamflowMeasurementToJSON;