wallee
Version:
TypeScript/JavaScript client for wallee
38 lines (37 loc) • 1.45 kB
JavaScript
import { FeatureCategoryFromJSON, FeatureCategoryToJSON, } from './FeatureCategory';
/**
* Check if a given object implements the Feature interface.
*/
export function instanceOfFeature(value) {
return true;
}
export function FeatureFromJSON(json) {
return FeatureFromJSONTyped(json, false);
}
export 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 : FeatureCategoryFromJSON(json['category']),
'beta': json['beta'] == null ? undefined : json['beta'],
};
}
export function FeatureToJSON(json) {
return FeatureToJSONTyped(json, false);
}
export function FeatureToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'category': FeatureCategoryToJSON(value['category']),
};
}