UNPKG

cwmsjs

Version:

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

57 lines (56 loc) 2.5 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"); const StreamLocationNode_1 = require("./StreamLocationNode"); function StreamLocationFromJSON(json) { return StreamLocationFromJSONTyped(json, false); } exports.StreamLocationFromJSON = StreamLocationFromJSON; function StreamLocationFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'streamLocationNode': StreamLocationNode_1.StreamLocationNodeFromJSON(json['stream-location-node']), 'publishedStation': !runtime_1.exists(json, 'published-station') ? undefined : json['published-station'], 'navigationStation': !runtime_1.exists(json, 'navigation-station') ? undefined : json['navigation-station'], 'lowestMeasurableStage': !runtime_1.exists(json, 'lowest-measurable-stage') ? undefined : json['lowest-measurable-stage'], 'totalDrainageArea': !runtime_1.exists(json, 'total-drainage-area') ? undefined : json['total-drainage-area'], 'ungagedDrainageArea': !runtime_1.exists(json, 'ungaged-drainage-area') ? undefined : json['ungaged-drainage-area'], 'areaUnits': !runtime_1.exists(json, 'area-units') ? undefined : json['area-units'], 'stageUnits': !runtime_1.exists(json, 'stage-units') ? undefined : json['stage-units'], }; } exports.StreamLocationFromJSONTyped = StreamLocationFromJSONTyped; function StreamLocationToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'stream-location-node': StreamLocationNode_1.StreamLocationNodeToJSON(value.streamLocationNode), 'published-station': value.publishedStation, 'navigation-station': value.navigationStation, 'lowest-measurable-stage': value.lowestMeasurableStage, 'total-drainage-area': value.totalDrainageArea, 'ungaged-drainage-area': value.ungagedDrainageArea, 'area-units': value.areaUnits, 'stage-units': value.stageUnits, }; } exports.StreamLocationToJSON = StreamLocationToJSON;