cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
90 lines (81 loc) • 2.02 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 {
LocationLevelConstituentFromJSONTyped
} from './';
/**
*
* @export
* @interface RATING
*/
export interface RATING {
/**
*
* @type {string}
* @memberof RATING
*/
abbr?: string;
/**
*
* @type {string}
* @memberof RATING
*/
type?: string;
/**
*
* @type {string}
* @memberof RATING
*/
name?: string;
/**
*
* @type {Array<string>}
* @memberof RATING
*/
constituentList?: Array<string>;
}
export function RATINGFromJSON(json: any): RATING {
return RATINGFromJSONTyped(json, false);
}
export function RATINGFromJSONTyped(json: any, ignoreDiscriminator: boolean): RATING {
if ((json === undefined) || (json === null)) {
return json;
}
if (!ignoreDiscriminator) {
if (json['type'] === 'LocationLevelConstituent') {
return LocationLevelConstituentFromJSONTyped(json, true);
}
}
return {
'abbr': !exists(json, 'abbr') ? undefined : json['abbr'],
'type': !exists(json, 'type') ? undefined : json['type'],
'name': !exists(json, 'name') ? undefined : json['name'],
'constituentList': !exists(json, 'constituent-list') ? undefined : json['constituent-list'],
};
}
export function RATINGToJSON(value?: RATING | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'abbr': value.abbr,
'type': value.type,
'name': value.name,
'constituent-list': value.constituentList,
};
}