cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
60 lines (59 loc) • 2.17 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ForecastSpecToJSON = exports.ForecastSpecFromJSONTyped = exports.ForecastSpecFromJSON = exports.instanceOfForecastSpec = void 0;
/**
* Check if a given object implements the ForecastSpec interface.
*/
function instanceOfForecastSpec(value) {
if (!('officeId' in value))
return false;
return true;
}
exports.instanceOfForecastSpec = instanceOfForecastSpec;
function ForecastSpecFromJSON(json) {
return ForecastSpecFromJSONTyped(json, false);
}
exports.ForecastSpecFromJSON = ForecastSpecFromJSON;
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'],
};
}
exports.ForecastSpecFromJSONTyped = ForecastSpecFromJSONTyped;
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'],
};
}
exports.ForecastSpecToJSON = ForecastSpecToJSON;