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

use crate::*;

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

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

impl NSIncrementalStoreNode {
    extern_methods!(
        #[cfg(feature = "NSManagedObjectID")]
        /// # Safety
        ///
        /// `values` generic should be of the correct type.
        #[unsafe(method(initWithObjectID:withValues:version:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithObjectID_withValues_version(
            this: Allocated<Self>,
            object_id: &NSManagedObjectID,
            values: &NSDictionary<NSString, AnyObject>,
            version: u64,
        ) -> Retained<Self>;

        /// # Safety
        ///
        /// `values` generic should be of the correct type.
        #[unsafe(method(updateWithValues:version:))]
        #[unsafe(method_family = none)]
        pub unsafe fn updateWithValues_version(
            &self,
            values: &NSDictionary<NSString, AnyObject>,
            version: u64,
        );

        #[cfg(feature = "NSManagedObjectID")]
        #[unsafe(method(objectID))]
        #[unsafe(method_family = none)]
        pub unsafe fn objectID(&self) -> Retained<NSManagedObjectID>;

        #[unsafe(method(version))]
        #[unsafe(method_family = none)]
        pub unsafe fn version(&self) -> u64;

        #[cfg(feature = "NSPropertyDescription")]
        #[unsafe(method(valueForPropertyDescription:))]
        #[unsafe(method_family = none)]
        pub unsafe fn valueForPropertyDescription(
            &self,
            prop: &NSPropertyDescription,
        ) -> Option<Retained<AnyObject>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSIncrementalStoreNode {
    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>;
    );
}
