UNPKG

cwmsjs

Version:

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

69 lines (68 loc) 2.22 kB
"use strict"; /* 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.GateSettingToJSON = exports.GateSettingFromJSONTyped = exports.GateSettingFromJSON = exports.instanceOfGateSetting = void 0; const CwmsId_1 = require("./CwmsId"); /** * Check if a given object implements the GateSetting interface. */ function instanceOfGateSetting(value) { if (!('locationId' in value)) return false; if (!('opening' in value)) return false; if (!('openingParameter' in value)) return false; if (!('openingUnits' in value)) return false; if (!('invertElevation' in value)) return false; return true; } exports.instanceOfGateSetting = instanceOfGateSetting; function GateSettingFromJSON(json) { return GateSettingFromJSONTyped(json, false); } exports.GateSettingFromJSON = GateSettingFromJSON; function GateSettingFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } if (!ignoreDiscriminator) { } return { 'locationId': (0, CwmsId_1.CwmsIdFromJSON)(json['location-id']), 'opening': json['opening'], 'openingParameter': json['opening-parameter'], 'openingUnits': json['opening-units'], 'invertElevation': json['invert-elevation'], 'type': json['type'] == null ? undefined : json['type'], }; } exports.GateSettingFromJSONTyped = GateSettingFromJSONTyped; function GateSettingToJSON(value) { if (value == null) { return value; } return { 'location-id': (0, CwmsId_1.CwmsIdToJSON)(value['locationId']), 'opening': value['opening'], 'opening-parameter': value['openingParameter'], 'opening-units': value['openingUnits'], 'invert-elevation': value['invertElevation'], 'type': value['type'], }; } exports.GateSettingToJSON = GateSettingToJSON;