objc2_intents/generated/
INBookRestaurantReservationIntent.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(INIntent, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "INIntent")]
15 pub struct INBookRestaurantReservationIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20 unsafe impl NSCoding for INBookRestaurantReservationIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25 unsafe impl NSCopying for INBookRestaurantReservationIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INBookRestaurantReservationIntent {
30 type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for INBookRestaurantReservationIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40 unsafe impl NSSecureCoding for INBookRestaurantReservationIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INBookRestaurantReservationIntent {
45 extern_methods!(
46 #[cfg(all(
47 feature = "INPerson",
48 feature = "INRestaurant",
49 feature = "INRestaurantGuest",
50 feature = "INRestaurantOffer"
51 ))]
52 #[unsafe(method(initWithRestaurant:bookingDateComponents:partySize:bookingIdentifier:guest:selectedOffer:guestProvidedSpecialRequestText:))]
53 #[unsafe(method_family = init)]
54 pub unsafe fn initWithRestaurant_bookingDateComponents_partySize_bookingIdentifier_guest_selectedOffer_guestProvidedSpecialRequestText(
55 this: Allocated<Self>,
56 restaurant: &INRestaurant,
57 booking_date_components: &NSDateComponents,
58 party_size: NSUInteger,
59 booking_identifier: Option<&NSString>,
60 guest: Option<&INRestaurantGuest>,
61 selected_offer: Option<&INRestaurantOffer>,
62 guest_provided_special_request_text: Option<&NSString>,
63 ) -> Retained<Self>;
64
65 #[cfg(feature = "INRestaurant")]
66 #[unsafe(method(restaurant))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn restaurant(&self) -> Retained<INRestaurant>;
69
70 #[cfg(feature = "INRestaurant")]
71 #[unsafe(method(setRestaurant:))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn setRestaurant(&self, restaurant: &INRestaurant);
77
78 #[unsafe(method(bookingDateComponents))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn bookingDateComponents(&self) -> Retained<NSDateComponents>;
81
82 #[unsafe(method(setBookingDateComponents:))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn setBookingDateComponents(&self, booking_date_components: &NSDateComponents);
88
89 #[unsafe(method(partySize))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn partySize(&self) -> NSUInteger;
92
93 #[unsafe(method(setPartySize:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn setPartySize(&self, party_size: NSUInteger);
97
98 #[unsafe(method(bookingIdentifier))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn bookingIdentifier(&self) -> Option<Retained<NSString>>;
101
102 #[unsafe(method(setBookingIdentifier:))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn setBookingIdentifier(&self, booking_identifier: Option<&NSString>);
108
109 #[cfg(all(feature = "INPerson", feature = "INRestaurantGuest"))]
110 #[unsafe(method(guest))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn guest(&self) -> Option<Retained<INRestaurantGuest>>;
113
114 #[cfg(all(feature = "INPerson", feature = "INRestaurantGuest"))]
115 #[unsafe(method(setGuest:))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn setGuest(&self, guest: Option<&INRestaurantGuest>);
121
122 #[cfg(feature = "INRestaurantOffer")]
123 #[unsafe(method(selectedOffer))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn selectedOffer(&self) -> Option<Retained<INRestaurantOffer>>;
126
127 #[cfg(feature = "INRestaurantOffer")]
128 #[unsafe(method(setSelectedOffer:))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn setSelectedOffer(&self, selected_offer: Option<&INRestaurantOffer>);
134
135 #[unsafe(method(guestProvidedSpecialRequestText))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn guestProvidedSpecialRequestText(&self) -> Option<Retained<NSString>>;
138
139 #[unsafe(method(setGuestProvidedSpecialRequestText:))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn setGuestProvidedSpecialRequestText(
145 &self,
146 guest_provided_special_request_text: Option<&NSString>,
147 );
148 );
149}
150
151#[cfg(feature = "INIntent")]
153impl INBookRestaurantReservationIntent {
154 extern_methods!(
155 #[unsafe(method(init))]
156 #[unsafe(method_family = init)]
157 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
158
159 #[unsafe(method(new))]
160 #[unsafe(method_family = new)]
161 pub unsafe fn new() -> Retained<Self>;
162 );
163}
164
165extern_protocol!(
166 pub unsafe trait INBookRestaurantReservationIntentHandling: NSObjectProtocol {
168 #[cfg(all(
169 feature = "INBookRestaurantReservationIntentResponse",
170 feature = "INIntent",
171 feature = "INIntentResponse",
172 feature = "block2"
173 ))]
174 #[unsafe(method(handleBookRestaurantReservation:completion:))]
186 #[unsafe(method_family = none)]
187 unsafe fn handleBookRestaurantReservation_completion(
188 &self,
189 intent: &INBookRestaurantReservationIntent,
190 completion: &block2::DynBlock<
191 dyn Fn(NonNull<INBookRestaurantReservationIntentResponse>),
192 >,
193 );
194
195 #[cfg(all(
196 feature = "INBookRestaurantReservationIntentResponse",
197 feature = "INIntent",
198 feature = "INIntentResponse",
199 feature = "block2"
200 ))]
201 #[optional]
213 #[unsafe(method(confirmBookRestaurantReservation:completion:))]
214 #[unsafe(method_family = none)]
215 unsafe fn confirmBookRestaurantReservation_completion(
216 &self,
217 intent: &INBookRestaurantReservationIntent,
218 completion: &block2::DynBlock<
219 dyn Fn(NonNull<INBookRestaurantReservationIntentResponse>),
220 >,
221 );
222
223 #[cfg(all(
224 feature = "INIntent",
225 feature = "INIntentResolutionResult",
226 feature = "INRestaurantResolutionResult",
227 feature = "block2"
228 ))]
229 #[optional]
241 #[unsafe(method(resolveRestaurantForBookRestaurantReservation:withCompletion:))]
242 #[unsafe(method_family = none)]
243 unsafe fn resolveRestaurantForBookRestaurantReservation_withCompletion(
244 &self,
245 intent: &INBookRestaurantReservationIntent,
246 completion: &block2::DynBlock<dyn Fn(NonNull<INRestaurantResolutionResult>)>,
247 );
248
249 #[cfg(all(
250 feature = "INDateComponentsResolutionResult",
251 feature = "INIntent",
252 feature = "INIntentResolutionResult",
253 feature = "block2"
254 ))]
255 #[optional]
256 #[unsafe(method(resolveBookingDateComponentsForBookRestaurantReservation:withCompletion:))]
257 #[unsafe(method_family = none)]
258 unsafe fn resolveBookingDateComponentsForBookRestaurantReservation_withCompletion(
259 &self,
260 intent: &INBookRestaurantReservationIntent,
261 completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsResolutionResult>)>,
262 );
263
264 #[cfg(all(
265 feature = "INIntegerResolutionResult",
266 feature = "INIntent",
267 feature = "INIntentResolutionResult",
268 feature = "block2"
269 ))]
270 #[optional]
271 #[unsafe(method(resolvePartySizeForBookRestaurantReservation:withCompletion:))]
272 #[unsafe(method_family = none)]
273 unsafe fn resolvePartySizeForBookRestaurantReservation_withCompletion(
274 &self,
275 intent: &INBookRestaurantReservationIntent,
276 completion: &block2::DynBlock<dyn Fn(NonNull<INIntegerResolutionResult>)>,
277 );
278
279 #[cfg(all(
280 feature = "INIntent",
281 feature = "INIntentResolutionResult",
282 feature = "INRestaurantGuestResolutionResult",
283 feature = "block2"
284 ))]
285 #[optional]
286 #[unsafe(method(resolveGuestForBookRestaurantReservation:withCompletion:))]
287 #[unsafe(method_family = none)]
288 unsafe fn resolveGuestForBookRestaurantReservation_withCompletion(
289 &self,
290 intent: &INBookRestaurantReservationIntent,
291 completion: &block2::DynBlock<dyn Fn(NonNull<INRestaurantGuestResolutionResult>)>,
292 );
293
294 #[cfg(all(
295 feature = "INIntent",
296 feature = "INIntentResolutionResult",
297 feature = "INStringResolutionResult",
298 feature = "block2"
299 ))]
300 #[optional]
301 #[unsafe(method(resolveGuestProvidedSpecialRequestTextForBookRestaurantReservation:withCompletion:))]
302 #[unsafe(method_family = none)]
303 unsafe fn resolveGuestProvidedSpecialRequestTextForBookRestaurantReservation_withCompletion(
304 &self,
305 intent: &INBookRestaurantReservationIntent,
306 completion: &block2::DynBlock<dyn Fn(NonNull<INStringResolutionResult>)>,
307 );
308 }
309);