use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSMappingModel;
);
extern_conformance!(
unsafe impl NSObjectProtocol for NSMappingModel {}
);
impl NSMappingModel {
extern_methods!(
#[cfg(feature = "NSManagedObjectModel")]
#[unsafe(method(mappingModelFromBundles:forSourceModel:destinationModel:))]
#[unsafe(method_family = none)]
pub unsafe fn mappingModelFromBundles_forSourceModel_destinationModel(
bundles: Option<&NSArray<NSBundle>>,
source_model: Option<&NSManagedObjectModel>,
destination_model: Option<&NSManagedObjectModel>,
) -> Option<Retained<NSMappingModel>>;
#[cfg(feature = "NSManagedObjectModel")]
#[unsafe(method(inferredMappingModelForSourceModel:destinationModel:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn inferredMappingModelForSourceModel_destinationModel_error(
source_model: &NSManagedObjectModel,
destination_model: &NSManagedObjectModel,
) -> Result<Retained<NSMappingModel>, Retained<NSError>>;
#[unsafe(method(initWithContentsOfURL:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithContentsOfURL(
this: Allocated<Self>,
url: Option<&NSURL>,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSEntityMapping")]
#[unsafe(method(entityMappings))]
#[unsafe(method_family = none)]
pub unsafe fn entityMappings(&self) -> Option<Retained<NSArray<NSEntityMapping>>>;
#[cfg(feature = "NSEntityMapping")]
#[unsafe(method(setEntityMappings:))]
#[unsafe(method_family = none)]
pub unsafe fn setEntityMappings(&self, entity_mappings: Option<&NSArray<NSEntityMapping>>);
#[cfg(feature = "NSEntityMapping")]
#[unsafe(method(entityMappingsByName))]
#[unsafe(method_family = none)]
pub unsafe fn entityMappingsByName(
&self,
) -> Retained<NSDictionary<NSString, NSEntityMapping>>;
);
}
impl NSMappingModel {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}