cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
65 lines (64 loc) • 3.02 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.ExpressionRatingToJSON = exports.ExpressionRatingFromJSONTyped = exports.ExpressionRatingFromJSON = exports.instanceOfExpressionRating = void 0;
const VerticalDatumInfo_1 = require("./VerticalDatumInfo");
/**
* Check if a given object implements the ExpressionRating interface.
*/
function instanceOfExpressionRating(value) {
return true;
}
exports.instanceOfExpressionRating = instanceOfExpressionRating;
function ExpressionRatingFromJSON(json) {
return ExpressionRatingFromJSONTyped(json, false);
}
exports.ExpressionRatingFromJSON = ExpressionRatingFromJSON;
function ExpressionRatingFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'officeId': json['office-id'] == null ? undefined : json['office-id'],
'ratingSpecId': json['rating-spec-id'] == null ? undefined : json['rating-spec-id'],
'unitsId': json['units-id'] == null ? undefined : json['units-id'],
'active': json['active'] == null ? undefined : json['active'],
'effectiveDate': json['effective-date'] == null ? undefined : (new Date(json['effective-date'])),
'createDate': json['create-date'] == null ? undefined : (new Date(json['create-date'])),
'transitionDate': json['transition-date'] == null ? undefined : (new Date(json['transition-date'])),
'description': json['description'] == null ? undefined : json['description'],
'verticalDatumInfo': json['vertical-datum-info'] == null ? undefined : (0, VerticalDatumInfo_1.VerticalDatumInfoFromJSON)(json['vertical-datum-info']),
'expression': json['expression'] == null ? undefined : json['expression'],
};
}
exports.ExpressionRatingFromJSONTyped = ExpressionRatingFromJSONTyped;
function ExpressionRatingToJSON(value) {
if (value == null) {
return value;
}
return {
'office-id': value['officeId'],
'rating-spec-id': value['ratingSpecId'],
'units-id': value['unitsId'],
'active': value['active'],
'effective-date': value['effectiveDate'] == null ? undefined : ((value['effectiveDate']).toISOString()),
'create-date': value['createDate'] == null ? undefined : ((value['createDate']).toISOString()),
'transition-date': value['transitionDate'] == null ? undefined : ((value['transitionDate']).toISOString()),
'description': value['description'],
'vertical-datum-info': (0, VerticalDatumInfo_1.VerticalDatumInfoToJSON)(value['verticalDatumInfo']),
'expression': value['expression'],
};
}
exports.ExpressionRatingToJSON = ExpressionRatingToJSON;