UNPKG

cwmsjs

Version:

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

75 lines (74 loc) 3.83 kB
"use strict"; /* 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. */ Object.defineProperty(exports, "__esModule", { value: true }); const runtime_1 = require("../runtime"); const IndependentRoundingSpec_1 = require("./IndependentRoundingSpec"); function RatingSpecFromJSON(json) { return RatingSpecFromJSONTyped(json, false); } exports.RatingSpecFromJSON = RatingSpecFromJSON; function RatingSpecFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'officeId': json['office-id'], 'ratingId': !runtime_1.exists(json, 'rating-id') ? undefined : json['rating-id'], 'templateId': !runtime_1.exists(json, 'template-id') ? undefined : json['template-id'], 'locationId': !runtime_1.exists(json, 'location-id') ? undefined : json['location-id'], 'version': !runtime_1.exists(json, 'version') ? undefined : json['version'], 'sourceAgency': !runtime_1.exists(json, 'source-agency') ? undefined : json['source-agency'], 'inRangeMethod': !runtime_1.exists(json, 'in-range-method') ? undefined : json['in-range-method'], 'outRangeLowMethod': !runtime_1.exists(json, 'out-range-low-method') ? undefined : json['out-range-low-method'], 'outRangeHighMethod': !runtime_1.exists(json, 'out-range-high-method') ? undefined : json['out-range-high-method'], 'active': !runtime_1.exists(json, 'active') ? undefined : json['active'], 'autoUpdate': !runtime_1.exists(json, 'auto-update') ? undefined : json['auto-update'], 'autoActivate': !runtime_1.exists(json, 'auto-activate') ? undefined : json['auto-activate'], 'autoMigrateExtension': !runtime_1.exists(json, 'auto-migrate-extension') ? undefined : json['auto-migrate-extension'], 'independentRoundingSpecs': !runtime_1.exists(json, 'independent-rounding-specs') ? undefined : (json['independent-rounding-specs'].map(IndependentRoundingSpec_1.IndependentRoundingSpecFromJSON)), 'dependentRoundingSpec': !runtime_1.exists(json, 'dependent-rounding-spec') ? undefined : json['dependent-rounding-spec'], 'description': !runtime_1.exists(json, 'description') ? undefined : json['description'], 'effectiveDates': !runtime_1.exists(json, 'effective-dates') ? undefined : json['effective-dates'], }; } exports.RatingSpecFromJSONTyped = RatingSpecFromJSONTyped; function RatingSpecToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'office-id': value.officeId, 'rating-id': value.ratingId, 'template-id': value.templateId, 'location-id': value.locationId, 'version': value.version, 'source-agency': value.sourceAgency, 'in-range-method': value.inRangeMethod, 'out-range-low-method': value.outRangeLowMethod, 'out-range-high-method': value.outRangeHighMethod, 'active': value.active, 'auto-update': value.autoUpdate, 'auto-activate': value.autoActivate, 'auto-migrate-extension': value.autoMigrateExtension, 'independent-rounding-specs': value.independentRoundingSpecs === undefined ? undefined : (value.independentRoundingSpecs.map(IndependentRoundingSpec_1.IndependentRoundingSpecToJSON)), 'dependent-rounding-spec': value.dependentRoundingSpec, 'description': value.description, 'effective-dates': value.effectiveDates, }; } exports.RatingSpecToJSON = RatingSpecToJSON;