driver-legacy/src/main/com/mongodb/BulkWriteRequestBuilder.java
public BulkUpdateRequestBuilder upsert() {
        return new BulkUpdateRequestBuilder(bulkWriteOperation, query, true, codec, replacementCodec, collation, null);
    }
public BulkUpdateRequestBuilder upsert() {
        return new BulkUpdateRequestBuilder(bulkWriteOperation, query, true, codec, replacementCodec, collation, null);
    }
Specifies that the request being built should be an upsert.

@return a new builder that allows only update and replace, since upsert does not apply to remove.
@mongodb.driver.manual tutorial/modify-documents/#upsert-option Upsert