cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
78 lines (69 loc) • 2.13 kB
text/typescript
/* 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';
import {
LocationsWithProjectKind,
LocationsWithProjectKindFromJSON,
LocationsWithProjectKindFromJSONTyped,
LocationsWithProjectKindToJSON,
} from './LocationsWithProjectKind';
/**
*
* @export
* @interface ProjectChildLocations
*/
export interface ProjectChildLocations {
/**
*
* @type {CwmsId}
* @memberof ProjectChildLocations
*/
projectId?: CwmsId;
/**
*
* @type {Array<LocationsWithProjectKind>}
* @memberof ProjectChildLocations
*/
locationsByKind?: Array<LocationsWithProjectKind>;
}
export function ProjectChildLocationsFromJSON(json: any): ProjectChildLocations {
return ProjectChildLocationsFromJSONTyped(json, false);
}
export function ProjectChildLocationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectChildLocations {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'projectId': !exists(json, 'project-id') ? undefined : CwmsIdFromJSON(json['project-id']),
'locationsByKind': !exists(json, 'locations-by-kind') ? undefined : ((json['locations-by-kind'] as Array<any>).map(LocationsWithProjectKindFromJSON)),
};
}
export function ProjectChildLocationsToJSON(value?: ProjectChildLocations | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'project-id': CwmsIdToJSON(value.projectId),
'locations-by-kind': value.locationsByKind === undefined ? undefined : ((value.locationsByKind as Array<any>).map(LocationsWithProjectKindToJSON)),
};
}