UNPKG

cwmsjs

Version:

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

55 lines (54 loc) 2.13 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 Offset_1 = require("./Offset"); function VerticalDatumInfoFromJSON(json) { return VerticalDatumInfoFromJSONTyped(json, false); } exports.VerticalDatumInfoFromJSON = VerticalDatumInfoFromJSON; function VerticalDatumInfoFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'office': !runtime_1.exists(json, 'office') ? undefined : json['office'], 'unit': !runtime_1.exists(json, 'unit') ? undefined : json['unit'], 'location': !runtime_1.exists(json, 'location') ? undefined : json['location'], 'nativeDatum': !runtime_1.exists(json, 'native-datum') ? undefined : json['native-datum'], 'elevation': !runtime_1.exists(json, 'elevation') ? undefined : json['elevation'], 'localDatumName': !runtime_1.exists(json, 'local-datum-name') ? undefined : json['local-datum-name'], 'offsets': !runtime_1.exists(json, 'offsets') ? undefined : (json['offsets'].map(Offset_1.OffsetFromJSON)), }; } exports.VerticalDatumInfoFromJSONTyped = VerticalDatumInfoFromJSONTyped; function VerticalDatumInfoToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'office': value.office, 'unit': value.unit, 'location': value.location, 'native-datum': value.nativeDatum, 'elevation': value.elevation, 'local-datum-name': value.localDatumName, 'offsets': value.offsets === undefined ? undefined : (value.offsets.map(Offset_1.OffsetToJSON)), }; } exports.VerticalDatumInfoToJSON = VerticalDatumInfoToJSON;