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 NSPersistentStoreDescription;
);
extern_conformance!(
unsafe impl NSCopying for NSPersistentStoreDescription {}
);
unsafe impl CopyingHelper for NSPersistentStoreDescription {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for NSPersistentStoreDescription {}
);
impl NSPersistentStoreDescription {
extern_methods!(
#[unsafe(method(persistentStoreDescriptionWithURL:))]
#[unsafe(method_family = none)]
pub unsafe fn persistentStoreDescriptionWithURL(url: &NSURL) -> Retained<Self>;
#[unsafe(method(type))]
#[unsafe(method_family = none)]
pub unsafe fn r#type(&self) -> Retained<NSString>;
#[unsafe(method(setType:))]
#[unsafe(method_family = none)]
pub unsafe fn setType(&self, r#type: &NSString);
#[unsafe(method(configuration))]
#[unsafe(method_family = none)]
pub unsafe fn configuration(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setConfiguration:))]
#[unsafe(method_family = none)]
pub unsafe fn setConfiguration(&self, configuration: Option<&NSString>);
#[unsafe(method(URL))]
#[unsafe(method_family = none)]
pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
#[unsafe(method(setURL:))]
#[unsafe(method_family = none)]
pub unsafe fn setURL(&self, url: Option<&NSURL>);
#[unsafe(method(options))]
#[unsafe(method_family = none)]
pub unsafe fn options(&self) -> Retained<NSDictionary<NSString, NSObject>>;
#[unsafe(method(setOption:forKey:))]
#[unsafe(method_family = none)]
pub unsafe fn setOption_forKey(&self, option: Option<&NSObject>, key: &NSString);
#[unsafe(method(isReadOnly))]
#[unsafe(method_family = none)]
pub unsafe fn isReadOnly(&self) -> bool;
#[unsafe(method(setReadOnly:))]
#[unsafe(method_family = none)]
pub unsafe fn setReadOnly(&self, read_only: bool);
#[unsafe(method(timeout))]
#[unsafe(method_family = none)]
pub unsafe fn timeout(&self) -> NSTimeInterval;
#[unsafe(method(setTimeout:))]
#[unsafe(method_family = none)]
pub unsafe fn setTimeout(&self, timeout: NSTimeInterval);
#[unsafe(method(sqlitePragmas))]
#[unsafe(method_family = none)]
pub unsafe fn sqlitePragmas(&self) -> Retained<NSDictionary<NSString, NSObject>>;
#[unsafe(method(setValue:forPragmaNamed:))]
#[unsafe(method_family = none)]
pub unsafe fn setValue_forPragmaNamed(&self, value: Option<&NSObject>, name: &NSString);
#[unsafe(method(shouldAddStoreAsynchronously))]
#[unsafe(method_family = none)]
pub unsafe fn shouldAddStoreAsynchronously(&self) -> bool;
#[unsafe(method(setShouldAddStoreAsynchronously:))]
#[unsafe(method_family = none)]
pub unsafe fn setShouldAddStoreAsynchronously(&self, should_add_store_asynchronously: bool);
#[unsafe(method(shouldMigrateStoreAutomatically))]
#[unsafe(method_family = none)]
pub unsafe fn shouldMigrateStoreAutomatically(&self) -> bool;
#[unsafe(method(setShouldMigrateStoreAutomatically:))]
#[unsafe(method_family = none)]
pub unsafe fn setShouldMigrateStoreAutomatically(
&self,
should_migrate_store_automatically: bool,
);
#[unsafe(method(shouldInferMappingModelAutomatically))]
#[unsafe(method_family = none)]
pub unsafe fn shouldInferMappingModelAutomatically(&self) -> bool;
#[unsafe(method(setShouldInferMappingModelAutomatically:))]
#[unsafe(method_family = none)]
pub unsafe fn setShouldInferMappingModelAutomatically(
&self,
should_infer_mapping_model_automatically: bool,
);
#[unsafe(method(initWithURL:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
);
}
impl NSPersistentStoreDescription {
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>;
);
}
impl NSPersistentStoreDescription {
extern_methods!(
#[cfg(feature = "NSPersistentCloudKitContainerOptions")]
#[unsafe(method(cloudKitContainerOptions))]
#[unsafe(method_family = none)]
pub unsafe fn cloudKitContainerOptions(
&self,
) -> Option<Retained<NSPersistentCloudKitContainerOptions>>;
#[cfg(feature = "NSPersistentCloudKitContainerOptions")]
#[unsafe(method(setCloudKitContainerOptions:))]
#[unsafe(method_family = none)]
pub unsafe fn setCloudKitContainerOptions(
&self,
cloud_kit_container_options: Option<&NSPersistentCloudKitContainerOptions>,
);
);
}