cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
62 lines (61 loc) • 2.24 kB
JavaScript
/* 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 { BinaryTimeSeriesRowFromJSON, BinaryTimeSeriesRowToJSON, } from './BinaryTimeSeriesRow';
/**
* @export
*/
export const BinaryTimeSeriesDateVersionTypeEnum = {
MaxAggregate: 'MAX_AGGREGATE',
SingleVersion: 'SINGLE_VERSION',
Unversioned: 'UNVERSIONED'
};
/**
* Check if a given object implements the BinaryTimeSeries interface.
*/
export function instanceOfBinaryTimeSeries(value) {
if (!('officeId' in value))
return false;
return true;
}
export function BinaryTimeSeriesFromJSON(json) {
return BinaryTimeSeriesFromJSONTyped(json, false);
}
export function BinaryTimeSeriesFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'officeId': json['office-id'],
'name': json['name'] == null ? undefined : json['name'],
'intervalOffset': json['interval-offset'] == null ? undefined : json['interval-offset'],
'timeZone': json['time-zone'] == null ? undefined : json['time-zone'],
'dateVersionType': json['date-version-type'] == null ? undefined : json['date-version-type'],
'versionDate': json['version-date'] == null ? undefined : (new Date(json['version-date'])),
'binaryValues': json['binary-values'] == null ? undefined : (json['binary-values'].map(BinaryTimeSeriesRowFromJSON)),
};
}
export function BinaryTimeSeriesToJSON(value) {
if (value == null) {
return value;
}
return {
'office-id': value['officeId'],
'name': value['name'],
'interval-offset': value['intervalOffset'],
'time-zone': value['timeZone'],
'date-version-type': value['dateVersionType'],
'version-date': value['versionDate'] == null ? undefined : ((value['versionDate']).toISOString()),
'binary-values': value['binaryValues'] == null ? undefined : (value['binaryValues'].map(BinaryTimeSeriesRowToJSON)),
};
}