UNPKG

cwmsjs

Version:

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

86 lines (79 loc) 2.3 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'; import { LocationLevelConstituentAllOf, LocationLevelConstituentAllOfFromJSON, LocationLevelConstituentAllOfFromJSONTyped, LocationLevelConstituentAllOfToJSON, } from './LocationLevelConstituentAllOf'; import { RATING, RATINGFromJSON, RATINGFromJSONTyped, RATINGToJSON, } from './RATING'; /** * * @export * @interface LocationLevelConstituent */ export interface LocationLevelConstituent extends RATING { /** * * @type {string} * @memberof LocationLevelConstituent */ attributeId?: string; /** * * @type {number} * @memberof LocationLevelConstituent */ attributeValue?: number; /** * * @type {string} * @memberof LocationLevelConstituent */ attributeUnits?: string; } export function LocationLevelConstituentFromJSON(json: any): LocationLevelConstituent { return LocationLevelConstituentFromJSONTyped(json, false); } export function LocationLevelConstituentFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationLevelConstituent { if ((json === undefined) || (json === null)) { return json; } return { ...RATINGFromJSONTyped(json, ignoreDiscriminator), 'attributeId': !exists(json, 'attribute-id') ? undefined : json['attribute-id'], 'attributeValue': !exists(json, 'attribute-value') ? undefined : json['attribute-value'], 'attributeUnits': !exists(json, 'attribute-units') ? undefined : json['attribute-units'], }; } export function LocationLevelConstituentToJSON(value?: LocationLevelConstituent | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { ...RATINGToJSON(value), 'attribute-id': value.attributeId, 'attribute-value': value.attributeValue, 'attribute-units': value.attributeUnits, }; }