cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
71 lines (70 loc) • 3.39 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.ForecastInstanceToJSON = exports.ForecastInstanceFromJSONTyped = exports.ForecastInstanceFromJSON = exports.instanceOfForecastInstance = void 0;
const ForecastSpec_1 = require("./ForecastSpec");
/**
* Check if a given object implements the ForecastInstance interface.
*/
function instanceOfForecastInstance(value) {
return true;
}
exports.instanceOfForecastInstance = instanceOfForecastInstance;
function ForecastInstanceFromJSON(json) {
return ForecastInstanceFromJSONTyped(json, false);
}
exports.ForecastInstanceFromJSON = ForecastInstanceFromJSON;
function ForecastInstanceFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'spec': json['spec'] == null ? undefined : (0, ForecastSpec_1.ForecastSpecFromJSON)(json['spec']),
'dateTime': json['date-time'] == null ? undefined : (new Date(json['date-time'])),
'issueDateTime': json['issue-date-time'] == null ? undefined : (new Date(json['issue-date-time'])),
'firstDateTime': json['first-date-time'] == null ? undefined : (new Date(json['first-date-time'])),
'lastDateTime': json['last-date-time'] == null ? undefined : (new Date(json['last-date-time'])),
'maxAge': json['max-age'] == null ? undefined : json['max-age'],
'notes': json['notes'] == null ? undefined : json['notes'],
'metadata': json['metadata'] == null ? undefined : json['metadata'],
'filename': json['filename'] == null ? undefined : json['filename'],
'fileDescription': json['file-description'] == null ? undefined : json['file-description'],
'fileMediaType': json['file-media-type'] == null ? undefined : json['file-media-type'],
'fileData': json['file-data'] == null ? undefined : json['file-data'],
'fileDataUrl': json['file-data-url'] == null ? undefined : json['file-data-url'],
};
}
exports.ForecastInstanceFromJSONTyped = ForecastInstanceFromJSONTyped;
function ForecastInstanceToJSON(value) {
if (value == null) {
return value;
}
return {
'spec': (0, ForecastSpec_1.ForecastSpecToJSON)(value['spec']),
'date-time': value['dateTime'] == null ? undefined : ((value['dateTime']).toISOString()),
'issue-date-time': value['issueDateTime'] == null ? undefined : ((value['issueDateTime']).toISOString()),
'first-date-time': value['firstDateTime'] == null ? undefined : ((value['firstDateTime']).toISOString()),
'last-date-time': value['lastDateTime'] == null ? undefined : ((value['lastDateTime']).toISOString()),
'max-age': value['maxAge'],
'notes': value['notes'],
'metadata': value['metadata'],
'filename': value['filename'],
'file-description': value['fileDescription'],
'file-media-type': value['fileMediaType'],
'file-data': value['fileData'],
'file-data-url': value['fileDataUrl'],
};
}
exports.ForecastInstanceToJSON = ForecastInstanceToJSON;