objc2_intents/generated/
INGetAvailableRestaurantReservationBookingsIntent.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/ingetavailablerestaurantreservationbookingsintent?language=objc)
12    #[unsafe(super(INIntent, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "INIntent")]
15    pub struct INGetAvailableRestaurantReservationBookingsIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20    unsafe impl NSCoding for INGetAvailableRestaurantReservationBookingsIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25    unsafe impl NSCopying for INGetAvailableRestaurantReservationBookingsIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INGetAvailableRestaurantReservationBookingsIntent {
30    type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for INGetAvailableRestaurantReservationBookingsIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40    unsafe impl NSSecureCoding for INGetAvailableRestaurantReservationBookingsIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INGetAvailableRestaurantReservationBookingsIntent {
45    extern_methods!(
46        #[cfg(feature = "INRestaurant")]
47        #[unsafe(method(initWithRestaurant:partySize:preferredBookingDateComponents:maximumNumberOfResults:earliestBookingDateForResults:latestBookingDateForResults:))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn initWithRestaurant_partySize_preferredBookingDateComponents_maximumNumberOfResults_earliestBookingDateForResults_latestBookingDateForResults(
50            this: Allocated<Self>,
51            restaurant: &INRestaurant,
52            party_size: NSUInteger,
53            preferred_booking_date_components: Option<&NSDateComponents>,
54            maximum_number_of_results: Option<&NSNumber>,
55            earliest_booking_date_for_results: Option<&NSDate>,
56            latest_booking_date_for_results: Option<&NSDate>,
57        ) -> Retained<Self>;
58
59        #[cfg(feature = "INRestaurant")]
60        #[unsafe(method(restaurant))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn restaurant(&self) -> Retained<INRestaurant>;
63
64        #[cfg(feature = "INRestaurant")]
65        /// Setter for [`restaurant`][Self::restaurant].
66        ///
67        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
68        #[unsafe(method(setRestaurant:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn setRestaurant(&self, restaurant: &INRestaurant);
71
72        #[unsafe(method(partySize))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn partySize(&self) -> NSUInteger;
75
76        /// Setter for [`partySize`][Self::partySize].
77        #[unsafe(method(setPartySize:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn setPartySize(&self, party_size: NSUInteger);
80
81        #[unsafe(method(preferredBookingDateComponents))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn preferredBookingDateComponents(&self) -> Option<Retained<NSDateComponents>>;
84
85        /// Setter for [`preferredBookingDateComponents`][Self::preferredBookingDateComponents].
86        ///
87        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
88        #[unsafe(method(setPreferredBookingDateComponents:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn setPreferredBookingDateComponents(
91            &self,
92            preferred_booking_date_components: Option<&NSDateComponents>,
93        );
94
95        #[unsafe(method(maximumNumberOfResults))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn maximumNumberOfResults(&self) -> Option<Retained<NSNumber>>;
98
99        /// Setter for [`maximumNumberOfResults`][Self::maximumNumberOfResults].
100        ///
101        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
102        #[unsafe(method(setMaximumNumberOfResults:))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn setMaximumNumberOfResults(
105            &self,
106            maximum_number_of_results: Option<&NSNumber>,
107        );
108
109        #[unsafe(method(earliestBookingDateForResults))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn earliestBookingDateForResults(&self) -> Option<Retained<NSDate>>;
112
113        /// Setter for [`earliestBookingDateForResults`][Self::earliestBookingDateForResults].
114        ///
115        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
116        #[unsafe(method(setEarliestBookingDateForResults:))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn setEarliestBookingDateForResults(
119            &self,
120            earliest_booking_date_for_results: Option<&NSDate>,
121        );
122
123        #[unsafe(method(latestBookingDateForResults))]
124        #[unsafe(method_family = none)]
125        pub unsafe fn latestBookingDateForResults(&self) -> Option<Retained<NSDate>>;
126
127        /// Setter for [`latestBookingDateForResults`][Self::latestBookingDateForResults].
128        ///
129        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
130        #[unsafe(method(setLatestBookingDateForResults:))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn setLatestBookingDateForResults(
133            &self,
134            latest_booking_date_for_results: Option<&NSDate>,
135        );
136    );
137}
138
139/// Methods declared on superclass `NSObject`.
140#[cfg(feature = "INIntent")]
141impl INGetAvailableRestaurantReservationBookingsIntent {
142    extern_methods!(
143        #[unsafe(method(init))]
144        #[unsafe(method_family = init)]
145        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
146
147        #[unsafe(method(new))]
148        #[unsafe(method_family = new)]
149        pub unsafe fn new() -> Retained<Self>;
150    );
151}
152
153extern_protocol!(
154    /// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetavailablerestaurantreservationbookingsintenthandling?language=objc)
155    pub unsafe trait INGetAvailableRestaurantReservationBookingsIntentHandling:
156        NSObjectProtocol
157    {
158        #[cfg(all(
159            feature = "INGetAvailableRestaurantReservationBookingsIntentResponse",
160            feature = "INIntent",
161            feature = "INIntentResponse",
162            feature = "block2"
163        ))]
164        /// Handling method - Execute the task represented by the INGetAvailableRestaurantReservationBookingsIntent that's passed in
165        ///
166        /// 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
167        ///
168        ///
169        /// Parameter `intent`: The input intent
170        ///
171        /// Parameter `completion`: The response handling block to invoke with the response to handling the intent.
172        ///
173        ///
174        /// See: INGetAvailableRestaurantReservationBookingsIntentResponse
175        #[unsafe(method(handleGetAvailableRestaurantReservationBookings:completion:))]
176        #[unsafe(method_family = none)]
177        unsafe fn handleGetAvailableRestaurantReservationBookings_completion(
178            &self,
179            intent: &INGetAvailableRestaurantReservationBookingsIntent,
180            completion: &block2::DynBlock<
181                dyn Fn(NonNull<INGetAvailableRestaurantReservationBookingsIntentResponse>),
182            >,
183        );
184
185        #[cfg(all(
186            feature = "INGetAvailableRestaurantReservationBookingsIntentResponse",
187            feature = "INIntent",
188            feature = "INIntentResponse",
189            feature = "block2"
190        ))]
191        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
192        ///
193        /// 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.
194        ///
195        ///
196        /// Parameter `intent`: The input intent
197        ///
198        /// Parameter `completion`: The response block contains an INGetAvailableRestaurantReservationBookingDefaultsIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
199        ///
200        ///
201        /// See: INGetAvailableRestaurantReservationBookingsIntentResponse
202        #[optional]
203        #[unsafe(method(confirmGetAvailableRestaurantReservationBookings:completion:))]
204        #[unsafe(method_family = none)]
205        unsafe fn confirmGetAvailableRestaurantReservationBookings_completion(
206            &self,
207            intent: &INGetAvailableRestaurantReservationBookingsIntent,
208            completion: &block2::DynBlock<
209                dyn Fn(NonNull<INGetAvailableRestaurantReservationBookingsIntentResponse>),
210            >,
211        );
212
213        #[cfg(all(
214            feature = "INIntent",
215            feature = "INIntentResolutionResult",
216            feature = "INRestaurantResolutionResult",
217            feature = "block2"
218        ))]
219        /// Resolution methods - Determine if this intent is ready for the next step (confirmation)
220        ///
221        /// 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.
222        ///
223        ///
224        /// Parameter `intent`: The input intent
225        ///
226        /// Parameter `completion`: The response block contains an INIntentResolutionResult for the parameter being resolved
227        ///
228        ///
229        /// See: INGetAvailableRestaurantReservationBookingsIntentResponse
230        #[optional]
231        #[unsafe(method(resolveRestaurantForGetAvailableRestaurantReservationBookings:withCompletion:))]
232        #[unsafe(method_family = none)]
233        unsafe fn resolveRestaurantForGetAvailableRestaurantReservationBookings_withCompletion(
234            &self,
235            intent: &INGetAvailableRestaurantReservationBookingsIntent,
236            completion: &block2::DynBlock<dyn Fn(NonNull<INRestaurantResolutionResult>)>,
237        );
238
239        #[cfg(all(
240            feature = "INIntegerResolutionResult",
241            feature = "INIntent",
242            feature = "INIntentResolutionResult",
243            feature = "block2"
244        ))]
245        #[optional]
246        #[unsafe(method(resolvePartySizeForGetAvailableRestaurantReservationBookings:withCompletion:))]
247        #[unsafe(method_family = none)]
248        unsafe fn resolvePartySizeForGetAvailableRestaurantReservationBookings_withCompletion(
249            &self,
250            intent: &INGetAvailableRestaurantReservationBookingsIntent,
251            completion: &block2::DynBlock<dyn Fn(NonNull<INIntegerResolutionResult>)>,
252        );
253
254        #[cfg(all(
255            feature = "INDateComponentsResolutionResult",
256            feature = "INIntent",
257            feature = "INIntentResolutionResult",
258            feature = "block2"
259        ))]
260        #[optional]
261        #[unsafe(method(resolvePreferredBookingDateComponentsForGetAvailableRestaurantReservationBookings:withCompletion:))]
262        #[unsafe(method_family = none)]
263        unsafe fn resolvePreferredBookingDateComponentsForGetAvailableRestaurantReservationBookings_withCompletion(
264            &self,
265            intent: &INGetAvailableRestaurantReservationBookingsIntent,
266            completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsResolutionResult>)>,
267        );
268    }
269);