cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
95 lines (94 loc) • 4 kB
JavaScript
/* 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.
*/
/**
* @export
*/
export const LocationNationEnum = {
Us: 'US',
Canada: 'CANADA',
Mexico: 'MEXICO'
};
/**
* Check if a given object implements the Location interface.
*/
export function instanceOfLocation(value) {
if (!('officeId' in value))
return false;
if (!('name' in value))
return false;
return true;
}
export function LocationFromJSON(json) {
return LocationFromJSONTyped(json, false);
}
export 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'],
};
}
export 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'],
};
}