use crate::common::*;
use crate::CoreData::*;
use crate::Foundation::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CoreData_NSEntityDescription")]
pub struct NSEntityDescription;
#[cfg(feature = "CoreData_NSEntityDescription")]
unsafe impl ClassType for NSEntityDescription {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "CoreData_NSEntityDescription")]
unsafe impl NSCoding for NSEntityDescription {}
#[cfg(feature = "CoreData_NSEntityDescription")]
unsafe impl NSCopying for NSEntityDescription {}
#[cfg(feature = "CoreData_NSEntityDescription")]
unsafe impl NSFastEnumeration for NSEntityDescription {}
#[cfg(feature = "CoreData_NSEntityDescription")]
unsafe impl NSObjectProtocol for NSEntityDescription {}
extern_methods!(
#[cfg(feature = "CoreData_NSEntityDescription")]
unsafe impl NSEntityDescription {
#[cfg(all(
feature = "CoreData_NSManagedObjectContext",
feature = "Foundation_NSString"
))]
#[method_id(@__retain_semantics Other entityForName:inManagedObjectContext:)]
pub unsafe fn entityForName_inManagedObjectContext(
entity_name: &NSString,
context: &NSManagedObjectContext,
) -> Option<Id<NSEntityDescription>>;
#[cfg(all(
feature = "CoreData_NSManagedObject",
feature = "CoreData_NSManagedObjectContext",
feature = "Foundation_NSString"
))]
#[method_id(@__retain_semantics Other insertNewObjectForEntityForName:inManagedObjectContext:)]
pub unsafe fn insertNewObjectForEntityForName_inManagedObjectContext(
entity_name: &NSString,
context: &NSManagedObjectContext,
) -> Id<NSManagedObject>;
#[cfg(feature = "CoreData_NSManagedObjectModel")]
#[method_id(@__retain_semantics Other managedObjectModel)]
pub unsafe fn managedObjectModel(&self) -> Id<NSManagedObjectModel>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other managedObjectClassName)]
pub unsafe fn managedObjectClassName(&self) -> Id<NSString>;
#[cfg(feature = "Foundation_NSString")]
#[method(setManagedObjectClassName:)]
pub unsafe fn setManagedObjectClassName(
&self,
managed_object_class_name: Option<&NSString>,
);
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other name)]
pub unsafe fn name(&self) -> Option<Id<NSString>>;
#[cfg(feature = "Foundation_NSString")]
#[method(setName:)]
pub unsafe fn setName(&self, name: Option<&NSString>);
#[method(isAbstract)]
pub unsafe fn isAbstract(&self) -> bool;
#[method(setAbstract:)]
pub unsafe fn setAbstract(&self, r#abstract: bool);
#[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))]
#[method_id(@__retain_semantics Other subentitiesByName)]
pub unsafe fn subentitiesByName(&self) -> Id<NSDictionary<NSString, NSEntityDescription>>;
#[cfg(feature = "Foundation_NSArray")]
#[method_id(@__retain_semantics Other subentities)]
pub unsafe fn subentities(&self) -> Id<NSArray<NSEntityDescription>>;
#[cfg(feature = "Foundation_NSArray")]
#[method(setSubentities:)]
pub unsafe fn setSubentities(&self, subentities: &NSArray<NSEntityDescription>);
#[method_id(@__retain_semantics Other superentity)]
pub unsafe fn superentity(&self) -> Option<Id<NSEntityDescription>>;
#[cfg(all(
feature = "CoreData_NSPropertyDescription",
feature = "Foundation_NSDictionary",
feature = "Foundation_NSString"
))]
#[method_id(@__retain_semantics Other propertiesByName)]
pub unsafe fn propertiesByName(&self) -> Id<NSDictionary<NSString, NSPropertyDescription>>;
#[cfg(all(
feature = "CoreData_NSPropertyDescription",
feature = "Foundation_NSArray"
))]
#[method_id(@__retain_semantics Other properties)]
pub unsafe fn properties(&self) -> Id<NSArray<NSPropertyDescription>>;
#[cfg(all(
feature = "CoreData_NSPropertyDescription",
feature = "Foundation_NSArray"
))]
#[method(setProperties:)]
pub unsafe fn setProperties(&self, properties: &NSArray<NSPropertyDescription>);
#[cfg(feature = "Foundation_NSDictionary")]
#[method_id(@__retain_semantics Other userInfo)]
pub unsafe fn userInfo(&self) -> Option<Id<NSDictionary>>;
#[cfg(feature = "Foundation_NSDictionary")]
#[method(setUserInfo:)]
pub unsafe fn setUserInfo(&self, user_info: Option<&NSDictionary>);
#[cfg(all(
feature = "CoreData_NSAttributeDescription",
feature = "Foundation_NSDictionary",
feature = "Foundation_NSString"
))]
#[method_id(@__retain_semantics Other attributesByName)]
pub unsafe fn attributesByName(&self)
-> Id<NSDictionary<NSString, NSAttributeDescription>>;
#[cfg(all(
feature = "CoreData_NSRelationshipDescription",
feature = "Foundation_NSDictionary",
feature = "Foundation_NSString"
))]
#[method_id(@__retain_semantics Other relationshipsByName)]
pub unsafe fn relationshipsByName(
&self,
) -> Id<NSDictionary<NSString, NSRelationshipDescription>>;
#[cfg(all(
feature = "CoreData_NSRelationshipDescription",
feature = "Foundation_NSArray"
))]
#[method_id(@__retain_semantics Other relationshipsWithDestinationEntity:)]
pub unsafe fn relationshipsWithDestinationEntity(
&self,
entity: &NSEntityDescription,
) -> Id<NSArray<NSRelationshipDescription>>;
#[method(isKindOfEntity:)]
pub unsafe fn isKindOfEntity(&self, entity: &NSEntityDescription) -> bool;
#[cfg(feature = "Foundation_NSData")]
#[method_id(@__retain_semantics Other versionHash)]
pub unsafe fn versionHash(&self) -> Id<NSData>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other versionHashModifier)]
pub unsafe fn versionHashModifier(&self) -> Option<Id<NSString>>;
#[cfg(feature = "Foundation_NSString")]
#[method(setVersionHashModifier:)]
pub unsafe fn setVersionHashModifier(&self, version_hash_modifier: Option<&NSString>);
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other renamingIdentifier)]
pub unsafe fn renamingIdentifier(&self) -> Option<Id<NSString>>;
#[cfg(feature = "Foundation_NSString")]
#[method(setRenamingIdentifier:)]
pub unsafe fn setRenamingIdentifier(&self, renaming_identifier: Option<&NSString>);
#[cfg(all(
feature = "CoreData_NSFetchIndexDescription",
feature = "Foundation_NSArray"
))]
#[method_id(@__retain_semantics Other indexes)]
pub unsafe fn indexes(&self) -> Id<NSArray<NSFetchIndexDescription>>;
#[cfg(all(
feature = "CoreData_NSFetchIndexDescription",
feature = "Foundation_NSArray"
))]
#[method(setIndexes:)]
pub unsafe fn setIndexes(&self, indexes: &NSArray<NSFetchIndexDescription>);
#[cfg(feature = "Foundation_NSArray")]
#[method_id(@__retain_semantics Other uniquenessConstraints)]
pub unsafe fn uniquenessConstraints(&self) -> Id<NSArray<NSArray<AnyObject>>>;
#[cfg(feature = "Foundation_NSArray")]
#[method(setUniquenessConstraints:)]
pub unsafe fn setUniquenessConstraints(
&self,
uniqueness_constraints: &NSArray<NSArray<AnyObject>>,
);
#[cfg(feature = "Foundation_NSArray")]
#[deprecated = "Use NSEntityDescription.indexes instead"]
#[method_id(@__retain_semantics Other compoundIndexes)]
pub unsafe fn compoundIndexes(&self) -> Id<NSArray<NSArray<AnyObject>>>;
#[cfg(feature = "Foundation_NSArray")]
#[deprecated = "Use NSEntityDescription.indexes instead"]
#[method(setCompoundIndexes:)]
pub unsafe fn setCompoundIndexes(&self, compound_indexes: &NSArray<NSArray<AnyObject>>);
#[cfg(feature = "Foundation_NSExpression")]
#[method_id(@__retain_semantics Other coreSpotlightDisplayNameExpression)]
pub unsafe fn coreSpotlightDisplayNameExpression(&self) -> Id<NSExpression>;
#[cfg(feature = "Foundation_NSExpression")]
#[method(setCoreSpotlightDisplayNameExpression:)]
pub unsafe fn setCoreSpotlightDisplayNameExpression(
&self,
core_spotlight_display_name_expression: &NSExpression,
);
}
);
extern_methods!(
#[cfg(feature = "CoreData_NSEntityDescription")]
unsafe impl NSEntityDescription {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);