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