objc2-core-data 0.3.2

Bindings to the CoreData framework
Documentation
//! 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::*;
#[cfg(feature = "objc2-cloud-kit")]
use objc2_cloud_kit::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// NSPersistentCloudKitContainerOptions provides customization of how NSPersistentCloudKitContainer aligns a given instance of NSPersistentStoreDescription with a CloudKit database.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentcloudkitcontaineroptions?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSPersistentCloudKitContainerOptions;
);

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

impl NSPersistentCloudKitContainerOptions {
    extern_methods!(
        /// The container identifier of the CKContainer to use with a given instance of NSPersistentStoreDescription
        #[unsafe(method(containerIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn containerIdentifier(&self) -> Retained<NSString>;

        #[cfg(feature = "objc2-cloud-kit")]
        #[unsafe(method(databaseScope))]
        #[unsafe(method_family = none)]
        pub unsafe fn databaseScope(&self) -> CKDatabaseScope;

        #[cfg(feature = "objc2-cloud-kit")]
        /// Setter for [`databaseScope`][Self::databaseScope].
        #[unsafe(method(setDatabaseScope:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDatabaseScope(&self, database_scope: CKDatabaseScope);

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(initWithContainerIdentifier:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithContainerIdentifier(
            this: Allocated<Self>,
            container_identifier: &NSString,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSPersistentCloudKitContainerOptions {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}