cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
90 lines (77 loc) • 2.27 kB
text/typescript
/* 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';
/**
*
* @export
* @interface LocationsWithProjectKind
*/
export interface LocationsWithProjectKind {
/**
*
* @type {string}
* @memberof LocationsWithProjectKind
*/
kind?: LocationsWithProjectKindKindEnum;
/**
*
* @type {Array<CwmsId>}
* @memberof LocationsWithProjectKind
*/
locationIds?: Array<CwmsId>;
}
/**
* @export
*/
export const LocationsWithProjectKindKindEnum = {
Embankment: 'EMBANKMENT',
Turbine: 'TURBINE',
Outlet: 'OUTLET',
Lock: 'LOCK',
Gate: 'GATE'
} as const;
export type LocationsWithProjectKindKindEnum = typeof LocationsWithProjectKindKindEnum[keyof typeof LocationsWithProjectKindKindEnum];
/**
* Check if a given object implements the LocationsWithProjectKind interface.
*/
export function instanceOfLocationsWithProjectKind(value: object): boolean {
return true;
}
export function LocationsWithProjectKindFromJSON(json: any): LocationsWithProjectKind {
return LocationsWithProjectKindFromJSONTyped(json, false);
}
export function LocationsWithProjectKindFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationsWithProjectKind {
if (json == null) {
return json;
}
return {
'kind': json['kind'] == null ? undefined : json['kind'],
'locationIds': json['location-ids'] == null ? undefined : ((json['location-ids'] as Array<any>).map(CwmsIdFromJSON)),
};
}
export function LocationsWithProjectKindToJSON(value?: LocationsWithProjectKind | null): any {
if (value == null) {
return value;
}
return {
'kind': value['kind'],
'location-ids': value['locationIds'] == null ? undefined : ((value['locationIds'] as Array<any>).map(CwmsIdToJSON)),
};
}