public Cluster withHsms(Hsm... hsms) {
        if (this.hsms == null) {
            setHsms(new java.util.ArrayList<Hsm>(hsms.length));
        }
        for (Hsm ele : hsms) {
            this.hsms.add(ele);
        }
        return this;
    }
<p>
Contains information about the HSMs in the cluster.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setHsms(java.util.Collection)} or {@link #withHsms(java.util.Collection)} if you want to override the
existing values.
</p>

@param hsms
       Contains information about the HSMs in the cluster.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-cloudhsmv2/src/main/java/com/amazonaws/services/cloudhsmv2/model/Cluster.java