Class UserAllocation
java.lang.Object
com.azure.spring.cloud.feature.management.models.UserAllocation
User allocation of a variant for feature flag targeting. This class defines how specific
users are assigned to a particular variant of a feature. It contains a reference to
a variant name and a list of user identifiers that should receive this variant
when the feature flag is evaluated. This enables targeted feature rollout to specific users.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetUsers()Gets the list of user identifiers that should receive this variant.Gets the name of the variant that is assigned to the specified users.Sets the list of user identifiers that should receive this variant.setVariant(String variant) Sets the name of the variant that should be assigned to the specified users.
-
Constructor Details
-
UserAllocation
public UserAllocation()Creates a new instance of the UserAllocation class.
-
-
Method Details
-
getVariant
Gets the name of the variant that is assigned to the specified users.- Returns:
- the variant name for this user allocation
-
setVariant
Sets the name of the variant that should be assigned to the specified users. This should match a valid variant name defined in the feature flag configuration.- Parameters:
variant- the variant name to assign to the users- Returns:
- the updated UserAllocation object
-
getUsers
-
setUsers
Sets the list of user identifiers that should receive this variant. When a user matches any of these identifiers, they will be assigned this variant during feature flag evaluation.- Parameters:
users- the list of user identifiers to associate with this variant- Returns:
- the updated UserAllocation object
-