cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
60 lines (59 loc) • 2.17 kB
JavaScript
;
/* 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.OutletToJSON = exports.OutletFromJSONTyped = exports.OutletFromJSON = exports.instanceOfOutlet = void 0;
const CwmsId_1 = require("./CwmsId");
const Location_1 = require("./Location");
/**
* Check if a given object implements the Outlet interface.
*/
function instanceOfOutlet(value) {
if (!('projectId' in value))
return false;
if (!('location' in value))
return false;
return true;
}
exports.instanceOfOutlet = instanceOfOutlet;
function OutletFromJSON(json) {
return OutletFromJSONTyped(json, false);
}
exports.OutletFromJSON = OutletFromJSON;
function OutletFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'projectId': (0, CwmsId_1.CwmsIdFromJSON)(json['project-id']),
'location': (0, Location_1.LocationFromJSON)(json['location']),
'ratingGroupId': json['rating-group-id'] == null ? undefined : (0, CwmsId_1.CwmsIdFromJSON)(json['rating-group-id']),
'ratingSpecId': json['rating-spec-id'] == null ? undefined : json['rating-spec-id'],
'ratingCategoryId': json['rating-category-id'] == null ? undefined : (0, CwmsId_1.CwmsIdFromJSON)(json['rating-category-id']),
};
}
exports.OutletFromJSONTyped = OutletFromJSONTyped;
function OutletToJSON(value) {
if (value == null) {
return value;
}
return {
'project-id': (0, CwmsId_1.CwmsIdToJSON)(value['projectId']),
'location': (0, Location_1.LocationToJSON)(value['location']),
'rating-group-id': (0, CwmsId_1.CwmsIdToJSON)(value['ratingGroupId']),
'rating-spec-id': value['ratingSpecId'],
'rating-category-id': (0, CwmsId_1.CwmsIdToJSON)(value['ratingCategoryId']),
};
}
exports.OutletToJSON = OutletToJSON;