cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
82 lines (72 loc) • 2.29 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';
import type { LocationsWithProjectKind } from './LocationsWithProjectKind';
import {
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>;
}
/**
* Check if a given object implements the ProjectChildLocations interface.
*/
export function instanceOfProjectChildLocations(value: object): boolean {
return true;
}
export function ProjectChildLocationsFromJSON(json: any): ProjectChildLocations {
return ProjectChildLocationsFromJSONTyped(json, false);
}
export function ProjectChildLocationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectChildLocations {
if (json == null) {
return json;
}
return {
'projectId': json['project-id'] == null ? undefined : CwmsIdFromJSON(json['project-id']),
'locationsByKind': json['locations-by-kind'] == null ? undefined : ((json['locations-by-kind'] as Array<any>).map(LocationsWithProjectKindFromJSON)),
};
}
export function ProjectChildLocationsToJSON(value?: ProjectChildLocations | null): any {
if (value == null) {
return value;
}
return {
'project-id': CwmsIdToJSON(value['projectId']),
'locations-by-kind': value['locationsByKind'] == null ? undefined : ((value['locationsByKind'] as Array<any>).map(LocationsWithProjectKindToJSON)),
};
}