objc2_intents/generated/
INPaymentMethod.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/inpaymentmethod?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct INPaymentMethod;
14);
15
16extern_conformance!(
17    unsafe impl NSCoding for INPaymentMethod {}
18);
19
20extern_conformance!(
21    unsafe impl NSCopying for INPaymentMethod {}
22);
23
24unsafe impl CopyingHelper for INPaymentMethod {
25    type Result = Self;
26}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for INPaymentMethod {}
30);
31
32extern_conformance!(
33    unsafe impl NSSecureCoding for INPaymentMethod {}
34);
35
36impl INPaymentMethod {
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(all(feature = "INImage", feature = "INPaymentMethodType"))]
43        #[unsafe(method(initWithType:name:identificationHint:icon:))]
44        #[unsafe(method_family = init)]
45        pub unsafe fn initWithType_name_identificationHint_icon(
46            this: Allocated<Self>,
47            r#type: INPaymentMethodType,
48            name: Option<&NSString>,
49            identification_hint: Option<&NSString>,
50            icon: Option<&INImage>,
51        ) -> Retained<Self>;
52
53        #[cfg(feature = "INPaymentMethodType")]
54        #[unsafe(method(type))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn r#type(&self) -> INPaymentMethodType;
57
58        #[unsafe(method(name))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn name(&self) -> Option<Retained<NSString>>;
61
62        #[cfg(feature = "INImage")]
63        #[unsafe(method(icon))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn icon(&self) -> Option<Retained<INImage>>;
66
67        #[unsafe(method(identificationHint))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn identificationHint(&self) -> Option<Retained<NSString>>;
70
71        #[unsafe(method(applePayPaymentMethod))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn applePayPaymentMethod() -> Retained<Self>;
74    );
75}
76
77/// Methods declared on superclass `NSObject`.
78impl INPaymentMethod {
79    extern_methods!(
80        #[unsafe(method(new))]
81        #[unsafe(method_family = new)]
82        pub unsafe fn new() -> Retained<Self>;
83    );
84}