All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.spring.cloud.config.feature.management.entity.FeatureSet Maven / Gradle / Ivy

The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.spring.cloud.config.feature.management.entity;

import java.util.HashMap;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Set of Feature Flag Key pairs.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public final class FeatureSet {

    @JsonProperty("FeatureManagement")
    private HashMap featureManagement;

    /**
     * Returns Map of Feature Flags.
     * 
     * @return the featureFlags
     */
    public HashMap getFeatureManagement() {
        return featureManagement;
    }

    /**
     * Adds a new Feature Flag.
     * 
     * @param key Name of the Feature Flag.
     * @param feature true/false, for on/off feature Flag. {@code Feature} if Feature Filter.
     */
    public void addFeature(String key, Object feature) {
        if (featureManagement == null) {
            featureManagement = new HashMap<>();
        }
        if (feature != null) {
            featureManagement.put(key, feature);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy