objc2_health_kit/generated/
HKObject.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkobject?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct HKObject;
14);
15
16unsafe impl Send for HKObject {}
17
18unsafe impl Sync for HKObject {}
19
20extern_conformance!(
21    unsafe impl NSCoding for HKObject {}
22);
23
24extern_conformance!(
25    unsafe impl NSObjectProtocol for HKObject {}
26);
27
28extern_conformance!(
29    unsafe impl NSSecureCoding for HKObject {}
30);
31
32impl HKObject {
33    extern_methods!(
34        /// A unique identifier of the receiver in the HealthKit database.
35        #[unsafe(method(UUID))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn UUID(&self) -> Retained<NSUUID>;
38
39        #[cfg(feature = "HKSource")]
40        #[deprecated]
41        #[unsafe(method(source))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn source(&self) -> Retained<HKSource>;
44
45        #[cfg(feature = "HKSourceRevision")]
46        /// Represents the revision of the source responsible for saving the receiver.
47        #[unsafe(method(sourceRevision))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn sourceRevision(&self) -> Retained<HKSourceRevision>;
50
51        #[cfg(feature = "HKDevice")]
52        /// Represents the device that generated the data of the receiver.
53        #[unsafe(method(device))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn device(&self) -> Option<Retained<HKDevice>>;
56
57        /// Extra information describing properties of the receiver.
58        ///
59        /// Keys must be NSString and values must be either NSString, NSNumber, NSDate, or
60        /// HKQuantity. See HKMetadata.h for potential metadata keys and values.
61        #[unsafe(method(metadata))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn metadata(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
64
65        #[unsafe(method(init))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
68    );
69}
70
71/// Methods declared on superclass `NSObject`.
72impl HKObject {
73    extern_methods!(
74        #[unsafe(method(new))]
75        #[unsafe(method_family = new)]
76        pub unsafe fn new() -> Retained<Self>;
77    );
78}
79
80extern "C" {
81    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathuuid?language=objc)
82    pub static HKPredicateKeyPathUUID: &'static NSString;
83}
84
85extern "C" {
86    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathsource?language=objc)
87    pub static HKPredicateKeyPathSource: &'static NSString;
88}
89
90extern "C" {
91    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathmetadata?language=objc)
92    pub static HKPredicateKeyPathMetadata: &'static NSString;
93}
94
95extern "C" {
96    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathcorrelation?language=objc)
97    pub static HKPredicateKeyPathCorrelation: &'static NSString;
98}
99
100extern "C" {
101    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathworkout?language=objc)
102    pub static HKPredicateKeyPathWorkout: &'static NSString;
103}
104
105extern "C" {
106    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathdevice?language=objc)
107    pub static HKPredicateKeyPathDevice: &'static NSString;
108}
109
110extern "C" {
111    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathsourcerevision?language=objc)
112    pub static HKPredicateKeyPathSourceRevision: &'static NSString;
113}
114
115extern "C" {
116    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathworkouteffortrelationship?language=objc)
117    pub static HKPredicateKeyPathWorkoutEffortRelationship: &'static NSString;
118}