objc2_health_kit/generated/
HKMetadataEnums.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7/// Indicates which algorithm version number was used by the ECG app on Apple Watch.
8///
9/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkappleecgalgorithmversion?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct HKAppleECGAlgorithmVersion(pub NSInteger);
14impl HKAppleECGAlgorithmVersion {
15    #[doc(alias = "HKAppleECGAlgorithmVersion1")]
16    pub const Version1: Self = Self(1);
17    #[doc(alias = "HKAppleECGAlgorithmVersion2")]
18    pub const Version2: Self = Self(2);
19}
20
21unsafe impl Encode for HKAppleECGAlgorithmVersion {
22    const ENCODING: Encoding = NSInteger::ENCODING;
23}
24
25unsafe impl RefEncode for HKAppleECGAlgorithmVersion {
26    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
27}
28
29/// Indicates how your blood glucose reading relates to a meal.
30///
31/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkbloodglucosemealtime?language=objc)
32// NS_ENUM
33#[repr(transparent)]
34#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
35pub struct HKBloodGlucoseMealTime(pub NSInteger);
36impl HKBloodGlucoseMealTime {
37    #[doc(alias = "HKBloodGlucoseMealTimePreprandial")]
38    pub const Preprandial: Self = Self(1);
39    #[doc(alias = "HKBloodGlucoseMealTimePostprandial")]
40    pub const Postprandial: Self = Self(2);
41}
42
43unsafe impl Encode for HKBloodGlucoseMealTime {
44    const ENCODING: Encoding = NSInteger::ENCODING;
45}
46
47unsafe impl RefEncode for HKBloodGlucoseMealTime {
48    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
49}
50
51/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkbodytemperaturesensorlocation?language=objc)
52// NS_ENUM
53#[repr(transparent)]
54#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
55pub struct HKBodyTemperatureSensorLocation(pub NSInteger);
56impl HKBodyTemperatureSensorLocation {
57    #[doc(alias = "HKBodyTemperatureSensorLocationOther")]
58    pub const Other: Self = Self(0);
59    #[doc(alias = "HKBodyTemperatureSensorLocationArmpit")]
60    pub const Armpit: Self = Self(1);
61    #[doc(alias = "HKBodyTemperatureSensorLocationBody")]
62    pub const Body: Self = Self(2);
63    #[doc(alias = "HKBodyTemperatureSensorLocationEar")]
64    pub const Ear: Self = Self(3);
65    #[doc(alias = "HKBodyTemperatureSensorLocationFinger")]
66    pub const Finger: Self = Self(4);
67    #[doc(alias = "HKBodyTemperatureSensorLocationGastroIntestinal")]
68    pub const GastroIntestinal: Self = Self(5);
69    #[doc(alias = "HKBodyTemperatureSensorLocationMouth")]
70    pub const Mouth: Self = Self(6);
71    #[doc(alias = "HKBodyTemperatureSensorLocationRectum")]
72    pub const Rectum: Self = Self(7);
73    #[doc(alias = "HKBodyTemperatureSensorLocationToe")]
74    pub const Toe: Self = Self(8);
75    #[doc(alias = "HKBodyTemperatureSensorLocationEarDrum")]
76    pub const EarDrum: Self = Self(9);
77    #[doc(alias = "HKBodyTemperatureSensorLocationTemporalArtery")]
78    pub const TemporalArtery: Self = Self(10);
79    #[doc(alias = "HKBodyTemperatureSensorLocationForehead")]
80    pub const Forehead: Self = Self(11);
81}
82
83unsafe impl Encode for HKBodyTemperatureSensorLocation {
84    const ENCODING: Encoding = NSInteger::ENCODING;
85}
86
87unsafe impl RefEncode for HKBodyTemperatureSensorLocation {
88    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
89}
90
91/// Represents the test used to determine a Cycling Functional Threshold Power value.
92///
93///
94/// limit for a sustained period of 60
95/// minutes.
96///
97/// limit for a sustained period of 20
98/// minutes.
99///
100/// until exhaustion.
101///
102/// the user’s cycling workouts to calculate
103/// a predicted Cycling Functional Threshold
104/// Power.
105///
106/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkcyclingfunctionalthresholdpowertesttype?language=objc)
107// NS_ENUM
108#[repr(transparent)]
109#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
110pub struct HKCyclingFunctionalThresholdPowerTestType(pub NSInteger);
111impl HKCyclingFunctionalThresholdPowerTestType {
112    #[doc(alias = "HKCyclingFunctionalThresholdPowerTestTypeMaxExercise60Minute")]
113    pub const MaxExercise60Minute: Self = Self(1);
114    #[doc(alias = "HKCyclingFunctionalThresholdPowerTestTypeMaxExercise20Minute")]
115    pub const MaxExercise20Minute: Self = Self(2);
116    #[doc(alias = "HKCyclingFunctionalThresholdPowerTestTypeRampTest")]
117    pub const RampTest: Self = Self(3);
118    #[doc(alias = "HKCyclingFunctionalThresholdPowerTestTypePredictionExercise")]
119    pub const PredictionExercise: Self = Self(4);
120}
121
122unsafe impl Encode for HKCyclingFunctionalThresholdPowerTestType {
123    const ENCODING: Encoding = NSInteger::ENCODING;
124}
125
126unsafe impl RefEncode for HKCyclingFunctionalThresholdPowerTestType {
127    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
128}
129
130/// The detected placement of the device during the bout of walking
131///
132/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkdeviceplacementside?language=objc)
133// NS_ENUM
134#[repr(transparent)]
135#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
136pub struct HKDevicePlacementSide(pub NSInteger);
137impl HKDevicePlacementSide {
138    #[doc(alias = "HKDevicePlacementSideUnknown")]
139    pub const Unknown: Self = Self(0);
140    #[doc(alias = "HKDevicePlacementSideLeft")]
141    pub const Left: Self = Self(1);
142    #[doc(alias = "HKDevicePlacementSideRight")]
143    pub const Right: Self = Self(2);
144    #[doc(alias = "HKDevicePlacementSideCentral")]
145    pub const Central: Self = Self(3);
146}
147
148unsafe impl Encode for HKDevicePlacementSide {
149    const ENCODING: Encoding = NSInteger::ENCODING;
150}
151
152unsafe impl RefEncode for HKDevicePlacementSide {
153    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
154}
155
156/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkheartratemotioncontext?language=objc)
157// NS_ENUM
158#[repr(transparent)]
159#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
160pub struct HKHeartRateMotionContext(pub NSInteger);
161impl HKHeartRateMotionContext {
162    #[doc(alias = "HKHeartRateMotionContextNotSet")]
163    pub const NotSet: Self = Self(0);
164    #[doc(alias = "HKHeartRateMotionContextSedentary")]
165    pub const Sedentary: Self = Self(1);
166    #[doc(alias = "HKHeartRateMotionContextActive")]
167    pub const Active: Self = Self(2);
168}
169
170unsafe impl Encode for HKHeartRateMotionContext {
171    const ENCODING: Encoding = NSInteger::ENCODING;
172}
173
174unsafe impl RefEncode for HKHeartRateMotionContext {
175    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
176}
177
178/// Represents the test used to determine a Heart Rate Recovery value
179///
180///
181/// evaluate actual Heart Rate Recovery.
182///
183/// and correlate a predicted Heart Rate Recovery.
184///
185/// metrics to calculate a predicted Heart Rate
186/// Recovery.
187///
188/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkheartraterecoverytesttype?language=objc)
189// NS_ENUM
190#[repr(transparent)]
191#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
192pub struct HKHeartRateRecoveryTestType(pub NSInteger);
193impl HKHeartRateRecoveryTestType {
194    #[doc(alias = "HKHeartRateRecoveryTestTypeMaxExercise")]
195    pub const MaxExercise: Self = Self(1);
196    #[doc(alias = "HKHeartRateRecoveryTestTypePredictionSubMaxExercise")]
197    pub const PredictionSubMaxExercise: Self = Self(2);
198    #[doc(alias = "HKHeartRateRecoveryTestTypePredictionNonExercise")]
199    pub const PredictionNonExercise: Self = Self(3);
200}
201
202unsafe impl Encode for HKHeartRateRecoveryTestType {
203    const ENCODING: Encoding = NSInteger::ENCODING;
204}
205
206unsafe impl RefEncode for HKHeartRateRecoveryTestType {
207    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
208}
209
210/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkheartratesensorlocation?language=objc)
211// NS_ENUM
212#[repr(transparent)]
213#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
214pub struct HKHeartRateSensorLocation(pub NSInteger);
215impl HKHeartRateSensorLocation {
216    #[doc(alias = "HKHeartRateSensorLocationOther")]
217    pub const Other: Self = Self(0);
218    #[doc(alias = "HKHeartRateSensorLocationChest")]
219    pub const Chest: Self = Self(1);
220    #[doc(alias = "HKHeartRateSensorLocationWrist")]
221    pub const Wrist: Self = Self(2);
222    #[doc(alias = "HKHeartRateSensorLocationFinger")]
223    pub const Finger: Self = Self(3);
224    #[doc(alias = "HKHeartRateSensorLocationHand")]
225    pub const Hand: Self = Self(4);
226    #[doc(alias = "HKHeartRateSensorLocationEarLobe")]
227    pub const EarLobe: Self = Self(5);
228    #[doc(alias = "HKHeartRateSensorLocationFoot")]
229    pub const Foot: Self = Self(6);
230}
231
232unsafe impl Encode for HKHeartRateSensorLocation {
233    const ENCODING: Encoding = NSInteger::ENCODING;
234}
235
236unsafe impl RefEncode for HKHeartRateSensorLocation {
237    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
238}
239
240/// Represents a medical reason for the delivery of insulin
241///
242///
243/// administered as a continuous rate from an insulin pump, or a periodic
244/// injection of slow-acting insulin.
245///
246/// glucose level correction.
247///
248/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason?language=objc)
249// NS_ENUM
250#[repr(transparent)]
251#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
252pub struct HKInsulinDeliveryReason(pub NSInteger);
253impl HKInsulinDeliveryReason {
254    #[doc(alias = "HKInsulinDeliveryReasonBasal")]
255    pub const Basal: Self = Self(1);
256    #[doc(alias = "HKInsulinDeliveryReasonBolus")]
257    pub const Bolus: Self = Self(2);
258}
259
260unsafe impl Encode for HKInsulinDeliveryReason {
261    const ENCODING: Encoding = NSInteger::ENCODING;
262}
263
264unsafe impl RefEncode for HKInsulinDeliveryReason {
265    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
266}
267
268/// Represents the estimation used to create a Physical Effort Sample.
269///
270///
271/// standard such as a stationary bike
272///
273/// signals (walking, running etc.)
274///
275/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkphysicaleffortestimationtype?language=objc)
276// NS_ENUM
277#[repr(transparent)]
278#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
279pub struct HKPhysicalEffortEstimationType(pub NSInteger);
280impl HKPhysicalEffortEstimationType {
281    #[doc(alias = "HKPhysicalEffortEstimationTypeActivityLookup")]
282    pub const ActivityLookup: Self = Self(1);
283    #[doc(alias = "HKPhysicalEffortEstimationTypeDeviceSensed")]
284    pub const DeviceSensed: Self = Self(2);
285}
286
287unsafe impl Encode for HKPhysicalEffortEstimationType {
288    const ENCODING: Encoding = NSInteger::ENCODING;
289}
290
291unsafe impl RefEncode for HKPhysicalEffortEstimationType {
292    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
293}
294
295/// Represents a style of stroke used during a swimming workout.
296///
297/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkswimmingstrokestyle?language=objc)
298// NS_ENUM
299#[repr(transparent)]
300#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
301pub struct HKSwimmingStrokeStyle(pub NSInteger);
302impl HKSwimmingStrokeStyle {
303    #[doc(alias = "HKSwimmingStrokeStyleUnknown")]
304    pub const Unknown: Self = Self(0);
305    #[doc(alias = "HKSwimmingStrokeStyleMixed")]
306    pub const Mixed: Self = Self(1);
307    #[doc(alias = "HKSwimmingStrokeStyleFreestyle")]
308    pub const Freestyle: Self = Self(2);
309    #[doc(alias = "HKSwimmingStrokeStyleBackstroke")]
310    pub const Backstroke: Self = Self(3);
311    #[doc(alias = "HKSwimmingStrokeStyleBreaststroke")]
312    pub const Breaststroke: Self = Self(4);
313    #[doc(alias = "HKSwimmingStrokeStyleButterfly")]
314    pub const Butterfly: Self = Self(5);
315    #[doc(alias = "HKSwimmingStrokeStyleKickboard")]
316    pub const Kickboard: Self = Self(6);
317}
318
319unsafe impl Encode for HKSwimmingStrokeStyle {
320    const ENCODING: Encoding = NSInteger::ENCODING;
321}
322
323unsafe impl RefEncode for HKSwimmingStrokeStyle {
324    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
325}
326
327/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkusermotioncontext?language=objc)
328// NS_ENUM
329#[repr(transparent)]
330#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
331pub struct HKUserMotionContext(pub NSInteger);
332impl HKUserMotionContext {
333    #[doc(alias = "HKUserMotionContextNotSet")]
334    pub const NotSet: Self = Self(0);
335    #[doc(alias = "HKUserMotionContextStationary")]
336    pub const Stationary: Self = Self(1);
337    #[doc(alias = "HKUserMotionContextActive")]
338    pub const Active: Self = Self(2);
339}
340
341unsafe impl Encode for HKUserMotionContext {
342    const ENCODING: Encoding = NSInteger::ENCODING;
343}
344
345unsafe impl RefEncode for HKUserMotionContext {
346    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
347}
348
349/// Represents the test used to create a VO2 Max Sample.
350///
351///
352/// measure actual VO2Max.
353///
354/// a predicted VO2Max.
355///
356/// calculate a predicted VO2Max.
357///
358/// predicted VO2Max.
359///
360/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkvo2maxtesttype?language=objc)
361// NS_ENUM
362#[repr(transparent)]
363#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
364pub struct HKVO2MaxTestType(pub NSInteger);
365impl HKVO2MaxTestType {
366    #[doc(alias = "HKVO2MaxTestTypeMaxExercise")]
367    pub const MaxExercise: Self = Self(1);
368    #[doc(alias = "HKVO2MaxTestTypePredictionSubMaxExercise")]
369    pub const PredictionSubMaxExercise: Self = Self(2);
370    #[doc(alias = "HKVO2MaxTestTypePredictionNonExercise")]
371    pub const PredictionNonExercise: Self = Self(3);
372    #[doc(alias = "HKVO2MaxTestTypePredictionStepTest")]
373    pub const PredictionStepTest: Self = Self(4);
374}
375
376unsafe impl Encode for HKVO2MaxTestType {
377    const ENCODING: Encoding = NSInteger::ENCODING;
378}
379
380unsafe impl RefEncode for HKVO2MaxTestType {
381    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
382}
383
384/// Represents the water salinity for an underwater depth or water temperature sample.
385///
386/// This value indicates the water salinity
387///
388/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkwatersalinity?language=objc)
389// NS_ENUM
390#[repr(transparent)]
391#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
392pub struct HKWaterSalinity(pub NSInteger);
393impl HKWaterSalinity {
394    #[doc(alias = "HKWaterSalinityFreshWater")]
395    pub const FreshWater: Self = Self(1);
396    #[doc(alias = "HKWaterSalinitySaltWater")]
397    pub const SaltWater: Self = Self(2);
398}
399
400unsafe impl Encode for HKWaterSalinity {
401    const ENCODING: Encoding = NSInteger::ENCODING;
402}
403
404unsafe impl RefEncode for HKWaterSalinity {
405    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
406}
407
408/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkweathercondition?language=objc)
409// NS_ENUM
410#[repr(transparent)]
411#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
412pub struct HKWeatherCondition(pub NSInteger);
413impl HKWeatherCondition {
414    #[doc(alias = "HKWeatherConditionNone")]
415    pub const None: Self = Self(0);
416    #[doc(alias = "HKWeatherConditionClear")]
417    pub const Clear: Self = Self(1);
418    #[doc(alias = "HKWeatherConditionFair")]
419    pub const Fair: Self = Self(2);
420    #[doc(alias = "HKWeatherConditionPartlyCloudy")]
421    pub const PartlyCloudy: Self = Self(3);
422    #[doc(alias = "HKWeatherConditionMostlyCloudy")]
423    pub const MostlyCloudy: Self = Self(4);
424    #[doc(alias = "HKWeatherConditionCloudy")]
425    pub const Cloudy: Self = Self(5);
426    #[doc(alias = "HKWeatherConditionFoggy")]
427    pub const Foggy: Self = Self(6);
428    #[doc(alias = "HKWeatherConditionHaze")]
429    pub const Haze: Self = Self(7);
430    #[doc(alias = "HKWeatherConditionWindy")]
431    pub const Windy: Self = Self(8);
432    #[doc(alias = "HKWeatherConditionBlustery")]
433    pub const Blustery: Self = Self(9);
434    #[doc(alias = "HKWeatherConditionSmoky")]
435    pub const Smoky: Self = Self(10);
436    #[doc(alias = "HKWeatherConditionDust")]
437    pub const Dust: Self = Self(11);
438    #[doc(alias = "HKWeatherConditionSnow")]
439    pub const Snow: Self = Self(12);
440    #[doc(alias = "HKWeatherConditionHail")]
441    pub const Hail: Self = Self(13);
442    #[doc(alias = "HKWeatherConditionSleet")]
443    pub const Sleet: Self = Self(14);
444    #[doc(alias = "HKWeatherConditionFreezingDrizzle")]
445    pub const FreezingDrizzle: Self = Self(15);
446    #[doc(alias = "HKWeatherConditionFreezingRain")]
447    pub const FreezingRain: Self = Self(16);
448    #[doc(alias = "HKWeatherConditionMixedRainAndHail")]
449    pub const MixedRainAndHail: Self = Self(17);
450    #[doc(alias = "HKWeatherConditionMixedRainAndSnow")]
451    pub const MixedRainAndSnow: Self = Self(18);
452    #[doc(alias = "HKWeatherConditionMixedRainAndSleet")]
453    pub const MixedRainAndSleet: Self = Self(19);
454    #[doc(alias = "HKWeatherConditionMixedSnowAndSleet")]
455    pub const MixedSnowAndSleet: Self = Self(20);
456    #[doc(alias = "HKWeatherConditionDrizzle")]
457    pub const Drizzle: Self = Self(21);
458    #[doc(alias = "HKWeatherConditionScatteredShowers")]
459    pub const ScatteredShowers: Self = Self(22);
460    #[doc(alias = "HKWeatherConditionShowers")]
461    pub const Showers: Self = Self(23);
462    #[doc(alias = "HKWeatherConditionThunderstorms")]
463    pub const Thunderstorms: Self = Self(24);
464    #[doc(alias = "HKWeatherConditionTropicalStorm")]
465    pub const TropicalStorm: Self = Self(25);
466    #[doc(alias = "HKWeatherConditionHurricane")]
467    pub const Hurricane: Self = Self(26);
468    #[doc(alias = "HKWeatherConditionTornado")]
469    pub const Tornado: Self = Self(27);
470}
471
472unsafe impl Encode for HKWeatherCondition {
473    const ENCODING: Encoding = NSInteger::ENCODING;
474}
475
476unsafe impl RefEncode for HKWeatherCondition {
477    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
478}
479
480/// This enumerated type is used to represent the location type of a swimming workout.
481///
482/// This value indicates whether a swimming workout was performed in a pool or open water.
483///
484/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkworkoutswimminglocationtype?language=objc)
485// NS_ENUM
486#[repr(transparent)]
487#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
488pub struct HKWorkoutSwimmingLocationType(pub NSInteger);
489impl HKWorkoutSwimmingLocationType {
490    #[doc(alias = "HKWorkoutSwimmingLocationTypeUnknown")]
491    pub const Unknown: Self = Self(0);
492    #[doc(alias = "HKWorkoutSwimmingLocationTypePool")]
493    pub const Pool: Self = Self(1);
494    #[doc(alias = "HKWorkoutSwimmingLocationTypeOpenWater")]
495    pub const OpenWater: Self = Self(2);
496}
497
498unsafe impl Encode for HKWorkoutSwimmingLocationType {
499    const ENCODING: Encoding = NSInteger::ENCODING;
500}
501
502unsafe impl RefEncode for HKWorkoutSwimmingLocationType {
503    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
504}