objc2-core-data 0.3.2

Bindings to the CoreData framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsmanagedobjectmodelreference?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSManagedObjectModelReference;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for NSManagedObjectModelReference {}
);

impl NSManagedObjectModelReference {
    extern_methods!(
        #[cfg(feature = "NSManagedObjectModel")]
        #[unsafe(method(resolvedModel))]
        #[unsafe(method_family = none)]
        pub unsafe fn resolvedModel(&self) -> Retained<NSManagedObjectModel>;

        #[unsafe(method(versionChecksum))]
        #[unsafe(method_family = none)]
        pub unsafe fn versionChecksum(&self) -> Retained<NSString>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(feature = "NSManagedObjectModel")]
        #[unsafe(method(initWithModel:versionChecksum:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithModel_versionChecksum(
            this: Allocated<Self>,
            model: &NSManagedObjectModel,
            version_checksum: &NSString,
        ) -> Retained<Self>;

        #[unsafe(method(initWithFileURL:versionChecksum:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithFileURL_versionChecksum(
            this: Allocated<Self>,
            file_url: &NSURL,
            version_checksum: &NSString,
        ) -> Retained<Self>;

        /// # Safety
        ///
        /// `version_hash` generic should be of the correct type.
        #[unsafe(method(initWithEntityVersionHashes:inBundle:versionChecksum:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithEntityVersionHashes_inBundle_versionChecksum(
            this: Allocated<Self>,
            version_hash: &NSDictionary,
            bundle: Option<&NSBundle>,
            version_checksum: &NSString,
        ) -> Retained<Self>;

        #[unsafe(method(initWithName:inBundle:versionChecksum:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithName_inBundle_versionChecksum(
            this: Allocated<Self>,
            model_name: &NSString,
            bundle: Option<&NSBundle>,
            version_checksum: &NSString,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSManagedObjectModelReference {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}