objc2_intents/generated/
INPayBillIntent.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    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inpaybillintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    #[deprecated = "INPayBillIntent is deprecated. There is no replacement."]
16    pub struct INPayBillIntent;
17);
18
19#[cfg(feature = "INIntent")]
20extern_conformance!(
21    unsafe impl NSCoding for INPayBillIntent {}
22);
23
24#[cfg(feature = "INIntent")]
25extern_conformance!(
26    unsafe impl NSCopying for INPayBillIntent {}
27);
28
29#[cfg(feature = "INIntent")]
30unsafe impl CopyingHelper for INPayBillIntent {
31    type Result = Self;
32}
33
34#[cfg(feature = "INIntent")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for INPayBillIntent {}
37);
38
39#[cfg(feature = "INIntent")]
40extern_conformance!(
41    unsafe impl NSSecureCoding for INPayBillIntent {}
42);
43
44#[cfg(feature = "INIntent")]
45impl INPayBillIntent {
46    extern_methods!(
47        #[cfg(all(
48            feature = "INBillPayee",
49            feature = "INBillType",
50            feature = "INDateComponentsRange",
51            feature = "INPaymentAccount",
52            feature = "INPaymentAmount"
53        ))]
54        #[deprecated = "INPayBillIntent is deprecated. There is no replacement."]
55        #[unsafe(method(initWithBillPayee:fromAccount:transactionAmount:transactionScheduledDate:transactionNote:billType:dueDate:))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn initWithBillPayee_fromAccount_transactionAmount_transactionScheduledDate_transactionNote_billType_dueDate(
58            this: Allocated<Self>,
59            bill_payee: Option<&INBillPayee>,
60            from_account: Option<&INPaymentAccount>,
61            transaction_amount: Option<&INPaymentAmount>,
62            transaction_scheduled_date: Option<&INDateComponentsRange>,
63            transaction_note: Option<&NSString>,
64            bill_type: INBillType,
65            due_date: Option<&INDateComponentsRange>,
66        ) -> Retained<Self>;
67
68        #[cfg(feature = "INBillPayee")]
69        #[deprecated = "INPayBillIntent is deprecated. There is no replacement."]
70        #[unsafe(method(billPayee))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn billPayee(&self) -> Option<Retained<INBillPayee>>;
73
74        #[cfg(feature = "INPaymentAccount")]
75        #[deprecated = "INPayBillIntent is deprecated. There is no replacement."]
76        #[unsafe(method(fromAccount))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn fromAccount(&self) -> Option<Retained<INPaymentAccount>>;
79
80        #[cfg(feature = "INPaymentAmount")]
81        #[deprecated = "INPayBillIntent is deprecated. There is no replacement."]
82        #[unsafe(method(transactionAmount))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn transactionAmount(&self) -> Option<Retained<INPaymentAmount>>;
85
86        #[cfg(feature = "INDateComponentsRange")]
87        #[deprecated = "INPayBillIntent is deprecated. There is no replacement."]
88        #[unsafe(method(transactionScheduledDate))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn transactionScheduledDate(&self) -> Option<Retained<INDateComponentsRange>>;
91
92        #[deprecated = "INPayBillIntent is deprecated. There is no replacement."]
93        #[unsafe(method(transactionNote))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn transactionNote(&self) -> Option<Retained<NSString>>;
96
97        #[cfg(feature = "INBillType")]
98        #[deprecated = "INPayBillIntent is deprecated. There is no replacement."]
99        #[unsafe(method(billType))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn billType(&self) -> INBillType;
102
103        #[cfg(feature = "INDateComponentsRange")]
104        #[deprecated = "INPayBillIntent is deprecated. There is no replacement."]
105        #[unsafe(method(dueDate))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn dueDate(&self) -> Option<Retained<INDateComponentsRange>>;
108    );
109}
110
111/// Methods declared on superclass `NSObject`.
112#[cfg(feature = "INIntent")]
113impl INPayBillIntent {
114    extern_methods!(
115        #[unsafe(method(init))]
116        #[unsafe(method_family = init)]
117        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
118
119        #[unsafe(method(new))]
120        #[unsafe(method_family = new)]
121        pub unsafe fn new() -> Retained<Self>;
122    );
123}
124
125extern_protocol!(
126    /// Protocol to declare support for handling an INPayBillIntent. By implementing this protocol, a class can provide logic for resolving, confirming and handling the intent.
127    ///
128    /// The minimum requirement for an implementing class is that it should be able to handle the intent. The resolution and confirmation methods are optional. The handling method is always called last, after resolving and confirming the intent.
129    ///
130    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/inpaybillintenthandling?language=objc)
131    #[deprecated = "INPayBillIntentHandling is deprecated. There is no replacement."]
132    pub unsafe trait INPayBillIntentHandling: NSObjectProtocol {
133        #[cfg(all(
134            feature = "INIntent",
135            feature = "INIntentResponse",
136            feature = "INPayBillIntentResponse",
137            feature = "block2"
138        ))]
139        /// Handling method - Execute the task represented by the INPayBillIntent that's passed in
140        ///
141        /// Called to actually execute the intent. The app must return a response for this intent.
142        ///
143        ///
144        /// Parameter `intent`: The input intent
145        ///
146        /// Parameter `completion`: The response handling block takes a INPayBillIntentResponse containing the details of the result of having executed the intent
147        ///
148        ///
149        /// See: INPayBillIntentResponse
150        #[deprecated = "INPayBillIntentHandling is deprecated. There is no replacement."]
151        #[unsafe(method(handlePayBill:completion:))]
152        #[unsafe(method_family = none)]
153        unsafe fn handlePayBill_completion(
154            &self,
155            intent: &INPayBillIntent,
156            completion: &block2::DynBlock<dyn Fn(NonNull<INPayBillIntentResponse>)>,
157        );
158
159        #[cfg(all(
160            feature = "INIntent",
161            feature = "INIntentResponse",
162            feature = "INPayBillIntentResponse",
163            feature = "block2"
164        ))]
165        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
166        ///
167        /// Called prior to asking the app to handle the intent. The app should return a response object that contains additional information about the intent, which may be relevant for the system to show the user prior to handling. If unimplemented, the system will assume the intent is valid following resolution, and will assume there is no additional information relevant to this intent.
168        ///
169        ///
170        /// Parameter `intent`: The input intent
171        ///
172        /// Parameter `completion`: The response block contains an INPayBillIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
173        ///
174        ///
175        /// See: INPayBillIntentResponse
176        #[deprecated = "INPayBillIntentHandling is deprecated. There is no replacement."]
177        #[optional]
178        #[unsafe(method(confirmPayBill:completion:))]
179        #[unsafe(method_family = none)]
180        unsafe fn confirmPayBill_completion(
181            &self,
182            intent: &INPayBillIntent,
183            completion: &block2::DynBlock<dyn Fn(NonNull<INPayBillIntentResponse>)>,
184        );
185
186        #[cfg(all(
187            feature = "INBillPayeeResolutionResult",
188            feature = "INIntent",
189            feature = "INIntentResolutionResult",
190            feature = "block2"
191        ))]
192        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
193        ///
194        /// Called to make sure the app extension is capable of handling this intent in its current form. This method is for validating if the intent needs any further fleshing out.
195        ///
196        ///
197        /// Parameter `intent`: The input intent
198        ///
199        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
200        ///
201        ///
202        /// See: INIntentResolutionResult
203        #[deprecated = "INPayBillIntentHandling is deprecated. There is no replacement."]
204        #[optional]
205        #[unsafe(method(resolveBillPayeeForPayBill:withCompletion:))]
206        #[unsafe(method_family = none)]
207        unsafe fn resolveBillPayeeForPayBill_withCompletion(
208            &self,
209            intent: &INPayBillIntent,
210            completion: &block2::DynBlock<dyn Fn(NonNull<INBillPayeeResolutionResult>)>,
211        );
212
213        #[cfg(all(
214            feature = "INIntent",
215            feature = "INIntentResolutionResult",
216            feature = "INPaymentAccountResolutionResult",
217            feature = "block2"
218        ))]
219        #[deprecated = "INPayBillIntentHandling is deprecated. There is no replacement."]
220        #[optional]
221        #[unsafe(method(resolveFromAccountForPayBill:withCompletion:))]
222        #[unsafe(method_family = none)]
223        unsafe fn resolveFromAccountForPayBill_withCompletion(
224            &self,
225            intent: &INPayBillIntent,
226            completion: &block2::DynBlock<dyn Fn(NonNull<INPaymentAccountResolutionResult>)>,
227        );
228
229        #[cfg(all(
230            feature = "INIntent",
231            feature = "INIntentResolutionResult",
232            feature = "INPaymentAmountResolutionResult",
233            feature = "block2"
234        ))]
235        #[deprecated = "INPayBillIntentHandling is deprecated. There is no replacement."]
236        #[optional]
237        #[unsafe(method(resolveTransactionAmountForPayBill:withCompletion:))]
238        #[unsafe(method_family = none)]
239        unsafe fn resolveTransactionAmountForPayBill_withCompletion(
240            &self,
241            intent: &INPayBillIntent,
242            completion: &block2::DynBlock<dyn Fn(NonNull<INPaymentAmountResolutionResult>)>,
243        );
244
245        #[cfg(all(
246            feature = "INDateComponentsRangeResolutionResult",
247            feature = "INIntent",
248            feature = "INIntentResolutionResult",
249            feature = "block2"
250        ))]
251        #[deprecated = "INPayBillIntentHandling is deprecated. There is no replacement."]
252        #[optional]
253        #[unsafe(method(resolveTransactionScheduledDateForPayBill:withCompletion:))]
254        #[unsafe(method_family = none)]
255        unsafe fn resolveTransactionScheduledDateForPayBill_withCompletion(
256            &self,
257            intent: &INPayBillIntent,
258            completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
259        );
260
261        #[cfg(all(
262            feature = "INIntent",
263            feature = "INIntentResolutionResult",
264            feature = "INStringResolutionResult",
265            feature = "block2"
266        ))]
267        #[deprecated = "INPayBillIntentHandling is deprecated. There is no replacement."]
268        #[optional]
269        #[unsafe(method(resolveTransactionNoteForPayBill:withCompletion:))]
270        #[unsafe(method_family = none)]
271        unsafe fn resolveTransactionNoteForPayBill_withCompletion(
272            &self,
273            intent: &INPayBillIntent,
274            completion: &block2::DynBlock<dyn Fn(NonNull<INStringResolutionResult>)>,
275        );
276
277        #[cfg(all(
278            feature = "INBillTypeResolutionResult",
279            feature = "INIntent",
280            feature = "INIntentResolutionResult",
281            feature = "block2"
282        ))]
283        #[deprecated = "INPayBillIntentHandling is deprecated. There is no replacement."]
284        #[optional]
285        #[unsafe(method(resolveBillTypeForPayBill:withCompletion:))]
286        #[unsafe(method_family = none)]
287        unsafe fn resolveBillTypeForPayBill_withCompletion(
288            &self,
289            intent: &INPayBillIntent,
290            completion: &block2::DynBlock<dyn Fn(NonNull<INBillTypeResolutionResult>)>,
291        );
292
293        #[cfg(all(
294            feature = "INDateComponentsRangeResolutionResult",
295            feature = "INIntent",
296            feature = "INIntentResolutionResult",
297            feature = "block2"
298        ))]
299        #[deprecated = "INPayBillIntentHandling is deprecated. There is no replacement."]
300        #[optional]
301        #[unsafe(method(resolveDueDateForPayBill:withCompletion:))]
302        #[unsafe(method_family = none)]
303        unsafe fn resolveDueDateForPayBill_withCompletion(
304            &self,
305            intent: &INPayBillIntent,
306            completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
307        );
308    }
309);