public CreateUserPoolRequest withUsernameAttributes(UsernameAttributeType... usernameAttributes) {
        java.util.ArrayList<String> usernameAttributesCopy = new java.util.ArrayList<String>(usernameAttributes.length);
        for (UsernameAttributeType value : usernameAttributes) {
            usernameAttributesCopy.add(value.toString());
        }
        if (getUsernameAttributes() == null) {
            setUsernameAttributes(usernameAttributesCopy);
        } else {
            getUsernameAttributes().addAll(usernameAttributesCopy);
        }
        return this;
    }
<p>
Specifies whether a user can use an email address or phone number as a username when they sign up.
</p>

@param usernameAttributes
       Specifies whether a user can use an email address or phone number as a username when they sign up.
@return Returns a reference to this object so that method calls can be chained together.
@see UsernameAttributeType
aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/model/CreateUserPoolRequest.java