objc2_health_kit/generated/
HKClinicalRecord.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 "C" {
10    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathclinicalrecordfhirresourceidentifier?language=objc)
11    pub static HKPredicateKeyPathClinicalRecordFHIRResourceIdentifier: &'static NSString;
12}
13
14extern "C" {
15    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathclinicalrecordfhirresourcetype?language=objc)
16    pub static HKPredicateKeyPathClinicalRecordFHIRResourceType: &'static NSString;
17}
18
19extern_class!(
20    /// An HKObject subclass representing a health record.
21    ///
22    /// The startDate and endDate properties (inherited from HKSample) are set to the date the sample was
23    /// added to Health. Unlike other HKObject subclasses, UUID is not a stable identifier
24    /// for a given sample. Use a combination of HKSource, FHIRResource.resourceType, and
25    /// FHIRResource.identifier instead.
26    ///
27    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicalrecord?language=objc)
28    #[unsafe(super(HKSample, HKObject, NSObject))]
29    #[derive(Debug, PartialEq, Eq, Hash)]
30    #[cfg(all(feature = "HKObject", feature = "HKSample"))]
31    pub struct HKClinicalRecord;
32);
33
34#[cfg(all(feature = "HKObject", feature = "HKSample"))]
35unsafe impl Send for HKClinicalRecord {}
36
37#[cfg(all(feature = "HKObject", feature = "HKSample"))]
38unsafe impl Sync for HKClinicalRecord {}
39
40#[cfg(all(feature = "HKObject", feature = "HKSample"))]
41extern_conformance!(
42    unsafe impl NSCoding for HKClinicalRecord {}
43);
44
45#[cfg(all(feature = "HKObject", feature = "HKSample"))]
46extern_conformance!(
47    unsafe impl NSCopying for HKClinicalRecord {}
48);
49
50#[cfg(all(feature = "HKObject", feature = "HKSample"))]
51unsafe impl CopyingHelper for HKClinicalRecord {
52    type Result = Self;
53}
54
55#[cfg(all(feature = "HKObject", feature = "HKSample"))]
56extern_conformance!(
57    unsafe impl NSObjectProtocol for HKClinicalRecord {}
58);
59
60#[cfg(all(feature = "HKObject", feature = "HKSample"))]
61extern_conformance!(
62    unsafe impl NSSecureCoding for HKClinicalRecord {}
63);
64
65#[cfg(all(feature = "HKObject", feature = "HKSample"))]
66impl HKClinicalRecord {
67    extern_methods!(
68        #[cfg(all(feature = "HKClinicalType", feature = "HKObjectType"))]
69        #[unsafe(method(clinicalType))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn clinicalType(&self) -> Retained<HKClinicalType>;
72
73        /// The primary display name used in Health.
74        ///
75        /// The display name is not localized, and is generally expected to be US English.
76        #[unsafe(method(displayName))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn displayName(&self) -> Retained<NSString>;
79
80        #[cfg(feature = "HKFHIRResource")]
81        /// The FHIR resource (where applicable) backing this sample.
82        #[unsafe(method(FHIRResource))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn FHIRResource(&self) -> Option<Retained<HKFHIRResource>>;
85
86        #[unsafe(method(init))]
87        #[unsafe(method_family = init)]
88        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89
90        #[unsafe(method(new))]
91        #[unsafe(method_family = new)]
92        pub unsafe fn new() -> Retained<Self>;
93    );
94}