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 state or government that issued the identity document.
56        #[unsafe(method(issuingAuthorityElement))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn issuingAuthorityElement() -> Retained<PKIdentityElement>;
59
60        /// The document's issue date. This is usually the issue date of the corresponding physical
61        /// document, if applicable.
62        #[unsafe(method(documentIssueDateElement))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn documentIssueDateElement() -> Retained<PKIdentityElement>;
65
66        /// The document's expiration date. This is usually the expiration date of the corresponding physical
67        /// document, if applicable.
68        #[unsafe(method(documentExpirationDateElement))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn documentExpirationDateElement() -> Retained<PKIdentityElement>;
71
72        /// The document's DHS (U.S. Department of Homeland Security) compliance status.
73        ///
74        /// This is also known as the document's "REAL ID status".
75        #[unsafe(method(documentDHSComplianceStatusElement))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn documentDHSComplianceStatusElement() -> Retained<PKIdentityElement>;
78
79        /// The doument's number, as defined by the document's issuing authority.
80        #[unsafe(method(documentNumberElement))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn documentNumberElement() -> Retained<PKIdentityElement>;
83
84        /// The user's driving privileges.
85        #[unsafe(method(drivingPrivilegesElement))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn drivingPrivilegesElement() -> Retained<PKIdentityElement>;
88
89        /// The user's age in years.
90        #[unsafe(method(ageElement))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn ageElement() -> Retained<PKIdentityElement>;
93
94        /// The user's date of birth.
95        #[unsafe(method(dateOfBirthElement))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn dateOfBirthElement() -> Retained<PKIdentityElement>;
98
99        /// The user's sex.
100        #[unsafe(method(sexElement))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn sexElement() -> Retained<PKIdentityElement>;
103
104        /// Boolean indicating whether the user's age is at least the given age.
105        /// For example, ageThresholdElementWithAge:21 will return true if the user is at least 21 years old.
106        /// This value is only available for a given age if it was provided by the issuer. If this value
107        /// is not available, it will automatically fall back to a request for age.
108        #[unsafe(method(ageThresholdElementWithAge:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn ageThresholdElementWithAge(age: NSInteger) -> Retained<Self>;
111
112        #[unsafe(method(init))]
113        #[unsafe(method_family = init)]
114        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
115
116        #[unsafe(method(new))]
117        #[unsafe(method_family = new)]
118        pub unsafe fn new() -> Retained<Self>;
119    );
120}