objc2-health-kit 0.3.2

Bindings to the HealthKit framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;

use crate::*;

/// Indicates which algorithm version number was used by the ECG app on Apple Watch.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkappleecgalgorithmversion?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKAppleECGAlgorithmVersion(pub NSInteger);
impl HKAppleECGAlgorithmVersion {
    #[doc(alias = "HKAppleECGAlgorithmVersion1")]
    pub const Version1: Self = Self(1);
    #[doc(alias = "HKAppleECGAlgorithmVersion2")]
    pub const Version2: Self = Self(2);
}

unsafe impl Encode for HKAppleECGAlgorithmVersion {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKAppleECGAlgorithmVersion {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Indicates how your blood glucose reading relates to a meal.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkbloodglucosemealtime?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKBloodGlucoseMealTime(pub NSInteger);
impl HKBloodGlucoseMealTime {
    #[doc(alias = "HKBloodGlucoseMealTimePreprandial")]
    pub const Preprandial: Self = Self(1);
    #[doc(alias = "HKBloodGlucoseMealTimePostprandial")]
    pub const Postprandial: Self = Self(2);
}

unsafe impl Encode for HKBloodGlucoseMealTime {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKBloodGlucoseMealTime {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkbodytemperaturesensorlocation?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKBodyTemperatureSensorLocation(pub NSInteger);
impl HKBodyTemperatureSensorLocation {
    #[doc(alias = "HKBodyTemperatureSensorLocationOther")]
    pub const Other: Self = Self(0);
    #[doc(alias = "HKBodyTemperatureSensorLocationArmpit")]
    pub const Armpit: Self = Self(1);
    #[doc(alias = "HKBodyTemperatureSensorLocationBody")]
    pub const Body: Self = Self(2);
    #[doc(alias = "HKBodyTemperatureSensorLocationEar")]
    pub const Ear: Self = Self(3);
    #[doc(alias = "HKBodyTemperatureSensorLocationFinger")]
    pub const Finger: Self = Self(4);
    #[doc(alias = "HKBodyTemperatureSensorLocationGastroIntestinal")]
    pub const GastroIntestinal: Self = Self(5);
    #[doc(alias = "HKBodyTemperatureSensorLocationMouth")]
    pub const Mouth: Self = Self(6);
    #[doc(alias = "HKBodyTemperatureSensorLocationRectum")]
    pub const Rectum: Self = Self(7);
    #[doc(alias = "HKBodyTemperatureSensorLocationToe")]
    pub const Toe: Self = Self(8);
    #[doc(alias = "HKBodyTemperatureSensorLocationEarDrum")]
    pub const EarDrum: Self = Self(9);
    #[doc(alias = "HKBodyTemperatureSensorLocationTemporalArtery")]
    pub const TemporalArtery: Self = Self(10);
    #[doc(alias = "HKBodyTemperatureSensorLocationForehead")]
    pub const Forehead: Self = Self(11);
}

unsafe impl Encode for HKBodyTemperatureSensorLocation {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKBodyTemperatureSensorLocation {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Represents the test used to determine a Cycling Functional Threshold Power value.
///
///
/// limit for a sustained period of 60
/// minutes.
///
/// limit for a sustained period of 20
/// minutes.
///
/// until exhaustion.
///
/// the user’s cycling workouts to calculate
/// a predicted Cycling Functional Threshold
/// Power.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkcyclingfunctionalthresholdpowertesttype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKCyclingFunctionalThresholdPowerTestType(pub NSInteger);
impl HKCyclingFunctionalThresholdPowerTestType {
    #[doc(alias = "HKCyclingFunctionalThresholdPowerTestTypeMaxExercise60Minute")]
    pub const MaxExercise60Minute: Self = Self(1);
    #[doc(alias = "HKCyclingFunctionalThresholdPowerTestTypeMaxExercise20Minute")]
    pub const MaxExercise20Minute: Self = Self(2);
    #[doc(alias = "HKCyclingFunctionalThresholdPowerTestTypeRampTest")]
    pub const RampTest: Self = Self(3);
    #[doc(alias = "HKCyclingFunctionalThresholdPowerTestTypePredictionExercise")]
    pub const PredictionExercise: Self = Self(4);
}

unsafe impl Encode for HKCyclingFunctionalThresholdPowerTestType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKCyclingFunctionalThresholdPowerTestType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// The detected placement of the device during the bout of walking
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkdeviceplacementside?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKDevicePlacementSide(pub NSInteger);
impl HKDevicePlacementSide {
    #[doc(alias = "HKDevicePlacementSideUnknown")]
    pub const Unknown: Self = Self(0);
    #[doc(alias = "HKDevicePlacementSideLeft")]
    pub const Left: Self = Self(1);
    #[doc(alias = "HKDevicePlacementSideRight")]
    pub const Right: Self = Self(2);
    #[doc(alias = "HKDevicePlacementSideCentral")]
    pub const Central: Self = Self(3);
}

unsafe impl Encode for HKDevicePlacementSide {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKDevicePlacementSide {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkheartratemotioncontext?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKHeartRateMotionContext(pub NSInteger);
impl HKHeartRateMotionContext {
    #[doc(alias = "HKHeartRateMotionContextNotSet")]
    pub const NotSet: Self = Self(0);
    #[doc(alias = "HKHeartRateMotionContextSedentary")]
    pub const Sedentary: Self = Self(1);
    #[doc(alias = "HKHeartRateMotionContextActive")]
    pub const Active: Self = Self(2);
}

unsafe impl Encode for HKHeartRateMotionContext {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKHeartRateMotionContext {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Represents the test used to determine a Heart Rate Recovery value
///
///
/// evaluate actual Heart Rate Recovery.
///
/// and correlate a predicted Heart Rate Recovery.
///
/// metrics to calculate a predicted Heart Rate
/// Recovery.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkheartraterecoverytesttype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKHeartRateRecoveryTestType(pub NSInteger);
impl HKHeartRateRecoveryTestType {
    #[doc(alias = "HKHeartRateRecoveryTestTypeMaxExercise")]
    pub const MaxExercise: Self = Self(1);
    #[doc(alias = "HKHeartRateRecoveryTestTypePredictionSubMaxExercise")]
    pub const PredictionSubMaxExercise: Self = Self(2);
    #[doc(alias = "HKHeartRateRecoveryTestTypePredictionNonExercise")]
    pub const PredictionNonExercise: Self = Self(3);
}

unsafe impl Encode for HKHeartRateRecoveryTestType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKHeartRateRecoveryTestType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkheartratesensorlocation?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKHeartRateSensorLocation(pub NSInteger);
impl HKHeartRateSensorLocation {
    #[doc(alias = "HKHeartRateSensorLocationOther")]
    pub const Other: Self = Self(0);
    #[doc(alias = "HKHeartRateSensorLocationChest")]
    pub const Chest: Self = Self(1);
    #[doc(alias = "HKHeartRateSensorLocationWrist")]
    pub const Wrist: Self = Self(2);
    #[doc(alias = "HKHeartRateSensorLocationFinger")]
    pub const Finger: Self = Self(3);
    #[doc(alias = "HKHeartRateSensorLocationHand")]
    pub const Hand: Self = Self(4);
    #[doc(alias = "HKHeartRateSensorLocationEarLobe")]
    pub const EarLobe: Self = Self(5);
    #[doc(alias = "HKHeartRateSensorLocationFoot")]
    pub const Foot: Self = Self(6);
}

unsafe impl Encode for HKHeartRateSensorLocation {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKHeartRateSensorLocation {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Represents a medical reason for the delivery of insulin
///
///
/// administered as a continuous rate from an insulin pump, or a periodic
/// injection of slow-acting insulin.
///
/// glucose level correction.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkinsulindeliveryreason?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKInsulinDeliveryReason(pub NSInteger);
impl HKInsulinDeliveryReason {
    #[doc(alias = "HKInsulinDeliveryReasonBasal")]
    pub const Basal: Self = Self(1);
    #[doc(alias = "HKInsulinDeliveryReasonBolus")]
    pub const Bolus: Self = Self(2);
}

unsafe impl Encode for HKInsulinDeliveryReason {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKInsulinDeliveryReason {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Represents the estimation used to create a Physical Effort Sample.
///
///
/// standard such as a stationary bike
///
/// signals (walking, running etc.)
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkphysicaleffortestimationtype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKPhysicalEffortEstimationType(pub NSInteger);
impl HKPhysicalEffortEstimationType {
    #[doc(alias = "HKPhysicalEffortEstimationTypeActivityLookup")]
    pub const ActivityLookup: Self = Self(1);
    #[doc(alias = "HKPhysicalEffortEstimationTypeDeviceSensed")]
    pub const DeviceSensed: Self = Self(2);
}

unsafe impl Encode for HKPhysicalEffortEstimationType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKPhysicalEffortEstimationType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Represents a style of stroke used during a swimming workout.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkswimmingstrokestyle?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKSwimmingStrokeStyle(pub NSInteger);
impl HKSwimmingStrokeStyle {
    #[doc(alias = "HKSwimmingStrokeStyleUnknown")]
    pub const Unknown: Self = Self(0);
    #[doc(alias = "HKSwimmingStrokeStyleMixed")]
    pub const Mixed: Self = Self(1);
    #[doc(alias = "HKSwimmingStrokeStyleFreestyle")]
    pub const Freestyle: Self = Self(2);
    #[doc(alias = "HKSwimmingStrokeStyleBackstroke")]
    pub const Backstroke: Self = Self(3);
    #[doc(alias = "HKSwimmingStrokeStyleBreaststroke")]
    pub const Breaststroke: Self = Self(4);
    #[doc(alias = "HKSwimmingStrokeStyleButterfly")]
    pub const Butterfly: Self = Self(5);
    #[doc(alias = "HKSwimmingStrokeStyleKickboard")]
    pub const Kickboard: Self = Self(6);
}

unsafe impl Encode for HKSwimmingStrokeStyle {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKSwimmingStrokeStyle {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkusermotioncontext?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKUserMotionContext(pub NSInteger);
impl HKUserMotionContext {
    #[doc(alias = "HKUserMotionContextNotSet")]
    pub const NotSet: Self = Self(0);
    #[doc(alias = "HKUserMotionContextStationary")]
    pub const Stationary: Self = Self(1);
    #[doc(alias = "HKUserMotionContextActive")]
    pub const Active: Self = Self(2);
}

unsafe impl Encode for HKUserMotionContext {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKUserMotionContext {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Represents the test used to create a VO2 Max Sample.
///
///
/// measure actual VO2Max.
///
/// a predicted VO2Max.
///
/// calculate a predicted VO2Max.
///
/// predicted VO2Max.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkvo2maxtesttype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKVO2MaxTestType(pub NSInteger);
impl HKVO2MaxTestType {
    #[doc(alias = "HKVO2MaxTestTypeMaxExercise")]
    pub const MaxExercise: Self = Self(1);
    #[doc(alias = "HKVO2MaxTestTypePredictionSubMaxExercise")]
    pub const PredictionSubMaxExercise: Self = Self(2);
    #[doc(alias = "HKVO2MaxTestTypePredictionNonExercise")]
    pub const PredictionNonExercise: Self = Self(3);
    #[doc(alias = "HKVO2MaxTestTypePredictionStepTest")]
    pub const PredictionStepTest: Self = Self(4);
}

unsafe impl Encode for HKVO2MaxTestType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKVO2MaxTestType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Represents the water salinity for an underwater depth or water temperature sample.
///
/// This value indicates the water salinity
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkwatersalinity?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKWaterSalinity(pub NSInteger);
impl HKWaterSalinity {
    #[doc(alias = "HKWaterSalinityFreshWater")]
    pub const FreshWater: Self = Self(1);
    #[doc(alias = "HKWaterSalinitySaltWater")]
    pub const SaltWater: Self = Self(2);
}

unsafe impl Encode for HKWaterSalinity {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKWaterSalinity {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkweathercondition?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKWeatherCondition(pub NSInteger);
impl HKWeatherCondition {
    #[doc(alias = "HKWeatherConditionNone")]
    pub const None: Self = Self(0);
    #[doc(alias = "HKWeatherConditionClear")]
    pub const Clear: Self = Self(1);
    #[doc(alias = "HKWeatherConditionFair")]
    pub const Fair: Self = Self(2);
    #[doc(alias = "HKWeatherConditionPartlyCloudy")]
    pub const PartlyCloudy: Self = Self(3);
    #[doc(alias = "HKWeatherConditionMostlyCloudy")]
    pub const MostlyCloudy: Self = Self(4);
    #[doc(alias = "HKWeatherConditionCloudy")]
    pub const Cloudy: Self = Self(5);
    #[doc(alias = "HKWeatherConditionFoggy")]
    pub const Foggy: Self = Self(6);
    #[doc(alias = "HKWeatherConditionHaze")]
    pub const Haze: Self = Self(7);
    #[doc(alias = "HKWeatherConditionWindy")]
    pub const Windy: Self = Self(8);
    #[doc(alias = "HKWeatherConditionBlustery")]
    pub const Blustery: Self = Self(9);
    #[doc(alias = "HKWeatherConditionSmoky")]
    pub const Smoky: Self = Self(10);
    #[doc(alias = "HKWeatherConditionDust")]
    pub const Dust: Self = Self(11);
    #[doc(alias = "HKWeatherConditionSnow")]
    pub const Snow: Self = Self(12);
    #[doc(alias = "HKWeatherConditionHail")]
    pub const Hail: Self = Self(13);
    #[doc(alias = "HKWeatherConditionSleet")]
    pub const Sleet: Self = Self(14);
    #[doc(alias = "HKWeatherConditionFreezingDrizzle")]
    pub const FreezingDrizzle: Self = Self(15);
    #[doc(alias = "HKWeatherConditionFreezingRain")]
    pub const FreezingRain: Self = Self(16);
    #[doc(alias = "HKWeatherConditionMixedRainAndHail")]
    pub const MixedRainAndHail: Self = Self(17);
    #[doc(alias = "HKWeatherConditionMixedRainAndSnow")]
    pub const MixedRainAndSnow: Self = Self(18);
    #[doc(alias = "HKWeatherConditionMixedRainAndSleet")]
    pub const MixedRainAndSleet: Self = Self(19);
    #[doc(alias = "HKWeatherConditionMixedSnowAndSleet")]
    pub const MixedSnowAndSleet: Self = Self(20);
    #[doc(alias = "HKWeatherConditionDrizzle")]
    pub const Drizzle: Self = Self(21);
    #[doc(alias = "HKWeatherConditionScatteredShowers")]
    pub const ScatteredShowers: Self = Self(22);
    #[doc(alias = "HKWeatherConditionShowers")]
    pub const Showers: Self = Self(23);
    #[doc(alias = "HKWeatherConditionThunderstorms")]
    pub const Thunderstorms: Self = Self(24);
    #[doc(alias = "HKWeatherConditionTropicalStorm")]
    pub const TropicalStorm: Self = Self(25);
    #[doc(alias = "HKWeatherConditionHurricane")]
    pub const Hurricane: Self = Self(26);
    #[doc(alias = "HKWeatherConditionTornado")]
    pub const Tornado: Self = Self(27);
}

unsafe impl Encode for HKWeatherCondition {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKWeatherCondition {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// This enumerated type is used to represent the location type of a swimming workout.
///
/// This value indicates whether a swimming workout was performed in a pool or open water.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkworkoutswimminglocationtype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct HKWorkoutSwimmingLocationType(pub NSInteger);
impl HKWorkoutSwimmingLocationType {
    #[doc(alias = "HKWorkoutSwimmingLocationTypeUnknown")]
    pub const Unknown: Self = Self(0);
    #[doc(alias = "HKWorkoutSwimmingLocationTypePool")]
    pub const Pool: Self = Self(1);
    #[doc(alias = "HKWorkoutSwimmingLocationTypeOpenWater")]
    pub const OpenWater: Self = Self(2);
}

unsafe impl Encode for HKWorkoutSwimmingLocationType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for HKWorkoutSwimmingLocationType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}