objc2-intents 0.3.2

Bindings to the Intents framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inpaymentmethod?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct INPaymentMethod;
);

extern_conformance!(
    unsafe impl NSCoding for INPaymentMethod {}
);

extern_conformance!(
    unsafe impl NSCopying for INPaymentMethod {}
);

unsafe impl CopyingHelper for INPaymentMethod {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for INPaymentMethod {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for INPaymentMethod {}
);

impl INPaymentMethod {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(all(feature = "INImage", feature = "INPaymentMethodType"))]
        #[unsafe(method(initWithType:name:identificationHint:icon:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithType_name_identificationHint_icon(
            this: Allocated<Self>,
            r#type: INPaymentMethodType,
            name: Option<&NSString>,
            identification_hint: Option<&NSString>,
            icon: Option<&INImage>,
        ) -> Retained<Self>;

        #[cfg(feature = "INPaymentMethodType")]
        #[unsafe(method(type))]
        #[unsafe(method_family = none)]
        pub unsafe fn r#type(&self) -> INPaymentMethodType;

        #[unsafe(method(name))]
        #[unsafe(method_family = none)]
        pub unsafe fn name(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "INImage")]
        #[unsafe(method(icon))]
        #[unsafe(method_family = none)]
        pub unsafe fn icon(&self) -> Option<Retained<INImage>>;

        #[unsafe(method(identificationHint))]
        #[unsafe(method_family = none)]
        pub unsafe fn identificationHint(&self) -> Option<Retained<NSString>>;

        #[unsafe(method(applePayPaymentMethod))]
        #[unsafe(method_family = none)]
        pub unsafe fn applePayPaymentMethod() -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl INPaymentMethod {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}