UNPKG

cwmsjs

Version:

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

89 lines (88 loc) 4.36 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"); function LocationCatalogEntryFromJSON(json) { return LocationCatalogEntryFromJSONTyped(json, false); } exports.LocationCatalogEntryFromJSON = LocationCatalogEntryFromJSON; function LocationCatalogEntryFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'office': !runtime_1.exists(json, 'office') ? undefined : json['office'], 'name': !runtime_1.exists(json, 'name') ? undefined : json['name'], 'nearestCity': !runtime_1.exists(json, 'nearest-city') ? undefined : json['nearest-city'], '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'], 'kind': !runtime_1.exists(json, 'kind') ? undefined : json['kind'], 'type': !runtime_1.exists(json, 'type') ? undefined : json['type'], 'timeZone': !runtime_1.exists(json, 'time-zone') ? undefined : json['time-zone'], 'latitude': !runtime_1.exists(json, 'latitude') ? undefined : json['latitude'], 'longitude': !runtime_1.exists(json, 'longitude') ? undefined : json['longitude'], 'publishedLatitude': !runtime_1.exists(json, 'published-latitude') ? undefined : json['published-latitude'], 'publishedLongitude': !runtime_1.exists(json, 'published-longitude') ? undefined : json['published-longitude'], 'horizontalDatum': !runtime_1.exists(json, 'horizontal-datum') ? undefined : json['horizontal-datum'], 'elevation': !runtime_1.exists(json, 'elevation') ? undefined : json['elevation'], 'unit': !runtime_1.exists(json, 'unit') ? undefined : json['unit'], 'verticalDatum': !runtime_1.exists(json, 'vertical-datum') ? undefined : json['vertical-datum'], 'nation': !runtime_1.exists(json, 'nation') ? undefined : json['nation'], 'state': !runtime_1.exists(json, 'state') ? undefined : json['state'], 'county': !runtime_1.exists(json, 'county') ? undefined : json['county'], 'boundingOffice': !runtime_1.exists(json, 'bounding-office') ? undefined : json['bounding-office'], 'mapLabel': !runtime_1.exists(json, 'map-label') ? undefined : json['map-label'], 'active': !runtime_1.exists(json, 'active') ? undefined : json['active'], 'aliases': !runtime_1.exists(json, 'aliases') ? undefined : (json['aliases'].map(Alias_1.AliasFromJSON)), }; } exports.LocationCatalogEntryFromJSONTyped = LocationCatalogEntryFromJSONTyped; function LocationCatalogEntryToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'office': value.office, 'name': value.name, 'nearest-city': value.nearestCity, 'public-name': value.publicName, 'long-name': value.longName, 'description': value.description, 'kind': value.kind, 'type': value.type, 'time-zone': value.timeZone, 'latitude': value.latitude, 'longitude': value.longitude, 'published-latitude': value.publishedLatitude, 'published-longitude': value.publishedLongitude, 'horizontal-datum': value.horizontalDatum, 'elevation': value.elevation, 'unit': value.unit, 'vertical-datum': value.verticalDatum, 'nation': value.nation, 'state': value.state, 'county': value.county, 'bounding-office': value.boundingOffice, 'map-label': value.mapLabel, 'active': value.active, 'aliases': value.aliases === undefined ? undefined : (value.aliases.map(Alias_1.AliasToJSON)), }; } exports.LocationCatalogEntryToJSON = LocationCatalogEntryToJSON;