UNPKG

cwmsjs

Version:

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

106 lines (105 loc) 6.12 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 Alias_1 = require("./Alias"); const SeasonalValueBean_1 = require("./SeasonalValueBean"); /** * @export * @enum {string} */ var SeasonalLocationLevelParameterTypeIdEnum; (function (SeasonalLocationLevelParameterTypeIdEnum) { SeasonalLocationLevelParameterTypeIdEnum["Inst"] = "Inst"; SeasonalLocationLevelParameterTypeIdEnum["Ave"] = "Ave"; SeasonalLocationLevelParameterTypeIdEnum["Min"] = "Min"; SeasonalLocationLevelParameterTypeIdEnum["Max"] = "Max"; SeasonalLocationLevelParameterTypeIdEnum["Total"] = "Total"; })(SeasonalLocationLevelParameterTypeIdEnum = exports.SeasonalLocationLevelParameterTypeIdEnum || (exports.SeasonalLocationLevelParameterTypeIdEnum = {})); /** * @export * @enum {string} */ var SeasonalLocationLevelInterpolateStringEnum; (function (SeasonalLocationLevelInterpolateStringEnum) { SeasonalLocationLevelInterpolateStringEnum["T"] = "T"; SeasonalLocationLevelInterpolateStringEnum["F"] = "F"; })(SeasonalLocationLevelInterpolateStringEnum = exports.SeasonalLocationLevelInterpolateStringEnum || (exports.SeasonalLocationLevelInterpolateStringEnum = {})); function SeasonalLocationLevelFromJSON(json) { return SeasonalLocationLevelFromJSONTyped(json, false); } exports.SeasonalLocationLevelFromJSON = SeasonalLocationLevelFromJSON; function SeasonalLocationLevelFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'officeId': json['office-id'], 'locationLevelId': json['location-level-id'], 'specifiedLevelId': !runtime_1.exists(json, 'specified-level-id') ? undefined : json['specified-level-id'], 'expirationDate': !runtime_1.exists(json, 'expiration-date') ? undefined : (new Date(json['expiration-date'])), 'parameterId': !runtime_1.exists(json, 'parameter-id') ? undefined : json['parameter-id'], 'parameterTypeId': !runtime_1.exists(json, 'parameter-type-id') ? undefined : json['parameter-type-id'], 'interpolateString': !runtime_1.exists(json, 'interpolate-string') ? undefined : json['interpolate-string'], 'levelUnitsId': !runtime_1.exists(json, 'level-units-id') ? undefined : json['level-units-id'], 'levelDate': !runtime_1.exists(json, 'level-date') ? undefined : (new Date(json['level-date'])), 'levelComment': !runtime_1.exists(json, 'level-comment') ? undefined : json['level-comment'], 'durationId': !runtime_1.exists(json, 'duration-id') ? undefined : json['duration-id'], 'attributeValue': !runtime_1.exists(json, 'attribute-value') ? undefined : json['attribute-value'], 'attributeUnitsId': !runtime_1.exists(json, 'attribute-units-id') ? undefined : json['attribute-units-id'], 'attributeParameterTypeId': !runtime_1.exists(json, 'attribute-parameter-type-id') ? undefined : json['attribute-parameter-type-id'], 'attributeParameterId': !runtime_1.exists(json, 'attribute-parameter-id') ? undefined : json['attribute-parameter-id'], 'attributeDurationId': !runtime_1.exists(json, 'attribute-duration-id') ? undefined : json['attribute-duration-id'], 'attributeComment': !runtime_1.exists(json, 'attribute-comment') ? undefined : json['attribute-comment'], 'aliases': !runtime_1.exists(json, 'aliases') ? undefined : (json['aliases'].map(Alias_1.AliasFromJSON)), 'intervalOrigin': !runtime_1.exists(json, 'interval-origin') ? undefined : (new Date(json['interval-origin'])), 'intervalMonths': !runtime_1.exists(json, 'interval-months') ? undefined : json['interval-months'], 'intervalMinutes': !runtime_1.exists(json, 'interval-minutes') ? undefined : json['interval-minutes'], 'seasonalValues': !runtime_1.exists(json, 'seasonal-values') ? undefined : (json['seasonal-values'].map(SeasonalValueBean_1.SeasonalValueBeanFromJSON)), }; } exports.SeasonalLocationLevelFromJSONTyped = SeasonalLocationLevelFromJSONTyped; function SeasonalLocationLevelToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'office-id': value.officeId, 'location-level-id': value.locationLevelId, 'specified-level-id': value.specifiedLevelId, 'expiration-date': value.expirationDate === undefined ? undefined : (value.expirationDate.toISOString()), 'parameter-id': value.parameterId, 'parameter-type-id': value.parameterTypeId, 'interpolate-string': value.interpolateString, 'level-units-id': value.levelUnitsId, 'level-date': value.levelDate === undefined ? undefined : (value.levelDate.toISOString()), 'level-comment': value.levelComment, 'duration-id': value.durationId, 'attribute-value': value.attributeValue, 'attribute-units-id': value.attributeUnitsId, 'attribute-parameter-type-id': value.attributeParameterTypeId, 'attribute-parameter-id': value.attributeParameterId, 'attribute-duration-id': value.attributeDurationId, 'attribute-comment': value.attributeComment, 'aliases': value.aliases === undefined ? undefined : (value.aliases.map(Alias_1.AliasToJSON)), 'interval-origin': value.intervalOrigin === undefined ? undefined : (value.intervalOrigin.toISOString()), 'interval-months': value.intervalMonths, 'interval-minutes': value.intervalMinutes, 'seasonal-values': value.seasonalValues === undefined ? undefined : (value.seasonalValues.map(SeasonalValueBean_1.SeasonalValueBeanToJSON)), }; } exports.SeasonalLocationLevelToJSON = SeasonalLocationLevelToJSON;