objc2_pass_kit/generated/
PKIdentityRequest.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// Request for information from an identity document stored as a Wallet pass.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/passkit/pkidentityrequest?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct PKIdentityRequest;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for PKIdentityRequest {}
21);
22
23impl PKIdentityRequest {
24    extern_methods!(
25        #[cfg(feature = "PKIdentityDocumentDescriptor")]
26        /// A descriptor describing the identity document to request.
27        #[unsafe(method(descriptor))]
28        #[unsafe(method_family = none)]
29        pub unsafe fn descriptor(
30            &self,
31        ) -> Option<Retained<ProtocolObject<dyn PKIdentityDocumentDescriptor>>>;
32
33        #[cfg(feature = "PKIdentityDocumentDescriptor")]
34        /// Setter for [`descriptor`][Self::descriptor].
35        #[unsafe(method(setDescriptor:))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn setDescriptor(
38            &self,
39            descriptor: Option<&ProtocolObject<dyn PKIdentityDocumentDescriptor>>,
40        );
41
42        /// A caller-specified nonce that will be included in the signed response payload.
43        /// This is treated as opaque by the PKIdentityAuthorizationController, and has a
44        /// maximum allowed size of 64 bytes.
45        #[unsafe(method(nonce))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn nonce(&self) -> Option<Retained<NSData>>;
48
49        /// Setter for [`nonce`][Self::nonce].
50        ///
51        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
52        #[unsafe(method(setNonce:))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn setNonce(&self, nonce: Option<&NSData>);
55
56        /// Identifies the merchant making the request, as previously agreed with Apple.
57        /// This must match one of the merchant identifiers in the application's entitlement.
58        /// This property must be set when requestDocument is invoked.
59        #[unsafe(method(merchantIdentifier))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn merchantIdentifier(&self) -> Option<Retained<NSString>>;
62
63        /// Setter for [`merchantIdentifier`][Self::merchantIdentifier].
64        ///
65        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
66        #[unsafe(method(setMerchantIdentifier:))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn setMerchantIdentifier(&self, merchant_identifier: Option<&NSString>);
69    );
70}
71
72/// Methods declared on superclass `NSObject`.
73impl PKIdentityRequest {
74    extern_methods!(
75        #[unsafe(method(init))]
76        #[unsafe(method_family = init)]
77        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
78
79        #[unsafe(method(new))]
80        #[unsafe(method_family = new)]
81        pub unsafe fn new() -> Retained<Self>;
82    );
83}