Class GroupAllocation

java.lang.Object
com.azure.spring.cloud.feature.management.models.GroupAllocation

public class GroupAllocation extends Object
Group allocation of a variant for feature flag targeting. This class defines how specific user groups are assigned to a particular variant of a feature. It contains a reference to a variant name and a list of group identifiers that should receive this variant when the feature flag is evaluated.
  • Constructor Details

    • GroupAllocation

      public GroupAllocation()
      Creates a new instance of the GroupAllocation class.
  • Method Details

    • getVariant

      public String getVariant()
      Gets the name of the variant that is assigned to the specified groups.
      Returns:
      the variant name for this group allocation
    • setVariant

      public GroupAllocation setVariant(String variant)
      Sets the name of the variant that should be assigned to the specified groups. This should match a valid variant name defined in the feature flag configuration.
      Parameters:
      variant - the variant name to assign to the groups
      Returns:
      the updated GroupAllocation object
    • getGroups

      public List<String> getGroups()
      Gets the list of group identifiers that should receive this variant. When a user belongs to any of these groups, they will be assigned this variant during feature flag evaluation.
      Returns:
      the list of group identifiers for this allocation
    • setGroups

      public GroupAllocation setGroups(List<String> groups)
      Sets the list of group identifiers that should receive this variant. When a user belongs to any of these groups, they will be assigned this variant during feature flag evaluation.
      Parameters:
      groups - the list of group identifiers to associate with this variant
      Returns:
      the updated GroupAllocation object