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