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:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn setCardholderName(&self, cardholder_name: Option<&NSString>);
73
74 #[unsafe(method(primaryAccountSuffix))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn primaryAccountSuffix(&self) -> Option<Retained<NSString>>;
77
78 #[unsafe(method(setPrimaryAccountSuffix:))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn setPrimaryAccountSuffix(&self, primary_account_suffix: Option<&NSString>);
82
83 #[cfg(feature = "PKLabeledValue")]
84 #[unsafe(method(cardDetails))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn cardDetails(&self) -> Retained<NSArray<PKLabeledValue>>;
87
88 #[cfg(feature = "PKLabeledValue")]
89 #[unsafe(method(setCardDetails:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn setCardDetails(&self, card_details: &NSArray<PKLabeledValue>);
93
94 #[unsafe(method(localizedDescription))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn localizedDescription(&self) -> Option<Retained<NSString>>;
97
98 #[unsafe(method(setLocalizedDescription:))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn setLocalizedDescription(&self, localized_description: Option<&NSString>);
102
103 #[unsafe(method(primaryAccountIdentifier))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn primaryAccountIdentifier(&self) -> Option<Retained<NSString>>;
106
107 #[unsafe(method(setPrimaryAccountIdentifier:))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn setPrimaryAccountIdentifier(
111 &self,
112 primary_account_identifier: Option<&NSString>,
113 );
114
115 #[cfg(feature = "PKConstants")]
116 #[unsafe(method(paymentNetwork))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn paymentNetwork(&self) -> Option<Retained<PKPaymentNetwork>>;
119
120 #[cfg(feature = "PKConstants")]
121 #[unsafe(method(setPaymentNetwork:))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn setPaymentNetwork(&self, payment_network: Option<&PKPaymentNetwork>);
125
126 #[unsafe(method(productIdentifiers))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn productIdentifiers(&self) -> Retained<NSSet<NSString>>;
129
130 #[unsafe(method(setProductIdentifiers:))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn setProductIdentifiers(&self, product_identifiers: &NSSet<NSString>);
134
135 #[unsafe(method(requiresFelicaSecureElement))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn requiresFelicaSecureElement(&self) -> bool;
138
139 #[unsafe(method(setRequiresFelicaSecureElement:))]
141 #[unsafe(method_family = none)]
142 pub unsafe fn setRequiresFelicaSecureElement(&self, requires_felica_secure_element: bool);
143 );
144}
145
146impl PKAddPaymentPassRequestConfiguration {
148 extern_methods!(
149 #[unsafe(method(init))]
150 #[unsafe(method_family = init)]
151 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
152
153 #[unsafe(method(new))]
154 #[unsafe(method_family = new)]
155 pub unsafe fn new() -> Retained<Self>;
156 );
157}
158
159extern_class!(
160 #[unsafe(super(NSObject))]
162 #[derive(Debug, PartialEq, Eq, Hash)]
163 pub struct PKAddPaymentPassRequest;
164);
165
166extern_conformance!(
167 unsafe impl NSObjectProtocol for PKAddPaymentPassRequest {}
168);
169
170impl PKAddPaymentPassRequest {
171 extern_methods!(
172 #[unsafe(method(init))]
173 #[unsafe(method_family = init)]
174 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
175
176 #[unsafe(method(encryptedPassData))]
177 #[unsafe(method_family = none)]
178 pub unsafe fn encryptedPassData(&self) -> Option<Retained<NSData>>;
179
180 #[unsafe(method(setEncryptedPassData:))]
182 #[unsafe(method_family = none)]
183 pub unsafe fn setEncryptedPassData(&self, encrypted_pass_data: Option<&NSData>);
184
185 #[unsafe(method(activationData))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn activationData(&self) -> Option<Retained<NSData>>;
188
189 #[unsafe(method(setActivationData:))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn setActivationData(&self, activation_data: Option<&NSData>);
193
194 #[unsafe(method(ephemeralPublicKey))]
195 #[unsafe(method_family = none)]
196 pub unsafe fn ephemeralPublicKey(&self) -> Option<Retained<NSData>>;
197
198 #[unsafe(method(setEphemeralPublicKey:))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn setEphemeralPublicKey(&self, ephemeral_public_key: Option<&NSData>);
202
203 #[unsafe(method(wrappedKey))]
204 #[unsafe(method_family = none)]
205 pub unsafe fn wrappedKey(&self) -> Option<Retained<NSData>>;
206
207 #[unsafe(method(setWrappedKey:))]
209 #[unsafe(method_family = none)]
210 pub unsafe fn setWrappedKey(&self, wrapped_key: Option<&NSData>);
211 );
212}
213
214impl PKAddPaymentPassRequest {
216 extern_methods!(
217 #[unsafe(method(new))]
218 #[unsafe(method_family = new)]
219 pub unsafe fn new() -> Retained<Self>;
220 );
221}