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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
/// Represents a medications general form.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralform?language=objc)
// NS_TYPED_ENUM
pub type HKMedicationGeneralForm = NSString;
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformcapsule?language=objc)
pub static HKMedicationGeneralFormCapsule: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformcream?language=objc)
pub static HKMedicationGeneralFormCream: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformdevice?language=objc)
pub static HKMedicationGeneralFormDevice: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformdrops?language=objc)
pub static HKMedicationGeneralFormDrops: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformfoam?language=objc)
pub static HKMedicationGeneralFormFoam: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformgel?language=objc)
pub static HKMedicationGeneralFormGel: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralforminhaler?language=objc)
pub static HKMedicationGeneralFormInhaler: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralforminjection?language=objc)
pub static HKMedicationGeneralFormInjection: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformliquid?language=objc)
pub static HKMedicationGeneralFormLiquid: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformlotion?language=objc)
pub static HKMedicationGeneralFormLotion: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformointment?language=objc)
pub static HKMedicationGeneralFormOintment: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformpatch?language=objc)
pub static HKMedicationGeneralFormPatch: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformpowder?language=objc)
pub static HKMedicationGeneralFormPowder: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformspray?language=objc)
pub static HKMedicationGeneralFormSpray: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformsuppository?language=objc)
pub static HKMedicationGeneralFormSuppository: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformtablet?language=objc)
pub static HKMedicationGeneralFormTablet: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformtopical?language=objc)
pub static HKMedicationGeneralFormTopical: &'static HKMedicationGeneralForm;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationgeneralformunknown?language=objc)
pub static HKMedicationGeneralFormUnknown: &'static HKMedicationGeneralForm;
}
extern_class!(
/// An object that represents the concept of a medication.
///
/// Medications can have clinical significance, or can be created by the user.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkmedicationconcept?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct HKMedicationConcept;
);
unsafe impl Send for HKMedicationConcept {}
unsafe impl Sync for HKMedicationConcept {}
extern_conformance!(
unsafe impl NSCoding for HKMedicationConcept {}
);
extern_conformance!(
unsafe impl NSCopying for HKMedicationConcept {}
);
unsafe impl CopyingHelper for HKMedicationConcept {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for HKMedicationConcept {}
);
extern_conformance!(
unsafe impl NSSecureCoding for HKMedicationConcept {}
);
impl HKMedicationConcept {
extern_methods!(
#[cfg(feature = "HKHealthConceptIdentifier")]
/// A unique identifier that differentiates concepts from each other.
///
/// One medication concept will have a stable identifier across multiple devices, and can be used for direct comparison.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Retained<HKHealthConceptIdentifier>;
/// An unlocalized string suitable for display.
///
/// The name of the medication entered or selected during medication onboarding.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(displayText))]
#[unsafe(method_family = none)]
pub unsafe fn displayText(&self) -> Retained<NSString>;
/// The general form this medication is manufactured in.
///
/// A general manufactured dose form for this medication.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(generalForm))]
#[unsafe(method_family = none)]
pub unsafe fn generalForm(&self) -> Retained<HKMedicationGeneralForm>;
#[cfg(feature = "HKClinicalCoding")]
/// A list of potentially related codings.
///
/// Contains a set of relevant codes for this particular medication.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(relatedCodings))]
#[unsafe(method_family = none)]
pub unsafe fn relatedCodings(&self) -> Retained<NSSet<HKClinicalCoding>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
/// Methods declared on superclass `NSObject`.
impl HKMedicationConcept {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}