cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
48 lines (47 loc) • 1.55 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.
*/
import { TsvIdFromJSON, TsvIdToJSON, } from './TsvId';
/**
* Check if a given object implements the Tsv interface.
*/
export function instanceOfTsv(value) {
return true;
}
export function TsvFromJSON(json) {
return TsvFromJSONTyped(json, false);
}
export function TsvFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : TsvIdFromJSON(json['id']),
'value': json['value'] == null ? undefined : json['value'],
'qualityCode': json['qualityCode'] == null ? undefined : json['qualityCode'],
'startDate': json['startDate'] == null ? undefined : (new Date(json['startDate'])),
'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
};
}
export function TsvToJSON(value) {
if (value == null) {
return value;
}
return {
'id': TsvIdToJSON(value['id']),
'value': value['value'],
'qualityCode': value['qualityCode'],
'startDate': value['startDate'] == null ? undefined : ((value['startDate']).toISOString()),
'endDate': value['endDate'] == null ? undefined : ((value['endDate']).toISOString()),
};
}