UNPKG

cwmsjs

Version:

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

52 lines (51 loc) 1.83 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.TsvIdToJSON = exports.TsvIdFromJSONTyped = exports.TsvIdFromJSON = exports.instanceOfTsvId = void 0; /** * Check if a given object implements the TsvId interface. */ function instanceOfTsvId(value) { return true; } exports.instanceOfTsvId = instanceOfTsvId; function TsvIdFromJSON(json) { return TsvIdFromJSONTyped(json, false); } exports.TsvIdFromJSON = TsvIdFromJSON; 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'])), }; } exports.TsvIdFromJSONTyped = TsvIdFromJSONTyped; 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()), }; } exports.TsvIdToJSON = TsvIdToJSON;