public Document withHierarchicalAccessControlList(HierarchicalPrincipal... hierarchicalAccessControlList) {
        if (this.hierarchicalAccessControlList == null) {
            setHierarchicalAccessControlList(new java.util.ArrayList<HierarchicalPrincipal>(hierarchicalAccessControlList.length));
        }
        for (HierarchicalPrincipal ele : hierarchicalAccessControlList) {
            this.hierarchicalAccessControlList.add(ele);
        }
        return this;
    }
<p>
The list of <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_Principal.html">principal</a> lists that
define the hierarchy for which documents users should have access to.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setHierarchicalAccessControlList(java.util.Collection)} or
{@link #withHierarchicalAccessControlList(java.util.Collection)} if you want to override the existing values.
</p>

@param hierarchicalAccessControlList
       The list of <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_Principal.html">principal</a> lists
       that define the hierarchy for which documents users should have access to.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-kendra/src/main/java/com/amazonaws/services/kendra/model/Document.java