cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
50 lines (49 loc) • 2.03 kB
JavaScript
;
/* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectChildLocationsToJSON = exports.ProjectChildLocationsFromJSONTyped = exports.ProjectChildLocationsFromJSON = exports.instanceOfProjectChildLocations = void 0;
const CwmsId_1 = require("./CwmsId");
const LocationsWithProjectKind_1 = require("./LocationsWithProjectKind");
/**
* Check if a given object implements the ProjectChildLocations interface.
*/
function instanceOfProjectChildLocations(value) {
return true;
}
exports.instanceOfProjectChildLocations = instanceOfProjectChildLocations;
function ProjectChildLocationsFromJSON(json) {
return ProjectChildLocationsFromJSONTyped(json, false);
}
exports.ProjectChildLocationsFromJSON = ProjectChildLocationsFromJSON;
function ProjectChildLocationsFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'projectId': json['project-id'] == null ? undefined : (0, CwmsId_1.CwmsIdFromJSON)(json['project-id']),
'locationsByKind': json['locations-by-kind'] == null ? undefined : (json['locations-by-kind'].map(LocationsWithProjectKind_1.LocationsWithProjectKindFromJSON)),
};
}
exports.ProjectChildLocationsFromJSONTyped = ProjectChildLocationsFromJSONTyped;
function ProjectChildLocationsToJSON(value) {
if (value == null) {
return value;
}
return {
'project-id': (0, CwmsId_1.CwmsIdToJSON)(value['projectId']),
'locations-by-kind': value['locationsByKind'] == null ? undefined : (value['locationsByKind'].map(LocationsWithProjectKind_1.LocationsWithProjectKindToJSON)),
};
}
exports.ProjectChildLocationsToJSON = ProjectChildLocationsToJSON;