objc2_cloud_kit/generated/
CKFetchRecordZoneChangesOperation.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// This operation will fetch records changes across the given record zones
12    ///
13    ///
14    /// For each
15    /// `previousServerChangeToken`passed in with a
16    /// `CKFetchRecordZoneChangesConfiguration,`only records that have changed since that anchor will be fetched.
17    /// If this is your first fetch of a zone or if you wish to re-fetch all records within a zone, do not include a
18    /// `previousServerChangeToken.`Change tokens are opaque tokens and clients should not infer any behavior based on their content.
19    ///
20    /// See also [Apple's documentation](https://developer.apple.com/documentation/cloudkit/ckfetchrecordzonechangesoperation?language=objc)
21    #[unsafe(super(CKDatabaseOperation, CKOperation, NSOperation, NSObject))]
22    #[derive(Debug, PartialEq, Eq, Hash)]
23    #[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
24    pub struct CKFetchRecordZoneChangesOperation;
25);
26
27#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
28extern_conformance!(
29    unsafe impl NSObjectProtocol for CKFetchRecordZoneChangesOperation {}
30);
31
32#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
33impl CKFetchRecordZoneChangesOperation {
34    extern_methods!(
35        #[unsafe(method(init))]
36        #[unsafe(method_family = init)]
37        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
38
39        #[cfg(feature = "CKRecordZoneID")]
40        #[unsafe(method(initWithRecordZoneIDs:configurationsByRecordZoneID:))]
41        #[unsafe(method_family = init)]
42        pub unsafe fn initWithRecordZoneIDs_configurationsByRecordZoneID(
43            this: Allocated<Self>,
44            record_zone_i_ds: &NSArray<CKRecordZoneID>,
45            configurations_by_record_zone_id: Option<
46                &NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration>,
47            >,
48        ) -> Retained<Self>;
49
50        #[cfg(feature = "CKRecordZoneID")]
51        /// This property is not atomic.
52        ///
53        /// # Safety
54        ///
55        /// This might not be thread-safe.
56        #[unsafe(method(recordZoneIDs))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn recordZoneIDs(&self) -> Option<Retained<NSArray<CKRecordZoneID>>>;
59
60        #[cfg(feature = "CKRecordZoneID")]
61        /// Setter for [`recordZoneIDs`][Self::recordZoneIDs].
62        ///
63        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
64        ///
65        /// # Safety
66        ///
67        /// This might not be thread-safe.
68        #[unsafe(method(setRecordZoneIDs:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn setRecordZoneIDs(&self, record_zone_i_ds: Option<&NSArray<CKRecordZoneID>>);
71
72        #[cfg(feature = "CKRecordZoneID")]
73        /// This property is not atomic.
74        ///
75        /// # Safety
76        ///
77        /// This might not be thread-safe.
78        #[unsafe(method(configurationsByRecordZoneID))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn configurationsByRecordZoneID(
81            &self,
82        ) -> Option<Retained<NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration>>>;
83
84        #[cfg(feature = "CKRecordZoneID")]
85        /// Setter for [`configurationsByRecordZoneID`][Self::configurationsByRecordZoneID].
86        ///
87        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
88        ///
89        /// # Safety
90        ///
91        /// This might not be thread-safe.
92        #[unsafe(method(setConfigurationsByRecordZoneID:))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn setConfigurationsByRecordZoneID(
95            &self,
96            configurations_by_record_zone_id: Option<
97                &NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesConfiguration>,
98            >,
99        );
100
101        /// Determines if the operation should fetch all changes from the server before completing.
102        ///
103        ///
104        /// When set to YES, this operation will send repeated requests to the server until all record changes have been fetched.
105        /// `recordZoneChangeTokensUpdatedBlock`will be invoked periodically, to give clients an updated change token so that already-fetched record changes don't need to be re-fetched on a subsequent operation.
106        /// `recordZoneFetchCompletionBlock`will only be called once and
107        /// `moreComing`will always be NO.
108        ///
109        /// When set to NO, it is the responsibility of the caller to issue subsequent fetch-changes operations when
110        /// `moreComing`is YES in a
111        /// `recordZoneFetchCompletionBlock`invocation.
112        ///
113        /// `fetchAllChanges`is YES by default
114        ///
115        /// This property is not atomic.
116        ///
117        /// # Safety
118        ///
119        /// This might not be thread-safe.
120        #[unsafe(method(fetchAllChanges))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn fetchAllChanges(&self) -> bool;
123
124        /// Setter for [`fetchAllChanges`][Self::fetchAllChanges].
125        ///
126        /// # Safety
127        ///
128        /// This might not be thread-safe.
129        #[unsafe(method(setFetchAllChanges:))]
130        #[unsafe(method_family = none)]
131        pub unsafe fn setFetchAllChanges(&self, fetch_all_changes: bool);
132
133        #[cfg(all(feature = "CKRecord", feature = "block2"))]
134        /// If the replacement callback
135        /// `recordWasChangedBlock`is set, this callback block is ignored.
136        /// Each
137        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
138        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
139        /// should not be concurrently used outside of blocks assigned to this operation.
140        ///
141        /// This property is not atomic.
142        ///
143        /// # Safety
144        ///
145        /// - The returned block's argument must be a valid pointer.
146        /// - This might not be thread-safe.
147        #[deprecated = "Use recordWasChangedBlock instead, which surfaces per-record errors"]
148        #[unsafe(method(recordChangedBlock))]
149        #[unsafe(method_family = none)]
150        pub unsafe fn recordChangedBlock(&self)
151            -> *mut block2::DynBlock<dyn Fn(NonNull<CKRecord>)>;
152
153        #[cfg(all(feature = "CKRecord", feature = "block2"))]
154        /// Setter for [`recordChangedBlock`][Self::recordChangedBlock].
155        ///
156        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
157        ///
158        /// # Safety
159        ///
160        /// This might not be thread-safe.
161        #[deprecated = "Use recordWasChangedBlock instead, which surfaces per-record errors"]
162        #[unsafe(method(setRecordChangedBlock:))]
163        #[unsafe(method_family = none)]
164        pub unsafe fn setRecordChangedBlock(
165            &self,
166            record_changed_block: Option<&block2::DynBlock<dyn Fn(NonNull<CKRecord>)>>,
167        );
168
169        #[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
170        /// If a record fails in post-processing (say, a network failure materializing a
171        /// `CKAsset`record field), the per-record error will be passed here.
172        /// Each
173        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
174        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
175        /// should not be concurrently used outside of blocks assigned to this operation.
176        ///
177        /// This property is not atomic.
178        ///
179        /// # Safety
180        ///
181        /// - The returned block's argument 1 must be a valid pointer.
182        /// - The returned block's argument 2 must be a valid pointer or null.
183        /// - The returned block's argument 3 must be a valid pointer or null.
184        /// - This might not be thread-safe.
185        #[unsafe(method(recordWasChangedBlock))]
186        #[unsafe(method_family = none)]
187        pub unsafe fn recordWasChangedBlock(
188            &self,
189        ) -> *mut block2::DynBlock<dyn Fn(NonNull<CKRecordID>, *mut CKRecord, *mut NSError)>;
190
191        #[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
192        /// Setter for [`recordWasChangedBlock`][Self::recordWasChangedBlock].
193        ///
194        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
195        ///
196        /// # Safety
197        ///
198        /// This might not be thread-safe.
199        #[unsafe(method(setRecordWasChangedBlock:))]
200        #[unsafe(method_family = none)]
201        pub unsafe fn setRecordWasChangedBlock(
202            &self,
203            record_was_changed_block: Option<
204                &block2::DynBlock<dyn Fn(NonNull<CKRecordID>, *mut CKRecord, *mut NSError)>,
205            >,
206        );
207
208        #[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
209        /// Each
210        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
211        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
212        /// should not be concurrently used outside of blocks assigned to this operation.
213        ///
214        /// This property is not atomic.
215        ///
216        /// # Safety
217        ///
218        /// - The returned block's argument 1 must be a valid pointer.
219        /// - The returned block's argument 2 must be a valid pointer.
220        /// - This might not be thread-safe.
221        #[unsafe(method(recordWithIDWasDeletedBlock))]
222        #[unsafe(method_family = none)]
223        pub unsafe fn recordWithIDWasDeletedBlock(
224            &self,
225        ) -> *mut block2::DynBlock<dyn Fn(NonNull<CKRecordID>, NonNull<CKRecordType>)>;
226
227        #[cfg(all(feature = "CKRecord", feature = "CKRecordID", feature = "block2"))]
228        /// Setter for [`recordWithIDWasDeletedBlock`][Self::recordWithIDWasDeletedBlock].
229        ///
230        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
231        ///
232        /// # Safety
233        ///
234        /// This might not be thread-safe.
235        #[unsafe(method(setRecordWithIDWasDeletedBlock:))]
236        #[unsafe(method_family = none)]
237        pub unsafe fn setRecordWithIDWasDeletedBlock(
238            &self,
239            record_with_id_was_deleted_block: Option<
240                &block2::DynBlock<dyn Fn(NonNull<CKRecordID>, NonNull<CKRecordType>)>,
241            >,
242        );
243
244        #[cfg(all(
245            feature = "CKRecordZoneID",
246            feature = "CKServerChangeToken",
247            feature = "block2"
248        ))]
249        /// Clients are responsible for saving this per-recordZone
250        /// `serverChangeToken`and passing it in to the next call to
251        /// `CKFetchRecordZoneChangesOperation.`Note that a fetch can fail partway. If that happens, an updated change token may be returned in this block so that already fetched records don't need to be re-downloaded on a subsequent operation.
252        /// `recordZoneChangeTokensUpdatedBlock`will not be called after the last batch of changes in a zone; the
253        /// `recordZoneFetchCompletionBlock`block will be called instead.
254        /// The
255        /// `clientChangeTokenData`from the most recent
256        /// `CKModifyRecordsOperation`issued on this zone is also returned, or nil if none was provided.
257        /// If the server returns a
258        /// `CKErrorChangeTokenExpired`error, the
259        /// `serverChangeToken`used for this record zone when initting this operation was too old and the client should toss its local cache and re-fetch the changes in this record zone starting with a nil
260        /// `serverChangeToken.``recordZoneChangeTokensUpdatedBlock`will not be called if
261        /// `fetchAllChanges`is NO.
262        /// Each
263        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
264        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
265        /// should not be concurrently used outside of blocks assigned to this operation.
266        ///
267        /// This property is not atomic.
268        ///
269        /// # Safety
270        ///
271        /// - The returned block's argument 1 must be a valid pointer.
272        /// - The returned block's argument 2 must be a valid pointer or null.
273        /// - The returned block's argument 3 must be a valid pointer or null.
274        /// - This might not be thread-safe.
275        #[unsafe(method(recordZoneChangeTokensUpdatedBlock))]
276        #[unsafe(method_family = none)]
277        pub unsafe fn recordZoneChangeTokensUpdatedBlock(
278            &self,
279        ) -> *mut block2::DynBlock<
280            dyn Fn(NonNull<CKRecordZoneID>, *mut CKServerChangeToken, *mut NSData),
281        >;
282
283        #[cfg(all(
284            feature = "CKRecordZoneID",
285            feature = "CKServerChangeToken",
286            feature = "block2"
287        ))]
288        /// Setter for [`recordZoneChangeTokensUpdatedBlock`][Self::recordZoneChangeTokensUpdatedBlock].
289        ///
290        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
291        ///
292        /// # Safety
293        ///
294        /// This might not be thread-safe.
295        #[unsafe(method(setRecordZoneChangeTokensUpdatedBlock:))]
296        #[unsafe(method_family = none)]
297        pub unsafe fn setRecordZoneChangeTokensUpdatedBlock(
298            &self,
299            record_zone_change_tokens_updated_block: Option<
300                &block2::DynBlock<
301                    dyn Fn(NonNull<CKRecordZoneID>, *mut CKServerChangeToken, *mut NSData),
302                >,
303            >,
304        );
305
306        #[cfg(all(
307            feature = "CKRecordZoneID",
308            feature = "CKServerChangeToken",
309            feature = "block2"
310        ))]
311        /// This property is not atomic.
312        ///
313        /// # Safety
314        ///
315        /// - The returned block's argument 1 must be a valid pointer.
316        /// - The returned block's argument 2 must be a valid pointer or null.
317        /// - The returned block's argument 3 must be a valid pointer or null.
318        /// - The returned block's argument 5 must be a valid pointer or null.
319        /// - This might not be thread-safe.
320        #[unsafe(method(recordZoneFetchCompletionBlock))]
321        #[unsafe(method_family = none)]
322        pub unsafe fn recordZoneFetchCompletionBlock(
323            &self,
324        ) -> *mut block2::DynBlock<
325            dyn Fn(
326                NonNull<CKRecordZoneID>,
327                *mut CKServerChangeToken,
328                *mut NSData,
329                Bool,
330                *mut NSError,
331            ),
332        >;
333
334        #[cfg(all(
335            feature = "CKRecordZoneID",
336            feature = "CKServerChangeToken",
337            feature = "block2"
338        ))]
339        /// Setter for [`recordZoneFetchCompletionBlock`][Self::recordZoneFetchCompletionBlock].
340        ///
341        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
342        ///
343        /// # Safety
344        ///
345        /// This might not be thread-safe.
346        #[unsafe(method(setRecordZoneFetchCompletionBlock:))]
347        #[unsafe(method_family = none)]
348        pub unsafe fn setRecordZoneFetchCompletionBlock(
349            &self,
350            record_zone_fetch_completion_block: Option<
351                &block2::DynBlock<
352                    dyn Fn(
353                        NonNull<CKRecordZoneID>,
354                        *mut CKServerChangeToken,
355                        *mut NSData,
356                        Bool,
357                        *mut NSError,
358                    ),
359                >,
360            >,
361        );
362
363        #[cfg(feature = "block2")]
364        /// This block is called when the operation completes.
365        ///
366        ///
367        /// `serverChangeToken-s`previously returned via a
368        /// `recordZoneChangeTokensUpdatedBlock`or
369        /// `recordZoneFetchCompletionBlock`invocation, along with the record changes that preceded it, are valid even if there is a subsequent
370        /// `operationError`If the error is
371        /// `CKErrorPartialFailure,`the error's userInfo dictionary contains a dictionary of recordIDs and zoneIDs to errors keyed off of
372        /// `CKPartialErrorsByItemIDKey.`Each
373        /// `CKOperation`instance has a private serial queue. This queue is used for all callback block invocations.
374        /// This block may share mutable state with other blocks assigned to this operation, but any such mutable state
375        /// should not be concurrently used outside of blocks assigned to this operation.
376        ///
377        /// This property is not atomic.
378        ///
379        /// # Safety
380        ///
381        /// - The returned block's argument must be a valid pointer or null.
382        /// - This might not be thread-safe.
383        #[unsafe(method(fetchRecordZoneChangesCompletionBlock))]
384        #[unsafe(method_family = none)]
385        pub unsafe fn fetchRecordZoneChangesCompletionBlock(
386            &self,
387        ) -> *mut block2::DynBlock<dyn Fn(*mut NSError)>;
388
389        #[cfg(feature = "block2")]
390        /// Setter for [`fetchRecordZoneChangesCompletionBlock`][Self::fetchRecordZoneChangesCompletionBlock].
391        ///
392        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
393        ///
394        /// # Safety
395        ///
396        /// This might not be thread-safe.
397        #[unsafe(method(setFetchRecordZoneChangesCompletionBlock:))]
398        #[unsafe(method_family = none)]
399        pub unsafe fn setFetchRecordZoneChangesCompletionBlock(
400            &self,
401            fetch_record_zone_changes_completion_block: Option<
402                &block2::DynBlock<dyn Fn(*mut NSError)>,
403            >,
404        );
405    );
406}
407
408/// Methods declared on superclass `NSObject`.
409#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
410impl CKFetchRecordZoneChangesOperation {
411    extern_methods!(
412        #[unsafe(method(new))]
413        #[unsafe(method_family = new)]
414        pub unsafe fn new() -> Retained<Self>;
415    );
416}
417
418/// Deprecated.
419#[cfg(all(feature = "CKDatabaseOperation", feature = "CKOperation"))]
420impl CKFetchRecordZoneChangesOperation {
421    extern_methods!(
422        #[cfg(feature = "CKRecordZoneID")]
423        #[deprecated]
424        #[unsafe(method(initWithRecordZoneIDs:optionsByRecordZoneID:))]
425        #[unsafe(method_family = init)]
426        pub unsafe fn initWithRecordZoneIDs_optionsByRecordZoneID(
427            this: Allocated<Self>,
428            record_zone_i_ds: &NSArray<CKRecordZoneID>,
429            options_by_record_zone_id: Option<
430                &NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesOptions>,
431            >,
432        ) -> Retained<Self>;
433
434        #[cfg(feature = "CKRecordZoneID")]
435        /// This property is not atomic.
436        ///
437        /// # Safety
438        ///
439        /// This might not be thread-safe.
440        #[deprecated]
441        #[unsafe(method(optionsByRecordZoneID))]
442        #[unsafe(method_family = none)]
443        pub unsafe fn optionsByRecordZoneID(
444            &self,
445        ) -> Option<Retained<NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesOptions>>>;
446
447        #[cfg(feature = "CKRecordZoneID")]
448        /// Setter for [`optionsByRecordZoneID`][Self::optionsByRecordZoneID].
449        ///
450        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
451        ///
452        /// # Safety
453        ///
454        /// This might not be thread-safe.
455        #[deprecated]
456        #[unsafe(method(setOptionsByRecordZoneID:))]
457        #[unsafe(method_family = none)]
458        pub unsafe fn setOptionsByRecordZoneID(
459            &self,
460            options_by_record_zone_id: Option<
461                &NSDictionary<CKRecordZoneID, CKFetchRecordZoneChangesOptions>,
462            >,
463        );
464    );
465}
466
467extern_class!(
468    /// [Apple's documentation](https://developer.apple.com/documentation/cloudkit/ckfetchrecordzonechangesconfiguration?language=objc)
469    #[unsafe(super(NSObject))]
470    #[derive(Debug, PartialEq, Eq, Hash)]
471    pub struct CKFetchRecordZoneChangesConfiguration;
472);
473
474extern_conformance!(
475    unsafe impl NSCoding for CKFetchRecordZoneChangesConfiguration {}
476);
477
478extern_conformance!(
479    unsafe impl NSCopying for CKFetchRecordZoneChangesConfiguration {}
480);
481
482unsafe impl CopyingHelper for CKFetchRecordZoneChangesConfiguration {
483    type Result = Self;
484}
485
486extern_conformance!(
487    unsafe impl NSObjectProtocol for CKFetchRecordZoneChangesConfiguration {}
488);
489
490extern_conformance!(
491    unsafe impl NSSecureCoding for CKFetchRecordZoneChangesConfiguration {}
492);
493
494impl CKFetchRecordZoneChangesConfiguration {
495    extern_methods!(
496        #[cfg(feature = "CKServerChangeToken")]
497        #[unsafe(method(previousServerChangeToken))]
498        #[unsafe(method_family = none)]
499        pub unsafe fn previousServerChangeToken(&self) -> Option<Retained<CKServerChangeToken>>;
500
501        #[cfg(feature = "CKServerChangeToken")]
502        /// Setter for [`previousServerChangeToken`][Self::previousServerChangeToken].
503        ///
504        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
505        #[unsafe(method(setPreviousServerChangeToken:))]
506        #[unsafe(method_family = none)]
507        pub unsafe fn setPreviousServerChangeToken(
508            &self,
509            previous_server_change_token: Option<&CKServerChangeToken>,
510        );
511
512        #[unsafe(method(resultsLimit))]
513        #[unsafe(method_family = none)]
514        pub unsafe fn resultsLimit(&self) -> NSUInteger;
515
516        /// Setter for [`resultsLimit`][Self::resultsLimit].
517        #[unsafe(method(setResultsLimit:))]
518        #[unsafe(method_family = none)]
519        pub unsafe fn setResultsLimit(&self, results_limit: NSUInteger);
520
521        #[cfg(feature = "CKRecord")]
522        /// Declares which user-defined keys should be fetched and added to the resulting CKRecords.
523        ///
524        ///
525        /// If nil, declares the entire record should be downloaded. If set to an empty array, declares that no user fields should be downloaded.
526        /// Defaults to
527        /// `nil.`
528        #[unsafe(method(desiredKeys))]
529        #[unsafe(method_family = none)]
530        pub unsafe fn desiredKeys(&self) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
531
532        #[cfg(feature = "CKRecord")]
533        /// Setter for [`desiredKeys`][Self::desiredKeys].
534        ///
535        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
536        #[unsafe(method(setDesiredKeys:))]
537        #[unsafe(method_family = none)]
538        pub unsafe fn setDesiredKeys(&self, desired_keys: Option<&NSArray<CKRecordFieldKey>>);
539    );
540}
541
542/// Methods declared on superclass `NSObject`.
543impl CKFetchRecordZoneChangesConfiguration {
544    extern_methods!(
545        #[unsafe(method(init))]
546        #[unsafe(method_family = init)]
547        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
548
549        #[unsafe(method(new))]
550        #[unsafe(method_family = new)]
551        pub unsafe fn new() -> Retained<Self>;
552    );
553}
554
555extern_class!(
556    /// [Apple's documentation](https://developer.apple.com/documentation/cloudkit/ckfetchrecordzonechangesoptions?language=objc)
557    #[unsafe(super(NSObject))]
558    #[derive(Debug, PartialEq, Eq, Hash)]
559    #[deprecated]
560    pub struct CKFetchRecordZoneChangesOptions;
561);
562
563extern_conformance!(
564    unsafe impl NSCoding for CKFetchRecordZoneChangesOptions {}
565);
566
567extern_conformance!(
568    unsafe impl NSCopying for CKFetchRecordZoneChangesOptions {}
569);
570
571unsafe impl CopyingHelper for CKFetchRecordZoneChangesOptions {
572    type Result = Self;
573}
574
575extern_conformance!(
576    unsafe impl NSObjectProtocol for CKFetchRecordZoneChangesOptions {}
577);
578
579extern_conformance!(
580    unsafe impl NSSecureCoding for CKFetchRecordZoneChangesOptions {}
581);
582
583impl CKFetchRecordZoneChangesOptions {
584    extern_methods!(
585        #[cfg(feature = "CKServerChangeToken")]
586        #[deprecated]
587        #[unsafe(method(previousServerChangeToken))]
588        #[unsafe(method_family = none)]
589        pub unsafe fn previousServerChangeToken(&self) -> Option<Retained<CKServerChangeToken>>;
590
591        #[cfg(feature = "CKServerChangeToken")]
592        /// Setter for [`previousServerChangeToken`][Self::previousServerChangeToken].
593        ///
594        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
595        #[deprecated]
596        #[unsafe(method(setPreviousServerChangeToken:))]
597        #[unsafe(method_family = none)]
598        pub unsafe fn setPreviousServerChangeToken(
599            &self,
600            previous_server_change_token: Option<&CKServerChangeToken>,
601        );
602
603        #[deprecated]
604        #[unsafe(method(resultsLimit))]
605        #[unsafe(method_family = none)]
606        pub unsafe fn resultsLimit(&self) -> NSUInteger;
607
608        /// Setter for [`resultsLimit`][Self::resultsLimit].
609        #[deprecated]
610        #[unsafe(method(setResultsLimit:))]
611        #[unsafe(method_family = none)]
612        pub unsafe fn setResultsLimit(&self, results_limit: NSUInteger);
613
614        #[cfg(feature = "CKRecord")]
615        #[deprecated]
616        #[unsafe(method(desiredKeys))]
617        #[unsafe(method_family = none)]
618        pub unsafe fn desiredKeys(&self) -> Option<Retained<NSArray<CKRecordFieldKey>>>;
619
620        #[cfg(feature = "CKRecord")]
621        /// Setter for [`desiredKeys`][Self::desiredKeys].
622        ///
623        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
624        #[deprecated]
625        #[unsafe(method(setDesiredKeys:))]
626        #[unsafe(method_family = none)]
627        pub unsafe fn setDesiredKeys(&self, desired_keys: Option<&NSArray<CKRecordFieldKey>>);
628    );
629}
630
631/// Methods declared on superclass `NSObject`.
632impl CKFetchRecordZoneChangesOptions {
633    extern_methods!(
634        #[unsafe(method(init))]
635        #[unsafe(method_family = init)]
636        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
637
638        #[unsafe(method(new))]
639        #[unsafe(method_family = new)]
640        pub unsafe fn new() -> Retained<Self>;
641    );
642}