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 INStartWorkoutIntent;
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCoding for INStartWorkoutIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCopying for INStartWorkoutIntent {}
);
#[cfg(feature = "INIntent")]
unsafe impl CopyingHelper for INStartWorkoutIntent {
type Result = Self;
}
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSObjectProtocol for INStartWorkoutIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSSecureCoding for INStartWorkoutIntent {}
);
#[cfg(feature = "INIntent")]
impl INStartWorkoutIntent {
extern_methods!(
#[cfg(all(
feature = "INSpeakableString",
feature = "INWorkoutGoalUnitType",
feature = "INWorkoutLocationType"
))]
#[unsafe(method(initWithWorkoutName:goalValue:workoutGoalUnitType:workoutLocationType:isOpenEnded:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithWorkoutName_goalValue_workoutGoalUnitType_workoutLocationType_isOpenEnded(
this: Allocated<Self>,
workout_name: Option<&INSpeakableString>,
goal_value: Option<&NSNumber>,
workout_goal_unit_type: INWorkoutGoalUnitType,
workout_location_type: INWorkoutLocationType,
is_open_ended: Option<&NSNumber>,
) -> Retained<Self>;
#[cfg(feature = "INSpeakableString")]
#[unsafe(method(workoutName))]
#[unsafe(method_family = none)]
pub unsafe fn workoutName(&self) -> Option<Retained<INSpeakableString>>;
#[unsafe(method(goalValue))]
#[unsafe(method_family = none)]
pub unsafe fn goalValue(&self) -> Option<Retained<NSNumber>>;
#[cfg(feature = "INWorkoutGoalUnitType")]
#[unsafe(method(workoutGoalUnitType))]
#[unsafe(method_family = none)]
pub unsafe fn workoutGoalUnitType(&self) -> INWorkoutGoalUnitType;
#[cfg(feature = "INWorkoutLocationType")]
#[unsafe(method(workoutLocationType))]
#[unsafe(method_family = none)]
pub unsafe fn workoutLocationType(&self) -> INWorkoutLocationType;
#[unsafe(method(isOpenEnded))]
#[unsafe(method_family = none)]
pub unsafe fn isOpenEnded(&self) -> Option<Retained<NSNumber>>;
);
}
#[cfg(feature = "INIntent")]
impl INStartWorkoutIntent {
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 INStartWorkoutIntentHandling: NSObjectProtocol {
#[cfg(all(
feature = "INIntent",
feature = "INIntentResponse",
feature = "INStartWorkoutIntentResponse",
feature = "block2"
))]
#[unsafe(method(handleStartWorkout:completion:))]
#[unsafe(method_family = none)]
unsafe fn handleStartWorkout_completion(
&self,
intent: &INStartWorkoutIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INStartWorkoutIntentResponse>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResponse",
feature = "INStartWorkoutIntentResponse",
feature = "block2"
))]
#[optional]
#[unsafe(method(confirmStartWorkout:completion:))]
#[unsafe(method_family = none)]
unsafe fn confirmStartWorkout_completion(
&self,
intent: &INStartWorkoutIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INStartWorkoutIntentResponse>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INSpeakableStringResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveWorkoutNameForStartWorkout:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveWorkoutNameForStartWorkout_withCompletion(
&self,
intent: &INStartWorkoutIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
);
#[cfg(all(
feature = "INDoubleResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveGoalValueForStartWorkout:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveGoalValueForStartWorkout_withCompletion(
&self,
intent: &INStartWorkoutIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INDoubleResolutionResult>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INWorkoutGoalUnitTypeResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveWorkoutGoalUnitTypeForStartWorkout:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveWorkoutGoalUnitTypeForStartWorkout_withCompletion(
&self,
intent: &INStartWorkoutIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INWorkoutGoalUnitTypeResolutionResult>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INWorkoutLocationTypeResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveWorkoutLocationTypeForStartWorkout:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveWorkoutLocationTypeForStartWorkout_withCompletion(
&self,
intent: &INStartWorkoutIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INWorkoutLocationTypeResolutionResult>)>,
);
#[cfg(all(
feature = "INBooleanResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveIsOpenEndedForStartWorkout:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveIsOpenEndedForStartWorkout_withCompletion(
&self,
intent: &INStartWorkoutIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INBooleanResolutionResult>)>,
);
}
);