UNPKG

cwmsjs

Version:

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

99 lines (98 loc) 5.37 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"); /** * @export * @enum {string} */ var TimeSeriesLocationLevelParameterTypeIdEnum; (function (TimeSeriesLocationLevelParameterTypeIdEnum) { TimeSeriesLocationLevelParameterTypeIdEnum["Inst"] = "Inst"; TimeSeriesLocationLevelParameterTypeIdEnum["Ave"] = "Ave"; TimeSeriesLocationLevelParameterTypeIdEnum["Min"] = "Min"; TimeSeriesLocationLevelParameterTypeIdEnum["Max"] = "Max"; TimeSeriesLocationLevelParameterTypeIdEnum["Total"] = "Total"; })(TimeSeriesLocationLevelParameterTypeIdEnum = exports.TimeSeriesLocationLevelParameterTypeIdEnum || (exports.TimeSeriesLocationLevelParameterTypeIdEnum = {})); /** * @export * @enum {string} */ var TimeSeriesLocationLevelInterpolateStringEnum; (function (TimeSeriesLocationLevelInterpolateStringEnum) { TimeSeriesLocationLevelInterpolateStringEnum["T"] = "T"; TimeSeriesLocationLevelInterpolateStringEnum["F"] = "F"; })(TimeSeriesLocationLevelInterpolateStringEnum = exports.TimeSeriesLocationLevelInterpolateStringEnum || (exports.TimeSeriesLocationLevelInterpolateStringEnum = {})); function TimeSeriesLocationLevelFromJSON(json) { return TimeSeriesLocationLevelFromJSONTyped(json, false); } exports.TimeSeriesLocationLevelFromJSON = TimeSeriesLocationLevelFromJSON; function TimeSeriesLocationLevelFromJSONTyped(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)), 'seasonalTimeSeriesId': json['seasonal-time-series-id'], }; } exports.TimeSeriesLocationLevelFromJSONTyped = TimeSeriesLocationLevelFromJSONTyped; function TimeSeriesLocationLevelToJSON(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)), 'seasonal-time-series-id': value.seasonalTimeSeriesId, }; } exports.TimeSeriesLocationLevelToJSON = TimeSeriesLocationLevelToJSON;