UNPKG

cwmsjs

Version:

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

109 lines (99 loc) 2.35 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 { CwmsId, CwmsIdFromJSON, CwmsIdFromJSONTyped, CwmsIdToJSON, } from './CwmsId'; import { } from './'; /** * * @export * @interface GateSetting */ export interface GateSetting { /** * * @type {CwmsId} * @memberof GateSetting */ locationId: CwmsId; /** * * @type {number} * @memberof GateSetting */ opening: number; /** * * @type {string} * @memberof GateSetting */ openingParameter: string; /** * * @type {string} * @memberof GateSetting */ openingUnits: string; /** * * @type {number} * @memberof GateSetting */ invertElevation: number; /** * * @type {string} * @memberof GateSetting */ type?: string; } export function GateSettingFromJSON(json: any): GateSetting { return GateSettingFromJSONTyped(json, false); } export function GateSettingFromJSONTyped(json: any, ignoreDiscriminator: boolean): GateSetting { if ((json === undefined) || (json === null)) { return json; } if (!ignoreDiscriminator) { } return { 'locationId': CwmsIdFromJSON(json['location-id']), 'opening': json['opening'], 'openingParameter': json['opening-parameter'], 'openingUnits': json['opening-units'], 'invertElevation': json['invert-elevation'], 'type': !exists(json, 'type') ? undefined : json['type'], }; } export function GateSettingToJSON(value?: GateSetting | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'location-id': CwmsIdToJSON(value.locationId), 'opening': value.opening, 'opening-parameter': value.openingParameter, 'opening-units': value.openingUnits, 'invert-elevation': value.invertElevation, 'type': value.type, }; }