UNPKG

cwmsjs

Version:

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

52 lines (51 loc) 1.97 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.ExtentsToJSON = exports.ExtentsFromJSONTyped = exports.ExtentsFromJSON = exports.instanceOfExtents = void 0; /** * Check if a given object implements the Extents interface. */ function instanceOfExtents(value) { return true; } exports.instanceOfExtents = instanceOfExtents; function ExtentsFromJSON(json) { return ExtentsFromJSONTyped(json, false); } exports.ExtentsFromJSON = ExtentsFromJSON; function ExtentsFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'earliestTime': json['earliest-time'] == null ? undefined : (new Date(json['earliest-time'])), 'lastUpdate': json['last-update'] == null ? undefined : (new Date(json['last-update'])), 'latestTime': json['latest-time'] == null ? undefined : (new Date(json['latest-time'])), 'versionTime': json['version-time'] == null ? undefined : (new Date(json['version-time'])), }; } exports.ExtentsFromJSONTyped = ExtentsFromJSONTyped; function ExtentsToJSON(value) { if (value == null) { return value; } return { 'earliest-time': value['earliestTime'] == null ? undefined : ((value['earliestTime']).toISOString()), 'last-update': value['lastUpdate'] == null ? undefined : ((value['lastUpdate']).toISOString()), 'latest-time': value['latestTime'] == null ? undefined : ((value['latestTime']).toISOString()), 'version-time': value['versionTime'] == null ? undefined : ((value['versionTime']).toISOString()), }; } exports.ExtentsToJSON = ExtentsToJSON;