cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
53 lines (52 loc) • 1.76 kB
JavaScript
/* 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.
*/
/**
* Check if a given object implements the ForecastSpec interface.
*/
export function instanceOfForecastSpec(value) {
if (!('officeId' in value))
return false;
return true;
}
export function ForecastSpecFromJSON(json) {
return ForecastSpecFromJSONTyped(json, false);
}
export function ForecastSpecFromJSONTyped(json, ignoreDiscriminator) {
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) {
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'],
};
}