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::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

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

#[cfg(feature = "PKStoredValuePassProperties")]
extern_conformance!(
    unsafe impl NSObjectProtocol for PKTransitPassProperties {}
);

#[cfg(feature = "PKStoredValuePassProperties")]
impl PKTransitPassProperties {
    extern_methods!(
        #[deprecated]
        #[unsafe(method(transitBalance))]
        #[unsafe(method_family = none)]
        pub unsafe fn transitBalance(&self) -> Retained<NSDecimalNumber>;

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

        #[deprecated]
        #[unsafe(method(isBlacklisted))]
        #[unsafe(method_family = none)]
        pub unsafe fn isBlacklisted(&self) -> bool;

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

        #[unsafe(method(isBlocked))]
        #[unsafe(method_family = none)]
        pub unsafe fn isBlocked(&self) -> bool;

        #[unsafe(method(isInStation))]
        #[unsafe(method_family = none)]
        pub unsafe fn isInStation(&self) -> bool;
    );
}

/// Methods declared on superclass `PKStoredValuePassProperties`.
#[cfg(feature = "PKStoredValuePassProperties")]
impl PKTransitPassProperties {
    extern_methods!(
        #[cfg(all(feature = "PKObject", feature = "PKPass"))]
        #[unsafe(method(passPropertiesForPass:))]
        #[unsafe(method_family = none)]
        pub unsafe fn passPropertiesForPass(pass: &PKPass) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "PKStoredValuePassProperties")]
impl PKTransitPassProperties {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

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