objc2_intents/generated/
INSendMessageRecipientResolutionResult.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/insendmessagerecipientunsupportedreason?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct INSendMessageRecipientUnsupportedReason(pub NSInteger);
14impl INSendMessageRecipientUnsupportedReason {
15    #[doc(alias = "INSendMessageRecipientUnsupportedReasonNoAccount")]
16    pub const NoAccount: Self = Self(1);
17    #[doc(alias = "INSendMessageRecipientUnsupportedReasonOffline")]
18    pub const Offline: Self = Self(2);
19    #[doc(alias = "INSendMessageRecipientUnsupportedReasonMessagingServiceNotEnabledForRecipient")]
20    pub const MessagingServiceNotEnabledForRecipient: Self = Self(3);
21    #[doc(alias = "INSendMessageRecipientUnsupportedReasonNoValidHandle")]
22    pub const NoValidHandle: Self = Self(4);
23    #[doc(alias = "INSendMessageRecipientUnsupportedReasonRequestedHandleInvalid")]
24    pub const RequestedHandleInvalid: Self = Self(5);
25    #[doc(alias = "INSendMessageRecipientUnsupportedReasonNoHandleForLabel")]
26    pub const NoHandleForLabel: Self = Self(6);
27    #[doc(alias = "INSendMessageRecipientUnsupportedReasonRequiringInAppAuthentication")]
28    pub const RequiringInAppAuthentication: Self = Self(7);
29}
30
31unsafe impl Encode for INSendMessageRecipientUnsupportedReason {
32    const ENCODING: Encoding = NSInteger::ENCODING;
33}
34
35unsafe impl RefEncode for INSendMessageRecipientUnsupportedReason {
36    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}
38
39extern_class!(
40    /// [Apple's documentation](https://developer.apple.com/documentation/intents/insendmessagerecipientresolutionresult?language=objc)
41    #[unsafe(super(INPersonResolutionResult, INIntentResolutionResult, NSObject))]
42    #[derive(Debug, PartialEq, Eq, Hash)]
43    #[cfg(all(
44        feature = "INIntentResolutionResult",
45        feature = "INPersonResolutionResult"
46    ))]
47    pub struct INSendMessageRecipientResolutionResult;
48);
49
50#[cfg(all(
51    feature = "INIntentResolutionResult",
52    feature = "INPersonResolutionResult"
53))]
54extern_conformance!(
55    unsafe impl NSObjectProtocol for INSendMessageRecipientResolutionResult {}
56);
57
58#[cfg(all(
59    feature = "INIntentResolutionResult",
60    feature = "INPersonResolutionResult"
61))]
62impl INSendMessageRecipientResolutionResult {
63    extern_methods!(
64        #[unsafe(method(unsupportedForReason:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn unsupportedForReason(
67            reason: INSendMessageRecipientUnsupportedReason,
68        ) -> Retained<Self>;
69
70        #[unsafe(method(initWithPersonResolutionResult:))]
71        #[unsafe(method_family = init)]
72        pub unsafe fn initWithPersonResolutionResult(
73            this: Allocated<Self>,
74            person_resolution_result: &INPersonResolutionResult,
75        ) -> Retained<Self>;
76    );
77}
78
79/// Methods declared on superclass `INPersonResolutionResult`.
80#[cfg(all(
81    feature = "INIntentResolutionResult",
82    feature = "INPersonResolutionResult"
83))]
84impl INSendMessageRecipientResolutionResult {
85    extern_methods!(
86        #[cfg(feature = "INPerson")]
87        #[unsafe(method(successWithResolvedPerson:))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn successWithResolvedPerson(resolved_person: &INPerson) -> Retained<Self>;
90
91        #[cfg(feature = "INPerson")]
92        #[unsafe(method(disambiguationWithPeopleToDisambiguate:))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn disambiguationWithPeopleToDisambiguate(
95            people_to_disambiguate: &NSArray<INPerson>,
96        ) -> Retained<Self>;
97
98        #[cfg(feature = "INPerson")]
99        #[unsafe(method(confirmationRequiredWithPersonToConfirm:))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn confirmationRequiredWithPersonToConfirm(
102            person_to_confirm: Option<&INPerson>,
103        ) -> Retained<Self>;
104    );
105}
106
107/// Methods declared on superclass `INIntentResolutionResult`.
108#[cfg(all(
109    feature = "INIntentResolutionResult",
110    feature = "INPersonResolutionResult"
111))]
112impl INSendMessageRecipientResolutionResult {
113    extern_methods!(
114        #[unsafe(method(init))]
115        #[unsafe(method_family = init)]
116        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
117
118        #[unsafe(method(needsValue))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn needsValue() -> Retained<Self>;
121
122        #[unsafe(method(notRequired))]
123        #[unsafe(method_family = none)]
124        pub unsafe fn notRequired() -> Retained<Self>;
125
126        #[unsafe(method(unsupported))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn unsupported() -> Retained<Self>;
129    );
130}
131
132/// Methods declared on superclass `NSObject`.
133#[cfg(all(
134    feature = "INIntentResolutionResult",
135    feature = "INPersonResolutionResult"
136))]
137impl INSendMessageRecipientResolutionResult {
138    extern_methods!(
139        #[unsafe(method(new))]
140        #[unsafe(method_family = new)]
141        pub unsafe fn new() -> Retained<Self>;
142    );
143}