cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
112 lines (103 loc) • 2.84 kB
text/typescript
/* 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';
import {
Offset,
OffsetFromJSON,
OffsetFromJSONTyped,
OffsetToJSON,
} from './Offset';
/**
*
* @export
* @interface VerticalDatumInfo
*/
export interface VerticalDatumInfo {
/**
*
* @type {string}
* @memberof VerticalDatumInfo
*/
office?: string;
/**
*
* @type {string}
* @memberof VerticalDatumInfo
*/
unit?: string;
/**
*
* @type {string}
* @memberof VerticalDatumInfo
*/
location?: string;
/**
*
* @type {string}
* @memberof VerticalDatumInfo
*/
nativeDatum?: string;
/**
*
* @type {number}
* @memberof VerticalDatumInfo
*/
elevation?: number;
/**
*
* @type {string}
* @memberof VerticalDatumInfo
*/
localDatumName?: string;
/**
*
* @type {Array<Offset>}
* @memberof VerticalDatumInfo
*/
offsets?: Array<Offset>;
}
export function VerticalDatumInfoFromJSON(json: any): VerticalDatumInfo {
return VerticalDatumInfoFromJSONTyped(json, false);
}
export function VerticalDatumInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerticalDatumInfo {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'office': !exists(json, 'office') ? undefined : json['office'],
'unit': !exists(json, 'unit') ? undefined : json['unit'],
'location': !exists(json, 'location') ? undefined : json['location'],
'nativeDatum': !exists(json, 'native-datum') ? undefined : json['native-datum'],
'elevation': !exists(json, 'elevation') ? undefined : json['elevation'],
'localDatumName': !exists(json, 'local-datum-name') ? undefined : json['local-datum-name'],
'offsets': !exists(json, 'offsets') ? undefined : ((json['offsets'] as Array<any>).map(OffsetFromJSON)),
};
}
export function VerticalDatumInfoToJSON(value?: VerticalDatumInfo | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'office': value.office,
'unit': value.unit,
'location': value.location,
'native-datum': value.nativeDatum,
'elevation': value.elevation,
'local-datum-name': value.localDatumName,
'offsets': value.offsets === undefined ? undefined : ((value.offsets as Array<any>).map(OffsetToJSON)),
};
}