kentico-cloud-delivery
Version:
Official Kentico Cloud Delivery SDK
20 lines • 731 B
JavaScript
import { GenericElement } from '../models';
var GenericElementMapper = /** @class */ (function () {
function GenericElementMapper() {
}
GenericElementMapper.prototype.mapElement = function (response) {
if (!response) {
throw Error("Invalid response for mapping element");
}
return new GenericElement({
codename: response.codename,
name: response.name,
type: response.type,
options: response.options ? response.options : [],
taxonomyGroup: response.taxonomy_group
});
};
return GenericElementMapper;
}());
export { GenericElementMapper };
//# sourceMappingURL=generic-element.mapper.js.map