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

#include "NativeClientReturnedRecord.hpp"  // my header
#include "HString.hpp"

namespace djinni_generated {

jobject NativeClientReturnedRecord::toJava(JNIEnv* jniEnv, ClientReturnedRecord c) {
    djinni::LocalRef<jstring> j_content(jniEnv, ::djinni::HString::toJava(jniEnv, c.content));
    const auto & data = djinni::JniClass<::djinni_generated::NativeClientReturnedRecord>::get();
    jobject r = jniEnv->NewObject(data.clazz.get(), data.jconstructor, j_content.get());
    djinni::jniExceptionCheck(jniEnv);
    return r;
}

ClientReturnedRecord NativeClientReturnedRecord::fromJava(JNIEnv* jniEnv, jobject j) {
    assert(j != nullptr);
    const auto & data = djinni::JniClass<::djinni_generated::NativeClientReturnedRecord>::get();
    return ClientReturnedRecord(
        ::djinni::HString::fromJava(jniEnv, djinni::LocalRef<jstring>(jniEnv, static_cast<jstring>(jniEnv->GetObjectField(j, data.field_mContent))).get()));
}

}  // namespace djinni_generated
