cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
110 lines (101 loc) • 2.88 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* CWMS Data API
* CWMS REST API for Data Retrieval
*
* The version of the OpenAPI document: 2.3.2-2025.03.19
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface ForecastSpec
*/
export interface ForecastSpec {
/**
* Owning office of object.
* @type {string}
* @memberof ForecastSpec
*/
officeId: string;
/**
* Forecast Spec ID
* @type {string}
* @memberof ForecastSpec
*/
specId?: string;
/**
* Forecast Designator
* @type {string}
* @memberof ForecastSpec
*/
designator?: string;
/**
* Location IDs
* @type {string}
* @memberof ForecastSpec
*/
locationId?: string;
/**
* Source Entity ID
* @type {string}
* @memberof ForecastSpec
*/
sourceEntityId?: string;
/**
* Description of Forecast
* @type {string}
* @memberof ForecastSpec
*/
description?: string;
/**
* List of Time Series IDs belonging to this Forecast Spec
* @type {Array<string>}
* @memberof ForecastSpec
*/
timeSeriesIds?: Array<string>;
}
/**
* Check if a given object implements the ForecastSpec interface.
*/
export function instanceOfForecastSpec(value: object): boolean {
if (!('officeId' in value)) return false;
return true;
}
export function ForecastSpecFromJSON(json: any): ForecastSpec {
return ForecastSpecFromJSONTyped(json, false);
}
export function ForecastSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ForecastSpec {
if (json == null) {
return json;
}
return {
'officeId': json['office-id'],
'specId': json['spec-id'] == null ? undefined : json['spec-id'],
'designator': json['designator'] == null ? undefined : json['designator'],
'locationId': json['location-id'] == null ? undefined : json['location-id'],
'sourceEntityId': json['source-entity-id'] == null ? undefined : json['source-entity-id'],
'description': json['description'] == null ? undefined : json['description'],
'timeSeriesIds': json['time-series-ids'] == null ? undefined : json['time-series-ids'],
};
}
export function ForecastSpecToJSON(value?: ForecastSpec | null): any {
if (value == null) {
return value;
}
return {
'office-id': value['officeId'],
'spec-id': value['specId'],
'designator': value['designator'],
'location-id': value['locationId'],
'source-entity-id': value['sourceEntityId'],
'description': value['description'],
'time-series-ids': value['timeSeriesIds'],
};
}