objc2_intents/generated/
INStartWorkoutIntent.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 INStartWorkoutIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20 unsafe impl NSCoding for INStartWorkoutIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25 unsafe impl NSCopying for INStartWorkoutIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INStartWorkoutIntent {
30 type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for INStartWorkoutIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40 unsafe impl NSSecureCoding for INStartWorkoutIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INStartWorkoutIntent {
45 extern_methods!(
46 #[cfg(all(
47 feature = "INSpeakableString",
48 feature = "INWorkoutGoalUnitType",
49 feature = "INWorkoutLocationType"
50 ))]
51 #[unsafe(method(initWithWorkoutName:goalValue:workoutGoalUnitType:workoutLocationType:isOpenEnded:))]
52 #[unsafe(method_family = init)]
53 pub unsafe fn initWithWorkoutName_goalValue_workoutGoalUnitType_workoutLocationType_isOpenEnded(
54 this: Allocated<Self>,
55 workout_name: Option<&INSpeakableString>,
56 goal_value: Option<&NSNumber>,
57 workout_goal_unit_type: INWorkoutGoalUnitType,
58 workout_location_type: INWorkoutLocationType,
59 is_open_ended: Option<&NSNumber>,
60 ) -> Retained<Self>;
61
62 #[cfg(feature = "INSpeakableString")]
63 #[unsafe(method(workoutName))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn workoutName(&self) -> Option<Retained<INSpeakableString>>;
66
67 #[unsafe(method(goalValue))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn goalValue(&self) -> Option<Retained<NSNumber>>;
70
71 #[cfg(feature = "INWorkoutGoalUnitType")]
72 #[unsafe(method(workoutGoalUnitType))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn workoutGoalUnitType(&self) -> INWorkoutGoalUnitType;
75
76 #[cfg(feature = "INWorkoutLocationType")]
77 #[unsafe(method(workoutLocationType))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn workoutLocationType(&self) -> INWorkoutLocationType;
80
81 #[unsafe(method(isOpenEnded))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn isOpenEnded(&self) -> Option<Retained<NSNumber>>;
84 );
85}
86
87#[cfg(feature = "INIntent")]
89impl INStartWorkoutIntent {
90 extern_methods!(
91 #[unsafe(method(init))]
92 #[unsafe(method_family = init)]
93 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
94
95 #[unsafe(method(new))]
96 #[unsafe(method_family = new)]
97 pub unsafe fn new() -> Retained<Self>;
98 );
99}
100
101extern_protocol!(
102 pub unsafe trait INStartWorkoutIntentHandling: NSObjectProtocol {
108 #[cfg(all(
109 feature = "INIntent",
110 feature = "INIntentResponse",
111 feature = "INStartWorkoutIntentResponse",
112 feature = "block2"
113 ))]
114 #[unsafe(method(handleStartWorkout:completion:))]
126 #[unsafe(method_family = none)]
127 unsafe fn handleStartWorkout_completion(
128 &self,
129 intent: &INStartWorkoutIntent,
130 completion: &block2::DynBlock<dyn Fn(NonNull<INStartWorkoutIntentResponse>)>,
131 );
132
133 #[cfg(all(
134 feature = "INIntent",
135 feature = "INIntentResponse",
136 feature = "INStartWorkoutIntentResponse",
137 feature = "block2"
138 ))]
139 #[optional]
151 #[unsafe(method(confirmStartWorkout:completion:))]
152 #[unsafe(method_family = none)]
153 unsafe fn confirmStartWorkout_completion(
154 &self,
155 intent: &INStartWorkoutIntent,
156 completion: &block2::DynBlock<dyn Fn(NonNull<INStartWorkoutIntentResponse>)>,
157 );
158
159 #[cfg(all(
160 feature = "INIntent",
161 feature = "INIntentResolutionResult",
162 feature = "INSpeakableStringResolutionResult",
163 feature = "block2"
164 ))]
165 #[optional]
177 #[unsafe(method(resolveWorkoutNameForStartWorkout:withCompletion:))]
178 #[unsafe(method_family = none)]
179 unsafe fn resolveWorkoutNameForStartWorkout_withCompletion(
180 &self,
181 intent: &INStartWorkoutIntent,
182 completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
183 );
184
185 #[cfg(all(
186 feature = "INDoubleResolutionResult",
187 feature = "INIntent",
188 feature = "INIntentResolutionResult",
189 feature = "block2"
190 ))]
191 #[optional]
192 #[unsafe(method(resolveGoalValueForStartWorkout:withCompletion:))]
193 #[unsafe(method_family = none)]
194 unsafe fn resolveGoalValueForStartWorkout_withCompletion(
195 &self,
196 intent: &INStartWorkoutIntent,
197 completion: &block2::DynBlock<dyn Fn(NonNull<INDoubleResolutionResult>)>,
198 );
199
200 #[cfg(all(
201 feature = "INIntent",
202 feature = "INIntentResolutionResult",
203 feature = "INWorkoutGoalUnitTypeResolutionResult",
204 feature = "block2"
205 ))]
206 #[optional]
207 #[unsafe(method(resolveWorkoutGoalUnitTypeForStartWorkout:withCompletion:))]
208 #[unsafe(method_family = none)]
209 unsafe fn resolveWorkoutGoalUnitTypeForStartWorkout_withCompletion(
210 &self,
211 intent: &INStartWorkoutIntent,
212 completion: &block2::DynBlock<dyn Fn(NonNull<INWorkoutGoalUnitTypeResolutionResult>)>,
213 );
214
215 #[cfg(all(
216 feature = "INIntent",
217 feature = "INIntentResolutionResult",
218 feature = "INWorkoutLocationTypeResolutionResult",
219 feature = "block2"
220 ))]
221 #[optional]
222 #[unsafe(method(resolveWorkoutLocationTypeForStartWorkout:withCompletion:))]
223 #[unsafe(method_family = none)]
224 unsafe fn resolveWorkoutLocationTypeForStartWorkout_withCompletion(
225 &self,
226 intent: &INStartWorkoutIntent,
227 completion: &block2::DynBlock<dyn Fn(NonNull<INWorkoutLocationTypeResolutionResult>)>,
228 );
229
230 #[cfg(all(
231 feature = "INBooleanResolutionResult",
232 feature = "INIntent",
233 feature = "INIntentResolutionResult",
234 feature = "block2"
235 ))]
236 #[optional]
237 #[unsafe(method(resolveIsOpenEndedForStartWorkout:withCompletion:))]
238 #[unsafe(method_family = none)]
239 unsafe fn resolveIsOpenEndedForStartWorkout_withCompletion(
240 &self,
241 intent: &INStartWorkoutIntent,
242 completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
243 );
244 }
245);