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 NSFetchIndexDescription;
);
extern_conformance!(
unsafe impl NSCoding for NSFetchIndexDescription {}
);
extern_conformance!(
unsafe impl NSCopying for NSFetchIndexDescription {}
);
unsafe impl CopyingHelper for NSFetchIndexDescription {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for NSFetchIndexDescription {}
);
impl NSFetchIndexDescription {
extern_methods!(
#[cfg(feature = "NSFetchIndexElementDescription")]
#[unsafe(method(initWithName:elements:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_elements(
this: Allocated<Self>,
name: &NSString,
elements: Option<&NSArray<NSFetchIndexElementDescription>>,
) -> Retained<Self>;
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[unsafe(method(setName:))]
#[unsafe(method_family = none)]
pub unsafe fn setName(&self, name: &NSString);
#[cfg(feature = "NSFetchIndexElementDescription")]
#[unsafe(method(elements))]
#[unsafe(method_family = none)]
pub unsafe fn elements(&self) -> Retained<NSArray<NSFetchIndexElementDescription>>;
#[cfg(feature = "NSFetchIndexElementDescription")]
#[unsafe(method(setElements:))]
#[unsafe(method_family = none)]
pub unsafe fn setElements(&self, elements: &NSArray<NSFetchIndexElementDescription>);
#[cfg(feature = "NSEntityDescription")]
#[unsafe(method(entity))]
#[unsafe(method_family = none)]
pub unsafe fn entity(&self) -> Option<Retained<NSEntityDescription>>;
#[unsafe(method(partialIndexPredicate))]
#[unsafe(method_family = none)]
pub unsafe fn partialIndexPredicate(&self) -> Option<Retained<NSPredicate>>;
#[unsafe(method(setPartialIndexPredicate:))]
#[unsafe(method_family = none)]
pub unsafe fn setPartialIndexPredicate(
&self,
partial_index_predicate: Option<&NSPredicate>,
);
);
}
impl NSFetchIndexDescription {
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>;
);
}