UNPKG

cwmsjs

Version:

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

54 lines (53 loc) 1.66 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 _1 = require("./"); function RATINGFromJSON(json) { return RATINGFromJSONTyped(json, false); } exports.RATINGFromJSON = RATINGFromJSON; function RATINGFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } if (!ignoreDiscriminator) { if (json['type'] === 'LocationLevelConstituent') { return _1.LocationLevelConstituentFromJSONTyped(json, true); } } return { 'abbr': !runtime_1.exists(json, 'abbr') ? undefined : json['abbr'], 'type': !runtime_1.exists(json, 'type') ? undefined : json['type'], 'name': !runtime_1.exists(json, 'name') ? undefined : json['name'], 'constituentList': !runtime_1.exists(json, 'constituent-list') ? undefined : json['constituent-list'], }; } exports.RATINGFromJSONTyped = RATINGFromJSONTyped; function RATINGToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'abbr': value.abbr, 'type': value.type, 'name': value.name, 'constituent-list': value.constituentList, }; } exports.RATINGToJSON = RATINGToJSON;