objc2-pass-kit 0.3.2

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

use crate::*;

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

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

impl PKAutomaticReloadPaymentRequest {
    extern_methods!(
        #[unsafe(method(paymentDescription))]
        #[unsafe(method_family = none)]
        pub unsafe fn paymentDescription(&self) -> Retained<NSString>;

        /// Setter for [`paymentDescription`][Self::paymentDescription].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setPaymentDescription:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPaymentDescription(&self, payment_description: &NSString);

        #[cfg(all(
            feature = "PKAutomaticReloadPaymentSummaryItem",
            feature = "PKPaymentSummaryItem"
        ))]
        #[unsafe(method(automaticReloadBilling))]
        #[unsafe(method_family = none)]
        pub unsafe fn automaticReloadBilling(
            &self,
        ) -> Retained<PKAutomaticReloadPaymentSummaryItem>;

        #[cfg(all(
            feature = "PKAutomaticReloadPaymentSummaryItem",
            feature = "PKPaymentSummaryItem"
        ))]
        /// Setter for [`automaticReloadBilling`][Self::automaticReloadBilling].
        #[unsafe(method(setAutomaticReloadBilling:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAutomaticReloadBilling(
            &self,
            automatic_reload_billing: &PKAutomaticReloadPaymentSummaryItem,
        );

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

        /// Setter for [`billingAgreement`][Self::billingAgreement].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setBillingAgreement:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setBillingAgreement(&self, billing_agreement: Option<&NSString>);

        #[unsafe(method(managementURL))]
        #[unsafe(method_family = none)]
        pub unsafe fn managementURL(&self) -> Retained<NSURL>;

        /// Setter for [`managementURL`][Self::managementURL].
        #[unsafe(method(setManagementURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setManagementURL(&self, management_url: &NSURL);

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

        /// Setter for [`tokenNotificationURL`][Self::tokenNotificationURL].
        #[unsafe(method(setTokenNotificationURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTokenNotificationURL(&self, token_notification_url: Option<&NSURL>);

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

        #[cfg(all(
            feature = "PKAutomaticReloadPaymentSummaryItem",
            feature = "PKPaymentSummaryItem"
        ))]
        #[unsafe(method(initWithPaymentDescription:automaticReloadBilling:managementURL:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPaymentDescription_automaticReloadBilling_managementURL(
            this: Allocated<Self>,
            payment_description: &NSString,
            automatic_reload_billing: &PKAutomaticReloadPaymentSummaryItem,
            management_url: &NSURL,
        ) -> Retained<Self>;
    );
}

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