UNPKG

cwmsjs

Version:

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

99 lines (98 loc) 4.7 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 Alias_1 = require("./Alias"); /** * @export * @enum {string} */ var LocationNationEnum; (function (LocationNationEnum) { LocationNationEnum["Us"] = "US"; LocationNationEnum["Canada"] = "CANADA"; LocationNationEnum["Mexico"] = "MEXICO"; })(LocationNationEnum = exports.LocationNationEnum || (exports.LocationNationEnum = {})); function LocationFromJSON(json) { return LocationFromJSONTyped(json, false); } exports.LocationFromJSON = LocationFromJSON; function LocationFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'officeId': json['office-id'], 'name': json['name'], 'latitude': !runtime_1.exists(json, 'latitude') ? undefined : json['latitude'], 'longitude': !runtime_1.exists(json, 'longitude') ? undefined : json['longitude'], 'active': !runtime_1.exists(json, 'active') ? undefined : json['active'], 'publicName': !runtime_1.exists(json, 'public-name') ? undefined : json['public-name'], 'longName': !runtime_1.exists(json, 'long-name') ? undefined : json['long-name'], 'description': !runtime_1.exists(json, 'description') ? undefined : json['description'], 'timezoneName': !runtime_1.exists(json, 'timezone-name') ? undefined : json['timezone-name'], 'locationType': !runtime_1.exists(json, 'location-type') ? undefined : json['location-type'], 'locationKind': !runtime_1.exists(json, 'location-kind') ? undefined : json['location-kind'], 'nation': !runtime_1.exists(json, 'nation') ? undefined : json['nation'], 'stateInitial': !runtime_1.exists(json, 'state-initial') ? undefined : json['state-initial'], 'countyName': !runtime_1.exists(json, 'county-name') ? undefined : json['county-name'], 'nearestCity': !runtime_1.exists(json, 'nearest-city') ? undefined : json['nearest-city'], 'horizontalDatum': !runtime_1.exists(json, 'horizontal-datum') ? undefined : json['horizontal-datum'], 'publishedLongitude': !runtime_1.exists(json, 'published-longitude') ? undefined : json['published-longitude'], 'publishedLatitude': !runtime_1.exists(json, 'published-latitude') ? undefined : json['published-latitude'], 'verticalDatum': !runtime_1.exists(json, 'vertical-datum') ? undefined : json['vertical-datum'], 'elevation': !runtime_1.exists(json, 'elevation') ? undefined : json['elevation'], 'mapLabel': !runtime_1.exists(json, 'map-label') ? undefined : json['map-label'], 'boundingOfficeId': !runtime_1.exists(json, 'bounding-office-id') ? undefined : json['bounding-office-id'], 'elevationUnits': !runtime_1.exists(json, 'elevation-units') ? undefined : json['elevation-units'], 'aliases': !runtime_1.exists(json, 'aliases') ? undefined : (json['aliases'].map(Alias_1.AliasFromJSON)), }; } exports.LocationFromJSONTyped = LocationFromJSONTyped; function LocationToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'office-id': value.officeId, 'name': value.name, 'latitude': value.latitude, 'longitude': value.longitude, 'active': value.active, 'public-name': value.publicName, 'long-name': value.longName, 'description': value.description, 'timezone-name': value.timezoneName, 'location-type': value.locationType, 'location-kind': value.locationKind, 'nation': value.nation, 'state-initial': value.stateInitial, 'county-name': value.countyName, 'nearest-city': value.nearestCity, 'horizontal-datum': value.horizontalDatum, 'published-longitude': value.publishedLongitude, 'published-latitude': value.publishedLatitude, 'vertical-datum': value.verticalDatum, 'elevation': value.elevation, 'map-label': value.mapLabel, 'bounding-office-id': value.boundingOfficeId, 'elevation-units': value.elevationUnits, 'aliases': value.aliases === undefined ? undefined : (value.aliases.map(Alias_1.AliasToJSON)), }; } exports.LocationToJSON = LocationToJSON;