let name: String let state: FeatureState } struct FeatureParam<T> { let name: String let featureName: String let value: T } let translatorFeature = Feature( name: "TranslatorFeature" state: .enabled) let APITimeoutFeature = Feature( name: "TranslateServiceAPITimeout" state: .disabled) let apiTimeoutParam = FeatureParam<Int>( name: serviceAPITimeoutFeature.name, featureName: "timeout", value: 300) func GetRequestTimeout() -> Int { return apiTimeoutParam(); } func GetState() -> TranslatorState { return FeatureList.IsEnabled( translatorFeature) ? .enabled : .disabled }