objc2-health-kit 0.3.2

Bindings to the HealthKit framework
Documentation
//! 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::*;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathclinicalrecordfhirresourceidentifier?language=objc)
    pub static HKPredicateKeyPathClinicalRecordFHIRResourceIdentifier: &'static NSString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathclinicalrecordfhirresourcetype?language=objc)
    pub static HKPredicateKeyPathClinicalRecordFHIRResourceType: &'static NSString;
}

extern_class!(
    /// An HKObject subclass representing a health record.
    ///
    /// The startDate and endDate properties (inherited from HKSample) are set to the date the sample was
    /// added to Health. Unlike other HKObject subclasses, UUID is not a stable identifier
    /// for a given sample. Use a combination of HKSource, FHIRResource.resourceType, and
    /// FHIRResource.identifier instead.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicalrecord?language=objc)
    #[unsafe(super(HKSample, HKObject, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "HKObject", feature = "HKSample"))]
    pub struct HKClinicalRecord;
);

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
unsafe impl Send for HKClinicalRecord {}

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
unsafe impl Sync for HKClinicalRecord {}

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
extern_conformance!(
    unsafe impl NSCoding for HKClinicalRecord {}
);

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
extern_conformance!(
    unsafe impl NSCopying for HKClinicalRecord {}
);

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
unsafe impl CopyingHelper for HKClinicalRecord {
    type Result = Self;
}

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
extern_conformance!(
    unsafe impl NSObjectProtocol for HKClinicalRecord {}
);

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
extern_conformance!(
    unsafe impl NSSecureCoding for HKClinicalRecord {}
);

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
impl HKClinicalRecord {
    extern_methods!(
        #[cfg(all(feature = "HKClinicalType", feature = "HKObjectType"))]
        #[unsafe(method(clinicalType))]
        #[unsafe(method_family = none)]
        pub unsafe fn clinicalType(&self) -> Retained<HKClinicalType>;

        /// The primary display name used in Health.
        ///
        /// The display name is not localized, and is generally expected to be US English.
        #[unsafe(method(displayName))]
        #[unsafe(method_family = none)]
        pub unsafe fn displayName(&self) -> Retained<NSString>;

        #[cfg(feature = "HKFHIRResource")]
        /// The FHIR resource (where applicable) backing this sample.
        #[unsafe(method(FHIRResource))]
        #[unsafe(method_family = none)]
        pub unsafe fn FHIRResource(&self) -> Option<Retained<HKFHIRResource>>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}