//! 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 "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nssqlitestoretype?language=objc)
    pub static NSSQLiteStoreType: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsxmlstoretype?language=objc)
    pub static NSXMLStoreType: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsbinarystoretype?language=objc)
    pub static NSBinaryStoreType: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsinmemorystoretype?language=objc)
    pub static NSInMemoryStoreType: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsstoretypekey?language=objc)
    pub static NSStoreTypeKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsstoreuuidkey?language=objc)
    pub static NSStoreUUIDKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstorecoordinatorstoreswillchangenotification?language=objc)
    pub static NSPersistentStoreCoordinatorStoresWillChangeNotification: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstorecoordinatorstoresdidchangenotification?language=objc)
    pub static NSPersistentStoreCoordinatorStoresDidChangeNotification: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstorecoordinatorwillremovestorenotification?language=objc)
    pub static NSPersistentStoreCoordinatorWillRemoveStoreNotification: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsaddedpersistentstoreskey?language=objc)
    pub static NSAddedPersistentStoresKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsremovedpersistentstoreskey?language=objc)
    pub static NSRemovedPersistentStoresKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsuuidchangedpersistentstoreskey?language=objc)
    pub static NSUUIDChangedPersistentStoresKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsreadonlypersistentstoreoption?language=objc)
    pub static NSReadOnlyPersistentStoreOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsvalidatexmlstoreoption?language=objc)
    pub static NSValidateXMLStoreOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoretimeoutoption?language=objc)
    pub static NSPersistentStoreTimeoutOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nssqlitepragmasoption?language=objc)
    pub static NSSQLitePragmasOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nssqliteanalyzeoption?language=objc)
    pub static NSSQLiteAnalyzeOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nssqlitemanualvacuumoption?language=objc)
    pub static NSSQLiteManualVacuumOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsignorepersistentstoreversioningoption?language=objc)
    pub static NSIgnorePersistentStoreVersioningOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsmigratepersistentstoresautomaticallyoption?language=objc)
    pub static NSMigratePersistentStoresAutomaticallyOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsinfermappingmodelautomaticallyoption?language=objc)
    pub static NSInferMappingModelAutomaticallyOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsstoremodelversionhasheskey?language=objc)
    pub static NSStoreModelVersionHashesKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsstoremodelversionidentifierskey?language=objc)
    pub static NSStoreModelVersionIdentifiersKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreoscompatibility?language=objc)
    pub static NSPersistentStoreOSCompatibility: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreconnectionpoolmaxsizekey?language=objc)
    pub static NSPersistentStoreConnectionPoolMaxSizeKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nscoredatacorespotlightexporter?language=objc)
    pub static NSCoreDataCoreSpotlightExporter: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstorestagedmigrationmanageroptionkey?language=objc)
    pub static NSPersistentStoreStagedMigrationManagerOptionKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsxmlexternalrecordtype?language=objc)
    #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
    pub static NSXMLExternalRecordType: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsbinaryexternalrecordtype?language=objc)
    #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
    pub static NSBinaryExternalRecordType: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsexternalrecordsfileformatoption?language=objc)
    #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
    pub static NSExternalRecordsFileFormatOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsexternalrecordsdirectoryoption?language=objc)
    #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
    pub static NSExternalRecordsDirectoryOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsexternalrecordextensionoption?language=objc)
    #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
    pub static NSExternalRecordExtensionOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsentitynameinpathkey?language=objc)
    #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
    pub static NSEntityNameInPathKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsstoreuuidinpathkey?language=objc)
    #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
    pub static NSStoreUUIDInPathKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsstorepathkey?language=objc)
    #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
    pub static NSStorePathKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsmodelpathkey?language=objc)
    #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
    pub static NSModelPathKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsobjecturikey?language=objc)
    #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
    pub static NSObjectURIKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreforcedestroyoption?language=objc)
    pub static NSPersistentStoreForceDestroyOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstorefileprotectionkey?language=objc)
    pub static NSPersistentStoreFileProtectionKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistenthistorytrackingkey?language=objc)
    pub static NSPersistentHistoryTrackingKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsbinarystoresecuredecodingclasses?language=objc)
    pub static NSBinaryStoreSecureDecodingClasses: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsbinarystoreinsecuredecodingcompatibilityoption?language=objc)
    pub static NSBinaryStoreInsecureDecodingCompatibilityOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreremotechangenotificationpostoptionkey?language=objc)
    pub static NSPersistentStoreRemoteChangeNotificationPostOptionKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreremotechangenotification?language=objc)
    pub static NSPersistentStoreRemoteChangeNotification: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreurlkey?language=objc)
    pub static NSPersistentStoreURLKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistenthistorytokenkey?language=objc)
    pub static NSPersistentHistoryTokenKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoredeferredlightweightmigrationoptionkey?language=objc)
    pub static NSPersistentStoreDeferredLightweightMigrationOptionKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoremodelversionchecksumkey?language=objc)
    pub static NSPersistentStoreModelVersionChecksumKey: &'static NSString;
}

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

