objc2-cloud-kit 0.3.2

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

use crate::*;

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

unsafe impl Send for CKRecordID {}

unsafe impl Sync for CKRecordID {}

extern_conformance!(
    unsafe impl NSCoding for CKRecordID {}
);

extern_conformance!(
    unsafe impl NSCopying for CKRecordID {}
);

unsafe impl CopyingHelper for CKRecordID {
    type Result = Self;
}

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

extern_conformance!(
    unsafe impl NSSecureCoding for CKRecordID {}
);

impl CKRecordID {
    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>;

        /// Creates a record ID in the default zone
        #[unsafe(method(initWithRecordName:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithRecordName(
            this: Allocated<Self>,
            record_name: &NSString,
        ) -> Retained<Self>;

        #[cfg(feature = "CKRecordZoneID")]
        #[unsafe(method(initWithRecordName:zoneID:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithRecordName_zoneID(
            this: Allocated<Self>,
            record_name: &NSString,
            zone_id: &CKRecordZoneID,
        ) -> Retained<Self>;

        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(recordName))]
        #[unsafe(method_family = none)]
        pub unsafe fn recordName(&self) -> Retained<NSString>;

        #[cfg(feature = "CKRecordZoneID")]
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(zoneID))]
        #[unsafe(method_family = none)]
        pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
    );
}