// Path: jres-core/src/main/java/com/blacklocus/jres/response/JresJsonReply.java
// public class JresJsonReply implements JresReply {
// 
//     private JsonNode node;
// 
//     @Override
//     public JsonNode node() {
//         return node;
//     }
// 
//     public JresJsonReply node(JsonNode node) {
//         this.node = node;
//         return this;
//     }
// 
//     @Override
//     public String toString() {
//         try {
//             return ObjectMappers.PRETTY.writeValueAsString(node());
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
// }
// 
// Path: jres-core/src/main/java/com/blacklocus/jres/strings/ObjectMappers.java
// public class ObjectMappers {
// 
//     public static final ObjectMapper NORMAL = newConfiguredObjectMapper();
// 
//     public static final ObjectMapper PRETTY = newConfiguredObjectMapper();
//     static {
//         PRETTY.configure(SerializationFeature.INDENT_OUTPUT, true);
//     }
// 
//     static ObjectMapper newConfiguredObjectMapper() {
//         return new ObjectMapper()
//                 // ElasticSearch is usually more okay with absence of properties rather than presence with null values.
//                 .setSerializationInclusion(JsonInclude.Include.NON_NULL)
//                 // Allow empty JSON objects where they might occur.
//                 .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
//                 // Not all properties need to be mapped back into POJOs.
//                 .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#writeValueAsString(Object)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static String toJson(Object o) {
//         try {
//             return NORMAL.writeValueAsString(o);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#writeValueAsString(Object)} with {@link ObjectMappers#PRETTY} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static String toJsonPretty(Object o) {
//         try {
//             return PRETTY.writeValueAsString(o);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(String, Class)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(String json, Class<T> klass) {
//         try {
//             return NORMAL.readValue(json, klass);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(String, TypeReference)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(String json, TypeReference<T> typeReference) {
//         try {
//             return NORMAL.readValue(json, typeReference);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(InputStream, Class)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(InputStream json, Class<T> klass) {
//         try {
//             return NORMAL.readValue(json, klass);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(InputStream, TypeReference)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(InputStream json, TypeReference<T> typeReference) {
//         try {
//             return NORMAL.readValue(json, typeReference);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(JsonParser, Class)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(JsonNode json, Class<T> klass) {
//         try {
//             return NORMAL.readValue(json.traverse(NORMAL), klass);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(JsonParser, TypeReference)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(JsonNode json, TypeReference<T> typeReference) {
//         try {
//             return NORMAL.readValue(json.traverse(NORMAL), typeReference);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// }


import com.blacklocus.jres.response.JresJsonReply;
import com.blacklocus.jres.strings.ObjectMappers;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
    private Boolean found;

    @JsonProperty("_source")
    private JsonNode source;

    public String getIndex() {
        return index;
    }

    public String getType() {
        return type;
    }

    public String getId() {
        return id;
    }

    public Integer getVersion() {
        return version;
    }

    public Boolean getFound() {
        return found;
    }

    public JsonNode getSource() {
        return source;
    }

    public <T> T getSourceAsType(Class<T> klass) {
// Path: jres-core/src/main/java/com/blacklocus/jres/response/JresJsonReply.java
// public class JresJsonReply implements JresReply {
// 
//     private JsonNode node;
// 
//     @Override
//     public JsonNode node() {
//         return node;
//     }
// 
//     public JresJsonReply node(JsonNode node) {
//         this.node = node;
//         return this;
//     }
// 
//     @Override
//     public String toString() {
//         try {
//             return ObjectMappers.PRETTY.writeValueAsString(node());
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
// }
// 
// Path: jres-core/src/main/java/com/blacklocus/jres/strings/ObjectMappers.java
// public class ObjectMappers {
// 
//     public static final ObjectMapper NORMAL = newConfiguredObjectMapper();
// 
//     public static final ObjectMapper PRETTY = newConfiguredObjectMapper();
//     static {
//         PRETTY.configure(SerializationFeature.INDENT_OUTPUT, true);
//     }
// 
//     static ObjectMapper newConfiguredObjectMapper() {
//         return new ObjectMapper()
//                 // ElasticSearch is usually more okay with absence of properties rather than presence with null values.
//                 .setSerializationInclusion(JsonInclude.Include.NON_NULL)
//                 // Allow empty JSON objects where they might occur.
//                 .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
//                 // Not all properties need to be mapped back into POJOs.
//                 .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#writeValueAsString(Object)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static String toJson(Object o) {
//         try {
//             return NORMAL.writeValueAsString(o);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#writeValueAsString(Object)} with {@link ObjectMappers#PRETTY} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static String toJsonPretty(Object o) {
//         try {
//             return PRETTY.writeValueAsString(o);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(String, Class)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(String json, Class<T> klass) {
//         try {
//             return NORMAL.readValue(json, klass);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(String, TypeReference)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(String json, TypeReference<T> typeReference) {
//         try {
//             return NORMAL.readValue(json, typeReference);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(InputStream, Class)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(InputStream json, Class<T> klass) {
//         try {
//             return NORMAL.readValue(json, klass);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(InputStream, TypeReference)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(InputStream json, TypeReference<T> typeReference) {
//         try {
//             return NORMAL.readValue(json, typeReference);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(JsonParser, Class)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(JsonNode json, Class<T> klass) {
//         try {
//             return NORMAL.readValue(json.traverse(NORMAL), klass);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     /**
//      * Convenience around {@link ObjectMapper#readValue(JsonParser, TypeReference)} with {@link ObjectMappers#NORMAL} wrapping
//      * checked exceptions in {@link RuntimeException}
//      */
//     public static <T> T fromJson(JsonNode json, TypeReference<T> typeReference) {
//         try {
//             return NORMAL.readValue(json.traverse(NORMAL), typeReference);
//         } catch (IOException e) {
//             throw new RuntimeException(e);
//         }
//     }
// }


// Path: jres-core/src/main/java/com/blacklocus/jres/response/document/JresGetDocumentReply.java
import com.blacklocus.jres.response.JresJsonReply;
import com.blacklocus.jres.strings.ObjectMappers;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;

    private Boolean found;

    @JsonProperty("_source")
    private JsonNode source;

    public String getIndex() {
        return index;
    }

    public String getType() {
        return type;
    }

    public String getId() {
        return id;
    }

    public Integer getVersion() {
        return version;
    }

    public Boolean getFound() {
        return found;
    }

    public JsonNode getSource() {
        return source;
    }

    public <T> T getSourceAsType(Class<T> klass) {
        return ObjectMappers.fromJson(source, klass);