}
RpbBucketProps build() {
Builder builder = RpbBucketProps.newBuilder();
if (allowMult != null) {
builder.setAllowMult(allowMult);
}
if (nValue != null) {
builder.setNVal(nValue);
}
if (lastWriteWins != null) {
builder.setLastWriteWins(lastWriteWins);
}
if (backend != null) {
builder.setBackend(ByteString.copyFromUtf8(backend));
}
if (smallVClock != null) {
builder.setSmallVclock(smallVClock);
}
if (bigVClock != null) {
builder.setBigVclock(bigVClock);
}
if (youngVClock != null) {
builder.setYoungVclock(youngVClock.intValue());
}
if (oldVClock != null) {
builder.setOldVclock(oldVClock.intValue());
}
if (r != null) {
builder.setR(r);
}
if (w != null) {
builder.setW(w);
}
if (rw != null) {
builder.setRw(rw);
}
if (dw != null) {
builder.setDw(dw);
}
if (pr != null) {
builder.setPr(pr);
}
if (pw != null) {
builder.setPw(pw);
}
if (basicQuorum != null) {
builder.setBasicQuorum(basicQuorum);
}
if (notFoundOk != null) {
builder.setNotfoundOk(notFoundOk);
}
if (searchEnabled != null) {
builder.setSearch(searchEnabled);
}
if (precommitHooks.size() > 0) {
builder.addAllPrecommit(convertHooks(precommitHooks));
}
if (postcommitHooks.size() > 0) {
builder.addAllPostcommit(convertHooks(postcommitHooks));
}
if (cHashFun != null) {
builder.setChashKeyfun(convertModFun(cHashFun));
}
if (linkFun != null) {
builder.setLinkfun(convertModFun(linkFun));
}
return builder.build();
}