objc2_health_kit/generated/
HKClinicalCoding.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_class!(
10    /// A coding embedded within a system.
11    ///
12    /// 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)
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkclinicalcoding?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct HKClinicalCoding;
18);
19
20unsafe impl Send for HKClinicalCoding {}
21
22unsafe impl Sync for HKClinicalCoding {}
23
24extern_conformance!(
25    unsafe impl NSCoding for HKClinicalCoding {}
26);
27
28extern_conformance!(
29    unsafe impl NSCopying for HKClinicalCoding {}
30);
31
32unsafe impl CopyingHelper for HKClinicalCoding {
33    type Result = Self;
34}
35
36extern_conformance!(
37    unsafe impl NSObjectProtocol for HKClinicalCoding {}
38);
39
40extern_conformance!(
41    unsafe impl NSSecureCoding for HKClinicalCoding {}
42);
43
44impl HKClinicalCoding {
45    extern_methods!(
46        /// A string identifier that uniquely represents a system.
47        ///
48        /// 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.
49        ///
50        /// This property is not atomic.
51        ///
52        /// # Safety
53        ///
54        /// This might not be thread-safe.
55        #[unsafe(method(system))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn system(&self) -> Retained<NSString>;
58
59        /// The version of the coding system, if it is relevant.
60        ///
61        /// This property is not atomic.
62        ///
63        /// # Safety
64        ///
65        /// This might not be thread-safe.
66        #[unsafe(method(version))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn version(&self) -> Option<Retained<NSString>>;
69
70        /// The code for this concept.
71        ///
72        /// The format of this code varies within each system.
73        ///
74        /// This property is not atomic.
75        ///
76        /// # Safety
77        ///
78        /// This might not be thread-safe.
79        #[unsafe(method(code))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn code(&self) -> Retained<NSString>;
82
83        #[unsafe(method(init))]
84        #[unsafe(method_family = init)]
85        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
86
87        /// Initializer for a clinical coding.
88        ///
89        ///
90        /// Parameter `system`: The system for this clinical coding.
91        ///
92        /// Parameter `version`: A version, if applicable.
93        ///
94        /// Parameter `code`: The actual code.
95        #[unsafe(method(initWithSystem:version:code:))]
96        #[unsafe(method_family = init)]
97        pub unsafe fn initWithSystem_version_code(
98            this: Allocated<Self>,
99            system: &NSString,
100            version: Option<&NSString>,
101            code: &NSString,
102        ) -> Retained<Self>;
103    );
104}
105
106/// Methods declared on superclass `NSObject`.
107impl HKClinicalCoding {
108    extern_methods!(
109        #[unsafe(method(new))]
110        #[unsafe(method_family = new)]
111        pub unsafe fn new() -> Retained<Self>;
112    );
113}