cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
65 lines (64 loc) • 3.08 kB
JavaScript
;
/* 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 CwmsId_1 = require("./CwmsId");
const Location_1 = require("./Location");
const LookupType_1 = require("./LookupType");
function EmbankmentFromJSON(json) {
return EmbankmentFromJSONTyped(json, false);
}
exports.EmbankmentFromJSON = EmbankmentFromJSON;
function EmbankmentFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'projectId': CwmsId_1.CwmsIdFromJSON(json['project-id']),
'location': Location_1.LocationFromJSON(json['location']),
'structureType': !runtime_1.exists(json, 'structure-type') ? undefined : LookupType_1.LookupTypeFromJSON(json['structure-type']),
'upstreamSideSlope': !runtime_1.exists(json, 'upstream-side-slope') ? undefined : json['upstream-side-slope'],
'downstreamSideSlope': !runtime_1.exists(json, 'downstream-side-slope') ? undefined : json['downstream-side-slope'],
'structureLength': !runtime_1.exists(json, 'structure-length') ? undefined : json['structure-length'],
'maxHeight': !runtime_1.exists(json, 'max-height') ? undefined : json['max-height'],
'topWidth': !runtime_1.exists(json, 'top-width') ? undefined : json['top-width'],
'lengthUnits': !runtime_1.exists(json, 'length-units') ? undefined : json['length-units'],
'downstreamProtectionType': !runtime_1.exists(json, 'downstream-protection-type') ? undefined : LookupType_1.LookupTypeFromJSON(json['downstream-protection-type']),
'upstreamProtectionType': !runtime_1.exists(json, 'upstream-protection-type') ? undefined : LookupType_1.LookupTypeFromJSON(json['upstream-protection-type']),
};
}
exports.EmbankmentFromJSONTyped = EmbankmentFromJSONTyped;
function EmbankmentToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'project-id': CwmsId_1.CwmsIdToJSON(value.projectId),
'location': Location_1.LocationToJSON(value.location),
'structure-type': LookupType_1.LookupTypeToJSON(value.structureType),
'upstream-side-slope': value.upstreamSideSlope,
'downstream-side-slope': value.downstreamSideSlope,
'structure-length': value.structureLength,
'max-height': value.maxHeight,
'top-width': value.topWidth,
'length-units': value.lengthUnits,
'downstream-protection-type': LookupType_1.LookupTypeToJSON(value.downstreamProtectionType),
'upstream-protection-type': LookupType_1.LookupTypeToJSON(value.upstreamProtectionType),
};
}
exports.EmbankmentToJSON = EmbankmentToJSON;