UNPKG

cwmsjs

Version:

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

100 lines (90 loc) 2.25 kB
/* 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 { mapValues } from '../runtime'; import type { TsvId } from './TsvId'; import { TsvIdFromJSON, TsvIdFromJSONTyped, TsvIdToJSON, } from './TsvId'; /** * * @export * @interface Tsv */ export interface Tsv { /** * * @type {TsvId} * @memberof Tsv */ id?: TsvId; /** * * @type {number} * @memberof Tsv */ value?: number; /** * * @type {number} * @memberof Tsv */ qualityCode?: number; /** * * @type {Date} * @memberof Tsv */ startDate?: Date; /** * * @type {Date} * @memberof Tsv */ endDate?: Date; } /** * Check if a given object implements the Tsv interface. */ export function instanceOfTsv(value: object): boolean { return true; } export function TsvFromJSON(json: any): Tsv { return TsvFromJSONTyped(json, false); } export function TsvFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tsv { 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?: Tsv | null): any { 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()), }; }