objc2_intents/generated/
INBalanceAmount.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
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inbalanceamount?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct INBalanceAmount;
14);
15
16extern_conformance!(
17    unsafe impl NSCoding for INBalanceAmount {}
18);
19
20extern_conformance!(
21    unsafe impl NSCopying for INBalanceAmount {}
22);
23
24unsafe impl CopyingHelper for INBalanceAmount {
25    type Result = Self;
26}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for INBalanceAmount {}
30);
31
32extern_conformance!(
33    unsafe impl NSSecureCoding for INBalanceAmount {}
34);
35
36impl INBalanceAmount {
37    extern_methods!(
38        #[unsafe(method(init))]
39        #[unsafe(method_family = init)]
40        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
41
42        #[cfg(feature = "INBalanceType")]
43        #[unsafe(method(initWithAmount:balanceType:))]
44        #[unsafe(method_family = init)]
45        pub unsafe fn initWithAmount_balanceType(
46            this: Allocated<Self>,
47            amount: &NSDecimalNumber,
48            balance_type: INBalanceType,
49        ) -> Option<Retained<Self>>;
50
51        #[unsafe(method(initWithAmount:currencyCode:))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn initWithAmount_currencyCode(
54            this: Allocated<Self>,
55            amount: &NSDecimalNumber,
56            currency_code: &NSString,
57        ) -> Retained<Self>;
58
59        #[unsafe(method(amount))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn amount(&self) -> Option<Retained<NSDecimalNumber>>;
62
63        #[cfg(feature = "INBalanceType")]
64        #[unsafe(method(balanceType))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn balanceType(&self) -> INBalanceType;
67
68        #[unsafe(method(currencyCode))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn currencyCode(&self) -> Option<Retained<NSString>>;
71    );
72}
73
74/// Methods declared on superclass `NSObject`.
75impl INBalanceAmount {
76    extern_methods!(
77        #[unsafe(method(new))]
78        #[unsafe(method_family = new)]
79        pub unsafe fn new() -> Retained<Self>;
80    );
81}