objc2_intents/generated/
INSendPaymentCurrencyAmountResolutionResult.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 INSendPaymentCurrencyAmountUnsupportedReason(pub NSInteger);
14impl INSendPaymentCurrencyAmountUnsupportedReason {
15 #[doc(alias = "INSendPaymentCurrencyAmountUnsupportedReasonPaymentsAmountBelowMinimum")]
16 pub const PaymentsAmountBelowMinimum: Self = Self(1);
17 #[doc(alias = "INSendPaymentCurrencyAmountUnsupportedReasonPaymentsAmountAboveMaximum")]
18 pub const PaymentsAmountAboveMaximum: Self = Self(2);
19 #[doc(alias = "INSendPaymentCurrencyAmountUnsupportedReasonPaymentsCurrencyUnsupported")]
20 pub const PaymentsCurrencyUnsupported: Self = Self(3);
21}
22
23unsafe impl Encode for INSendPaymentCurrencyAmountUnsupportedReason {
24 const ENCODING: Encoding = NSInteger::ENCODING;
25}
26
27unsafe impl RefEncode for INSendPaymentCurrencyAmountUnsupportedReason {
28 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
29}
30
31extern_class!(
32 #[unsafe(super(INCurrencyAmountResolutionResult, INIntentResolutionResult, NSObject))]
34 #[derive(Debug, PartialEq, Eq, Hash)]
35 #[cfg(all(
36 feature = "INCurrencyAmountResolutionResult",
37 feature = "INIntentResolutionResult"
38 ))]
39 pub struct INSendPaymentCurrencyAmountResolutionResult;
40);
41
42#[cfg(all(
43 feature = "INCurrencyAmountResolutionResult",
44 feature = "INIntentResolutionResult"
45))]
46extern_conformance!(
47 unsafe impl NSObjectProtocol for INSendPaymentCurrencyAmountResolutionResult {}
48);
49
50#[cfg(all(
51 feature = "INCurrencyAmountResolutionResult",
52 feature = "INIntentResolutionResult"
53))]
54impl INSendPaymentCurrencyAmountResolutionResult {
55 extern_methods!(
56 #[unsafe(method(unsupportedForReason:))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn unsupportedForReason(
59 reason: INSendPaymentCurrencyAmountUnsupportedReason,
60 ) -> Retained<Self>;
61
62 #[unsafe(method(initWithCurrencyAmountResolutionResult:))]
63 #[unsafe(method_family = init)]
64 pub unsafe fn initWithCurrencyAmountResolutionResult(
65 this: Allocated<Self>,
66 currency_amount_resolution_result: &INCurrencyAmountResolutionResult,
67 ) -> Retained<Self>;
68 );
69}
70
71#[cfg(all(
73 feature = "INCurrencyAmountResolutionResult",
74 feature = "INIntentResolutionResult"
75))]
76impl INSendPaymentCurrencyAmountResolutionResult {
77 extern_methods!(
78 #[cfg(feature = "INCurrencyAmount")]
79 #[unsafe(method(successWithResolvedCurrencyAmount:))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn successWithResolvedCurrencyAmount(
82 resolved_currency_amount: &INCurrencyAmount,
83 ) -> Retained<Self>;
84
85 #[cfg(feature = "INCurrencyAmount")]
86 #[unsafe(method(disambiguationWithCurrencyAmountsToDisambiguate:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn disambiguationWithCurrencyAmountsToDisambiguate(
89 currency_amounts_to_disambiguate: &NSArray<INCurrencyAmount>,
90 ) -> Retained<Self>;
91
92 #[cfg(feature = "INCurrencyAmount")]
93 #[unsafe(method(confirmationRequiredWithCurrencyAmountToConfirm:))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn confirmationRequiredWithCurrencyAmountToConfirm(
96 currency_amount_to_confirm: Option<&INCurrencyAmount>,
97 ) -> Retained<Self>;
98 );
99}
100
101#[cfg(all(
103 feature = "INCurrencyAmountResolutionResult",
104 feature = "INIntentResolutionResult"
105))]
106impl INSendPaymentCurrencyAmountResolutionResult {
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#[cfg(all(
128 feature = "INCurrencyAmountResolutionResult",
129 feature = "INIntentResolutionResult"
130))]
131impl INSendPaymentCurrencyAmountResolutionResult {
132 extern_methods!(
133 #[unsafe(method(new))]
134 #[unsafe(method_family = new)]
135 pub unsafe fn new() -> Retained<Self>;
136 );
137}