objc2_exposure_notification/generated/
ENCommon.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 "C" {
11    /// NSError domain for Exposure Notification errors.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enerrordomain?language=objc)
14    pub static ENErrorDomain: &'static NSErrorDomain;
15}
16
17/// Error codes used with ENErrorDomain.
18///
19/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enerrorcode?language=objc)
20// NS_ERROR_ENUM
21#[repr(transparent)]
22#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
23pub struct ENErrorCode(pub NSInteger);
24impl ENErrorCode {
25    #[doc(alias = "ENErrorCodeUnknown")]
26    pub const Unknown: Self = Self(1);
27    /// Underlying failure with an unknown cause.
28    #[doc(alias = "ENErrorCodeBadParameter")]
29    pub const BadParameter: Self = Self(2);
30    /// Missing or incorrect parameter.
31    #[doc(alias = "ENErrorCodeNotEntitled")]
32    pub const NotEntitled: Self = Self(3);
33    /// Calling process doesn't have the correct entitlement.
34    #[doc(alias = "ENErrorCodeNotAuthorized")]
35    pub const NotAuthorized: Self = Self(4);
36    /// User denied this process access to Exposure Notification functionality.
37    #[doc(alias = "ENErrorCodeUnsupported")]
38    pub const Unsupported: Self = Self(5);
39    /// Operation is not supported.
40    #[doc(alias = "ENErrorCodeInvalidated")]
41    pub const Invalidated: Self = Self(6);
42    /// Invalidate was called before the operation completed normally.
43    #[doc(alias = "ENErrorCodeBluetoothOff")]
44    pub const BluetoothOff: Self = Self(7);
45    /// Bluetooth was turned off the by user.
46    #[doc(alias = "ENErrorCodeInsufficientStorage")]
47    pub const InsufficientStorage: Self = Self(8);
48    /// Insufficient storage space to enable Exposure Notification.
49    #[doc(alias = "ENErrorCodeNotEnabled")]
50    pub const NotEnabled: Self = Self(9);
51    /// Exposure Notification has not been enabled.
52    #[doc(alias = "ENErrorCodeAPIMisuse")]
53    pub const APIMisuse: Self = Self(10);
54    /// The API was used incorrectly.
55    #[doc(alias = "ENErrorCodeInternal")]
56    pub const Internal: Self = Self(11);
57    /// Internal error. This indicates a bug in this framework.
58    #[doc(alias = "ENErrorCodeInsufficientMemory")]
59    pub const InsufficientMemory: Self = Self(12);
60    /// Not enough memory to perform an operation.
61    #[doc(alias = "ENErrorCodeRateLimited")]
62    pub const RateLimited: Self = Self(13);
63    /// API called too frequently. See API for acceptable frequency.
64    #[doc(alias = "ENErrorCodeRestricted")]
65    pub const Restricted: Self = Self(14);
66    /// Exposure Notification is disabled due to system policies.
67    #[doc(alias = "ENErrorCodeBadFormat")]
68    pub const BadFormat: Self = Self(15);
69    /// File or data format problem.
70    #[doc(alias = "ENErrorCodeDataInaccessible")]
71    pub const DataInaccessible: Self = Self(16);
72    /// The device must be unlocked before data is accessible.
73    #[doc(alias = "ENErrorCodeTravelStatusNotAvailable")]
74    pub const TravelStatusNotAvailable: Self = Self(17);
75}
76
77unsafe impl Encode for ENErrorCode {
78    const ENCODING: Encoding = NSInteger::ENCODING;
79}
80
81unsafe impl RefEncode for ENErrorCode {
82    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
83}
84
85/// Type for returning NSError's from functions. Avoids long and repetitious method signatures.
86///
87/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enerrorouttype?language=objc)
88pub type ENErrorOutType = *mut *mut NSError;
89
90/// Attenuation of a radio signal. This is the Advertised Transmit Power - Measured RSSI.
91///
92/// Note: The attenuation value may be misleading because more attenuation doesn’t necessarily mean the device is farther
93/// away. For example, two people could be very close and facing each other with their phones in their back pockets. This
94/// may report higher attenuation (i.e. weaker received signal) even though the individuals are very close together.
95///
96/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enattenuation?language=objc)
97pub type ENAttenuation = u8;
98
99/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enattenuationmin?language=objc)
100pub const ENAttenuationMin: c_uint = 0;
101/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enattenuationmax?language=objc)
102pub const ENAttenuationMax: c_uint = 0xFF;
103
104/// Indicates the status of authorization for the app.
105///
106/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enauthorizationstatus?language=objc)
107// NS_ENUM
108#[repr(transparent)]
109#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
110pub struct ENAuthorizationStatus(pub NSInteger);
111impl ENAuthorizationStatus {
112    /// Authorization status has not yet been determined.
113    /// This status means the user has not been prompted yet. Using the API in this state may prompt the user.
114    #[doc(alias = "ENAuthorizationStatusUnknown")]
115    pub const Unknown: Self = Self(0);
116    /// This app is not authorized to use Exposure Notification. The user cannot change this app's authorization status.
117    /// This status may be due to active restrictions, such as parental controls being in place.
118    #[doc(alias = "ENAuthorizationStatusRestricted")]
119    pub const Restricted: Self = Self(1);
120    /// The user denied authorization for this app.
121    #[doc(alias = "ENAuthorizationStatusNotAuthorized")]
122    pub const NotAuthorized: Self = Self(2);
123    /// The user has authorized this app to use Exposure Notification.
124    #[doc(alias = "ENAuthorizationStatusAuthorized")]
125    pub const Authorized: Self = Self(3);
126}
127
128unsafe impl Encode for ENAuthorizationStatus {
129    const ENCODING: Encoding = NSInteger::ENCODING;
130}
131
132unsafe impl RefEncode for ENAuthorizationStatus {
133    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
134}
135
136/// Confidence in calibration data.
137///
138/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/encalibrationconfidence?language=objc)
139// NS_ENUM
140#[repr(transparent)]
141#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
142pub struct ENCalibrationConfidence(pub u8);
143impl ENCalibrationConfidence {
144    /// No calibration data.
145    #[doc(alias = "ENCalibrationConfidenceLowest")]
146    pub const Lowest: Self = Self(0);
147    /// Using average calibration over phones of this manufacturer or Android beacons from EN API version
148    /// <
149    /// 1.5.
150    #[doc(alias = "ENCalibrationConfidenceLow")]
151    pub const Low: Self = Self(1);
152    /// Using single-antenna orientation for a similar phone model or iPhone beacons from EN API version
153    /// <
154    /// 1.5.
155    #[doc(alias = "ENCalibrationConfidenceMedium")]
156    pub const Medium: Self = Self(2);
157    /// Determined using significant calibration data for this model.
158    #[doc(alias = "ENCalibrationConfidenceHigh")]
159    pub const High: Self = Self(3);
160}
161
162unsafe impl Encode for ENCalibrationConfidence {
163    const ENCODING: Encoding = u8::ENCODING;
164}
165
166unsafe impl RefEncode for ENCalibrationConfidence {
167    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
168}
169
170/// The value used when days since onset of symptoms is unspecified.
171///
172/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/endayssinceonsetofsymptomsunknown?language=objc)
173pub static ENDaysSinceOnsetOfSymptomsUnknown: NSInteger = NSIntegerMax as _;
174
175/// How positive diagnosis was reported.
176///
177/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/endiagnosisreporttype?language=objc)
178// NS_ENUM
179#[repr(transparent)]
180#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
181pub struct ENDiagnosisReportType(pub u32);
182impl ENDiagnosisReportType {
183    /// Diagnosis type unknown or not available.
184    #[doc(alias = "ENDiagnosisReportTypeUnknown")]
185    pub const Unknown: Self = Self(0);
186    /// Confirmed test.
187    #[doc(alias = "ENDiagnosisReportTypeConfirmedTest")]
188    pub const ConfirmedTest: Self = Self(1);
189    /// Confirmed clinical diagnosis.
190    #[doc(alias = "ENDiagnosisReportTypeConfirmedClinicalDiagnosis")]
191    pub const ConfirmedClinicalDiagnosis: Self = Self(2);
192    /// User reported positive diagnosis without health authority involvement.
193    #[doc(alias = "ENDiagnosisReportTypeSelfReported")]
194    pub const SelfReported: Self = Self(3);
195    /// Person determined to be positive based on exposure to another person confirmed to be positive. This report type
196    /// is reserved for future use and keys with this report type are not matched by iOS.
197    #[doc(alias = "ENDiagnosisReportTypeRecursive")]
198    pub const Recursive: Self = Self(4);
199    /// Negative test. This is mainly to negate a previous self report or clinical diagnosis that may have been in error.
200    #[doc(alias = "ENDiagnosisReportTypeRevoked")]
201    pub const Revoked: Self = Self(5);
202}
203
204unsafe impl Encode for ENDiagnosisReportType {
205    const ENCODING: Encoding = u32::ENCODING;
206}
207
208unsafe impl RefEncode for ENDiagnosisReportType {
209    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
210}
211
212/// How infectious based on days since onset of symptoms.
213///
214/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/eninfectiousness?language=objc)
215// NS_ENUM
216#[repr(transparent)]
217#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
218pub struct ENInfectiousness(pub u32);
219impl ENInfectiousness {
220    #[doc(alias = "ENInfectiousnessNone")]
221    pub const None: Self = Self(0);
222    /// Never returned through the API, but used for configuration.
223    #[doc(alias = "ENInfectiousnessStandard")]
224    pub const Standard: Self = Self(1);
225    /// Never returned through the API, but used for configuration.
226    #[doc(alias = "ENInfectiousnessHigh")]
227    pub const High: Self = Self(2);
228}
229
230unsafe impl Encode for ENInfectiousness {
231    const ENCODING: Encoding = u32::ENCODING;
232}
233
234unsafe impl RefEncode for ENInfectiousness {
235    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
236}
237
238/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/envariantofconcerntype?language=objc)
239// NS_ENUM
240#[repr(transparent)]
241#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
242pub struct ENVariantOfConcernType(pub u32);
243impl ENVariantOfConcernType {
244    #[doc(alias = "ENVariantOfConcernTypeUnknown")]
245    pub const TypeUnknown: Self = Self(0);
246    #[doc(alias = "ENVariantOfConcernType1")]
247    pub const Type1: Self = Self(1);
248    #[doc(alias = "ENVariantOfConcernType2")]
249    pub const Type2: Self = Self(2);
250    #[doc(alias = "ENVariantOfConcernType3")]
251    pub const Type3: Self = Self(3);
252    #[doc(alias = "ENVariantOfConcernType4")]
253    pub const Type4: Self = Self(4);
254}
255
256unsafe impl Encode for ENVariantOfConcernType {
257    const ENCODING: Encoding = u32::ENCODING;
258}
259
260unsafe impl RefEncode for ENVariantOfConcernType {
261    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
262}
263
264/// ENIntervalNumber (ENIN)
265///
266/// A number for each 10 minute window that is shared between all devices participating in the protocol.
267/// These time windows are based Unix Time (epoch 1970-01-01 00:00:00). It's calculated as:
268///
269/// ENIN =
270/// <Seconds
271/// since 1970-01-01 00:00:00> / ( 60 * 10 )
272///
273/// It's encoded as an unsigned 32-bit (uint32_t), little endian value.
274///
275/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enintervalnumber?language=objc)
276pub type ENIntervalNumber = u32;
277
278/// Represents a risk level, ranging from 0-7.
279///
280/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enrisklevel?language=objc)
281pub type ENRiskLevel = u8;
282
283/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enrisklevelmin?language=objc)
284pub const ENRiskLevelMin: c_uint = 0;
285/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enrisklevelmax?language=objc)
286pub const ENRiskLevelMax: c_uint = 7;
287
288/// The value, ranging from 0 to 8, that the app assigns to each Risk Level in each of the Risk Level Parameters.
289///
290/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enrisklevelvalue?language=objc)
291pub type ENRiskLevelValue = u8;
292
293/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enrisklevelvaluemin?language=objc)
294pub const ENRiskLevelValueMin: c_uint = 0;
295/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enrisklevelvaluemax?language=objc)
296pub const ENRiskLevelValueMax: c_uint = 8;
297
298/// Represents estimated risk calculated by a scoring algorithm. Range is 0-255. 255 is the highest risk.
299///
300/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enriskscore?language=objc)
301pub type ENRiskScore = u8;
302
303/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enriskscoremin?language=objc)
304pub const ENRiskScoreMin: c_uint = 0;
305/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enriskscoremax?language=objc)
306pub const ENRiskScoreMax: c_uint = 255;
307
308/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enriskweightdefault?language=objc)
309pub const ENRiskWeightDefault: c_uint = 1;
310/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enriskweightdefaultv2?language=objc)
311pub const ENRiskWeightDefaultV2: c_uint = 100;
312/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enriskweightmin?language=objc)
313pub const ENRiskWeightMin: c_uint = 0;
314/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enriskweightmax?language=objc)
315pub const ENRiskWeightMax: c_uint = 100;
316/// [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enriskweightmaxv2?language=objc)
317pub const ENRiskWeightMaxV2: c_uint = 250;
318
319/// Invoked when an operation completes. Error is nil for success or non-nil if an error occurred.
320///
321/// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enerrorhandler?language=objc)
322#[cfg(feature = "block2")]
323pub type ENErrorHandler = *mut block2::DynBlock<dyn Fn(*mut NSError)>;
324
325extern_class!(
326    /// Configuration parameters for exposure detection.
327    ///
328    /// Configuration parameters are used to calculate an exposure duration for each exposure using the following formula.
329    ///
330    /// exposureDuration =
331    /// ( ( immediateDuration * immediateDurationWeight ) +
332    /// ( nearDuration      * nearDurationWeight ) +
333    /// ( mediumDuration    * mediumDurationWeight ) +
334    /// ( otherDuration     * otherDurationWeight ) )
335    /// infectiousnessWeight )
336    /// reportTypeWeight )
337    ///
338    /// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enexposureconfiguration?language=objc)
339    #[unsafe(super(NSObject))]
340    #[derive(Debug, PartialEq, Eq, Hash)]
341    pub struct ENExposureConfiguration;
342);
343
344extern_conformance!(
345    unsafe impl NSObjectProtocol for ENExposureConfiguration {}
346);
347
348impl ENExposureConfiguration {
349    extern_methods!(
350        /// Weights to apply to durations at each proximity level based on attenuation. Range is 0-250%.
351        #[unsafe(method(immediateDurationWeight))]
352        #[unsafe(method_family = none)]
353        pub unsafe fn immediateDurationWeight(&self) -> c_double;
354
355        /// Setter for [`immediateDurationWeight`][Self::immediateDurationWeight].
356        #[unsafe(method(setImmediateDurationWeight:))]
357        #[unsafe(method_family = none)]
358        pub unsafe fn setImmediateDurationWeight(&self, immediate_duration_weight: c_double);
359
360        #[unsafe(method(nearDurationWeight))]
361        #[unsafe(method_family = none)]
362        pub unsafe fn nearDurationWeight(&self) -> c_double;
363
364        /// Setter for [`nearDurationWeight`][Self::nearDurationWeight].
365        #[unsafe(method(setNearDurationWeight:))]
366        #[unsafe(method_family = none)]
367        pub unsafe fn setNearDurationWeight(&self, near_duration_weight: c_double);
368
369        #[unsafe(method(mediumDurationWeight))]
370        #[unsafe(method_family = none)]
371        pub unsafe fn mediumDurationWeight(&self) -> c_double;
372
373        /// Setter for [`mediumDurationWeight`][Self::mediumDurationWeight].
374        #[unsafe(method(setMediumDurationWeight:))]
375        #[unsafe(method_family = none)]
376        pub unsafe fn setMediumDurationWeight(&self, medium_duration_weight: c_double);
377
378        #[unsafe(method(otherDurationWeight))]
379        #[unsafe(method_family = none)]
380        pub unsafe fn otherDurationWeight(&self) -> c_double;
381
382        /// Setter for [`otherDurationWeight`][Self::otherDurationWeight].
383        #[unsafe(method(setOtherDurationWeight:))]
384        #[unsafe(method_family = none)]
385        pub unsafe fn setOtherDurationWeight(&self, other_duration_weight: c_double);
386
387        /// Maps daysSinceOnsetOfSymptoms to infectiousness. Must be configured if using V2 scoring.
388        /// Key is a daysSinceOnsetOfSymptoms: -14 to 14. Value is an ENInfectiousness.
389        /// Defaults to ENInfectiousnessNone for days not specified.
390        /// If a value is set to ENInfectiousnessNone, diagnosis keys for it should be ignored.
391        #[unsafe(method(infectiousnessForDaysSinceOnsetOfSymptoms))]
392        #[unsafe(method_family = none)]
393        pub unsafe fn infectiousnessForDaysSinceOnsetOfSymptoms(
394            &self,
395        ) -> Option<Retained<NSDictionary<NSNumber, NSNumber>>>;
396
397        /// Setter for [`infectiousnessForDaysSinceOnsetOfSymptoms`][Self::infectiousnessForDaysSinceOnsetOfSymptoms].
398        #[unsafe(method(setInfectiousnessForDaysSinceOnsetOfSymptoms:))]
399        #[unsafe(method_family = none)]
400        pub unsafe fn setInfectiousnessForDaysSinceOnsetOfSymptoms(
401            &self,
402            infectiousness_for_days_since_onset_of_symptoms: Option<
403                &NSDictionary<NSNumber, NSNumber>,
404            >,
405        );
406
407        /// Weights to apply for infectiousness. Range is 0-250%.
408        #[unsafe(method(infectiousnessStandardWeight))]
409        #[unsafe(method_family = none)]
410        pub unsafe fn infectiousnessStandardWeight(&self) -> c_double;
411
412        /// Setter for [`infectiousnessStandardWeight`][Self::infectiousnessStandardWeight].
413        #[unsafe(method(setInfectiousnessStandardWeight:))]
414        #[unsafe(method_family = none)]
415        pub unsafe fn setInfectiousnessStandardWeight(
416            &self,
417            infectiousness_standard_weight: c_double,
418        );
419
420        #[unsafe(method(infectiousnessHighWeight))]
421        #[unsafe(method_family = none)]
422        pub unsafe fn infectiousnessHighWeight(&self) -> c_double;
423
424        /// Setter for [`infectiousnessHighWeight`][Self::infectiousnessHighWeight].
425        #[unsafe(method(setInfectiousnessHighWeight:))]
426        #[unsafe(method_family = none)]
427        pub unsafe fn setInfectiousnessHighWeight(&self, infectiousness_high_weight: c_double);
428
429        /// Weights to apply for each report type. Range is 0-250%.
430        #[unsafe(method(reportTypeConfirmedTestWeight))]
431        #[unsafe(method_family = none)]
432        pub unsafe fn reportTypeConfirmedTestWeight(&self) -> c_double;
433
434        /// Setter for [`reportTypeConfirmedTestWeight`][Self::reportTypeConfirmedTestWeight].
435        #[unsafe(method(setReportTypeConfirmedTestWeight:))]
436        #[unsafe(method_family = none)]
437        pub unsafe fn setReportTypeConfirmedTestWeight(
438            &self,
439            report_type_confirmed_test_weight: c_double,
440        );
441
442        #[unsafe(method(reportTypeConfirmedClinicalDiagnosisWeight))]
443        #[unsafe(method_family = none)]
444        pub unsafe fn reportTypeConfirmedClinicalDiagnosisWeight(&self) -> c_double;
445
446        /// Setter for [`reportTypeConfirmedClinicalDiagnosisWeight`][Self::reportTypeConfirmedClinicalDiagnosisWeight].
447        #[unsafe(method(setReportTypeConfirmedClinicalDiagnosisWeight:))]
448        #[unsafe(method_family = none)]
449        pub unsafe fn setReportTypeConfirmedClinicalDiagnosisWeight(
450            &self,
451            report_type_confirmed_clinical_diagnosis_weight: c_double,
452        );
453
454        #[unsafe(method(reportTypeSelfReportedWeight))]
455        #[unsafe(method_family = none)]
456        pub unsafe fn reportTypeSelfReportedWeight(&self) -> c_double;
457
458        /// Setter for [`reportTypeSelfReportedWeight`][Self::reportTypeSelfReportedWeight].
459        #[unsafe(method(setReportTypeSelfReportedWeight:))]
460        #[unsafe(method_family = none)]
461        pub unsafe fn setReportTypeSelfReportedWeight(
462            &self,
463            report_type_self_reported_weight: c_double,
464        );
465
466        #[unsafe(method(reportTypeRecursiveWeight))]
467        #[unsafe(method_family = none)]
468        pub unsafe fn reportTypeRecursiveWeight(&self) -> c_double;
469
470        /// Setter for [`reportTypeRecursiveWeight`][Self::reportTypeRecursiveWeight].
471        #[unsafe(method(setReportTypeRecursiveWeight:))]
472        #[unsafe(method_family = none)]
473        pub unsafe fn setReportTypeRecursiveWeight(&self, report_type_recursive_weight: c_double);
474
475        /// Maps scenarios when Report Type is not present into one of the available report types.
476        /// If this is set to ENDiagnosisReportTypeUnknown, the key will be ignored if it does not contain a report type.
477        #[unsafe(method(reportTypeNoneMap))]
478        #[unsafe(method_family = none)]
479        pub unsafe fn reportTypeNoneMap(&self) -> ENDiagnosisReportType;
480
481        /// Setter for [`reportTypeNoneMap`][Self::reportTypeNoneMap].
482        #[unsafe(method(setReportTypeNoneMap:))]
483        #[unsafe(method_family = none)]
484        pub unsafe fn setReportTypeNoneMap(&self, report_type_none_map: ENDiagnosisReportType);
485
486        /// Thresholds for calculating attenuationDurations. Defaults to [50, 70, 90].
487        ///
488        /// Index        |0    |1    |2
489        /// Variable    |X    |Y    |Z
490        #[unsafe(method(attenuationDurationThresholds))]
491        #[unsafe(method_family = none)]
492        pub unsafe fn attenuationDurationThresholds(&self) -> Retained<NSArray<NSNumber>>;
493
494        /// Setter for [`attenuationDurationThresholds`][Self::attenuationDurationThresholds].
495        #[unsafe(method(setAttenuationDurationThresholds:))]
496        #[unsafe(method_family = none)]
497        pub unsafe fn setAttenuationDurationThresholds(
498            &self,
499            attenuation_duration_thresholds: &NSArray<NSNumber>,
500        );
501
502        /// Exclude exposures with daysSinceLastExposure > this value. Defaults to 0 (don't filter).
503        #[unsafe(method(daysSinceLastExposureThreshold))]
504        #[unsafe(method_family = none)]
505        pub unsafe fn daysSinceLastExposureThreshold(&self) -> NSInteger;
506
507        /// Setter for [`daysSinceLastExposureThreshold`][Self::daysSinceLastExposureThreshold].
508        #[unsafe(method(setDaysSinceLastExposureThreshold:))]
509        #[unsafe(method_family = none)]
510        pub unsafe fn setDaysSinceLastExposureThreshold(
511            &self,
512            days_since_last_exposure_threshold: NSInteger,
513        );
514
515        /// Minimum risk score. Excludes exposure incidents with scores lower than this. Full range and not capped to ENRiskScore.
516        #[unsafe(method(minimumRiskScoreFullRange))]
517        #[unsafe(method_family = none)]
518        pub unsafe fn minimumRiskScoreFullRange(&self) -> c_double;
519
520        /// Setter for [`minimumRiskScoreFullRange`][Self::minimumRiskScoreFullRange].
521        #[unsafe(method(setMinimumRiskScoreFullRange:))]
522        #[unsafe(method_family = none)]
523        pub unsafe fn setMinimumRiskScoreFullRange(&self, minimum_risk_score_full_range: c_double);
524
525        #[unsafe(method(attenuationLevelValues))]
526        #[unsafe(method_family = none)]
527        pub unsafe fn attenuationLevelValues(&self) -> Retained<NSArray<NSNumber>>;
528
529        /// Setter for [`attenuationLevelValues`][Self::attenuationLevelValues].
530        #[unsafe(method(setAttenuationLevelValues:))]
531        #[unsafe(method_family = none)]
532        pub unsafe fn setAttenuationLevelValues(
533            &self,
534            attenuation_level_values: &NSArray<NSNumber>,
535        );
536
537        #[unsafe(method(attenuationWeight))]
538        #[unsafe(method_family = none)]
539        pub unsafe fn attenuationWeight(&self) -> c_double;
540
541        /// Setter for [`attenuationWeight`][Self::attenuationWeight].
542        #[unsafe(method(setAttenuationWeight:))]
543        #[unsafe(method_family = none)]
544        pub unsafe fn setAttenuationWeight(&self, attenuation_weight: c_double);
545
546        #[unsafe(method(daysSinceLastExposureLevelValues))]
547        #[unsafe(method_family = none)]
548        pub unsafe fn daysSinceLastExposureLevelValues(&self) -> Retained<NSArray<NSNumber>>;
549
550        /// Setter for [`daysSinceLastExposureLevelValues`][Self::daysSinceLastExposureLevelValues].
551        #[unsafe(method(setDaysSinceLastExposureLevelValues:))]
552        #[unsafe(method_family = none)]
553        pub unsafe fn setDaysSinceLastExposureLevelValues(
554            &self,
555            days_since_last_exposure_level_values: &NSArray<NSNumber>,
556        );
557
558        #[unsafe(method(daysSinceLastExposureWeight))]
559        #[unsafe(method_family = none)]
560        pub unsafe fn daysSinceLastExposureWeight(&self) -> c_double;
561
562        /// Setter for [`daysSinceLastExposureWeight`][Self::daysSinceLastExposureWeight].
563        #[unsafe(method(setDaysSinceLastExposureWeight:))]
564        #[unsafe(method_family = none)]
565        pub unsafe fn setDaysSinceLastExposureWeight(
566            &self,
567            days_since_last_exposure_weight: c_double,
568        );
569
570        #[unsafe(method(durationLevelValues))]
571        #[unsafe(method_family = none)]
572        pub unsafe fn durationLevelValues(&self) -> Retained<NSArray<NSNumber>>;
573
574        /// Setter for [`durationLevelValues`][Self::durationLevelValues].
575        #[unsafe(method(setDurationLevelValues:))]
576        #[unsafe(method_family = none)]
577        pub unsafe fn setDurationLevelValues(&self, duration_level_values: &NSArray<NSNumber>);
578
579        #[unsafe(method(durationWeight))]
580        #[unsafe(method_family = none)]
581        pub unsafe fn durationWeight(&self) -> c_double;
582
583        /// Setter for [`durationWeight`][Self::durationWeight].
584        #[unsafe(method(setDurationWeight:))]
585        #[unsafe(method_family = none)]
586        pub unsafe fn setDurationWeight(&self, duration_weight: c_double);
587
588        #[unsafe(method(metadata))]
589        #[unsafe(method_family = none)]
590        pub unsafe fn metadata(&self) -> Option<Retained<NSDictionary>>;
591
592        /// Setter for [`metadata`][Self::metadata].
593        #[unsafe(method(setMetadata:))]
594        #[unsafe(method_family = none)]
595        pub unsafe fn setMetadata(&self, metadata: Option<&NSDictionary>);
596
597        #[unsafe(method(minimumRiskScore))]
598        #[unsafe(method_family = none)]
599        pub unsafe fn minimumRiskScore(&self) -> ENRiskScore;
600
601        /// Setter for [`minimumRiskScore`][Self::minimumRiskScore].
602        #[unsafe(method(setMinimumRiskScore:))]
603        #[unsafe(method_family = none)]
604        pub unsafe fn setMinimumRiskScore(&self, minimum_risk_score: ENRiskScore);
605
606        #[unsafe(method(transmissionRiskLevelValues))]
607        #[unsafe(method_family = none)]
608        pub unsafe fn transmissionRiskLevelValues(&self) -> Retained<NSArray<NSNumber>>;
609
610        /// Setter for [`transmissionRiskLevelValues`][Self::transmissionRiskLevelValues].
611        #[unsafe(method(setTransmissionRiskLevelValues:))]
612        #[unsafe(method_family = none)]
613        pub unsafe fn setTransmissionRiskLevelValues(
614            &self,
615            transmission_risk_level_values: &NSArray<NSNumber>,
616        );
617
618        #[unsafe(method(transmissionRiskWeight))]
619        #[unsafe(method_family = none)]
620        pub unsafe fn transmissionRiskWeight(&self) -> c_double;
621
622        /// Setter for [`transmissionRiskWeight`][Self::transmissionRiskWeight].
623        #[unsafe(method(setTransmissionRiskWeight:))]
624        #[unsafe(method_family = none)]
625        pub unsafe fn setTransmissionRiskWeight(&self, transmission_risk_weight: c_double);
626    );
627}
628
629/// Methods declared on superclass `NSObject`.
630impl ENExposureConfiguration {
631    extern_methods!(
632        #[unsafe(method(init))]
633        #[unsafe(method_family = init)]
634        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
635
636        #[unsafe(method(new))]
637        #[unsafe(method_family = new)]
638        pub unsafe fn new() -> Retained<Self>;
639    );
640}
641
642extern_class!(
643    /// Summary of exposure info for a single day.
644    ///
645    /// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enexposuredaysummary?language=objc)
646    #[unsafe(super(NSObject))]
647    #[derive(Debug, PartialEq, Eq, Hash)]
648    pub struct ENExposureDaySummary;
649);
650
651extern_conformance!(
652    unsafe impl NSObjectProtocol for ENExposureDaySummary {}
653);
654
655impl ENExposureDaySummary {
656    extern_methods!(
657        /// Day the exposure occurred.
658        #[unsafe(method(date))]
659        #[unsafe(method_family = none)]
660        pub unsafe fn date(&self) -> Retained<NSDate>;
661
662        /// Summary of all exposures on this day of a specific diagnosis report type.
663        #[unsafe(method(confirmedTestSummary))]
664        #[unsafe(method_family = none)]
665        pub unsafe fn confirmedTestSummary(&self) -> Option<Retained<ENExposureSummaryItem>>;
666
667        #[unsafe(method(confirmedClinicalDiagnosisSummary))]
668        #[unsafe(method_family = none)]
669        pub unsafe fn confirmedClinicalDiagnosisSummary(
670            &self,
671        ) -> Option<Retained<ENExposureSummaryItem>>;
672
673        #[unsafe(method(recursiveSummary))]
674        #[unsafe(method_family = none)]
675        pub unsafe fn recursiveSummary(&self) -> Option<Retained<ENExposureSummaryItem>>;
676
677        #[unsafe(method(selfReportedSummary))]
678        #[unsafe(method_family = none)]
679        pub unsafe fn selfReportedSummary(&self) -> Option<Retained<ENExposureSummaryItem>>;
680
681        /// Summary of all exposures on this day.
682        #[unsafe(method(daySummary))]
683        #[unsafe(method_family = none)]
684        pub unsafe fn daySummary(&self) -> Retained<ENExposureSummaryItem>;
685    );
686}
687
688/// Methods declared on superclass `NSObject`.
689impl ENExposureDaySummary {
690    extern_methods!(
691        #[unsafe(method(init))]
692        #[unsafe(method_family = init)]
693        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
694
695        #[unsafe(method(new))]
696        #[unsafe(method_family = new)]
697        pub unsafe fn new() -> Retained<Self>;
698    );
699}
700
701extern_class!(
702    /// Summary of exposure detection.
703    ///
704    /// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enexposuredetectionsummary?language=objc)
705    #[unsafe(super(NSObject))]
706    #[derive(Debug, PartialEq, Eq, Hash)]
707    pub struct ENExposureDetectionSummary;
708);
709
710extern_conformance!(
711    unsafe impl NSObjectProtocol for ENExposureDetectionSummary {}
712);
713
714impl ENExposureDetectionSummary {
715    extern_methods!(
716        /// Array of durations in seconds at certain radio signal attenuations.
717        /// Array index 0: Sum of durations for all exposures when attenuation
718        /// <
719        /// = X
720        /// Array index 1: Sum of durations for all exposures when attenuation
721        /// <
722        /// = Y
723        /// Array index 2: Sum of durations for all exposures when attenuation
724        /// <
725        /// = Z
726        /// Array index 3: Sum of durations for all exposures when attenuation >  Z
727        /// X, Y, Z come from the attenuationDurationThresholds on the configuration object.
728        #[unsafe(method(attenuationDurations))]
729        #[unsafe(method_family = none)]
730        pub unsafe fn attenuationDurations(&self) -> Retained<NSArray<NSNumber>>;
731
732        /// Number of days since the most recent exposure. 0 = today, 1 = yesterday, etc. Only valid if matchedKeyCount > 0.
733        #[unsafe(method(daysSinceLastExposure))]
734        #[unsafe(method_family = none)]
735        pub unsafe fn daysSinceLastExposure(&self) -> NSInteger;
736
737        /// Number of diagnosis keys that matched.
738        #[unsafe(method(matchedKeyCount))]
739        #[unsafe(method_family = none)]
740        pub unsafe fn matchedKeyCount(&self) -> u64;
741
742        /// Highest risk score of all exposure incidents.
743        #[unsafe(method(maximumRiskScore))]
744        #[unsafe(method_family = none)]
745        pub unsafe fn maximumRiskScore(&self) -> ENRiskScore;
746
747        /// Highest risk score of all exposure incidents.
748        #[unsafe(method(maximumRiskScoreFullRange))]
749        #[unsafe(method_family = none)]
750        pub unsafe fn maximumRiskScoreFullRange(&self) -> c_double;
751
752        /// Metadata associated with the summary.
753        #[unsafe(method(metadata))]
754        #[unsafe(method_family = none)]
755        pub unsafe fn metadata(&self) -> Option<Retained<NSDictionary>>;
756
757        /// Sum of risk scores for all exposures. Summed using the full range risk scores before capping to ENRiskScore.
758        #[unsafe(method(riskScoreSumFullRange))]
759        #[unsafe(method_family = none)]
760        pub unsafe fn riskScoreSumFullRange(&self) -> c_double;
761
762        /// Summary of each day containing an exposure.
763        #[unsafe(method(daySummaries))]
764        #[unsafe(method_family = none)]
765        pub unsafe fn daySummaries(&self) -> Retained<NSArray<ENExposureDaySummary>>;
766    );
767}
768
769/// Methods declared on superclass `NSObject`.
770impl ENExposureDetectionSummary {
771    extern_methods!(
772        #[unsafe(method(init))]
773        #[unsafe(method_family = init)]
774        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
775
776        #[unsafe(method(new))]
777        #[unsafe(method_family = new)]
778        pub unsafe fn new() -> Retained<Self>;
779    );
780}
781
782extern_class!(
783    /// Info about an exposure.
784    ///
785    /// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enexposureinfo?language=objc)
786    #[unsafe(super(NSObject))]
787    #[derive(Debug, PartialEq, Eq, Hash)]
788    pub struct ENExposureInfo;
789);
790
791extern_conformance!(
792    unsafe impl NSObjectProtocol for ENExposureInfo {}
793);
794
795impl ENExposureInfo {
796    extern_methods!(
797        /// Array of durations in seconds at certain radio signal attenuations.
798        /// Array index 0: Sum of durations for this exposure when attenuation
799        /// <
800        /// = X
801        /// Array index 1: Sum of durations for this exposure when attenuation
802        /// <
803        /// = Y
804        /// Array index 2: Sum of durations for this exposure when attenuation
805        /// <
806        /// = Z
807        /// Array index 3: Sum of durations for this exposure when attenuation >  Z
808        /// X, Y, Z come from the attenuationDurationThresholds on the configuration object.
809        #[unsafe(method(attenuationDurations))]
810        #[unsafe(method_family = none)]
811        pub unsafe fn attenuationDurations(&self) -> Retained<NSArray<NSNumber>>;
812
813        /// Duration-weighted average of the attenuations associated with this exposure.
814        #[unsafe(method(attenuationValue))]
815        #[unsafe(method_family = none)]
816        pub unsafe fn attenuationValue(&self) -> ENAttenuation;
817
818        /// Date when the exposure occurred. This may have reduced precision, such as within 1 day of the actual time.
819        #[unsafe(method(date))]
820        #[unsafe(method_family = none)]
821        pub unsafe fn date(&self) -> Retained<NSDate>;
822
823        /// Number of days since the onset of symptoms. Defaults to ENDaysSinceOnsetOfSymptomsUnknown.
824        #[unsafe(method(daysSinceOnsetOfSymptoms))]
825        #[unsafe(method_family = none)]
826        pub unsafe fn daysSinceOnsetOfSymptoms(&self) -> NSInteger;
827
828        /// How positive diagnosis was reported.
829        #[unsafe(method(diagnosisReportType))]
830        #[unsafe(method_family = none)]
831        pub unsafe fn diagnosisReportType(&self) -> ENDiagnosisReportType;
832
833        /// Length of exposure in 5 minute increments with a 30 minute maximum.
834        #[unsafe(method(duration))]
835        #[unsafe(method_family = none)]
836        pub unsafe fn duration(&self) -> NSTimeInterval;
837
838        /// Metadata associated with the exposure.
839        #[unsafe(method(metadata))]
840        #[unsafe(method_family = none)]
841        pub unsafe fn metadata(&self) -> Option<Retained<NSDictionary>>;
842
843        /// Indicates the total risk calculated for this exposure incident. Capped to ENRiskScore range.
844        #[unsafe(method(totalRiskScore))]
845        #[unsafe(method_family = none)]
846        pub unsafe fn totalRiskScore(&self) -> ENRiskScore;
847
848        /// Indicates the total risk calculated for this exposure incident. Full range and not capped to ENRiskScore.
849        #[unsafe(method(totalRiskScoreFullRange))]
850        #[unsafe(method_family = none)]
851        pub unsafe fn totalRiskScoreFullRange(&self) -> c_double;
852
853        /// Indicates the transmission risk associated with the diagnosis key.
854        #[unsafe(method(transmissionRiskLevel))]
855        #[unsafe(method_family = none)]
856        pub unsafe fn transmissionRiskLevel(&self) -> ENRiskLevel;
857    );
858}
859
860/// Methods declared on superclass `NSObject`.
861impl ENExposureInfo {
862    extern_methods!(
863        #[unsafe(method(init))]
864        #[unsafe(method_family = init)]
865        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
866
867        #[unsafe(method(new))]
868        #[unsafe(method_family = new)]
869        pub unsafe fn new() -> Retained<Self>;
870    );
871}
872
873extern_class!(
874    /// Summary for a specific time period or report type.
875    ///
876    /// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enexposuresummaryitem?language=objc)
877    #[unsafe(super(NSObject))]
878    #[derive(Debug, PartialEq, Eq, Hash)]
879    pub struct ENExposureSummaryItem;
880);
881
882extern_conformance!(
883    unsafe impl NSObjectProtocol for ENExposureSummaryItem {}
884);
885
886impl ENExposureSummaryItem {
887    extern_methods!(
888        /// Highest score of all exposures for this item.
889        #[unsafe(method(maximumScore))]
890        #[unsafe(method_family = none)]
891        pub unsafe fn maximumScore(&self) -> c_double;
892
893        /// Sum of scores for all exposure for this item.
894        #[unsafe(method(scoreSum))]
895        #[unsafe(method_family = none)]
896        pub unsafe fn scoreSum(&self) -> c_double;
897
898        /// Sum of exposure durations weighted by their attenuation.
899        /// weightedDurationSum =
900        /// ( immediateDuration * immediateDurationWeight ) +
901        /// ( nearDuration      * nearDurationWeight ) +
902        /// ( mediumDuration    * mediumDurationWeight ) +
903        /// ( otherDuration     * otherDurationWeight ).
904        #[unsafe(method(weightedDurationSum))]
905        #[unsafe(method_family = none)]
906        pub unsafe fn weightedDurationSum(&self) -> NSTimeInterval;
907    );
908}
909
910/// Methods declared on superclass `NSObject`.
911impl ENExposureSummaryItem {
912    extern_methods!(
913        #[unsafe(method(init))]
914        #[unsafe(method_family = init)]
915        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
916
917        #[unsafe(method(new))]
918        #[unsafe(method_family = new)]
919        pub unsafe fn new() -> Retained<Self>;
920    );
921}
922
923extern_class!(
924    /// A duration of up to 30 minutes during which beacons from a TEK were observed.
925    ///
926    /// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enexposurewindow?language=objc)
927    #[unsafe(super(NSObject))]
928    #[derive(Debug, PartialEq, Eq, Hash)]
929    pub struct ENExposureWindow;
930);
931
932extern_conformance!(
933    unsafe impl NSObjectProtocol for ENExposureWindow {}
934);
935
936impl ENExposureWindow {
937    extern_methods!(
938        /// Transmitting device's calibration confidence.
939        #[unsafe(method(calibrationConfidence))]
940        #[unsafe(method_family = none)]
941        pub unsafe fn calibrationConfidence(&self) -> ENCalibrationConfidence;
942
943        /// Day the exposure occurred.
944        #[unsafe(method(date))]
945        #[unsafe(method_family = none)]
946        pub unsafe fn date(&self) -> Retained<NSDate>;
947
948        /// How positive diagnosis was reported for this the TEK observed for this window.
949        #[unsafe(method(diagnosisReportType))]
950        #[unsafe(method_family = none)]
951        pub unsafe fn diagnosisReportType(&self) -> ENDiagnosisReportType;
952
953        /// How infectious based on days since onset of symptoms.
954        #[unsafe(method(infectiousness))]
955        #[unsafe(method_family = none)]
956        pub unsafe fn infectiousness(&self) -> ENInfectiousness;
957
958        /// Each scan instance corresponds to a scan (of a few seconds) when a beacon with a TEK causing this exposure was observed.
959        #[unsafe(method(scanInstances))]
960        #[unsafe(method_family = none)]
961        pub unsafe fn scanInstances(&self) -> Retained<NSArray<ENScanInstance>>;
962
963        /// Type of variant of concern
964        #[unsafe(method(variantOfConcernType))]
965        #[unsafe(method_family = none)]
966        pub unsafe fn variantOfConcernType(&self) -> ENVariantOfConcernType;
967    );
968}
969
970/// Methods declared on superclass `NSObject`.
971impl ENExposureWindow {
972    extern_methods!(
973        #[unsafe(method(init))]
974        #[unsafe(method_family = init)]
975        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
976
977        #[unsafe(method(new))]
978        #[unsafe(method_family = new)]
979        pub unsafe fn new() -> Retained<Self>;
980    );
981}
982
983extern_class!(
984    /// Aggregation of attenuations of all of this TEK's beacons received during a scan.
985    ///
986    /// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/enscaninstance?language=objc)
987    #[unsafe(super(NSObject))]
988    #[derive(Debug, PartialEq, Eq, Hash)]
989    pub struct ENScanInstance;
990);
991
992extern_conformance!(
993    unsafe impl NSObjectProtocol for ENScanInstance {}
994);
995
996impl ENScanInstance {
997    extern_methods!(
998        /// Minimum attenuation of all of this TEK's beacons received during the scan.
999        #[unsafe(method(minimumAttenuation))]
1000        #[unsafe(method_family = none)]
1001        pub unsafe fn minimumAttenuation(&self) -> ENAttenuation;
1002
1003        /// Aggregation of the attenuations of all of this TEK's beacons received during the scan.
1004        #[unsafe(method(typicalAttenuation))]
1005        #[unsafe(method_family = none)]
1006        pub unsafe fn typicalAttenuation(&self) -> ENAttenuation;
1007
1008        /// Seconds elapsed since the the previous scan.
1009        #[unsafe(method(secondsSinceLastScan))]
1010        #[unsafe(method_family = none)]
1011        pub unsafe fn secondsSinceLastScan(&self) -> NSInteger;
1012    );
1013}
1014
1015/// Methods declared on superclass `NSObject`.
1016impl ENScanInstance {
1017    extern_methods!(
1018        #[unsafe(method(init))]
1019        #[unsafe(method_family = init)]
1020        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1021
1022        #[unsafe(method(new))]
1023        #[unsafe(method_family = new)]
1024        pub unsafe fn new() -> Retained<Self>;
1025    );
1026}
1027
1028extern_class!(
1029    /// Key used to generate rolling proximity identifiers.
1030    ///
1031    /// See also [Apple's documentation](https://developer.apple.com/documentation/exposurenotification/entemporaryexposurekey?language=objc)
1032    #[unsafe(super(NSObject))]
1033    #[derive(Debug, PartialEq, Eq, Hash)]
1034    pub struct ENTemporaryExposureKey;
1035);
1036
1037extern_conformance!(
1038    unsafe impl NSObjectProtocol for ENTemporaryExposureKey {}
1039);
1040
1041impl ENTemporaryExposureKey {
1042    extern_methods!(
1043        /// Key material used to generate Rolling Proximity Identifiers.
1044        #[unsafe(method(keyData))]
1045        #[unsafe(method_family = none)]
1046        pub unsafe fn keyData(&self) -> Retained<NSData>;
1047
1048        /// Setter for [`keyData`][Self::keyData].
1049        #[unsafe(method(setKeyData:))]
1050        #[unsafe(method_family = none)]
1051        pub unsafe fn setKeyData(&self, key_data: &NSData);
1052
1053        /// Duration this key is valid. It's the number of 10-minute windows between key rolling.
1054        #[unsafe(method(rollingPeriod))]
1055        #[unsafe(method_family = none)]
1056        pub unsafe fn rollingPeriod(&self) -> ENIntervalNumber;
1057
1058        /// Setter for [`rollingPeriod`][Self::rollingPeriod].
1059        #[unsafe(method(setRollingPeriod:))]
1060        #[unsafe(method_family = none)]
1061        pub unsafe fn setRollingPeriod(&self, rolling_period: ENIntervalNumber);
1062
1063        /// Interval number when the key's EKRollingPeriod started.
1064        #[unsafe(method(rollingStartNumber))]
1065        #[unsafe(method_family = none)]
1066        pub unsafe fn rollingStartNumber(&self) -> ENIntervalNumber;
1067
1068        /// Setter for [`rollingStartNumber`][Self::rollingStartNumber].
1069        #[unsafe(method(setRollingStartNumber:))]
1070        #[unsafe(method_family = none)]
1071        pub unsafe fn setRollingStartNumber(&self, rolling_start_number: ENIntervalNumber);
1072
1073        /// Risk of transmission associated with the person this key came from.
1074        #[unsafe(method(transmissionRiskLevel))]
1075        #[unsafe(method_family = none)]
1076        pub unsafe fn transmissionRiskLevel(&self) -> ENRiskLevel;
1077
1078        /// Setter for [`transmissionRiskLevel`][Self::transmissionRiskLevel].
1079        #[unsafe(method(setTransmissionRiskLevel:))]
1080        #[unsafe(method_family = none)]
1081        pub unsafe fn setTransmissionRiskLevel(&self, transmission_risk_level: ENRiskLevel);
1082    );
1083}
1084
1085/// Methods declared on superclass `NSObject`.
1086impl ENTemporaryExposureKey {
1087    extern_methods!(
1088        #[unsafe(method(init))]
1089        #[unsafe(method_family = init)]
1090        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1091
1092        #[unsafe(method(new))]
1093        #[unsafe(method_family = new)]
1094        pub unsafe fn new() -> Retained<Self>;
1095    );
1096}