UNPKG

cwmsjs

Version:

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

84 lines (74 loc) 2.03 kB
/* 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. */ import { exists, mapValues } from '../runtime'; import { CwmsId, CwmsIdFromJSON, CwmsIdFromJSONTyped, CwmsIdToJSON, } from './CwmsId'; /** * * @export * @interface LocationsWithProjectKind */ export interface LocationsWithProjectKind { /** * * @type {string} * @memberof LocationsWithProjectKind */ kind?: LocationsWithProjectKindKindEnum; /** * * @type {Array<CwmsId>} * @memberof LocationsWithProjectKind */ locationIds?: Array<CwmsId>; } /** * @export * @enum {string} */ export enum LocationsWithProjectKindKindEnum { Embankment = 'EMBANKMENT', Turbine = 'TURBINE', Outlet = 'OUTLET', Lock = 'LOCK', Gate = 'GATE' } export function LocationsWithProjectKindFromJSON(json: any): LocationsWithProjectKind { return LocationsWithProjectKindFromJSONTyped(json, false); } export function LocationsWithProjectKindFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationsWithProjectKind { if ((json === undefined) || (json === null)) { return json; } return { 'kind': !exists(json, 'kind') ? undefined : json['kind'], 'locationIds': !exists(json, 'location-ids') ? undefined : ((json['location-ids'] as Array<any>).map(CwmsIdFromJSON)), }; } export function LocationsWithProjectKindToJSON(value?: LocationsWithProjectKind | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'kind': value.kind, 'location-ids': value.locationIds === undefined ? undefined : ((value.locationIds as Array<any>).map(CwmsIdToJSON)), }; }