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