// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from map.djinni

#include "NativeMapListRecord.hpp"  // my header
#include "HI64.hpp"
#include "HList.hpp"
#include "HMap.hpp"
#include "HString.hpp"

namespace djinni_generated {

jobject NativeMapListRecord::toJava(JNIEnv* jniEnv, ::MapListRecord c) {
    djinni::LocalRef<jobject> j_map_list(jniEnv, ::djinni::HList<::djinni::HMap<::djinni::HString, ::djinni::HI64>>::toJava(jniEnv, c.map_list));
    const auto & data = djinni::JniClass<::djinni_generated::NativeMapListRecord>::get();
    jobject r = jniEnv->NewObject(data.clazz.get(), data.jconstructor, j_map_list.get());
    djinni::jniExceptionCheck(jniEnv);
    return r;
}

::MapListRecord NativeMapListRecord::fromJava(JNIEnv* jniEnv, jobject j) {
    assert(j != nullptr);
    const auto & data = djinni::JniClass<::djinni_generated::NativeMapListRecord>::get();
    return ::MapListRecord(
        ::djinni::HList<::djinni::HMap<::djinni::HString, ::djinni::HI64>>::fromJava(jniEnv, djinni::LocalRef<jobject>(jniEnv, jniEnv->GetObjectField(j, data.field_mMapList)).get()));
}

}  // namespace djinni_generated
