return protoParams.build();
}
private FacetHandlerInitializerParam convertFacetParam(SenseiProtos.FacetHandlerInitializerParam protoFacetHandlerInitializerParam) {
DefaultFacetHandlerInitializerParam facetHandlerInitializerParam = new DefaultFacetHandlerInitializerParam();
for (SenseiProtos.BooleanParams param : protoFacetHandlerInitializerParam.getBooleanParamList()) {
boolean[] value = null;
if(!param.getIsNull()) {
value = new boolean[param.getValueCount()];
for (int i = 0; i < value.length; i++) {
value[i] = param.getValue(i);
}
}
facetHandlerInitializerParam.putBooleanParam(param.getKey(), value);
}
for (SenseiProtos.IntParams param : protoFacetHandlerInitializerParam.getIntParamList()) {
int[] value = null;
if (!param.getIsNull()) {
value = new int[param.getValueCount()];
for (int i = 0; i < value.length; i++) {
value[i] = param.getValue(i);
}
}
facetHandlerInitializerParam.putIntParam(param.getKey(), value);
}
for (SenseiProtos.LongParams param : protoFacetHandlerInitializerParam.getLongParamList()) {
long[] value = null;
if (!param.getIsNull()) {
value = new long[param.getValueCount()];
for (int i = 0; i < value.length; i++) {
value[i] = param.getValue(i);
}
}
facetHandlerInitializerParam.putLongParam(param.getKey(), value);
}
for (SenseiProtos.StringParams param : protoFacetHandlerInitializerParam.getStringParamList()) {
List<String> value = null;
if(!param.getIsNull()) {
value = param.getValueList();
}
facetHandlerInitializerParam.putStringParam(param.getKey(), value);
}
for (SenseiProtos.DoubleParams param : protoFacetHandlerInitializerParam.getDoubleParamList()) {
double[] value = null;
if (!param.getIsNull()) {
value = new double[param.getValueCount()];
for (int i = 0; i < value.length; i++) {
value[i] = param.getValue(i);
}
}
facetHandlerInitializerParam.putDoubleParam(param.getKey(), value);
}
for (SenseiProtos.StringParams param : protoFacetHandlerInitializerParam.getStringParamList()) {
List<String> value = null;
if (!param.getIsNull()) {
value = param.getValueList();
}
facetHandlerInitializerParam.putStringParam(param.getKey(), value);
}
for (SenseiProtos.ByteArrayParams param : protoFacetHandlerInitializerParam.getByteParamList()) {
ByteString value = null;
if (!param.getIsNull()) {
value = param.getValue();
}
facetHandlerInitializerParam.putByteArrayParam(param.getKey(), value.toByteArray());
}
return facetHandlerInitializerParam;
}