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_class!(
    /// A coding embedded within a system.
    ///
    /// Typically represents a single abstract concept within a coding system. This model is closely related to the FHIR model for codings. (https://build.fhir.org/datatypes.html#Coding)
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicalcoding?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct HKClinicalCoding;
);

unsafe impl Send for HKClinicalCoding {}

unsafe impl Sync for HKClinicalCoding {}

extern_conformance!(
    unsafe impl NSCoding for HKClinicalCoding {}
);

extern_conformance!(
    unsafe impl NSCopying for HKClinicalCoding {}
);

unsafe impl CopyingHelper for HKClinicalCoding {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for HKClinicalCoding {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for HKClinicalCoding {}
);

impl HKClinicalCoding {
    extern_methods!(
        /// A string identifier that uniquely represents a system.
        ///
        /// In most cases, it will be the canonical reference URL for the coding system with respect to the HL7 Terminology. For the system RxNorm, for example, this would be "http://www.nlm.nih.gov/research/umls/rxnorm", according to https://terminology.hl7.org/CodeSystem-v3-rxNorm.html.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(system))]
        #[unsafe(method_family = none)]
        pub unsafe fn system(&self) -> Retained<NSString>;

        /// The version of the coding system, if it is relevant.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(version))]
        #[unsafe(method_family = none)]
        pub unsafe fn version(&self) -> Option<Retained<NSString>>;

        /// The code for this concept.
        ///
        /// The format of this code varies within each system.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(code))]
        #[unsafe(method_family = none)]
        pub unsafe fn code(&self) -> Retained<NSString>;

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

        /// Initializer for a clinical coding.
        ///
        ///
        /// Parameter `system`: The system for this clinical coding.
        ///
        /// Parameter `version`: A version, if applicable.
        ///
        /// Parameter `code`: The actual code.
        #[unsafe(method(initWithSystem:version:code:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithSystem_version_code(
            this: Allocated<Self>,
            system: &NSString,
            version: Option<&NSString>,
            code: &NSString,
        ) -> Retained<Self>;
    );
}

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