Class Allocation

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

public class Allocation extends Object
Allocation of a feature flag to variants.
  • Constructor Details

    • Allocation

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

    • getDefaultWhenEnabled

      public String getDefaultWhenEnabled()
      Gets the variant to use when the feature flag is enabled and no specific allocation matches.
      Returns:
      the default variant when the feature flag is enabled
    • setDefaultWhenEnabled

      public Allocation setDefaultWhenEnabled(String defaultWhenEnabled)
      Sets the variant to use when the feature flag is enabled and no specific allocation matches.
      Parameters:
      defaultWhenEnabled - the default variant when enabled
      Returns:
      the updated Allocation object
    • getDefaultWhenDisabled

      public String getDefaultWhenDisabled()
      Gets the variant to use when the feature flag is disabled and no specific allocation matches.
      Returns:
      the default variant when the feature flag is disabled
    • setDefaultWhenDisabled

      public Allocation setDefaultWhenDisabled(String defaultWhenDisabled)
      Sets the variant to use when the feature flag is disabled and no specific allocation matches.
      Parameters:
      defaultWhenDisabled - the default variant when disabled
      Returns:
      the updated Allocation object
    • getUser

      public List<UserAllocation> getUser()
      Gets the list of user-specific allocations for the feature flag.
      Returns:
      the list of user allocations
    • setUser

      public Allocation setUser(List<UserAllocation> user)
      Sets the list of user-specific allocations for the feature flag.
      Parameters:
      user - the list of user allocations
      Returns:
      the updated Allocation object
    • getGroup

      public List<GroupAllocation> getGroup()
      Gets the list of group-specific allocations for the feature flag.
      Returns:
      the list of group allocations
    • setGroup

      public Allocation setGroup(List<GroupAllocation> group)
      Sets the list of group-specific allocations for the feature flag.
      Parameters:
      group - the list of group allocations
      Returns:
      the updated Allocation object
    • getPercentile

      public List<PercentileAllocation> getPercentile()
      Gets the list of percentile-based allocations for the feature flag.
      Returns:
      the list of percentile allocations
    • setPercentile

      public Allocation setPercentile(List<PercentileAllocation> percentile)
      Sets the list of percentile-based allocations for the feature flag.
      Parameters:
      percentile - the list of percentile allocations
      Returns:
      the updated Allocation object
    • getSeed

      public String getSeed()
      Gets the seed value used for randomization in allocation calculations.
      Returns:
      the seed value for allocation
    • setSeed

      public Allocation setSeed(String seed)
      Sets the seed value used for randomization in allocation calculations.
      Parameters:
      seed - the seed value for allocation
      Returns:
      the updated Allocation object