public LdapServerMetadataInput withHosts(String... hosts) {
        if (this.hosts == null) {
            setHosts(new java.util.ArrayList<String>(hosts.length));
        }
        for (String ele : hosts) {
            this.hosts.add(ele);
        }
        return this;
    }
<p>
Specifies the location of the LDAP server such as Directory Service for Microsoft Active Directory. Optional
failover server.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setHosts(java.util.Collection)} or {@link #withHosts(java.util.Collection)} if you want to override the
existing values.
</p>

@param hosts
       Specifies the location of the LDAP server such as Directory Service for Microsoft Active Directory.
       Optional failover server.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-mq/src/main/java/com/amazonaws/services/mq/model/LdapServerMetadataInput.java