code: public UpdateDocumentRequest withAttachments(AttachmentsSource... attachments) {
          if (this.attachments == null) {
              setAttachments(new com.amazonaws.internal.SdkInternalList<AttachmentsSource>(attachments.length));
          }
          for (AttachmentsSource ele : attachments) {
              this.attachments.add(ele);
          }
          return this;
      }
docs: <p>
  A list of key and value pairs that describe attachments to a version of a document.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setAttachments(java.util.Collection)} or {@link #withAttachments(java.util.Collection)} if you want to
  override the existing values.
  </p>
  
  @param attachments
  A list of key and value pairs that describe attachments to a version of a document.
  @return Returns a reference to this object so that method calls can be chained together.