UNPKG

cwmsjs

Version:

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

102 lines (101 loc) 4.38 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * CWMS Data API * CWMS REST API for Data Retrieval * * The version of the OpenAPI document: 2.3.2-2025.03.19 * * * 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 }); exports.LocationToJSON = exports.LocationFromJSONTyped = exports.LocationFromJSON = exports.instanceOfLocation = exports.LocationNationEnum = void 0; /** * @export */ exports.LocationNationEnum = { Us: 'US', Canada: 'CANADA', Mexico: 'MEXICO' }; /** * Check if a given object implements the Location interface. */ function instanceOfLocation(value) { if (!('officeId' in value)) return false; if (!('name' in value)) return false; return true; } exports.instanceOfLocation = instanceOfLocation; function LocationFromJSON(json) { return LocationFromJSONTyped(json, false); } exports.LocationFromJSON = LocationFromJSON; function LocationFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'officeId': json['office-id'], 'name': json['name'], 'latitude': json['latitude'] == null ? undefined : json['latitude'], 'longitude': json['longitude'] == null ? undefined : json['longitude'], 'active': json['active'] == null ? undefined : json['active'], 'publicName': json['public-name'] == null ? undefined : json['public-name'], 'longName': json['long-name'] == null ? undefined : json['long-name'], 'description': json['description'] == null ? undefined : json['description'], 'timezoneName': json['timezone-name'] == null ? undefined : json['timezone-name'], 'locationType': json['location-type'] == null ? undefined : json['location-type'], 'locationKind': json['location-kind'] == null ? undefined : json['location-kind'], 'nation': json['nation'] == null ? undefined : json['nation'], 'stateInitial': json['state-initial'] == null ? undefined : json['state-initial'], 'countyName': json['county-name'] == null ? undefined : json['county-name'], 'nearestCity': json['nearest-city'] == null ? undefined : json['nearest-city'], 'horizontalDatum': json['horizontal-datum'] == null ? undefined : json['horizontal-datum'], 'publishedLongitude': json['published-longitude'] == null ? undefined : json['published-longitude'], 'publishedLatitude': json['published-latitude'] == null ? undefined : json['published-latitude'], 'verticalDatum': json['vertical-datum'] == null ? undefined : json['vertical-datum'], 'elevation': json['elevation'] == null ? undefined : json['elevation'], 'mapLabel': json['map-label'] == null ? undefined : json['map-label'], 'boundingOfficeId': json['bounding-office-id'] == null ? undefined : json['bounding-office-id'], 'elevationUnits': json['elevation-units'] == null ? undefined : json['elevation-units'], }; } exports.LocationFromJSONTyped = LocationFromJSONTyped; function LocationToJSON(value) { if (value == null) { return value; } 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'], }; } exports.LocationToJSON = LocationToJSON;