use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct INSendPaymentCurrencyAmountUnsupportedReason(pub NSInteger);
impl INSendPaymentCurrencyAmountUnsupportedReason {
#[doc(alias = "INSendPaymentCurrencyAmountUnsupportedReasonPaymentsAmountBelowMinimum")]
pub const PaymentsAmountBelowMinimum: Self = Self(1);
#[doc(alias = "INSendPaymentCurrencyAmountUnsupportedReasonPaymentsAmountAboveMaximum")]
pub const PaymentsAmountAboveMaximum: Self = Self(2);
#[doc(alias = "INSendPaymentCurrencyAmountUnsupportedReasonPaymentsCurrencyUnsupported")]
pub const PaymentsCurrencyUnsupported: Self = Self(3);
}
unsafe impl Encode for INSendPaymentCurrencyAmountUnsupportedReason {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for INSendPaymentCurrencyAmountUnsupportedReason {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(INCurrencyAmountResolutionResult, INIntentResolutionResult, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "INCurrencyAmountResolutionResult",
feature = "INIntentResolutionResult"
))]
pub struct INSendPaymentCurrencyAmountResolutionResult;
);
#[cfg(all(
feature = "INCurrencyAmountResolutionResult",
feature = "INIntentResolutionResult"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for INSendPaymentCurrencyAmountResolutionResult {}
);
#[cfg(all(
feature = "INCurrencyAmountResolutionResult",
feature = "INIntentResolutionResult"
))]
impl INSendPaymentCurrencyAmountResolutionResult {
extern_methods!(
#[unsafe(method(unsupportedForReason:))]
#[unsafe(method_family = none)]
pub unsafe fn unsupportedForReason(
reason: INSendPaymentCurrencyAmountUnsupportedReason,
) -> Retained<Self>;
#[unsafe(method(initWithCurrencyAmountResolutionResult:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCurrencyAmountResolutionResult(
this: Allocated<Self>,
currency_amount_resolution_result: &INCurrencyAmountResolutionResult,
) -> Retained<Self>;
);
}
#[cfg(all(
feature = "INCurrencyAmountResolutionResult",
feature = "INIntentResolutionResult"
))]
impl INSendPaymentCurrencyAmountResolutionResult {
extern_methods!(
#[cfg(feature = "INCurrencyAmount")]
#[unsafe(method(successWithResolvedCurrencyAmount:))]
#[unsafe(method_family = none)]
pub unsafe fn successWithResolvedCurrencyAmount(
resolved_currency_amount: &INCurrencyAmount,
) -> Retained<Self>;
#[cfg(feature = "INCurrencyAmount")]
#[unsafe(method(disambiguationWithCurrencyAmountsToDisambiguate:))]
#[unsafe(method_family = none)]
pub unsafe fn disambiguationWithCurrencyAmountsToDisambiguate(
currency_amounts_to_disambiguate: &NSArray<INCurrencyAmount>,
) -> Retained<Self>;
#[cfg(feature = "INCurrencyAmount")]
#[unsafe(method(confirmationRequiredWithCurrencyAmountToConfirm:))]
#[unsafe(method_family = none)]
pub unsafe fn confirmationRequiredWithCurrencyAmountToConfirm(
currency_amount_to_confirm: Option<&INCurrencyAmount>,
) -> Retained<Self>;
);
}
#[cfg(all(
feature = "INCurrencyAmountResolutionResult",
feature = "INIntentResolutionResult"
))]
impl INSendPaymentCurrencyAmountResolutionResult {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(needsValue))]
#[unsafe(method_family = none)]
pub unsafe fn needsValue() -> Retained<Self>;
#[unsafe(method(notRequired))]
#[unsafe(method_family = none)]
pub unsafe fn notRequired() -> Retained<Self>;
#[unsafe(method(unsupported))]
#[unsafe(method_family = none)]
pub unsafe fn unsupported() -> Retained<Self>;
);
}
#[cfg(all(
feature = "INCurrencyAmountResolutionResult",
feature = "INIntentResolutionResult"
))]
impl INSendPaymentCurrencyAmountResolutionResult {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}