public void inflate(final Struct metadata, final Object target) {
        final Value empty = Value.newBuilder().setStringValue("-").build();
        final Value root = Value.newBuilder().setStructValue(metadata).build();
        for (final var entry : fieldNameMapping.entrySet()) {
            final FieldFormat fieldFormat = entry.getValue();
            final Object[] values = new String[fieldFormat.properties.size()];
            for (int i = 0; i < fieldFormat.properties.size(); i++) {
                values[i] = "-"; // Give it a default value
                final Property property = fieldFormat.properties.get(i);
                for (final Field field : property) {
                    Value value = root;
                    for (final String segment : field.dsvSegments) {
                        final var fieldMaps = new TreeMap<String, Value>(String.CASE_INSENSITIVE_ORDER);
                        fieldMaps.putAll(value.getStructValue().getFieldsMap());
                        value = fieldMaps.getOrDefault(segment, empty);
                    }
                    if (Strings.isNullOrEmpty(value.getStringValue()) || "-".equals(value.getStringValue())) {
                        continue;
                    }
                    values[i] = value.getStringValue();
                    break;
                }
            }
            final String value = Strings.lenientFormat(fieldFormat.format, values);
            if (!Strings.isNullOrEmpty(value)) {
                fieldSetterMapping.get(entry.getKey()).accept(target, value);
            }
        }
    }
Inflates the {@code target} with the given {@link Struct struct}.

@param metadata        the {@link Struct} metadata from where to retrieve and inflate the {@code target}.
@param target the {@code target} to be inflated.
oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/FieldsHelper.java