UNPKG

cwmsjs

Version:

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

248 lines (239 loc) 6.76 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 { Alias, AliasFromJSON, AliasFromJSONTyped, AliasToJSON, } from './Alias'; /** * * @export * @interface LocationCatalogEntry */ export interface LocationCatalogEntry { /** * * @type {string} * @memberof LocationCatalogEntry */ office?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ name?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ nearestCity?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ publicName?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ longName?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ description?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ kind?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ type?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ timeZone?: string; /** * * @type {number} * @memberof LocationCatalogEntry */ latitude?: number; /** * * @type {number} * @memberof LocationCatalogEntry */ longitude?: number; /** * * @type {number} * @memberof LocationCatalogEntry */ publishedLatitude?: number; /** * * @type {number} * @memberof LocationCatalogEntry */ publishedLongitude?: number; /** * * @type {string} * @memberof LocationCatalogEntry */ horizontalDatum?: string; /** * * @type {number} * @memberof LocationCatalogEntry */ elevation?: number; /** * * @type {string} * @memberof LocationCatalogEntry */ unit?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ verticalDatum?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ nation?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ state?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ county?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ boundingOffice?: string; /** * * @type {string} * @memberof LocationCatalogEntry */ mapLabel?: string; /** * * @type {boolean} * @memberof LocationCatalogEntry */ active?: boolean; /** * * @type {Array<Alias>} * @memberof LocationCatalogEntry */ aliases?: Array<Alias>; } export function LocationCatalogEntryFromJSON(json: any): LocationCatalogEntry { return LocationCatalogEntryFromJSONTyped(json, false); } export function LocationCatalogEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationCatalogEntry { if ((json === undefined) || (json === null)) { return json; } return { 'office': !exists(json, 'office') ? undefined : json['office'], 'name': !exists(json, 'name') ? undefined : json['name'], 'nearestCity': !exists(json, 'nearest-city') ? undefined : json['nearest-city'], 'publicName': !exists(json, 'public-name') ? undefined : json['public-name'], 'longName': !exists(json, 'long-name') ? undefined : json['long-name'], 'description': !exists(json, 'description') ? undefined : json['description'], 'kind': !exists(json, 'kind') ? undefined : json['kind'], 'type': !exists(json, 'type') ? undefined : json['type'], 'timeZone': !exists(json, 'time-zone') ? undefined : json['time-zone'], 'latitude': !exists(json, 'latitude') ? undefined : json['latitude'], 'longitude': !exists(json, 'longitude') ? undefined : json['longitude'], 'publishedLatitude': !exists(json, 'published-latitude') ? undefined : json['published-latitude'], 'publishedLongitude': !exists(json, 'published-longitude') ? undefined : json['published-longitude'], 'horizontalDatum': !exists(json, 'horizontal-datum') ? undefined : json['horizontal-datum'], 'elevation': !exists(json, 'elevation') ? undefined : json['elevation'], 'unit': !exists(json, 'unit') ? undefined : json['unit'], 'verticalDatum': !exists(json, 'vertical-datum') ? undefined : json['vertical-datum'], 'nation': !exists(json, 'nation') ? undefined : json['nation'], 'state': !exists(json, 'state') ? undefined : json['state'], 'county': !exists(json, 'county') ? undefined : json['county'], 'boundingOffice': !exists(json, 'bounding-office') ? undefined : json['bounding-office'], 'mapLabel': !exists(json, 'map-label') ? undefined : json['map-label'], 'active': !exists(json, 'active') ? undefined : json['active'], 'aliases': !exists(json, 'aliases') ? undefined : ((json['aliases'] as Array<any>).map(AliasFromJSON)), }; } export function LocationCatalogEntryToJSON(value?: LocationCatalogEntry | null): any { 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 as Array<any>).map(AliasToJSON)), }; }