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::*;

/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicaltypeidentifier?language=objc)
// NS_TYPED_ENUM
pub type HKClinicalTypeIdentifier = NSString;

extern "C" {
    /// A type identifier for records of allergies or intolerances.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicaltypeidentifierallergyrecord?language=objc)
    pub static HKClinicalTypeIdentifierAllergyRecord: &'static HKClinicalTypeIdentifier;
}

extern "C" {
    /// A type identifier for records that represent clinical notes.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicaltypeidentifierclinicalnoterecord?language=objc)
    pub static HKClinicalTypeIdentifierClinicalNoteRecord: &'static HKClinicalTypeIdentifier;
}

extern "C" {
    /// A type identifier for records of a condition, problem, or diagnosis.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicaltypeidentifierconditionrecord?language=objc)
    pub static HKClinicalTypeIdentifierConditionRecord: &'static HKClinicalTypeIdentifier;
}

extern "C" {
    /// A type identifier for records of vaccine administration.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicaltypeidentifierimmunizationrecord?language=objc)
    pub static HKClinicalTypeIdentifierImmunizationRecord: &'static HKClinicalTypeIdentifier;
}

extern "C" {
    /// A type identifier for records of lab results.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicaltypeidentifierlabresultrecord?language=objc)
    pub static HKClinicalTypeIdentifierLabResultRecord: &'static HKClinicalTypeIdentifier;
}

extern "C" {
    /// A type identifier for records of medication prescription, intake, or administration.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicaltypeidentifiermedicationrecord?language=objc)
    pub static HKClinicalTypeIdentifierMedicationRecord: &'static HKClinicalTypeIdentifier;
}

extern "C" {
    /// A type identifier for records of clinical procedures.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicaltypeidentifierprocedurerecord?language=objc)
    pub static HKClinicalTypeIdentifierProcedureRecord: &'static HKClinicalTypeIdentifier;
}

extern "C" {
    /// A type identifier for records of vital signs.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicaltypeidentifiervitalsignrecord?language=objc)
    pub static HKClinicalTypeIdentifierVitalSignRecord: &'static HKClinicalTypeIdentifier;
}

extern "C" {
    /// A type identifier for records containing information about the user’s insurance coverage.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicaltypeidentifiercoveragerecord?language=objc)
    pub static HKClinicalTypeIdentifierCoverageRecord: &'static HKClinicalTypeIdentifier;
}

/// ClinicalType.
#[cfg(feature = "HKObjectType")]
impl HKObjectType {
    extern_methods!(
        #[unsafe(method(clinicalTypeForIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn clinicalTypeForIdentifier(
            identifier: &HKClinicalTypeIdentifier,
        ) -> Option<Retained<HKClinicalType>>;
    );
}

extern_class!(
    /// A type that identifies samples that contain clinical record data.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicaltype?language=objc)
    #[unsafe(super(HKSampleType, HKObjectType, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "HKObjectType")]
    pub struct HKClinicalType;
);

#[cfg(feature = "HKObjectType")]
unsafe impl Send for HKClinicalType {}

#[cfg(feature = "HKObjectType")]
unsafe impl Sync for HKClinicalType {}

#[cfg(feature = "HKObjectType")]
extern_conformance!(
    unsafe impl NSCoding for HKClinicalType {}
);

#[cfg(feature = "HKObjectType")]
extern_conformance!(
    unsafe impl NSCopying for HKClinicalType {}
);

#[cfg(feature = "HKObjectType")]
unsafe impl CopyingHelper for HKClinicalType {
    type Result = Self;
}

#[cfg(feature = "HKObjectType")]
extern_conformance!(
    unsafe impl NSObjectProtocol for HKClinicalType {}
);

#[cfg(feature = "HKObjectType")]
extern_conformance!(
    unsafe impl NSSecureCoding for HKClinicalType {}
);

#[cfg(feature = "HKObjectType")]
impl HKClinicalType {
    extern_methods!();
}

/// Methods declared on superclass `HKObjectType`.
#[cfg(feature = "HKObjectType")]
impl HKClinicalType {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "HKObjectType")]
impl HKClinicalType {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}