objc2_intents/generated/
INEditMessageIntentResponse.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct INEditMessageIntentResponseCode(pub NSInteger);
14impl INEditMessageIntentResponseCode {
15 #[doc(alias = "INEditMessageIntentResponseCodeUnspecified")]
16 pub const Unspecified: Self = Self(0);
17 #[doc(alias = "INEditMessageIntentResponseCodeReady")]
18 pub const Ready: Self = Self(1);
19 #[doc(alias = "INEditMessageIntentResponseCodeInProgress")]
20 pub const InProgress: Self = Self(2);
21 #[doc(alias = "INEditMessageIntentResponseCodeSuccess")]
22 pub const Success: Self = Self(3);
23 #[doc(alias = "INEditMessageIntentResponseCodeFailure")]
24 pub const Failure: Self = Self(4);
25 #[doc(alias = "INEditMessageIntentResponseCodeFailureRequiringAppLaunch")]
26 pub const FailureRequiringAppLaunch: Self = Self(5);
27 #[doc(alias = "INEditMessageIntentResponseCodeFailureMessageNotFound")]
28 pub const FailureMessageNotFound: Self = Self(6);
29 #[doc(alias = "INEditMessageIntentResponseCodeFailurePastEditTimeLimit")]
30 pub const FailurePastEditTimeLimit: Self = Self(7);
31 #[doc(alias = "INEditMessageIntentResponseCodeFailureMessageTypeUnsupported")]
32 pub const FailureMessageTypeUnsupported: Self = Self(8);
33 #[doc(alias = "INEditMessageIntentResponseCodeFailureUnsupportedOnService")]
34 pub const FailureUnsupportedOnService: Self = Self(9);
35 #[doc(alias = "INEditMessageIntentResponseCodeFailureMessageServiceNotAvailable")]
36 pub const FailureMessageServiceNotAvailable: Self = Self(10);
37 #[doc(alias = "INEditMessageIntentResponseCodeFailureRequiringInAppAuthentication")]
38 pub const FailureRequiringInAppAuthentication: Self = Self(11);
39}
40
41unsafe impl Encode for INEditMessageIntentResponseCode {
42 const ENCODING: Encoding = NSInteger::ENCODING;
43}
44
45unsafe impl RefEncode for INEditMessageIntentResponseCode {
46 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
47}
48
49extern_class!(
50 #[unsafe(super(INIntentResponse, NSObject))]
52 #[derive(Debug, PartialEq, Eq, Hash)]
53 #[cfg(feature = "INIntentResponse")]
54 pub struct INEditMessageIntentResponse;
55);
56
57#[cfg(feature = "INIntentResponse")]
58extern_conformance!(
59 unsafe impl NSCoding for INEditMessageIntentResponse {}
60);
61
62#[cfg(feature = "INIntentResponse")]
63extern_conformance!(
64 unsafe impl NSCopying for INEditMessageIntentResponse {}
65);
66
67#[cfg(feature = "INIntentResponse")]
68unsafe impl CopyingHelper for INEditMessageIntentResponse {
69 type Result = Self;
70}
71
72#[cfg(feature = "INIntentResponse")]
73extern_conformance!(
74 unsafe impl NSObjectProtocol for INEditMessageIntentResponse {}
75);
76
77#[cfg(feature = "INIntentResponse")]
78extern_conformance!(
79 unsafe impl NSSecureCoding for INEditMessageIntentResponse {}
80);
81
82#[cfg(feature = "INIntentResponse")]
83impl INEditMessageIntentResponse {
84 extern_methods!(
85 #[unsafe(method(init))]
86 #[unsafe(method_family = init)]
87 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
88
89 #[unsafe(method(initWithCode:userActivity:))]
90 #[unsafe(method_family = init)]
91 pub unsafe fn initWithCode_userActivity(
92 this: Allocated<Self>,
93 code: INEditMessageIntentResponseCode,
94 user_activity: Option<&NSUserActivity>,
95 ) -> Retained<Self>;
96
97 #[unsafe(method(code))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn code(&self) -> INEditMessageIntentResponseCode;
100 );
101}
102
103#[cfg(feature = "INIntentResponse")]
105impl INEditMessageIntentResponse {
106 extern_methods!(
107 #[unsafe(method(new))]
108 #[unsafe(method_family = new)]
109 pub unsafe fn new() -> Retained<Self>;
110 );
111}