cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
45 lines (44 loc) • 1.5 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 TsvId interface.
*/
export function instanceOfTsvId(value) {
return true;
}
export function TsvIdFromJSON(json) {
return TsvIdFromJSONTyped(json, false);
}
export function TsvIdFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'tsCode': json['tsCode'] == null ? undefined : json['tsCode'],
'dateTime': json['dateTime'] == null ? undefined : (new Date(json['dateTime'])),
'versionDate': json['versionDate'] == null ? undefined : (new Date(json['versionDate'])),
'dataEntryDate': json['dataEntryDate'] == null ? undefined : (new Date(json['dataEntryDate'])),
};
}
export function TsvIdToJSON(value) {
if (value == null) {
return value;
}
return {
'tsCode': value['tsCode'],
'dateTime': value['dateTime'] == null ? undefined : ((value['dateTime']).toISOString()),
'versionDate': value['versionDate'] == null ? undefined : ((value['versionDate']).toISOString()),
'dataEntryDate': value['dataEntryDate'] == null ? undefined : ((value['dataEntryDate']).toISOString()),
};
}