objc2_intents/generated/
INUnsendMessagesIntentResponse.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/inunsendmessagesintentresponsecode?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct INUnsendMessagesIntentResponseCode(pub NSInteger);
14impl INUnsendMessagesIntentResponseCode {
15    #[doc(alias = "INUnsendMessagesIntentResponseCodeUnspecified")]
16    pub const Unspecified: Self = Self(0);
17    #[doc(alias = "INUnsendMessagesIntentResponseCodeReady")]
18    pub const Ready: Self = Self(1);
19    #[doc(alias = "INUnsendMessagesIntentResponseCodeInProgress")]
20    pub const InProgress: Self = Self(2);
21    #[doc(alias = "INUnsendMessagesIntentResponseCodeSuccess")]
22    pub const Success: Self = Self(3);
23    #[doc(alias = "INUnsendMessagesIntentResponseCodeFailure")]
24    pub const Failure: Self = Self(4);
25    #[doc(alias = "INUnsendMessagesIntentResponseCodeFailureRequiringAppLaunch")]
26    pub const FailureRequiringAppLaunch: Self = Self(5);
27    #[doc(alias = "INUnsendMessagesIntentResponseCodeFailureMessageNotFound")]
28    pub const FailureMessageNotFound: Self = Self(6);
29    #[doc(alias = "INUnsendMessagesIntentResponseCodeFailurePastUnsendTimeLimit")]
30    pub const FailurePastUnsendTimeLimit: Self = Self(7);
31    #[doc(alias = "INUnsendMessagesIntentResponseCodeFailureMessageTypeUnsupported")]
32    pub const FailureMessageTypeUnsupported: Self = Self(8);
33    #[doc(alias = "INUnsendMessagesIntentResponseCodeFailureUnsupportedOnService")]
34    pub const FailureUnsupportedOnService: Self = Self(9);
35    #[doc(alias = "INUnsendMessagesIntentResponseCodeFailureMessageServiceNotAvailable")]
36    pub const FailureMessageServiceNotAvailable: Self = Self(10);
37    #[doc(alias = "INUnsendMessagesIntentResponseCodeFailureRequiringInAppAuthentication")]
38    pub const FailureRequiringInAppAuthentication: Self = Self(11);
39}
40
41unsafe impl Encode for INUnsendMessagesIntentResponseCode {
42    const ENCODING: Encoding = NSInteger::ENCODING;
43}
44
45unsafe impl RefEncode for INUnsendMessagesIntentResponseCode {
46    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
47}
48
49extern_class!(
50    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inunsendmessagesintentresponse?language=objc)
51    #[unsafe(super(INIntentResponse, NSObject))]
52    #[derive(Debug, PartialEq, Eq, Hash)]
53    #[cfg(feature = "INIntentResponse")]
54    pub struct INUnsendMessagesIntentResponse;
55);
56
57#[cfg(feature = "INIntentResponse")]
58extern_conformance!(
59    unsafe impl NSCoding for INUnsendMessagesIntentResponse {}
60);
61
62#[cfg(feature = "INIntentResponse")]
63extern_conformance!(
64    unsafe impl NSCopying for INUnsendMessagesIntentResponse {}
65);
66
67#[cfg(feature = "INIntentResponse")]
68unsafe impl CopyingHelper for INUnsendMessagesIntentResponse {
69    type Result = Self;
70}
71
72#[cfg(feature = "INIntentResponse")]
73extern_conformance!(
74    unsafe impl NSObjectProtocol for INUnsendMessagesIntentResponse {}
75);
76
77#[cfg(feature = "INIntentResponse")]
78extern_conformance!(
79    unsafe impl NSSecureCoding for INUnsendMessagesIntentResponse {}
80);
81
82#[cfg(feature = "INIntentResponse")]
83impl INUnsendMessagesIntentResponse {
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: INUnsendMessagesIntentResponseCode,
94            user_activity: Option<&NSUserActivity>,
95        ) -> Retained<Self>;
96
97        #[unsafe(method(code))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn code(&self) -> INUnsendMessagesIntentResponseCode;
100    );
101}
102
103/// Methods declared on superclass `NSObject`.
104#[cfg(feature = "INIntentResponse")]
105impl INUnsendMessagesIntentResponse {
106    extern_methods!(
107        #[unsafe(method(new))]
108        #[unsafe(method_family = new)]
109        pub unsafe fn new() -> Retained<Self>;
110    );
111}