UserAllocation Class
- java.
lang. Object - com.
azure. spring. cloud. feature. management. models. UserAllocation
- com.
public class 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
| Constructor | Description |
|---|---|
| UserAllocation() |
Creates a new instance of the User |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| List<String> |
getUsers()
Gets the list of user identifiers that should receive this variant. |
| String |
getVariant()
Gets the name of the variant that is assigned to the specified users. |
|
User |
setUsers(List<String> users)
Sets the list of user identifiers that should receive this variant. |
|
User |
setVariant(String variant)
Sets the name of the variant that should be assigned to the specified users. |
Methods inherited from java.lang.Object
Constructor Details
UserAllocation
public UserAllocation()
Creates a new instance of the UserAllocation class.
Method Details
getUsers
public List<String> getUsers()
Gets the list of user identifiers that should receive this variant. These identifiers are typically usernames, email addresses, or user IDs that uniquely identify users in the system.
Returns:
getVariant
public String getVariant()
Gets the name of the variant that is assigned to the specified users.
Returns:
setUsers
public UserAllocation setUsers(List<String> users)
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:
Returns:
setVariant
public UserAllocation setVariant(String variant)
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:
Returns: