use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct INResumeWorkoutIntentResponseCode(pub NSInteger);
impl INResumeWorkoutIntentResponseCode {
#[doc(alias = "INResumeWorkoutIntentResponseCodeUnspecified")]
pub const Unspecified: Self = Self(0);
#[doc(alias = "INResumeWorkoutIntentResponseCodeReady")]
pub const Ready: Self = Self(1);
#[doc(alias = "INResumeWorkoutIntentResponseCodeContinueInApp")]
pub const ContinueInApp: Self = Self(2);
#[doc(alias = "INResumeWorkoutIntentResponseCodeFailure")]
pub const Failure: Self = Self(3);
#[doc(alias = "INResumeWorkoutIntentResponseCodeFailureRequiringAppLaunch")]
pub const FailureRequiringAppLaunch: Self = Self(4);
#[doc(alias = "INResumeWorkoutIntentResponseCodeFailureNoMatchingWorkout")]
pub const FailureNoMatchingWorkout: Self = Self(5);
#[doc(alias = "INResumeWorkoutIntentResponseCodeHandleInApp")]
pub const HandleInApp: Self = Self(6);
#[doc(alias = "INResumeWorkoutIntentResponseCodeSuccess")]
pub const Success: Self = Self(7);
}
unsafe impl Encode for INResumeWorkoutIntentResponseCode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for INResumeWorkoutIntentResponseCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(INIntentResponse, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "INIntentResponse")]
pub struct INResumeWorkoutIntentResponse;
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCoding for INResumeWorkoutIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCopying for INResumeWorkoutIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
unsafe impl CopyingHelper for INResumeWorkoutIntentResponse {
type Result = Self;
}
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSObjectProtocol for INResumeWorkoutIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSSecureCoding for INResumeWorkoutIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
impl INResumeWorkoutIntentResponse {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithCode:userActivity:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCode_userActivity(
this: Allocated<Self>,
code: INResumeWorkoutIntentResponseCode,
user_activity: Option<&NSUserActivity>,
) -> Retained<Self>;
#[unsafe(method(code))]
#[unsafe(method_family = none)]
pub unsafe fn code(&self) -> INResumeWorkoutIntentResponseCode;
);
}
#[cfg(feature = "INIntentResponse")]
impl INResumeWorkoutIntentResponse {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}