cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
102 lines (101 loc) • 5.65 kB
JavaScript
;
/* 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 RATING_1 = require("./RATING");
/**
* @export
* @enum {string}
*/
var VirtualLocationLevelParameterTypeIdEnum;
(function (VirtualLocationLevelParameterTypeIdEnum) {
VirtualLocationLevelParameterTypeIdEnum["Inst"] = "Inst";
VirtualLocationLevelParameterTypeIdEnum["Ave"] = "Ave";
VirtualLocationLevelParameterTypeIdEnum["Min"] = "Min";
VirtualLocationLevelParameterTypeIdEnum["Max"] = "Max";
VirtualLocationLevelParameterTypeIdEnum["Total"] = "Total";
})(VirtualLocationLevelParameterTypeIdEnum = exports.VirtualLocationLevelParameterTypeIdEnum || (exports.VirtualLocationLevelParameterTypeIdEnum = {})); /**
* @export
* @enum {string}
*/
var VirtualLocationLevelInterpolateStringEnum;
(function (VirtualLocationLevelInterpolateStringEnum) {
VirtualLocationLevelInterpolateStringEnum["T"] = "T";
VirtualLocationLevelInterpolateStringEnum["F"] = "F";
})(VirtualLocationLevelInterpolateStringEnum = exports.VirtualLocationLevelInterpolateStringEnum || (exports.VirtualLocationLevelInterpolateStringEnum = {}));
function VirtualLocationLevelFromJSON(json) {
return VirtualLocationLevelFromJSONTyped(json, false);
}
exports.VirtualLocationLevelFromJSON = VirtualLocationLevelFromJSON;
function VirtualLocationLevelFromJSONTyped(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)),
'constituents': !runtime_1.exists(json, 'constituents') ? undefined : (json['constituents'].map(RATING_1.RATINGFromJSON)),
'constituentConnections': !runtime_1.exists(json, 'constituent-connections') ? undefined : json['constituent-connections'],
};
}
exports.VirtualLocationLevelFromJSONTyped = VirtualLocationLevelFromJSONTyped;
function VirtualLocationLevelToJSON(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)),
'constituents': value.constituents === undefined ? undefined : (value.constituents.map(RATING_1.RATINGToJSON)),
'constituent-connections': value.constituentConnections,
};
}
exports.VirtualLocationLevelToJSON = VirtualLocationLevelToJSON;