UNPKG

cwmsjs

Version:

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

65 lines (57 loc) 1.72 kB
/* tslint:disable */ /* eslint-disable */ /** * CWMS Data API * CWMS REST API for Data Retrieval * * The version of the OpenAPI document: 2.4.0-2026.3.16 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; /** * Represents the start and end times of an extent * @export * @interface TimeExtents */ export interface TimeExtents { /** * Earliest value in the timeseries * @type {Date} * @memberof TimeExtents */ earliestTime?: Date; /** * Latest value in the timeseries * @type {Date} * @memberof TimeExtents */ latestTime?: Date; } export function TimeExtentsFromJSON(json: any): TimeExtents { return TimeExtentsFromJSONTyped(json, false); } export function TimeExtentsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimeExtents { if ((json === undefined) || (json === null)) { return json; } return { 'earliestTime': !exists(json, 'earliest-time') ? undefined : (new Date(json['earliest-time'])), 'latestTime': !exists(json, 'latest-time') ? undefined : (new Date(json['latest-time'])), }; } export function TimeExtentsToJSON(value?: TimeExtents | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'earliest-time': value.earliestTime === undefined ? undefined : (value.earliestTime.toISOString()), 'latest-time': value.latestTime === undefined ? undefined : (value.latestTime.toISOString()), }; }