private Object convertedValue()

in src/main/java/com/google/cloud/solutions/autotokenize/common/RecordUnflattener.java [87:108]


    private Object convertedValue() {
      String keyType = keyType();

      switch (value.getTypeCase()) {
        case INTEGER_VALUE:
          return new BigInteger(String.valueOf(value.getIntegerValue()));
        case FLOAT_VALUE:
          return new BigDecimal(String.valueOf(value.getFloatValue()));

        case BOOLEAN_VALUE:
          return value.getBooleanValue();

        case TYPE_NOT_SET:
          return null;
        default:
        case STRING_VALUE:
          if (keyType != null && keyType.equals("bytes")) {
            return ByteValueConverter.of(value).asJsonString();
          }
          return value.getStringValue();
      }
    }