wallee
Version:
TypeScript/JavaScript client for wallee
45 lines (44 loc) • 1.74 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfFeature = instanceOfFeature;
exports.FeatureFromJSON = FeatureFromJSON;
exports.FeatureFromJSONTyped = FeatureFromJSONTyped;
exports.FeatureToJSON = FeatureToJSON;
exports.FeatureToJSONTyped = FeatureToJSONTyped;
const FeatureCategory_1 = require("./FeatureCategory");
/**
* Check if a given object implements the Feature interface.
*/
function instanceOfFeature(value) {
return true;
}
function FeatureFromJSON(json) {
return FeatureFromJSONTyped(json, false);
}
function FeatureFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'requiredFeatures': json['requiredFeatures'] == null ? undefined : json['requiredFeatures'],
'visible': json['visible'] == null ? undefined : json['visible'],
'logoPath': json['logoPath'] == null ? undefined : json['logoPath'],
'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'],
'id': json['id'] == null ? undefined : json['id'],
'category': json['category'] == null ? undefined : (0, FeatureCategory_1.FeatureCategoryFromJSON)(json['category']),
'beta': json['beta'] == null ? undefined : json['beta'],
};
}
function FeatureToJSON(json) {
return FeatureToJSONTyped(json, false);
}
function FeatureToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'category': (0, FeatureCategory_1.FeatureCategoryToJSON)(value['category']),
};
}