objc2_pass_kit/generated/
PKIdentityElement.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    /// Elements that can be requested from identity documents. Not
11    /// all elements are supported by all document types. If an element
12    /// is requested from a type that does not support it, the element
13    /// is ignored.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/passkit/pkidentityelement?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct PKIdentityElement;
19);
20
21extern_conformance!(
22    unsafe impl NSCopying for PKIdentityElement {}
23);
24
25unsafe impl CopyingHelper for PKIdentityElement {
26    type Result = Self;
27}
28
29extern_conformance!(
30    unsafe impl NSObjectProtocol for PKIdentityElement {}
31);
32
33impl PKIdentityElement {
34    extern_methods!(
35        /// The user's given name or first name.
36        #[unsafe(method(givenNameElement))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn givenNameElement() -> Retained<PKIdentityElement>;
39
40        /// The user's family name or last name.
41        #[unsafe(method(familyNameElement))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn familyNameElement() -> Retained<PKIdentityElement>;
44
45        /// The portrait of the user on record with the issuer.
46        #[unsafe(method(portraitElement))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn portraitElement() -> Retained<PKIdentityElement>;
49
50        /// The address on record with the issuer.
51        #[unsafe(method(addressElement))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn addressElement() -> Retained<PKIdentityElement>;
54
55        /// The user's height on record with the issuer.
56        #[unsafe(method(heightElement))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn heightElement() -> Retained<PKIdentityElement>;
59
60        /// The user's weight on record with the issuer.
61        #[unsafe(method(weightElement))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn weightElement() -> Retained<PKIdentityElement>;
64
65        /// The user's eye color on record with the issuer.
66        #[unsafe(method(eyeColorElement))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn eyeColorElement() -> Retained<PKIdentityElement>;
69
70        /// The user's hair color on record with the issuer.
71        #[unsafe(method(hairColorElement))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn hairColorElement() -> Retained<PKIdentityElement>;
74
75        /// The user's organ donor status on record with the issuer.
76        #[unsafe(method(organDonorStatusElement))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn organDonorStatusElement() -> Retained<PKIdentityElement>;
79
80        /// The user's veteran status on record with the issuer.
81        #[unsafe(method(veteranStatusElement))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn veteranStatusElement() -> Retained<PKIdentityElement>;
84
85        /// The state or government that issued the identity document.
86        #[unsafe(method(issuingAuthorityElement))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn issuingAuthorityElement() -> Retained<PKIdentityElement>;
89
90        /// The document's issue date. This is usually the issue date of the corresponding physical
91        /// document, if applicable.
92        #[unsafe(method(documentIssueDateElement))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn documentIssueDateElement() -> Retained<PKIdentityElement>;
95
96        /// The document's expiration date. This is usually the expiration date of the corresponding physical
97        /// document, if applicable.
98        #[unsafe(method(documentExpirationDateElement))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn documentExpirationDateElement() -> Retained<PKIdentityElement>;
101
102        /// The document's DHS (U.S. Department of Homeland Security) compliance status.
103        ///
104        /// This is also known as the document's "REAL ID status".
105        #[unsafe(method(documentDHSComplianceStatusElement))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn documentDHSComplianceStatusElement() -> Retained<PKIdentityElement>;
108
109        /// The document's number, as defined by the document's issuing authority.
110        #[unsafe(method(documentNumberElement))]
111        #[unsafe(method_family = none)]
112        pub unsafe fn documentNumberElement() -> Retained<PKIdentityElement>;
113
114        /// The user's driving privileges.
115        #[unsafe(method(drivingPrivilegesElement))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn drivingPrivilegesElement() -> Retained<PKIdentityElement>;
118
119        /// The user's age in years.
120        #[unsafe(method(ageElement))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn ageElement() -> Retained<PKIdentityElement>;
123
124        /// The user's date of birth.
125        #[unsafe(method(dateOfBirthElement))]
126        #[unsafe(method_family = none)]
127        pub unsafe fn dateOfBirthElement() -> Retained<PKIdentityElement>;
128
129        /// The user's sex.
130        #[unsafe(method(sexElement))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn sexElement() -> Retained<PKIdentityElement>;
133
134        /// Boolean indicating whether the user's age is at least the given age.
135        /// For example, ageThresholdElementWithAge:21 will return true if the user is at least 21 years old.
136        /// This value is only available for a given age if it was provided by the issuer. If this value
137        /// is not available, it will automatically fall back to a request for age.
138        #[unsafe(method(ageThresholdElementWithAge:))]
139        #[unsafe(method_family = none)]
140        pub unsafe fn ageThresholdElementWithAge(age: NSInteger) -> Retained<Self>;
141
142        #[unsafe(method(init))]
143        #[unsafe(method_family = init)]
144        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
145
146        #[unsafe(method(new))]
147        #[unsafe(method_family = new)]
148        pub unsafe fn new() -> Retained<Self>;
149    );
150}