objc2_health_kit/generated/
HKVerifiableClinicalRecord.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
9/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkverifiableclinicalrecordsourcetype?language=objc)
10// NS_TYPED_ENUM
11pub type HKVerifiableClinicalRecordSourceType = NSString;
12
13extern "C" {
14    /// Represents a SMART Health Card source type for a verifiable record.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkverifiableclinicalrecordsourcetypesmarthealthcard?language=objc)
17    pub static HKVerifiableClinicalRecordSourceTypeSMARTHealthCard:
18        &'static HKVerifiableClinicalRecordSourceType;
19}
20
21extern "C" {
22    /// Represents a EU Digital COVID Certificate source type for a verifiable record.
23    ///
24    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkverifiableclinicalrecordsourcetypeeudigitalcovidcertificate?language=objc)
25    pub static HKVerifiableClinicalRecordSourceTypeEUDigitalCOVIDCertificate:
26        &'static HKVerifiableClinicalRecordSourceType;
27}
28
29/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkverifiableclinicalrecordcredentialtype?language=objc)
30// NS_TYPED_ENUM
31pub type HKVerifiableClinicalRecordCredentialType = NSString;
32
33extern "C" {
34    /// Represents the COVID-19 credential type for a verifiable record.
35    ///
36    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkverifiableclinicalrecordcredentialtypecovid19?language=objc)
37    pub static HKVerifiableClinicalRecordCredentialTypeCOVID19:
38        &'static HKVerifiableClinicalRecordCredentialType;
39}
40
41extern "C" {
42    /// Represents the immunization credential type for a verifiable record.
43    ///
44    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkverifiableclinicalrecordcredentialtypeimmunization?language=objc)
45    pub static HKVerifiableClinicalRecordCredentialTypeImmunization:
46        &'static HKVerifiableClinicalRecordCredentialType;
47}
48
49extern "C" {
50    /// Represents the laboratory credential type for a verifiable record.
51    ///
52    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkverifiableclinicalrecordcredentialtypelaboratory?language=objc)
53    pub static HKVerifiableClinicalRecordCredentialTypeLaboratory:
54        &'static HKVerifiableClinicalRecordCredentialType;
55}
56
57extern "C" {
58    /// Represents the recovery credential type for a verifiable record.
59    ///
60    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkverifiableclinicalrecordcredentialtyperecovery?language=objc)
61    pub static HKVerifiableClinicalRecordCredentialTypeRecovery:
62        &'static HKVerifiableClinicalRecordCredentialType;
63}
64
65extern_class!(
66    /// An NSObject that represents a verifiable clinical record.
67    ///
68    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkverifiableclinicalrecord?language=objc)
69    #[unsafe(super(HKSample, HKObject, NSObject))]
70    #[derive(Debug, PartialEq, Eq, Hash)]
71    #[cfg(all(feature = "HKObject", feature = "HKSample"))]
72    pub struct HKVerifiableClinicalRecord;
73);
74
75#[cfg(all(feature = "HKObject", feature = "HKSample"))]
76unsafe impl Send for HKVerifiableClinicalRecord {}
77
78#[cfg(all(feature = "HKObject", feature = "HKSample"))]
79unsafe impl Sync for HKVerifiableClinicalRecord {}
80
81#[cfg(all(feature = "HKObject", feature = "HKSample"))]
82extern_conformance!(
83    unsafe impl NSCoding for HKVerifiableClinicalRecord {}
84);
85
86#[cfg(all(feature = "HKObject", feature = "HKSample"))]
87extern_conformance!(
88    unsafe impl NSObjectProtocol for HKVerifiableClinicalRecord {}
89);
90
91#[cfg(all(feature = "HKObject", feature = "HKSample"))]
92extern_conformance!(
93    unsafe impl NSSecureCoding for HKVerifiableClinicalRecord {}
94);
95
96#[cfg(all(feature = "HKObject", feature = "HKSample"))]
97impl HKVerifiableClinicalRecord {
98    extern_methods!(
99        /// The types present in this record.
100        #[unsafe(method(recordTypes))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn recordTypes(&self) -> Retained<NSArray<NSString>>;
103
104        /// The identifier for the issuer of this record.
105        #[unsafe(method(issuerIdentifier))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn issuerIdentifier(&self) -> Retained<NSString>;
108
109        #[cfg(feature = "HKVerifiableClinicalRecordSubject")]
110        /// The subject of this record.
111        #[unsafe(method(subject))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn subject(&self) -> Retained<HKVerifiableClinicalRecordSubject>;
114
115        /// The date this record was issued.
116        #[unsafe(method(issuedDate))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn issuedDate(&self) -> Retained<NSDate>;
119
120        /// A date most relevant to this record, like when a vaccine was
121        /// administered or a test was performed.
122        #[unsafe(method(relevantDate))]
123        #[unsafe(method_family = none)]
124        pub unsafe fn relevantDate(&self) -> Retained<NSDate>;
125
126        /// The date this record expires.
127        #[unsafe(method(expirationDate))]
128        #[unsafe(method_family = none)]
129        pub unsafe fn expirationDate(&self) -> Option<Retained<NSDate>>;
130
131        /// A list of display names for each item contained in this record.
132        #[unsafe(method(itemNames))]
133        #[unsafe(method_family = none)]
134        pub unsafe fn itemNames(&self) -> Retained<NSArray<NSString>>;
135
136        /// The type of the source leading to this verifiable record.
137        #[unsafe(method(sourceType))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn sourceType(&self) -> Option<Retained<HKVerifiableClinicalRecordSourceType>>;
140
141        /// The record's data representation, determined by source type.
142        #[unsafe(method(dataRepresentation))]
143        #[unsafe(method_family = none)]
144        pub unsafe fn dataRepresentation(&self) -> Retained<NSData>;
145
146        /// The record's entirety as JSON Web Signature (JWS) data.
147        #[deprecated]
148        #[unsafe(method(JWSRepresentation))]
149        #[unsafe(method_family = none)]
150        pub unsafe fn JWSRepresentation(&self) -> Retained<NSData>;
151
152        #[unsafe(method(init))]
153        #[unsafe(method_family = init)]
154        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
155
156        #[unsafe(method(new))]
157        #[unsafe(method_family = new)]
158        pub unsafe fn new() -> Retained<Self>;
159    );
160}