in src/main/java/org/apache/skywalking/banyandb/v1/client/TagAndValue.java [68:85]
public static TagAndValue<?> fromProtobuf(BanyandbModel.Tag tag) {
switch (tag.getValue().getValueCase()) {
case INT:
return new LongTagPair(tag.getKey(), tag.getValue().getInt().getValue());
case STR:
return new StringTagPair(tag.getKey(), tag.getValue().getStr().getValue());
case INT_ARRAY:
return new LongArrayTagPair(tag.getKey(), tag.getValue().getIntArray().getValueList());
case STR_ARRAY:
return new StringArrayTagPair(tag.getKey(), tag.getValue().getStrArray().getValueList());
case BINARY_DATA:
return new BinaryTagPair(tag.getKey(), tag.getValue().getBinaryData());
case NULL:
return new NullTagPair(tag.getKey());
default:
throw new IllegalArgumentException("Unrecognized NullType");
}
}