UNPKG

cwmsjs

Version:

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

39 lines (38 loc) 1.72 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 RATING_1 = require("./RATING"); function LocationLevelConstituentFromJSON(json) { return LocationLevelConstituentFromJSONTyped(json, false); } exports.LocationLevelConstituentFromJSON = LocationLevelConstituentFromJSON; function LocationLevelConstituentFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return Object.assign({}, RATING_1.RATINGFromJSONTyped(json, ignoreDiscriminator), { 'attributeId': !runtime_1.exists(json, 'attribute-id') ? undefined : json['attribute-id'], 'attributeValue': !runtime_1.exists(json, 'attribute-value') ? undefined : json['attribute-value'], 'attributeUnits': !runtime_1.exists(json, 'attribute-units') ? undefined : json['attribute-units'] }); } exports.LocationLevelConstituentFromJSONTyped = LocationLevelConstituentFromJSONTyped; function LocationLevelConstituentToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return Object.assign({}, RATING_1.RATINGToJSON(value), { 'attribute-id': value.attributeId, 'attribute-value': value.attributeValue, 'attribute-units': value.attributeUnits }); } exports.LocationLevelConstituentToJSON = LocationLevelConstituentToJSON;