UNPKG

cwmsjs

Version:

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

120 lines (111 loc) 3.35 kB
/* 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 { StreamLocationNode, StreamLocationNodeFromJSON, StreamLocationNodeFromJSONTyped, StreamLocationNodeToJSON, } from './StreamLocationNode'; /** * * @export * @interface StreamLocation */ export interface StreamLocation { /** * * @type {StreamLocationNode} * @memberof StreamLocation */ streamLocationNode: StreamLocationNode; /** * * @type {number} * @memberof StreamLocation */ publishedStation?: number; /** * * @type {number} * @memberof StreamLocation */ navigationStation?: number; /** * * @type {number} * @memberof StreamLocation */ lowestMeasurableStage?: number; /** * * @type {number} * @memberof StreamLocation */ totalDrainageArea?: number; /** * * @type {number} * @memberof StreamLocation */ ungagedDrainageArea?: number; /** * * @type {string} * @memberof StreamLocation */ areaUnits?: string; /** * * @type {string} * @memberof StreamLocation */ stageUnits?: string; } export function StreamLocationFromJSON(json: any): StreamLocation { return StreamLocationFromJSONTyped(json, false); } export function StreamLocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamLocation { if ((json === undefined) || (json === null)) { return json; } return { 'streamLocationNode': StreamLocationNodeFromJSON(json['stream-location-node']), 'publishedStation': !exists(json, 'published-station') ? undefined : json['published-station'], 'navigationStation': !exists(json, 'navigation-station') ? undefined : json['navigation-station'], 'lowestMeasurableStage': !exists(json, 'lowest-measurable-stage') ? undefined : json['lowest-measurable-stage'], 'totalDrainageArea': !exists(json, 'total-drainage-area') ? undefined : json['total-drainage-area'], 'ungagedDrainageArea': !exists(json, 'ungaged-drainage-area') ? undefined : json['ungaged-drainage-area'], 'areaUnits': !exists(json, 'area-units') ? undefined : json['area-units'], 'stageUnits': !exists(json, 'stage-units') ? undefined : json['stage-units'], }; } export function StreamLocationToJSON(value?: StreamLocation | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'stream-location-node': 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, }; }