use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(INIntent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "INIntent")]
pub struct INAddTasksIntent;
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCoding for INAddTasksIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCopying for INAddTasksIntent {}
);
#[cfg(feature = "INIntent")]
unsafe impl CopyingHelper for INAddTasksIntent {
type Result = Self;
}
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSObjectProtocol for INAddTasksIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSSecureCoding for INAddTasksIntent {}
);
#[cfg(feature = "INIntent")]
impl INAddTasksIntent {
extern_methods!(
#[cfg(all(
feature = "INSpatialEventTrigger",
feature = "INSpeakableString",
feature = "INTaskList",
feature = "INTaskPriority",
feature = "INTemporalEventTrigger"
))]
#[unsafe(method(initWithTargetTaskList:taskTitles:spatialEventTrigger:temporalEventTrigger:priority:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithTargetTaskList_taskTitles_spatialEventTrigger_temporalEventTrigger_priority(
this: Allocated<Self>,
target_task_list: Option<&INTaskList>,
task_titles: Option<&NSArray<INSpeakableString>>,
spatial_event_trigger: Option<&INSpatialEventTrigger>,
temporal_event_trigger: Option<&INTemporalEventTrigger>,
priority: INTaskPriority,
) -> Retained<Self>;
#[cfg(feature = "INTaskList")]
#[unsafe(method(targetTaskList))]
#[unsafe(method_family = none)]
pub unsafe fn targetTaskList(&self) -> Option<Retained<INTaskList>>;
#[cfg(feature = "INSpeakableString")]
#[unsafe(method(taskTitles))]
#[unsafe(method_family = none)]
pub unsafe fn taskTitles(&self) -> Option<Retained<NSArray<INSpeakableString>>>;
#[cfg(feature = "INSpatialEventTrigger")]
#[unsafe(method(spatialEventTrigger))]
#[unsafe(method_family = none)]
pub unsafe fn spatialEventTrigger(&self) -> Option<Retained<INSpatialEventTrigger>>;
#[cfg(feature = "INTemporalEventTrigger")]
#[unsafe(method(temporalEventTrigger))]
#[unsafe(method_family = none)]
pub unsafe fn temporalEventTrigger(&self) -> Option<Retained<INTemporalEventTrigger>>;
#[cfg(feature = "INTaskPriority")]
#[unsafe(method(priority))]
#[unsafe(method_family = none)]
pub unsafe fn priority(&self) -> INTaskPriority;
);
}
#[cfg(feature = "INIntent")]
impl INAddTasksIntent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_protocol!(
pub unsafe trait INAddTasksIntentHandling: NSObjectProtocol {
#[cfg(all(
feature = "INAddTasksIntentResponse",
feature = "INIntent",
feature = "INIntentResponse",
feature = "block2"
))]
#[unsafe(method(handleAddTasks:completion:))]
#[unsafe(method_family = none)]
unsafe fn handleAddTasks_completion(
&self,
intent: &INAddTasksIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INAddTasksIntentResponse>)>,
);
#[cfg(all(
feature = "INAddTasksIntentResponse",
feature = "INIntent",
feature = "INIntentResponse",
feature = "block2"
))]
#[optional]
#[unsafe(method(confirmAddTasks:completion:))]
#[unsafe(method_family = none)]
unsafe fn confirmAddTasks_completion(
&self,
intent: &INAddTasksIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INAddTasksIntentResponse>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INTaskListResolutionResult",
feature = "block2"
))]
#[deprecated = "resolveTargetTaskListForAddTasks:withCompletion: is deprecated. Use resolveTargetTaskListForAddTasks:completion: instead"]
#[optional]
#[unsafe(method(resolveTargetTaskListForAddTasks:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveTargetTaskListForAddTasks_withCompletion(
&self,
intent: &INAddTasksIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INTaskListResolutionResult>)>,
);
#[cfg(all(
feature = "INAddTasksTargetTaskListResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INTaskListResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveTargetTaskListForAddTasks:completion:))]
#[unsafe(method_family = none)]
unsafe fn resolveTargetTaskListForAddTasks_completion(
&self,
intent: &INAddTasksIntent,
completion: &block2::DynBlock<
dyn Fn(NonNull<INAddTasksTargetTaskListResolutionResult>),
>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INSpeakableStringResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveTaskTitlesForAddTasks:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveTaskTitlesForAddTasks_withCompletion(
&self,
intent: &INAddTasksIntent,
completion: &block2::DynBlock<
dyn Fn(NonNull<NSArray<INSpeakableStringResolutionResult>>),
>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INSpatialEventTriggerResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveSpatialEventTriggerForAddTasks:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveSpatialEventTriggerForAddTasks_withCompletion(
&self,
intent: &INAddTasksIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INSpatialEventTriggerResolutionResult>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INTemporalEventTriggerResolutionResult",
feature = "block2"
))]
#[deprecated = "resolveTemporalEventTriggerForAddTasks:withCompletion: is deprecated. Use resolveTemporalEventTriggerForAddTasks:completion: instead"]
#[optional]
#[unsafe(method(resolveTemporalEventTriggerForAddTasks:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveTemporalEventTriggerForAddTasks_withCompletion(
&self,
intent: &INAddTasksIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INTemporalEventTriggerResolutionResult>)>,
);
#[cfg(all(
feature = "INAddTasksTemporalEventTriggerResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INTemporalEventTriggerResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveTemporalEventTriggerForAddTasks:completion:))]
#[unsafe(method_family = none)]
unsafe fn resolveTemporalEventTriggerForAddTasks_completion(
&self,
intent: &INAddTasksIntent,
completion: &block2::DynBlock<
dyn Fn(NonNull<INAddTasksTemporalEventTriggerResolutionResult>),
>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INTaskPriorityResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolvePriorityForAddTasks:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolvePriorityForAddTasks_withCompletion(
&self,
intent: &INAddTasksIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INTaskPriorityResolutionResult>)>,
);
}
);