objc2_intents/generated/
INRequestPaymentCurrencyAmountResolutionResult.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/inrequestpaymentcurrencyamountunsupportedreason?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct INRequestPaymentCurrencyAmountUnsupportedReason(pub NSInteger);
14impl INRequestPaymentCurrencyAmountUnsupportedReason {
15    #[doc(alias = "INRequestPaymentCurrencyAmountUnsupportedReasonPaymentsAmountBelowMinimum")]
16    pub const PaymentsAmountBelowMinimum: Self = Self(1);
17    #[doc(alias = "INRequestPaymentCurrencyAmountUnsupportedReasonPaymentsAmountAboveMaximum")]
18    pub const PaymentsAmountAboveMaximum: Self = Self(2);
19    #[doc(alias = "INRequestPaymentCurrencyAmountUnsupportedReasonPaymentsCurrencyUnsupported")]
20    pub const PaymentsCurrencyUnsupported: Self = Self(3);
21}
22
23unsafe impl Encode for INRequestPaymentCurrencyAmountUnsupportedReason {
24    const ENCODING: Encoding = NSInteger::ENCODING;
25}
26
27unsafe impl RefEncode for INRequestPaymentCurrencyAmountUnsupportedReason {
28    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
29}
30
31extern_class!(
32    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inrequestpaymentcurrencyamountresolutionresult?language=objc)
33    #[unsafe(super(INCurrencyAmountResolutionResult, INIntentResolutionResult, NSObject))]
34    #[derive(Debug, PartialEq, Eq, Hash)]
35    #[cfg(all(
36        feature = "INCurrencyAmountResolutionResult",
37        feature = "INIntentResolutionResult"
38    ))]
39    pub struct INRequestPaymentCurrencyAmountResolutionResult;
40);
41
42#[cfg(all(
43    feature = "INCurrencyAmountResolutionResult",
44    feature = "INIntentResolutionResult"
45))]
46extern_conformance!(
47    unsafe impl NSObjectProtocol for INRequestPaymentCurrencyAmountResolutionResult {}
48);
49
50#[cfg(all(
51    feature = "INCurrencyAmountResolutionResult",
52    feature = "INIntentResolutionResult"
53))]
54impl INRequestPaymentCurrencyAmountResolutionResult {
55    extern_methods!(
56        #[unsafe(method(unsupportedForReason:))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn unsupportedForReason(
59            reason: INRequestPaymentCurrencyAmountUnsupportedReason,
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/// Methods declared on superclass `INCurrencyAmountResolutionResult`.
72#[cfg(all(
73    feature = "INCurrencyAmountResolutionResult",
74    feature = "INIntentResolutionResult"
75))]
76impl INRequestPaymentCurrencyAmountResolutionResult {
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/// Methods declared on superclass `INIntentResolutionResult`.
102#[cfg(all(
103    feature = "INCurrencyAmountResolutionResult",
104    feature = "INIntentResolutionResult"
105))]
106impl INRequestPaymentCurrencyAmountResolutionResult {
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 = "INCurrencyAmountResolutionResult",
129    feature = "INIntentResolutionResult"
130))]
131impl INRequestPaymentCurrencyAmountResolutionResult {
132    extern_methods!(
133        #[unsafe(method(new))]
134        #[unsafe(method_family = new)]
135        pub unsafe fn new() -> Retained<Self>;
136    );
137}