public RejectedRecordsException withRejectedRecords(RejectedRecord... rejectedRecords) {
        if (this.rejectedRecords == null) {
            setRejectedRecords(new java.util.ArrayList<RejectedRecord>(rejectedRecords.length));
        }
        for (RejectedRecord ele : rejectedRecords) {
            this.rejectedRecords.add(ele);
        }
        return this;
    }
<p>
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setRejectedRecords(java.util.Collection)} or {@link #withRejectedRecords(java.util.Collection)} if you
want to override the existing values.
</p>

@param rejectedRecords
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-timestreamwrite/src/main/java/com/amazonaws/services/timestreamwrite/model/RejectedRecordsException.java