objc2_intents/generated/
INGetUserCurrentRestaurantReservationBookingsIntent.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/ingetusercurrentrestaurantreservationbookingsintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    pub struct INGetUserCurrentRestaurantReservationBookingsIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20    unsafe impl NSCoding for INGetUserCurrentRestaurantReservationBookingsIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25    unsafe impl NSCopying for INGetUserCurrentRestaurantReservationBookingsIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INGetUserCurrentRestaurantReservationBookingsIntent {
30    type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for INGetUserCurrentRestaurantReservationBookingsIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40    unsafe impl NSSecureCoding for INGetUserCurrentRestaurantReservationBookingsIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INGetUserCurrentRestaurantReservationBookingsIntent {
45    extern_methods!(
46        #[cfg(feature = "INRestaurant")]
47        #[unsafe(method(initWithRestaurant:reservationIdentifier:maximumNumberOfResults:earliestBookingDateForResults:))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn initWithRestaurant_reservationIdentifier_maximumNumberOfResults_earliestBookingDateForResults(
50            this: Allocated<Self>,
51            restaurant: Option<&INRestaurant>,
52            reservation_identifier: Option<&NSString>,
53            maximum_number_of_results: Option<&NSNumber>,
54            earliest_booking_date_for_results: Option<&NSDate>,
55        ) -> Retained<Self>;
56
57        #[cfg(feature = "INRestaurant")]
58        #[unsafe(method(restaurant))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn restaurant(&self) -> Option<Retained<INRestaurant>>;
61
62        #[cfg(feature = "INRestaurant")]
63        /// Setter for [`restaurant`][Self::restaurant].
64        ///
65        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
66        #[unsafe(method(setRestaurant:))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn setRestaurant(&self, restaurant: Option<&INRestaurant>);
69
70        #[unsafe(method(reservationIdentifier))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn reservationIdentifier(&self) -> Option<Retained<NSString>>;
73
74        /// Setter for [`reservationIdentifier`][Self::reservationIdentifier].
75        ///
76        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
77        #[unsafe(method(setReservationIdentifier:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn setReservationIdentifier(&self, reservation_identifier: Option<&NSString>);
80
81        #[unsafe(method(maximumNumberOfResults))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn maximumNumberOfResults(&self) -> Option<Retained<NSNumber>>;
84
85        /// Setter for [`maximumNumberOfResults`][Self::maximumNumberOfResults].
86        ///
87        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
88        #[unsafe(method(setMaximumNumberOfResults:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn setMaximumNumberOfResults(
91            &self,
92            maximum_number_of_results: Option<&NSNumber>,
93        );
94
95        #[unsafe(method(earliestBookingDateForResults))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn earliestBookingDateForResults(&self) -> Option<Retained<NSDate>>;
98
99        /// Setter for [`earliestBookingDateForResults`][Self::earliestBookingDateForResults].
100        ///
101        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
102        #[unsafe(method(setEarliestBookingDateForResults:))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn setEarliestBookingDateForResults(
105            &self,
106            earliest_booking_date_for_results: Option<&NSDate>,
107        );
108    );
109}
110
111/// Methods declared on superclass `NSObject`.
112#[cfg(feature = "INIntent")]
113impl INGetUserCurrentRestaurantReservationBookingsIntent {
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    /// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetusercurrentrestaurantreservationbookingsintenthandling?language=objc)
127    pub unsafe trait INGetUserCurrentRestaurantReservationBookingsIntentHandling:
128        NSObjectProtocol
129    {
130        #[cfg(all(
131            feature = "INGetUserCurrentRestaurantReservationBookingsIntentResponse",
132            feature = "INIntent",
133            feature = "INIntentResponse",
134            feature = "block2"
135        ))]
136        /// Handling method - Execute the task represented by the INGetUserCurrentRestaurantReservationBookingsIntent that's passed in
137        ///
138        /// This method is called to actually execute the intent, the app must return a response for this intent and an NSUserActivity capturing the state that the app must be restored to at the end of handling this intent
139        ///
140        ///
141        /// Parameter `intent`: The input intent
142        ///
143        /// Parameter `completion`: The response handling block to invoke with the response to handling the intent.
144        ///
145        ///
146        /// See: INGetUserCurrentRestaurantReservationBookingsIntentResponse
147        #[unsafe(method(handleGetUserCurrentRestaurantReservationBookings:completion:))]
148        #[unsafe(method_family = none)]
149        unsafe fn handleGetUserCurrentRestaurantReservationBookings_completion(
150            &self,
151            intent: &INGetUserCurrentRestaurantReservationBookingsIntent,
152            completion: &block2::DynBlock<
153                dyn Fn(NonNull<INGetUserCurrentRestaurantReservationBookingsIntentResponse>),
154            >,
155        );
156
157        #[cfg(all(
158            feature = "INGetUserCurrentRestaurantReservationBookingsIntentResponse",
159            feature = "INIntent",
160            feature = "INIntentResponse",
161            feature = "block2"
162        ))]
163        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
164        ///
165        /// These methods are 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.
166        ///
167        ///
168        /// Parameter `intent`: The input intent
169        ///
170        /// Parameter `completion`: The response block contains an INGetUserCurrentRestaurantReservationBookingsIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
171        ///
172        ///
173        /// See: INGetUserCurrentRestaurantReservationBookingsIntentResponse
174        #[optional]
175        #[unsafe(method(confirmGetUserCurrentRestaurantReservationBookings:completion:))]
176        #[unsafe(method_family = none)]
177        unsafe fn confirmGetUserCurrentRestaurantReservationBookings_completion(
178            &self,
179            intent: &INGetUserCurrentRestaurantReservationBookingsIntent,
180            completion: &block2::DynBlock<
181                dyn Fn(NonNull<INGetUserCurrentRestaurantReservationBookingsIntentResponse>),
182            >,
183        );
184
185        #[cfg(all(
186            feature = "INIntent",
187            feature = "INIntentResolutionResult",
188            feature = "INRestaurantResolutionResult",
189            feature = "block2"
190        ))]
191        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
192        ///
193        /// These methods are 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.
194        ///
195        ///
196        /// Parameter `intent`: The input intent
197        ///
198        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
199        ///
200        ///
201        /// See: INGetUserCurrentRestaurantReservationBookingsIntentResponse
202        #[optional]
203        #[unsafe(method(resolveRestaurantForGetUserCurrentRestaurantReservationBookings:withCompletion:))]
204        #[unsafe(method_family = none)]
205        unsafe fn resolveRestaurantForGetUserCurrentRestaurantReservationBookings_withCompletion(
206            &self,
207            intent: &INGetUserCurrentRestaurantReservationBookingsIntent,
208            completion: &block2::DynBlock<dyn Fn(NonNull<INRestaurantResolutionResult>)>,
209        );
210    }
211);