UNPKG

cwmsjs

Version:

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

227 lines (217 loc) 7.54 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'; /** * * @export * @interface TimeSeriesLocationLevel */ export interface TimeSeriesLocationLevel { /** * Owning office of object. * @type {string} * @memberof TimeSeriesLocationLevel */ officeId: string; /** * Name of the location level * @type {string} * @memberof TimeSeriesLocationLevel */ 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 TimeSeriesLocationLevel */ specifiedLevelId?: string; /** * The expiration date of the location level. * @type {Date} * @memberof TimeSeriesLocationLevel */ expirationDate?: Date; /** * Data Type such as Stage, Elevation, or others. * @type {string} * @memberof TimeSeriesLocationLevel */ parameterId?: string; /** * To indicate if single or aggregate value * @type {string} * @memberof TimeSeriesLocationLevel */ parameterTypeId?: TimeSeriesLocationLevelParameterTypeIdEnum; /** * Indicating whether or not to interpolate between seasonal values. * @type {string} * @memberof TimeSeriesLocationLevel */ interpolateString?: TimeSeriesLocationLevelInterpolateStringEnum; /** * Units the provided levels are in * @type {string} * @memberof TimeSeriesLocationLevel */ levelUnitsId?: string; /** * The date/time at which this location level configuration takes effect. * @type {Date} * @memberof TimeSeriesLocationLevel */ levelDate?: Date; /** * * @type {string} * @memberof TimeSeriesLocationLevel */ levelComment?: string; /** * 0 if parameterTypeId is Inst. Otherwise duration indicating the time window of the aggregate value. * @type {string} * @memberof TimeSeriesLocationLevel */ durationId?: string; /** * * @type {number} * @memberof TimeSeriesLocationLevel */ attributeValue?: number; /** * * @type {string} * @memberof TimeSeriesLocationLevel */ attributeUnitsId?: string; /** * * @type {string} * @memberof TimeSeriesLocationLevel */ attributeParameterTypeId?: string; /** * * @type {string} * @memberof TimeSeriesLocationLevel */ attributeParameterId?: string; /** * * @type {string} * @memberof TimeSeriesLocationLevel */ attributeDurationId?: string; /** * * @type {string} * @memberof TimeSeriesLocationLevel */ attributeComment?: string; /** * * @type {Array<Alias>} * @memberof TimeSeriesLocationLevel */ aliases?: Array<Alias>; /** * TimeSeries ID (e.g. from the times series catalog) to use as the location level. Mutually exclusive with seasonalValues and siParameterUnitsConstantValue * @type {string} * @memberof TimeSeriesLocationLevel */ seasonalTimeSeriesId: string; } /** * @export * @enum {string} */ export enum TimeSeriesLocationLevelParameterTypeIdEnum { Inst = 'Inst', Ave = 'Ave', Min = 'Min', Max = 'Max', Total = 'Total' }/** * @export * @enum {string} */ export enum TimeSeriesLocationLevelInterpolateStringEnum { T = 'T', F = 'F' } export function TimeSeriesLocationLevelFromJSON(json: any): TimeSeriesLocationLevel { return TimeSeriesLocationLevelFromJSONTyped(json, false); } export function TimeSeriesLocationLevelFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimeSeriesLocationLevel { 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)), 'seasonalTimeSeriesId': json['seasonal-time-series-id'], }; } export function TimeSeriesLocationLevelToJSON(value?: TimeSeriesLocationLevel | 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)), 'seasonal-time-series-id': value.seasonalTimeSeriesId, }; }