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

/// 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>;
    );
}