objc2_intents/generated/
INCancelWorkoutIntentResponse.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/incancelworkoutintentresponsecode?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct INCancelWorkoutIntentResponseCode(pub NSInteger);
14impl INCancelWorkoutIntentResponseCode {
15    #[doc(alias = "INCancelWorkoutIntentResponseCodeUnspecified")]
16    pub const Unspecified: Self = Self(0);
17    #[doc(alias = "INCancelWorkoutIntentResponseCodeReady")]
18    pub const Ready: Self = Self(1);
19    #[doc(alias = "INCancelWorkoutIntentResponseCodeContinueInApp")]
20    pub const ContinueInApp: Self = Self(2);
21    #[doc(alias = "INCancelWorkoutIntentResponseCodeFailure")]
22    pub const Failure: Self = Self(3);
23    #[doc(alias = "INCancelWorkoutIntentResponseCodeFailureRequiringAppLaunch")]
24    pub const FailureRequiringAppLaunch: Self = Self(4);
25    #[doc(alias = "INCancelWorkoutIntentResponseCodeFailureNoMatchingWorkout")]
26    pub const FailureNoMatchingWorkout: Self = Self(5);
27    #[doc(alias = "INCancelWorkoutIntentResponseCodeHandleInApp")]
28    pub const HandleInApp: Self = Self(6);
29    #[doc(alias = "INCancelWorkoutIntentResponseCodeSuccess")]
30    pub const Success: Self = Self(7);
31}
32
33unsafe impl Encode for INCancelWorkoutIntentResponseCode {
34    const ENCODING: Encoding = NSInteger::ENCODING;
35}
36
37unsafe impl RefEncode for INCancelWorkoutIntentResponseCode {
38    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
39}
40
41extern_class!(
42    /// [Apple's documentation](https://developer.apple.com/documentation/intents/incancelworkoutintentresponse?language=objc)
43    #[unsafe(super(INIntentResponse, NSObject))]
44    #[derive(Debug, PartialEq, Eq, Hash)]
45    #[cfg(feature = "INIntentResponse")]
46    pub struct INCancelWorkoutIntentResponse;
47);
48
49#[cfg(feature = "INIntentResponse")]
50extern_conformance!(
51    unsafe impl NSCoding for INCancelWorkoutIntentResponse {}
52);
53
54#[cfg(feature = "INIntentResponse")]
55extern_conformance!(
56    unsafe impl NSCopying for INCancelWorkoutIntentResponse {}
57);
58
59#[cfg(feature = "INIntentResponse")]
60unsafe impl CopyingHelper for INCancelWorkoutIntentResponse {
61    type Result = Self;
62}
63
64#[cfg(feature = "INIntentResponse")]
65extern_conformance!(
66    unsafe impl NSObjectProtocol for INCancelWorkoutIntentResponse {}
67);
68
69#[cfg(feature = "INIntentResponse")]
70extern_conformance!(
71    unsafe impl NSSecureCoding for INCancelWorkoutIntentResponse {}
72);
73
74#[cfg(feature = "INIntentResponse")]
75impl INCancelWorkoutIntentResponse {
76    extern_methods!(
77        #[unsafe(method(init))]
78        #[unsafe(method_family = init)]
79        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
80
81        #[unsafe(method(initWithCode:userActivity:))]
82        #[unsafe(method_family = init)]
83        pub unsafe fn initWithCode_userActivity(
84            this: Allocated<Self>,
85            code: INCancelWorkoutIntentResponseCode,
86            user_activity: Option<&NSUserActivity>,
87        ) -> Retained<Self>;
88
89        #[unsafe(method(code))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn code(&self) -> INCancelWorkoutIntentResponseCode;
92    );
93}
94
95/// Methods declared on superclass `NSObject`.
96#[cfg(feature = "INIntentResponse")]
97impl INCancelWorkoutIntentResponse {
98    extern_methods!(
99        #[unsafe(method(new))]
100        #[unsafe(method_family = new)]
101        pub unsafe fn new() -> Retained<Self>;
102    );
103}