public BatchWriteOperation withAttachToIndex(BatchAttachToIndex attachToIndex) {
        setAttachToIndex(attachToIndex);
        return this;
    }
<p>
Attaches the specified object to the specified index.
</p>

@param attachToIndex
       Attaches the specified object to the specified index.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-clouddirectory/src/main/java/com/amazonaws/services/clouddirectory/model/BatchWriteOperation.java