1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CKSyncEngineRecordZoneChangeBatch;

    unsafe impl ClassType for CKSyncEngineRecordZoneChangeBatch {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl Send for CKSyncEngineRecordZoneChangeBatch {}

unsafe impl Sync for CKSyncEngineRecordZoneChangeBatch {}

unsafe impl NSObjectProtocol for CKSyncEngineRecordZoneChangeBatch {}

extern_methods!(
    unsafe impl CKSyncEngineRecordZoneChangeBatch {
        #[cfg(all(
            feature = "CKRecord",
            feature = "CKRecordID",
            feature = "CKSyncEngineState",
            feature = "block2"
        ))]
        #[method_id(@__retain_semantics Init initWithPendingChanges:recordProvider:)]
        pub unsafe fn initWithPendingChanges_recordProvider(
            this: Allocated<Self>,
            pending_changes: &NSArray<CKSyncEnginePendingRecordZoneChange>,
            record_provider: &block2::Block<dyn Fn(NonNull<CKRecordID>) -> *mut CKRecord + '_>,
        ) -> Option<Retained<Self>>;

        #[cfg(all(feature = "CKRecord", feature = "CKRecordID"))]
        #[method_id(@__retain_semantics Init initWithRecordsToSave:recordIDsToDelete:atomicByZone:)]
        pub unsafe fn initWithRecordsToSave_recordIDsToDelete_atomicByZone(
            this: Allocated<Self>,
            records_to_save: Option<&NSArray<CKRecord>>,
            record_i_ds_to_delete: Option<&NSArray<CKRecordID>>,
            atomic_by_zone: bool,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;

        #[cfg(feature = "CKRecord")]
        #[method_id(@__retain_semantics Other recordsToSave)]
        pub unsafe fn recordsToSave(&self) -> Retained<NSArray<CKRecord>>;

        #[cfg(feature = "CKRecordID")]
        #[method_id(@__retain_semantics Other recordIDsToDelete)]
        pub unsafe fn recordIDsToDelete(&self) -> Retained<NSArray<CKRecordID>>;

        #[method(atomicByZone)]
        pub unsafe fn atomicByZone(&self) -> bool;

        #[method(setAtomicByZone:)]
        pub unsafe fn setAtomicByZone(&self, atomic_by_zone: bool);
    }
);