cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
61 lines (60 loc) • 2.44 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.RatingTemplateToJSON = exports.RatingTemplateFromJSONTyped = exports.RatingTemplateFromJSON = exports.instanceOfRatingTemplate = void 0;
const ParameterSpec_1 = require("./ParameterSpec");
/**
* Check if a given object implements the RatingTemplate interface.
*/
function instanceOfRatingTemplate(value) {
if (!('officeId' in value))
return false;
return true;
}
exports.instanceOfRatingTemplate = instanceOfRatingTemplate;
function RatingTemplateFromJSON(json) {
return RatingTemplateFromJSONTyped(json, false);
}
exports.RatingTemplateFromJSON = RatingTemplateFromJSON;
function RatingTemplateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'officeId': json['office-id'],
'id': json['id'] == null ? undefined : json['id'],
'version': json['version'] == null ? undefined : json['version'],
'description': json['description'] == null ? undefined : json['description'],
'dependentParameter': json['dependent-parameter'] == null ? undefined : json['dependent-parameter'],
'independentParameterSpecs': json['independent-parameter-specs'] == null ? undefined : (json['independent-parameter-specs'].map(ParameterSpec_1.ParameterSpecFromJSON)),
'ratingIds': json['rating-ids'] == null ? undefined : json['rating-ids'],
};
}
exports.RatingTemplateFromJSONTyped = RatingTemplateFromJSONTyped;
function RatingTemplateToJSON(value) {
if (value == null) {
return value;
}
return {
'office-id': value['officeId'],
'id': value['id'],
'version': value['version'],
'description': value['description'],
'dependent-parameter': value['dependentParameter'],
'independent-parameter-specs': value['independentParameterSpecs'] == null ? undefined : (value['independentParameterSpecs'].map(ParameterSpec_1.ParameterSpecToJSON)),
'rating-ids': value['ratingIds'],
};
}
exports.RatingTemplateToJSON = RatingTemplateToJSON;