UNPKG

cwmsjs

Version:

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

162 lines (152 loc) 4.49 kB
/* 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. */ import { mapValues } from '../runtime'; import type { CwmsId } from './CwmsId'; import { CwmsIdFromJSON, CwmsIdFromJSONTyped, CwmsIdToJSON, } from './CwmsId'; import type { Location } from './Location'; import { LocationFromJSON, LocationFromJSONTyped, LocationToJSON, } from './Location'; import type { LookupType } from './LookupType'; import { LookupTypeFromJSON, LookupTypeFromJSONTyped, LookupTypeToJSON, } from './LookupType'; /** * * @export * @interface Embankment */ export interface Embankment { /** * * @type {CwmsId} * @memberof Embankment */ projectId: CwmsId; /** * * @type {Location} * @memberof Embankment */ location: Location; /** * * @type {LookupType} * @memberof Embankment */ structureType?: LookupType; /** * * @type {number} * @memberof Embankment */ upstreamSideSlope?: number; /** * * @type {number} * @memberof Embankment */ downstreamSideSlope?: number; /** * * @type {number} * @memberof Embankment */ structureLength?: number; /** * * @type {number} * @memberof Embankment */ maxHeight?: number; /** * * @type {number} * @memberof Embankment */ topWidth?: number; /** * * @type {string} * @memberof Embankment */ lengthUnits?: string; /** * * @type {LookupType} * @memberof Embankment */ downstreamProtectionType?: LookupType; /** * * @type {LookupType} * @memberof Embankment */ upstreamProtectionType?: LookupType; } /** * Check if a given object implements the Embankment interface. */ export function instanceOfEmbankment(value: object): boolean { if (!('projectId' in value)) return false; if (!('location' in value)) return false; return true; } export function EmbankmentFromJSON(json: any): Embankment { return EmbankmentFromJSONTyped(json, false); } export function EmbankmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): Embankment { if (json == null) { return json; } return { 'projectId': CwmsIdFromJSON(json['project-id']), 'location': LocationFromJSON(json['location']), 'structureType': json['structure-type'] == null ? undefined : LookupTypeFromJSON(json['structure-type']), 'upstreamSideSlope': json['upstream-side-slope'] == null ? undefined : json['upstream-side-slope'], 'downstreamSideSlope': json['downstream-side-slope'] == null ? undefined : json['downstream-side-slope'], 'structureLength': json['structure-length'] == null ? undefined : json['structure-length'], 'maxHeight': json['max-height'] == null ? undefined : json['max-height'], 'topWidth': json['top-width'] == null ? undefined : json['top-width'], 'lengthUnits': json['length-units'] == null ? undefined : json['length-units'], 'downstreamProtectionType': json['downstream-protection-type'] == null ? undefined : LookupTypeFromJSON(json['downstream-protection-type']), 'upstreamProtectionType': json['upstream-protection-type'] == null ? undefined : LookupTypeFromJSON(json['upstream-protection-type']), }; } export function EmbankmentToJSON(value?: Embankment | null): any { if (value == null) { return value; } return { 'project-id': CwmsIdToJSON(value['projectId']), 'location': LocationToJSON(value['location']), 'structure-type': 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': LookupTypeToJSON(value['downstreamProtectionType']), 'upstream-protection-type': LookupTypeToJSON(value['upstreamProtectionType']), }; }