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
//! 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::*;
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetype?language=objc)
// NS_TYPED_ENUM
pub type HKFHIRResourceType = NSString;
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypeallergyintolerance?language=objc)
pub static HKFHIRResourceTypeAllergyIntolerance: &'static HKFHIRResourceType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypecondition?language=objc)
pub static HKFHIRResourceTypeCondition: &'static HKFHIRResourceType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypecoverage?language=objc)
pub static HKFHIRResourceTypeCoverage: &'static HKFHIRResourceType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypediagnosticreport?language=objc)
pub static HKFHIRResourceTypeDiagnosticReport: &'static HKFHIRResourceType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypedocumentreference?language=objc)
pub static HKFHIRResourceTypeDocumentReference: &'static HKFHIRResourceType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypeimmunization?language=objc)
pub static HKFHIRResourceTypeImmunization: &'static HKFHIRResourceType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypemedicationdispense?language=objc)
pub static HKFHIRResourceTypeMedicationDispense: &'static HKFHIRResourceType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypemedicationorder?language=objc)
pub static HKFHIRResourceTypeMedicationOrder: &'static HKFHIRResourceType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypemedicationrequest?language=objc)
pub static HKFHIRResourceTypeMedicationRequest: &'static HKFHIRResourceType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypemedicationstatement?language=objc)
pub static HKFHIRResourceTypeMedicationStatement: &'static HKFHIRResourceType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypeobservation?language=objc)
pub static HKFHIRResourceTypeObservation: &'static HKFHIRResourceType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresourcetypeprocedure?language=objc)
pub static HKFHIRResourceTypeProcedure: &'static HKFHIRResourceType;
}
extern_class!(
/// The HKFHIRResource class encapsulates a FHIR (Fast Healthcare Interoperability Resources) resource.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfhirresource?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct HKFHIRResource;
);
unsafe impl Send for HKFHIRResource {}
unsafe impl Sync for HKFHIRResource {}
extern_conformance!(
unsafe impl NSCoding for HKFHIRResource {}
);
extern_conformance!(
unsafe impl NSCopying for HKFHIRResource {}
);
unsafe impl CopyingHelper for HKFHIRResource {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for HKFHIRResource {}
);
extern_conformance!(
unsafe impl NSSecureCoding for HKFHIRResource {}
);
impl HKFHIRResource {
extern_methods!(
#[cfg(feature = "HKFHIRVersion")]
/// The FHIR version of the resource data.
#[unsafe(method(FHIRVersion))]
#[unsafe(method_family = none)]
pub unsafe fn FHIRVersion(&self) -> Retained<HKFHIRVersion>;
/// The resource type, corresponding to the 'resourceType' field in the resource's JSON representation.
///
/// May be one of 8 FHIR resource types supported within HealthKit: AllergyIntolerance, Condition,
/// Immunization, MedicationDispense, MedicationOrder, MedicationStatement, Observation, and Procedure.
#[unsafe(method(resourceType))]
#[unsafe(method_family = none)]
pub unsafe fn resourceType(&self) -> Retained<HKFHIRResourceType>;
/// The identifier of the resource, corresponding to the 'id' field in the resource's JSON representation.
///
/// Unique within a given resource type and FHIR end-point, as represented by an HKSource.
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
/// The JSON representation of the FHIR resource.
///
/// Conforms to the HL7 Argonaut Project resource type definitions.
#[unsafe(method(data))]
#[unsafe(method_family = none)]
pub unsafe fn data(&self) -> Retained<NSData>;
/// The fully specified source URL of the FHIR resource.
///
/// This URL can be used to help determine the provenance of the resource. Direct access is protected by
/// OAuth: querying without suitable authorization will result in an authorization error.
#[unsafe(method(sourceURL))]
#[unsafe(method_family = none)]
pub unsafe fn sourceURL(&self) -> Option<Retained<NSURL>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
/// Methods declared on superclass `NSObject`.
impl HKFHIRResource {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}