public HttpMatch withHeaderMatches(HeaderMatch... headerMatches) {
        if (this.headerMatches == null) {
            setHeaderMatches(new java.util.ArrayList<HeaderMatch>(headerMatches.length));
        }
        for (HeaderMatch ele : headerMatches) {
            this.headerMatches.add(ele);
        }
        return this;
    }
<p>
The header matches. Matches incoming requests with rule based on request header value before applying rule
action.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setHeaderMatches(java.util.Collection)} or {@link #withHeaderMatches(java.util.Collection)} if you want
to override the existing values.
</p>

@param headerMatches
       The header matches. Matches incoming requests with rule based on request header value before applying rule
       action.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-vpclattice/src/main/java/com/amazonaws/services/vpclattice/model/HttpMatch.java