1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-location")]
7use objc2_core_location::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(INIntent, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "INIntent")]
17 pub struct INSearchForNotebookItemsIntent;
18);
19
20#[cfg(feature = "INIntent")]
21extern_conformance!(
22 unsafe impl NSCoding for INSearchForNotebookItemsIntent {}
23);
24
25#[cfg(feature = "INIntent")]
26extern_conformance!(
27 unsafe impl NSCopying for INSearchForNotebookItemsIntent {}
28);
29
30#[cfg(feature = "INIntent")]
31unsafe impl CopyingHelper for INSearchForNotebookItemsIntent {
32 type Result = Self;
33}
34
35#[cfg(feature = "INIntent")]
36extern_conformance!(
37 unsafe impl NSObjectProtocol for INSearchForNotebookItemsIntent {}
38);
39
40#[cfg(feature = "INIntent")]
41extern_conformance!(
42 unsafe impl NSSecureCoding for INSearchForNotebookItemsIntent {}
43);
44
45#[cfg(feature = "INIntent")]
46impl INSearchForNotebookItemsIntent {
47 extern_methods!(
48 #[cfg(all(
49 feature = "INDateComponentsRange",
50 feature = "INDateSearchType",
51 feature = "INLocationSearchType",
52 feature = "INNotebookItemType",
53 feature = "INSpeakableString",
54 feature = "INTaskPriority",
55 feature = "INTaskStatus",
56 feature = "INTemporalEventTriggerTypeOptions",
57 feature = "objc2-core-location"
58 ))]
59 #[unsafe(method(initWithTitle:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:temporalEventTriggerTypes:taskPriority:notebookItemIdentifier:))]
60 #[unsafe(method_family = init)]
61 pub unsafe fn initWithTitle_content_itemType_status_location_locationSearchType_dateTime_dateSearchType_temporalEventTriggerTypes_taskPriority_notebookItemIdentifier(
62 this: Allocated<Self>,
63 title: Option<&INSpeakableString>,
64 content: Option<&NSString>,
65 item_type: INNotebookItemType,
66 status: INTaskStatus,
67 location: Option<&CLPlacemark>,
68 location_search_type: INLocationSearchType,
69 date_time: Option<&INDateComponentsRange>,
70 date_search_type: INDateSearchType,
71 temporal_event_trigger_types: INTemporalEventTriggerTypeOptions,
72 task_priority: INTaskPriority,
73 notebook_item_identifier: Option<&NSString>,
74 ) -> Retained<Self>;
75
76 #[cfg(feature = "INSpeakableString")]
77 #[unsafe(method(title))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn title(&self) -> Option<Retained<INSpeakableString>>;
80
81 #[unsafe(method(content))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn content(&self) -> Option<Retained<NSString>>;
84
85 #[cfg(feature = "INNotebookItemType")]
86 #[unsafe(method(itemType))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn itemType(&self) -> INNotebookItemType;
89
90 #[cfg(feature = "INTaskStatus")]
91 #[unsafe(method(status))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn status(&self) -> INTaskStatus;
94
95 #[cfg(feature = "objc2-core-location")]
96 #[unsafe(method(location))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn location(&self) -> Option<Retained<CLPlacemark>>;
99
100 #[cfg(feature = "INLocationSearchType")]
101 #[unsafe(method(locationSearchType))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn locationSearchType(&self) -> INLocationSearchType;
104
105 #[cfg(feature = "INDateComponentsRange")]
106 #[unsafe(method(dateTime))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn dateTime(&self) -> Option<Retained<INDateComponentsRange>>;
109
110 #[cfg(feature = "INDateSearchType")]
111 #[unsafe(method(dateSearchType))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn dateSearchType(&self) -> INDateSearchType;
114
115 #[cfg(feature = "INTemporalEventTriggerTypeOptions")]
116 #[unsafe(method(temporalEventTriggerTypes))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn temporalEventTriggerTypes(&self) -> INTemporalEventTriggerTypeOptions;
119
120 #[cfg(feature = "INTaskPriority")]
121 #[unsafe(method(taskPriority))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn taskPriority(&self) -> INTaskPriority;
124
125 #[unsafe(method(notebookItemIdentifier))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn notebookItemIdentifier(&self) -> Option<Retained<NSString>>;
128 );
129}
130
131#[cfg(feature = "INIntent")]
133impl INSearchForNotebookItemsIntent {
134 extern_methods!(
135 #[unsafe(method(init))]
136 #[unsafe(method_family = init)]
137 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
138
139 #[unsafe(method(new))]
140 #[unsafe(method_family = new)]
141 pub unsafe fn new() -> Retained<Self>;
142 );
143}
144
145extern_protocol!(
146 pub unsafe trait INSearchForNotebookItemsIntentHandling: NSObjectProtocol {
152 #[cfg(all(
153 feature = "INIntent",
154 feature = "INIntentResponse",
155 feature = "INSearchForNotebookItemsIntentResponse",
156 feature = "block2"
157 ))]
158 #[unsafe(method(handleSearchForNotebookItems:completion:))]
170 #[unsafe(method_family = none)]
171 unsafe fn handleSearchForNotebookItems_completion(
172 &self,
173 intent: &INSearchForNotebookItemsIntent,
174 completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForNotebookItemsIntentResponse>)>,
175 );
176
177 #[cfg(all(
178 feature = "INIntent",
179 feature = "INIntentResponse",
180 feature = "INSearchForNotebookItemsIntentResponse",
181 feature = "block2"
182 ))]
183 #[optional]
195 #[unsafe(method(confirmSearchForNotebookItems:completion:))]
196 #[unsafe(method_family = none)]
197 unsafe fn confirmSearchForNotebookItems_completion(
198 &self,
199 intent: &INSearchForNotebookItemsIntent,
200 completion: &block2::DynBlock<dyn Fn(NonNull<INSearchForNotebookItemsIntentResponse>)>,
201 );
202
203 #[cfg(all(
204 feature = "INIntent",
205 feature = "INIntentResolutionResult",
206 feature = "INSpeakableStringResolutionResult",
207 feature = "block2"
208 ))]
209 #[optional]
221 #[unsafe(method(resolveTitleForSearchForNotebookItems:withCompletion:))]
222 #[unsafe(method_family = none)]
223 unsafe fn resolveTitleForSearchForNotebookItems_withCompletion(
224 &self,
225 intent: &INSearchForNotebookItemsIntent,
226 completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
227 );
228
229 #[cfg(all(
230 feature = "INIntent",
231 feature = "INIntentResolutionResult",
232 feature = "INStringResolutionResult",
233 feature = "block2"
234 ))]
235 #[optional]
236 #[unsafe(method(resolveContentForSearchForNotebookItems:withCompletion:))]
237 #[unsafe(method_family = none)]
238 unsafe fn resolveContentForSearchForNotebookItems_withCompletion(
239 &self,
240 intent: &INSearchForNotebookItemsIntent,
241 completion: &block2::DynBlock<dyn Fn(NonNull<INStringResolutionResult>)>,
242 );
243
244 #[cfg(all(
245 feature = "INIntent",
246 feature = "INIntentResolutionResult",
247 feature = "INNotebookItemTypeResolutionResult",
248 feature = "block2"
249 ))]
250 #[optional]
251 #[unsafe(method(resolveItemTypeForSearchForNotebookItems:withCompletion:))]
252 #[unsafe(method_family = none)]
253 unsafe fn resolveItemTypeForSearchForNotebookItems_withCompletion(
254 &self,
255 intent: &INSearchForNotebookItemsIntent,
256 completion: &block2::DynBlock<dyn Fn(NonNull<INNotebookItemTypeResolutionResult>)>,
257 );
258
259 #[cfg(all(
260 feature = "INIntent",
261 feature = "INIntentResolutionResult",
262 feature = "INTaskStatusResolutionResult",
263 feature = "block2"
264 ))]
265 #[optional]
266 #[unsafe(method(resolveStatusForSearchForNotebookItems:withCompletion:))]
267 #[unsafe(method_family = none)]
268 unsafe fn resolveStatusForSearchForNotebookItems_withCompletion(
269 &self,
270 intent: &INSearchForNotebookItemsIntent,
271 completion: &block2::DynBlock<dyn Fn(NonNull<INTaskStatusResolutionResult>)>,
272 );
273
274 #[cfg(all(
275 feature = "INIntent",
276 feature = "INIntentResolutionResult",
277 feature = "INPlacemarkResolutionResult",
278 feature = "block2"
279 ))]
280 #[optional]
281 #[unsafe(method(resolveLocationForSearchForNotebookItems:withCompletion:))]
282 #[unsafe(method_family = none)]
283 unsafe fn resolveLocationForSearchForNotebookItems_withCompletion(
284 &self,
285 intent: &INSearchForNotebookItemsIntent,
286 completion: &block2::DynBlock<dyn Fn(NonNull<INPlacemarkResolutionResult>)>,
287 );
288
289 #[cfg(all(
290 feature = "INIntent",
291 feature = "INIntentResolutionResult",
292 feature = "INLocationSearchTypeResolutionResult",
293 feature = "block2"
294 ))]
295 #[optional]
296 #[unsafe(method(resolveLocationSearchTypeForSearchForNotebookItems:withCompletion:))]
297 #[unsafe(method_family = none)]
298 unsafe fn resolveLocationSearchTypeForSearchForNotebookItems_withCompletion(
299 &self,
300 intent: &INSearchForNotebookItemsIntent,
301 completion: &block2::DynBlock<dyn Fn(NonNull<INLocationSearchTypeResolutionResult>)>,
302 );
303
304 #[cfg(all(
305 feature = "INDateComponentsRangeResolutionResult",
306 feature = "INIntent",
307 feature = "INIntentResolutionResult",
308 feature = "block2"
309 ))]
310 #[optional]
311 #[unsafe(method(resolveDateTimeForSearchForNotebookItems:withCompletion:))]
312 #[unsafe(method_family = none)]
313 unsafe fn resolveDateTimeForSearchForNotebookItems_withCompletion(
314 &self,
315 intent: &INSearchForNotebookItemsIntent,
316 completion: &block2::DynBlock<dyn Fn(NonNull<INDateComponentsRangeResolutionResult>)>,
317 );
318
319 #[cfg(all(
320 feature = "INDateSearchTypeResolutionResult",
321 feature = "INIntent",
322 feature = "INIntentResolutionResult",
323 feature = "block2"
324 ))]
325 #[optional]
326 #[unsafe(method(resolveDateSearchTypeForSearchForNotebookItems:withCompletion:))]
327 #[unsafe(method_family = none)]
328 unsafe fn resolveDateSearchTypeForSearchForNotebookItems_withCompletion(
329 &self,
330 intent: &INSearchForNotebookItemsIntent,
331 completion: &block2::DynBlock<dyn Fn(NonNull<INDateSearchTypeResolutionResult>)>,
332 );
333
334 #[cfg(all(
335 feature = "INIntent",
336 feature = "INIntentResolutionResult",
337 feature = "INTemporalEventTriggerTypeOptionsResolutionResult",
338 feature = "block2"
339 ))]
340 #[optional]
341 #[unsafe(method(resolveTemporalEventTriggerTypesForSearchForNotebookItems:withCompletion:))]
342 #[unsafe(method_family = none)]
343 unsafe fn resolveTemporalEventTriggerTypesForSearchForNotebookItems_withCompletion(
344 &self,
345 intent: &INSearchForNotebookItemsIntent,
346 completion: &block2::DynBlock<
347 dyn Fn(NonNull<INTemporalEventTriggerTypeOptionsResolutionResult>),
348 >,
349 );
350
351 #[cfg(all(
352 feature = "INIntent",
353 feature = "INIntentResolutionResult",
354 feature = "INTaskPriorityResolutionResult",
355 feature = "block2"
356 ))]
357 #[optional]
358 #[unsafe(method(resolveTaskPriorityForSearchForNotebookItems:withCompletion:))]
359 #[unsafe(method_family = none)]
360 unsafe fn resolveTaskPriorityForSearchForNotebookItems_withCompletion(
361 &self,
362 intent: &INSearchForNotebookItemsIntent,
363 completion: &block2::DynBlock<dyn Fn(NonNull<INTaskPriorityResolutionResult>)>,
364 );
365 }
366);