objc2_intents/generated/
INAddTasksTargetTaskListResolutionResult.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9/// [Apple's documentation](https://developer.apple.com/documentation/intents/inaddtaskstargettasklistconfirmationreason?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct INAddTasksTargetTaskListConfirmationReason(pub NSInteger);
14impl INAddTasksTargetTaskListConfirmationReason {
15    #[doc(alias = "INAddTasksTargetTaskListConfirmationReasonListShouldBeCreated")]
16    pub const ListShouldBeCreated: Self = Self(1);
17}
18
19unsafe impl Encode for INAddTasksTargetTaskListConfirmationReason {
20    const ENCODING: Encoding = NSInteger::ENCODING;
21}
22
23unsafe impl RefEncode for INAddTasksTargetTaskListConfirmationReason {
24    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
25}
26
27extern_class!(
28    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inaddtaskstargettasklistresolutionresult?language=objc)
29    #[unsafe(super(INTaskListResolutionResult, INIntentResolutionResult, NSObject))]
30    #[derive(Debug, PartialEq, Eq, Hash)]
31    #[cfg(all(
32        feature = "INIntentResolutionResult",
33        feature = "INTaskListResolutionResult"
34    ))]
35    pub struct INAddTasksTargetTaskListResolutionResult;
36);
37
38#[cfg(all(
39    feature = "INIntentResolutionResult",
40    feature = "INTaskListResolutionResult"
41))]
42extern_conformance!(
43    unsafe impl NSObjectProtocol for INAddTasksTargetTaskListResolutionResult {}
44);
45
46#[cfg(all(
47    feature = "INIntentResolutionResult",
48    feature = "INTaskListResolutionResult"
49))]
50impl INAddTasksTargetTaskListResolutionResult {
51    extern_methods!(
52        #[cfg(feature = "INTaskList")]
53        #[unsafe(method(confirmationRequiredWithTaskListToConfirm:forReason:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn confirmationRequiredWithTaskListToConfirm_forReason(
56            task_list_to_confirm: Option<&INTaskList>,
57            reason: INAddTasksTargetTaskListConfirmationReason,
58        ) -> Retained<Self>;
59
60        #[unsafe(method(initWithTaskListResolutionResult:))]
61        #[unsafe(method_family = init)]
62        pub unsafe fn initWithTaskListResolutionResult(
63            this: Allocated<Self>,
64            task_list_resolution_result: &INTaskListResolutionResult,
65        ) -> Retained<Self>;
66    );
67}
68
69/// Methods declared on superclass `INTaskListResolutionResult`.
70#[cfg(all(
71    feature = "INIntentResolutionResult",
72    feature = "INTaskListResolutionResult"
73))]
74impl INAddTasksTargetTaskListResolutionResult {
75    extern_methods!(
76        #[cfg(feature = "INTaskList")]
77        #[unsafe(method(successWithResolvedTaskList:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn successWithResolvedTaskList(
80            resolved_task_list: &INTaskList,
81        ) -> Retained<Self>;
82
83        #[cfg(feature = "INTaskList")]
84        #[unsafe(method(disambiguationWithTaskListsToDisambiguate:))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn disambiguationWithTaskListsToDisambiguate(
87            task_lists_to_disambiguate: &NSArray<INTaskList>,
88        ) -> Retained<Self>;
89
90        #[cfg(feature = "INTaskList")]
91        #[unsafe(method(confirmationRequiredWithTaskListToConfirm:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn confirmationRequiredWithTaskListToConfirm(
94            task_list_to_confirm: Option<&INTaskList>,
95        ) -> Retained<Self>;
96    );
97}
98
99/// Methods declared on superclass `INIntentResolutionResult`.
100#[cfg(all(
101    feature = "INIntentResolutionResult",
102    feature = "INTaskListResolutionResult"
103))]
104impl INAddTasksTargetTaskListResolutionResult {
105    extern_methods!(
106        #[unsafe(method(init))]
107        #[unsafe(method_family = init)]
108        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
109
110        #[unsafe(method(needsValue))]
111        #[unsafe(method_family = none)]
112        pub unsafe fn needsValue() -> Retained<Self>;
113
114        #[unsafe(method(notRequired))]
115        #[unsafe(method_family = none)]
116        pub unsafe fn notRequired() -> Retained<Self>;
117
118        #[unsafe(method(unsupported))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn unsupported() -> Retained<Self>;
121    );
122}
123
124/// Methods declared on superclass `NSObject`.
125#[cfg(all(
126    feature = "INIntentResolutionResult",
127    feature = "INTaskListResolutionResult"
128))]
129impl INAddTasksTargetTaskListResolutionResult {
130    extern_methods!(
131        #[unsafe(method(new))]
132        #[unsafe(method_family = new)]
133        pub unsafe fn new() -> Retained<Self>;
134    );
135}