UNPKG

cwmsjs

Version:

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

257 lines (247 loc) 8.83 kB
/* 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. */ import { exists, mapValues } from '../runtime'; import { Alias, AliasFromJSON, AliasFromJSONTyped, AliasToJSON, } from './Alias'; import { SeasonalValueBean, SeasonalValueBeanFromJSON, SeasonalValueBeanFromJSONTyped, SeasonalValueBeanToJSON, } from './SeasonalValueBean'; /** * * @export * @interface SeasonalLocationLevel */ export interface SeasonalLocationLevel { /** * Owning office of object. * @type {string} * @memberof SeasonalLocationLevel */ officeId: string; /** * Name of the location level * @type {string} * @memberof SeasonalLocationLevel */ locationLevelId: string; /** * TimeSeries ID (e.g. from the times series catalog) to use as the location level. Mutually exclusive with seasonalValues and siParameterUnitsConstantValue * @type {string} * @memberof SeasonalLocationLevel */ specifiedLevelId?: string; /** * The expiration date of the location level. * @type {Date} * @memberof SeasonalLocationLevel */ expirationDate?: Date; /** * Data Type such as Stage, Elevation, or others. * @type {string} * @memberof SeasonalLocationLevel */ parameterId?: string; /** * To indicate if single or aggregate value * @type {string} * @memberof SeasonalLocationLevel */ parameterTypeId?: SeasonalLocationLevelParameterTypeIdEnum; /** * Indicating whether or not to interpolate between seasonal values. * @type {string} * @memberof SeasonalLocationLevel */ interpolateString?: SeasonalLocationLevelInterpolateStringEnum; /** * Units the provided levels are in * @type {string} * @memberof SeasonalLocationLevel */ levelUnitsId?: string; /** * The date/time at which this location level configuration takes effect. * @type {Date} * @memberof SeasonalLocationLevel */ levelDate?: Date; /** * * @type {string} * @memberof SeasonalLocationLevel */ levelComment?: string; /** * 0 if parameterTypeId is Inst. Otherwise duration indicating the time window of the aggregate value. * @type {string} * @memberof SeasonalLocationLevel */ durationId?: string; /** * * @type {number} * @memberof SeasonalLocationLevel */ attributeValue?: number; /** * * @type {string} * @memberof SeasonalLocationLevel */ attributeUnitsId?: string; /** * * @type {string} * @memberof SeasonalLocationLevel */ attributeParameterTypeId?: string; /** * * @type {string} * @memberof SeasonalLocationLevel */ attributeParameterId?: string; /** * * @type {string} * @memberof SeasonalLocationLevel */ attributeDurationId?: string; /** * * @type {string} * @memberof SeasonalLocationLevel */ attributeComment?: string; /** * * @type {Array<Alias>} * @memberof SeasonalLocationLevel */ aliases?: Array<Alias>; /** * The start point of provided seasonal values * @type {Date} * @memberof SeasonalLocationLevel */ intervalOrigin?: Date; /** * * @type {number} * @memberof SeasonalLocationLevel */ intervalMonths?: number; /** * * @type {number} * @memberof SeasonalLocationLevel */ intervalMinutes?: number; /** * List of Repeating seasonal values. The values repeat after the specified interval. A yearly interval seasonable could have 12 different values, one for each month for example. Mutually exclusive with seasonalTimeSeriesId and siParameterUnitsConstantValue * @type {Array<SeasonalValueBean>} * @memberof SeasonalLocationLevel */ seasonalValues?: Array<SeasonalValueBean>; } /** * @export * @enum {string} */ export enum SeasonalLocationLevelParameterTypeIdEnum { Inst = 'Inst', Ave = 'Ave', Min = 'Min', Max = 'Max', Total = 'Total' }/** * @export * @enum {string} */ export enum SeasonalLocationLevelInterpolateStringEnum { T = 'T', F = 'F' } export function SeasonalLocationLevelFromJSON(json: any): SeasonalLocationLevel { return SeasonalLocationLevelFromJSONTyped(json, false); } export function SeasonalLocationLevelFromJSONTyped(json: any, ignoreDiscriminator: boolean): SeasonalLocationLevel { if ((json === undefined) || (json === null)) { return json; } return { 'officeId': json['office-id'], 'locationLevelId': json['location-level-id'], 'specifiedLevelId': !exists(json, 'specified-level-id') ? undefined : json['specified-level-id'], 'expirationDate': !exists(json, 'expiration-date') ? undefined : (new Date(json['expiration-date'])), 'parameterId': !exists(json, 'parameter-id') ? undefined : json['parameter-id'], 'parameterTypeId': !exists(json, 'parameter-type-id') ? undefined : json['parameter-type-id'], 'interpolateString': !exists(json, 'interpolate-string') ? undefined : json['interpolate-string'], 'levelUnitsId': !exists(json, 'level-units-id') ? undefined : json['level-units-id'], 'levelDate': !exists(json, 'level-date') ? undefined : (new Date(json['level-date'])), 'levelComment': !exists(json, 'level-comment') ? undefined : json['level-comment'], 'durationId': !exists(json, 'duration-id') ? undefined : json['duration-id'], 'attributeValue': !exists(json, 'attribute-value') ? undefined : json['attribute-value'], 'attributeUnitsId': !exists(json, 'attribute-units-id') ? undefined : json['attribute-units-id'], 'attributeParameterTypeId': !exists(json, 'attribute-parameter-type-id') ? undefined : json['attribute-parameter-type-id'], 'attributeParameterId': !exists(json, 'attribute-parameter-id') ? undefined : json['attribute-parameter-id'], 'attributeDurationId': !exists(json, 'attribute-duration-id') ? undefined : json['attribute-duration-id'], 'attributeComment': !exists(json, 'attribute-comment') ? undefined : json['attribute-comment'], 'aliases': !exists(json, 'aliases') ? undefined : ((json['aliases'] as Array<any>).map(AliasFromJSON)), 'intervalOrigin': !exists(json, 'interval-origin') ? undefined : (new Date(json['interval-origin'])), 'intervalMonths': !exists(json, 'interval-months') ? undefined : json['interval-months'], 'intervalMinutes': !exists(json, 'interval-minutes') ? undefined : json['interval-minutes'], 'seasonalValues': !exists(json, 'seasonal-values') ? undefined : ((json['seasonal-values'] as Array<any>).map(SeasonalValueBeanFromJSON)), }; } export function SeasonalLocationLevelToJSON(value?: SeasonalLocationLevel | null): any { 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 as Array<any>).map(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 as Array<any>).map(SeasonalValueBeanToJSON)), }; }