objc2-pass-kit 0.3.2

Bindings to the PassKit 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!(
    /// Elements that can be requested from identity documents. Not
    /// all elements are supported by all document types. If an element
    /// is requested from a type that does not support it, the element
    /// is ignored.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/passkit/pkidentityelement?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct PKIdentityElement;
);

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

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

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

impl PKIdentityElement {
    extern_methods!(
        /// The user's given name or first name.
        #[unsafe(method(givenNameElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn givenNameElement() -> Retained<PKIdentityElement>;

        /// The user's family name or last name.
        #[unsafe(method(familyNameElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn familyNameElement() -> Retained<PKIdentityElement>;

        /// The portrait of the user on record with the issuer.
        #[unsafe(method(portraitElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn portraitElement() -> Retained<PKIdentityElement>;

        /// The address on record with the issuer.
        #[unsafe(method(addressElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn addressElement() -> Retained<PKIdentityElement>;

        /// The user's height on record with the issuer.
        #[unsafe(method(heightElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn heightElement() -> Retained<PKIdentityElement>;

        /// The user's weight on record with the issuer.
        #[unsafe(method(weightElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn weightElement() -> Retained<PKIdentityElement>;

        /// The user's eye color on record with the issuer.
        #[unsafe(method(eyeColorElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn eyeColorElement() -> Retained<PKIdentityElement>;

        /// The user's hair color on record with the issuer.
        #[unsafe(method(hairColorElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn hairColorElement() -> Retained<PKIdentityElement>;

        /// The user's organ donor status on record with the issuer.
        #[unsafe(method(organDonorStatusElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn organDonorStatusElement() -> Retained<PKIdentityElement>;

        /// The user's veteran status on record with the issuer.
        #[unsafe(method(veteranStatusElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn veteranStatusElement() -> Retained<PKIdentityElement>;

        /// The state or government that issued the identity document.
        #[unsafe(method(issuingAuthorityElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn issuingAuthorityElement() -> Retained<PKIdentityElement>;

        /// The document's issue date. This is usually the issue date of the corresponding physical
        /// document, if applicable.
        #[unsafe(method(documentIssueDateElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentIssueDateElement() -> Retained<PKIdentityElement>;

        /// The document's expiration date. This is usually the expiration date of the corresponding physical
        /// document, if applicable.
        #[unsafe(method(documentExpirationDateElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentExpirationDateElement() -> Retained<PKIdentityElement>;

        /// The document's DHS (U.S. Department of Homeland Security) compliance status.
        ///
        /// This is also known as the document's "REAL ID status".
        #[unsafe(method(documentDHSComplianceStatusElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentDHSComplianceStatusElement() -> Retained<PKIdentityElement>;

        /// The document's number, as defined by the document's issuing authority.
        #[unsafe(method(documentNumberElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentNumberElement() -> Retained<PKIdentityElement>;

        /// The user's driving privileges.
        #[unsafe(method(drivingPrivilegesElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn drivingPrivilegesElement() -> Retained<PKIdentityElement>;

        /// The user's age in years.
        #[unsafe(method(ageElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn ageElement() -> Retained<PKIdentityElement>;

        /// The user's date of birth.
        #[unsafe(method(dateOfBirthElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn dateOfBirthElement() -> Retained<PKIdentityElement>;

        /// The user's sex.
        #[unsafe(method(sexElement))]
        #[unsafe(method_family = none)]
        pub unsafe fn sexElement() -> Retained<PKIdentityElement>;

        /// Boolean indicating whether the user's age is at least the given age.
        /// For example, ageThresholdElementWithAge:21 will return true if the user is at least 21 years old.
        /// This value is only available for a given age if it was provided by the issuer. If this value
        /// is not available, it will automatically fall back to a request for age.
        #[unsafe(method(ageThresholdElementWithAge:))]
        #[unsafe(method_family = none)]
        pub unsafe fn ageThresholdElementWithAge(age: NSInteger) -> Retained<Self>;

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

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}