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

#import "DBRecordWithNestedDerivings+Private.h"
#import "DBRecordWithDerivings+Private.h"
#import "DJIDate.h"
#import "DJIMarshal+Private.h"
#import <Foundation/Foundation.h>
#include <cassert>
#include <utility>
#include <vector>

namespace djinni_generated {

auto RecordWithNestedDerivings::toCpp(ObjcType obj) -> CppType
{
    assert(obj);
    int32_t key = ::djinni::I32::toCpp(obj.key);
    ::RecordWithDerivings rec = ::djinni_generated::RecordWithDerivings::toCpp(obj.rec);
    return ::RecordWithNestedDerivings(
        key,
        rec);
}

auto RecordWithNestedDerivings::fromCpp(const CppType& cpp) -> ObjcType
{
    int32_t key = ::djinni::I32::fromCpp(cpp.key);
    DBRecordWithDerivings *rec = ::djinni_generated::RecordWithDerivings::fromCpp(cpp.rec);
    return [[DBRecordWithNestedDerivings alloc]
        initWithKey:key
        rec:rec];
}

}  // namespace djinni_generated
