objc2_pass_kit/generated/
PKAddPaymentPassRequest.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct PKAddPaymentPassStyle(pub NSInteger);
15impl PKAddPaymentPassStyle {
16 #[doc(alias = "PKAddPaymentPassStylePayment")]
17 pub const Payment: Self = Self(0);
18 #[doc(alias = "PKAddPaymentPassStyleAccess")]
19 pub const Access: Self = Self(1);
20}
21
22unsafe impl Encode for PKAddPaymentPassStyle {
23 const ENCODING: Encoding = NSInteger::ENCODING;
24}
25
26unsafe impl RefEncode for PKAddPaymentPassStyle {
27 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
28}
29
30extern_class!(
31 #[unsafe(super(NSObject))]
33 #[derive(Debug, PartialEq, Eq, Hash)]
34 pub struct PKAddPaymentPassRequestConfiguration;
35);
36
37extern_conformance!(
38 unsafe impl NSObjectProtocol for PKAddPaymentPassRequestConfiguration {}
39);
40
41impl PKAddPaymentPassRequestConfiguration {
42 extern_methods!(
43 #[cfg(feature = "PKConstants")]
44 #[unsafe(method(initWithEncryptionScheme:))]
45 #[unsafe(method_family = init)]
46 pub unsafe fn initWithEncryptionScheme(
47 this: Allocated<Self>,
48 encryption_scheme: &PKEncryptionScheme,
49 ) -> Option<Retained<Self>>;
50
51 #[cfg(feature = "PKConstants")]
52 #[unsafe(method(encryptionScheme))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn encryptionScheme(&self) -> Retained<PKEncryptionScheme>;
55
56 #[unsafe(method(style))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn style(&self) -> PKAddPaymentPassStyle;
59
60 #[unsafe(method(setStyle:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn setStyle(&self, style: PKAddPaymentPassStyle);
64
65 #[unsafe(method(cardholderName))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn cardholderName(&self) -> Option<Retained<NSString>>;
68
69 #[unsafe(method(setCardholderName:))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn setCardholderName(&self, cardholder_name: Option<&NSString>);
75
76 #[unsafe(method(primaryAccountSuffix))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn primaryAccountSuffix(&self) -> Option<Retained<NSString>>;
79
80 #[unsafe(method(setPrimaryAccountSuffix:))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn setPrimaryAccountSuffix(&self, primary_account_suffix: Option<&NSString>);
86
87 #[cfg(feature = "PKLabeledValue")]
88 #[unsafe(method(cardDetails))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn cardDetails(&self) -> Retained<NSArray<PKLabeledValue>>;
91
92 #[cfg(feature = "PKLabeledValue")]
93 #[unsafe(method(setCardDetails:))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn setCardDetails(&self, card_details: &NSArray<PKLabeledValue>);
99
100 #[unsafe(method(localizedDescription))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn localizedDescription(&self) -> Option<Retained<NSString>>;
103
104 #[unsafe(method(setLocalizedDescription:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn setLocalizedDescription(&self, localized_description: Option<&NSString>);
110
111 #[unsafe(method(primaryAccountIdentifier))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn primaryAccountIdentifier(&self) -> Option<Retained<NSString>>;
114
115 #[unsafe(method(setPrimaryAccountIdentifier:))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn setPrimaryAccountIdentifier(
121 &self,
122 primary_account_identifier: Option<&NSString>,
123 );
124
125 #[cfg(feature = "PKConstants")]
126 #[unsafe(method(paymentNetwork))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn paymentNetwork(&self) -> Option<Retained<PKPaymentNetwork>>;
129
130 #[cfg(feature = "PKConstants")]
131 #[unsafe(method(setPaymentNetwork:))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn setPaymentNetwork(&self, payment_network: Option<&PKPaymentNetwork>);
137
138 #[unsafe(method(productIdentifiers))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn productIdentifiers(&self) -> Retained<NSSet<NSString>>;
141
142 #[unsafe(method(setProductIdentifiers:))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn setProductIdentifiers(&self, product_identifiers: &NSSet<NSString>);
148
149 #[unsafe(method(requiresFelicaSecureElement))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn requiresFelicaSecureElement(&self) -> bool;
152
153 #[unsafe(method(setRequiresFelicaSecureElement:))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn setRequiresFelicaSecureElement(&self, requires_felica_secure_element: bool);
157 );
158}
159
160impl PKAddPaymentPassRequestConfiguration {
162 extern_methods!(
163 #[unsafe(method(init))]
164 #[unsafe(method_family = init)]
165 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
166
167 #[unsafe(method(new))]
168 #[unsafe(method_family = new)]
169 pub unsafe fn new() -> Retained<Self>;
170 );
171}
172
173extern_class!(
174 #[unsafe(super(NSObject))]
176 #[derive(Debug, PartialEq, Eq, Hash)]
177 pub struct PKAddPaymentPassRequest;
178);
179
180extern_conformance!(
181 unsafe impl NSObjectProtocol for PKAddPaymentPassRequest {}
182);
183
184impl PKAddPaymentPassRequest {
185 extern_methods!(
186 #[unsafe(method(init))]
187 #[unsafe(method_family = init)]
188 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
189
190 #[unsafe(method(encryptedPassData))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn encryptedPassData(&self) -> Option<Retained<NSData>>;
193
194 #[unsafe(method(setEncryptedPassData:))]
198 #[unsafe(method_family = none)]
199 pub unsafe fn setEncryptedPassData(&self, encrypted_pass_data: Option<&NSData>);
200
201 #[unsafe(method(activationData))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn activationData(&self) -> Option<Retained<NSData>>;
204
205 #[unsafe(method(setActivationData:))]
209 #[unsafe(method_family = none)]
210 pub unsafe fn setActivationData(&self, activation_data: Option<&NSData>);
211
212 #[unsafe(method(ephemeralPublicKey))]
213 #[unsafe(method_family = none)]
214 pub unsafe fn ephemeralPublicKey(&self) -> Option<Retained<NSData>>;
215
216 #[unsafe(method(setEphemeralPublicKey:))]
220 #[unsafe(method_family = none)]
221 pub unsafe fn setEphemeralPublicKey(&self, ephemeral_public_key: Option<&NSData>);
222
223 #[unsafe(method(wrappedKey))]
224 #[unsafe(method_family = none)]
225 pub unsafe fn wrappedKey(&self) -> Option<Retained<NSData>>;
226
227 #[unsafe(method(setWrappedKey:))]
231 #[unsafe(method_family = none)]
232 pub unsafe fn setWrappedKey(&self, wrapped_key: Option<&NSData>);
233 );
234}
235
236impl PKAddPaymentPassRequest {
238 extern_methods!(
239 #[unsafe(method(new))]
240 #[unsafe(method_family = new)]
241 pub unsafe fn new() -> Retained<Self>;
242 );
243}