public CreateUserPoolRequest withUsernameAttributes(String... usernameAttributes) {
        if (this.usernameAttributes == null) {
            setUsernameAttributes(new java.util.ArrayList<String>(usernameAttributes.length));
        }
        for (String ele : usernameAttributes) {
            this.usernameAttributes.add(ele);
        }
        return this;
    }
<p>
Specifies whether a user can use an email address or phone number as a username when they sign up.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setUsernameAttributes(java.util.Collection)} or {@link #withUsernameAttributes(java.util.Collection)} if
you want to override the existing values.
</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