unsafe impl Send for NSPersistentStoreCoordinator {}

unsafe impl Sync for NSPersistentStoreCoordinator {}

extern_conformance!(
    unsafe impl NSLocking for NSPersistentStoreCoordinator {}
);

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

impl NSPersistentStoreCoordinator {
    extern_methods!(
        #[cfg(feature = "NSManagedObjectModel")]
        #[unsafe(method(initWithManagedObjectModel:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithManagedObjectModel(
            this: Allocated<Self>,
            model: &NSManagedObjectModel,
        ) -> Retained<Self>;

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

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

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

        /// Setter for [`name`][Self::name].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setName(&self, name: Option<&NSString>);

        #[cfg(feature = "NSPersistentStore")]
        #[unsafe(method(persistentStoreForURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn persistentStoreForURL(
            &self,
            url: &NSURL,
        ) -> Option<Retained<NSPersistentStore>>;

        #[cfg(feature = "NSPersistentStore")]
        #[unsafe(method(URLForPersistentStore:))]
        #[unsafe(method_family = none)]
        pub unsafe fn URLForPersistentStore(&self, store: &NSPersistentStore) -> Retained<NSURL>;

        #[cfg(feature = "NSPersistentStore")]
        #[unsafe(method(setURL:forPersistentStore:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setURL_forPersistentStore(
            &self,
            url: &NSURL,
            store: &NSPersistentStore,
        ) -> bool;

        #[cfg(feature = "NSPersistentStore")]
        /// # Safety
        ///
        /// `options` generic should be of the correct type.
        #[unsafe(method(addPersistentStoreWithType:configuration:URL:options:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn addPersistentStoreWithType_configuration_URL_options_error(
            &self,
            store_type: &NSString,
            configuration: Option<&NSString>,
            store_url: Option<&NSURL>,
            options: Option<&NSDictionary>,
        ) -> Result<Retained<NSPersistentStore>, Retained<NSError>>;

        #[cfg(all(feature = "NSPersistentStoreDescription", feature = "block2"))]
        #[unsafe(method(addPersistentStoreWithDescription:completionHandler:))]
        #[unsafe(method_family = none)]
        pub unsafe fn addPersistentStoreWithDescription_completionHandler(
            &self,
            store_description: &NSPersistentStoreDescription,
            block: &block2::DynBlock<dyn Fn(NonNull<NSPersistentStoreDescription>, *mut NSError)>,
        );

        #[cfg(feature = "NSPersistentStore")]
        #[unsafe(method(removePersistentStore:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn removePersistentStore_error(
            &self,
            store: &NSPersistentStore,
        ) -> Result<(), Retained<NSError>>;

        #[cfg(feature = "NSPersistentStore")]
        /// # Safety
        ///
        /// `metadata` generic should be of the correct type.
        #[unsafe(method(setMetadata:forPersistentStore:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMetadata_forPersistentStore(
            &self,
            metadata: Option<&NSDictionary<NSString, AnyObject>>,
            store: &NSPersistentStore,
        );

        #[cfg(feature = "NSPersistentStore")]
        #[unsafe(method(metadataForPersistentStore:))]
        #[unsafe(method_family = none)]
        pub unsafe fn metadataForPersistentStore(
            &self,
            store: &NSPersistentStore,
        ) -> Retained<NSDictionary<NSString, AnyObject>>;

        #[cfg(feature = "NSManagedObjectID")]
        #[unsafe(method(managedObjectIDForURIRepresentation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn managedObjectIDForURIRepresentation(
            &self,
            url: &NSURL,
        ) -> Option<Retained<NSManagedObjectID>>;

        #[cfg(all(
            feature = "NSManagedObjectContext",
            feature = "NSPersistentStoreRequest"
        ))]
        #[unsafe(method(executeRequest:withContext:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn executeRequest_withContext_error(
            &self,
            request: &NSPersistentStoreRequest,
            context: &NSManagedObjectContext,
        ) -> Result<Retained<AnyObject>, Retained<NSError>>;

        #[unsafe(method(registeredStoreTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn registeredStoreTypes() -> Retained<NSDictionary<NSString, NSValue>>;

        /// # Safety
        ///
        /// `store_class` probably has further requirements.
        #[unsafe(method(registerStoreClass:forStoreType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn registerStoreClass_forStoreType(
            store_class: Option<&AnyClass>,
            store_type: &NSString,
        );

        /// # Safety
        ///
        /// `options` generic should be of the correct type.
        #[unsafe(method(metadataForPersistentStoreOfType:URL:options:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn metadataForPersistentStoreOfType_URL_options_error(
            store_type: &NSString,
            url: &NSURL,
            options: Option<&NSDictionary>,
        ) -> Result<Retained<NSDictionary<NSString, AnyObject>>, Retained<NSError>>;

        /// # Safety
        ///
        /// - `metadata` generic should be of the correct type.
        /// - `options` generic should be of the correct type.
        #[unsafe(method(setMetadata:forPersistentStoreOfType:URL:options:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMetadata_forPersistentStoreOfType_URL_options_error(
            metadata: Option<&NSDictionary<NSString, AnyObject>>,
            store_type: &NSString,
            url: &NSURL,
            options: Option<&NSDictionary>,
        ) -> Result<(), Retained<NSError>>;

        #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
        #[unsafe(method(elementsDerivedFromExternalRecordURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn elementsDerivedFromExternalRecordURL(
            file_url: &NSURL,
        ) -> Retained<NSDictionary>;

        #[cfg(feature = "NSPersistentStore")]
        /// # Safety
        ///
        /// `options` generic should be of the correct type.
        #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
        #[unsafe(method(importStoreWithIdentifier:fromExternalRecordsDirectory:toURL:options:withType:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn importStoreWithIdentifier_fromExternalRecordsDirectory_toURL_options_withType_error(
            &self,
            store_identifier: Option<&NSString>,
            external_records_url: &NSURL,
            destination_url: &NSURL,
            options: Option<&NSDictionary>,
            store_type: &NSString,
        ) -> Result<Retained<NSPersistentStore>, Retained<NSError>>;

        #[cfg(feature = "NSPersistentStore")]
        /// # Safety
        ///
        /// `options` generic should be of the correct type.
        #[unsafe(method(migratePersistentStore:toURL:options:withType:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn migratePersistentStore_toURL_options_withType_error(
            &self,
            store: &NSPersistentStore,
            url: &NSURL,
            options: Option<&NSDictionary>,
            store_type: &NSString,
        ) -> Result<Retained<NSPersistentStore>, Retained<NSError>>;

        /// # Safety
        ///
        /// `options` generic should be of the correct type.
        #[unsafe(method(destroyPersistentStoreAtURL:withType:options:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn destroyPersistentStoreAtURL_withType_options_error(
            &self,
            url: &NSURL,
            store_type: &NSString,
            options: Option<&NSDictionary>,
        ) -> Result<(), Retained<NSError>>;

        /// # Safety
        ///
        /// - `destination_options` generic should be of the correct type.
        /// - `source_options` generic should be of the correct type.
        #[unsafe(method(replacePersistentStoreAtURL:destinationOptions:withPersistentStoreFromURL:sourceOptions:storeType:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn replacePersistentStoreAtURL_destinationOptions_withPersistentStoreFromURL_sourceOptions_storeType_error(
            &self,
            destination_url: &NSURL,
            destination_options: Option<&NSDictionary>,
            source_url: &NSURL,
            source_options: Option<&NSDictionary>,
            store_type: &NSString,
        ) -> Result<(), Retained<NSError>>;

        #[cfg(feature = "block2")]
        /// # Safety
        ///
        /// `block` block must be sendable.
        #[unsafe(method(performBlock:))]
        #[unsafe(method_family = none)]
        pub unsafe fn performBlock(&self, block: &block2::DynBlock<dyn Fn()>);

        #[cfg(feature = "block2")]
        /// # Safety
        ///
        /// `block` block must be sendable.
        #[unsafe(method(performBlockAndWait:))]
        #[unsafe(method_family = none)]
        pub unsafe fn performBlockAndWait(&self, block: &block2::DynBlock<dyn Fn() + '_>);

        #[cfg(feature = "NSPersistentHistoryToken")]
        /// # Safety
        ///
        /// `stores` generic should be of the correct type.
        #[unsafe(method(currentPersistentHistoryTokenFromStores:))]
        #[unsafe(method_family = none)]
        pub unsafe fn currentPersistentHistoryTokenFromStores(
            &self,
            stores: Option<&NSArray>,
        ) -> Option<Retained<NSPersistentHistoryToken>>;

        #[unsafe(method(finishDeferredLightweightMigration:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn finishDeferredLightweightMigration(&self) -> Result<(), Retained<NSError>>;

        #[unsafe(method(finishDeferredLightweightMigrationTask:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn finishDeferredLightweightMigrationTask(
            &self,
        ) -> Result<(), Retained<NSError>>;

        #[cfg(feature = "NSManagedObjectID")]
        /// # Safety
        ///
        /// `utf8string` must be a valid pointer.
        #[unsafe(method(managedObjectIDFromUTF8String:length:))]
        #[unsafe(method_family = none)]
        pub unsafe fn managedObjectIDFromUTF8String_length(
            &self,
            utf8string: NonNull<c_char>,
            len: NSUInteger,
        ) -> Retained<NSManagedObjectID>;

        #[deprecated = "Use -metadataForPersistentStoreOfType:URL:options:error: and pass in an options dictionary matching addPersistentStoreWithType"]
        #[unsafe(method(metadataForPersistentStoreWithURL:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn metadataForPersistentStoreWithURL_error(
            url: &NSURL,
        ) -> Result<Retained<NSDictionary>, Retained<NSError>>;

        #[deprecated = "Use -performBlockAndWait: instead"]
        #[unsafe(method(lock))]
        #[unsafe(method_family = none)]
        pub unsafe fn lock(&self);

        #[deprecated = "Use -performBlockAndWait: instead"]
        #[unsafe(method(unlock))]
        #[unsafe(method_family = none)]
        pub unsafe fn unlock(&self);

        #[deprecated = "Use -performBlock: instead"]
        #[unsafe(method(tryLock))]
        #[unsafe(method_family = none)]
        pub unsafe fn tryLock(&self) -> bool;

        #[deprecated = "Use -metadataForPersistentStoreOfType:URL:options:error: and pass in an options dictionary matching addPersistentStoreWithType"]
        #[unsafe(method(metadataForPersistentStoreOfType:URL:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn metadataForPersistentStoreOfType_URL_error(
            store_type: Option<&NSString>,
            url: &NSURL,
        ) -> Result<Retained<NSDictionary<NSString, AnyObject>>, Retained<NSError>>;

        /// # Safety
        ///
        /// `metadata` generic should be of the correct type.
        #[deprecated = "Use  -setMetadata:forPersistentStoreOfType:URL:options:error: and pass in an options dictionary matching addPersistentStoreWithType"]
        #[unsafe(method(setMetadata:forPersistentStoreOfType:URL:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMetadata_forPersistentStoreOfType_URL_error(
            metadata: Option<&NSDictionary<NSString, AnyObject>>,
            store_type: Option<&NSString>,
            url: &NSURL,
        ) -> Result<(), Retained<NSError>>;

        /// # Safety
        ///
        /// `options` generic should be of the correct type.
        #[deprecated = "Please see the release notes and Core Data documentation."]
        #[unsafe(method(removeUbiquitousContentAndPersistentStoreAtURL:options:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn removeUbiquitousContentAndPersistentStoreAtURL_options_error(
            store_url: &NSURL,
            options: Option<&NSDictionary>,
        ) -> Result<(), Retained<NSError>>;
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreubiquitoustransitiontype?language=objc)
// NS_ENUM
#[deprecated = "Please see the release notes and Core Data documentation."]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSPersistentStoreUbiquitousTransitionType(pub NSUInteger);
impl NSPersistentStoreUbiquitousTransitionType {
    #[doc(alias = "NSPersistentStoreUbiquitousTransitionTypeAccountAdded")]
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub const AccountAdded: Self = Self(1);
    #[doc(alias = "NSPersistentStoreUbiquitousTransitionTypeAccountRemoved")]
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub const AccountRemoved: Self = Self(2);
    #[doc(alias = "NSPersistentStoreUbiquitousTransitionTypeContentRemoved")]
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub const ContentRemoved: Self = Self(3);
    #[doc(alias = "NSPersistentStoreUbiquitousTransitionTypeInitialImportCompleted")]
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub const InitialImportCompleted: Self = Self(4);
}

unsafe impl Encode for NSPersistentStoreUbiquitousTransitionType {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSPersistentStoreUbiquitousTransitionType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreubiquitouscontentnamekey?language=objc)
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub static NSPersistentStoreUbiquitousContentNameKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreubiquitouscontenturlkey?language=objc)
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub static NSPersistentStoreUbiquitousContentURLKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoredidimportubiquitouscontentchangesnotification?language=objc)
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub static NSPersistentStoreDidImportUbiquitousContentChangesNotification: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreubiquitoustransitiontypekey?language=objc)
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub static NSPersistentStoreUbiquitousTransitionTypeKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreubiquitouspeertokenoption?language=objc)
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub static NSPersistentStoreUbiquitousPeerTokenOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreremoveubiquitousmetadataoption?language=objc)
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub static NSPersistentStoreRemoveUbiquitousMetadataOption: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstoreubiquitouscontaineridentifierkey?language=objc)
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub static NSPersistentStoreUbiquitousContainerIdentifierKey: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentstorerebuildfromubiquitouscontentoption?language=objc)
    #[deprecated = "Please see the release notes and Core Data documentation."]
    pub static NSPersistentStoreRebuildFromUbiquitousContentOption: &'static NSString;
}
