UNPKG

cwmsjs

Version:

CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps

55 lines (54 loc) 1.86 kB
"use strict"; /* 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.TsvToJSON = exports.TsvFromJSONTyped = exports.TsvFromJSON = exports.instanceOfTsv = void 0; const TsvId_1 = require("./TsvId"); /** * Check if a given object implements the Tsv interface. */ function instanceOfTsv(value) { return true; } exports.instanceOfTsv = instanceOfTsv; function TsvFromJSON(json) { return TsvFromJSONTyped(json, false); } exports.TsvFromJSON = TsvFromJSON; function TsvFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['id'] == null ? undefined : (0, TsvId_1.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'])), }; } exports.TsvFromJSONTyped = TsvFromJSONTyped; function TsvToJSON(value) { if (value == null) { return value; } return { 'id': (0, TsvId_1.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()), }; } exports.TsvToJSON = TsvToJSON;