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 "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpasskiterrordomain?language=objc)
    pub static PKPassKitErrorDomain: &'static NSString;
}

/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpasskiterrorcode?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PKPassKitErrorCode(pub NSInteger);
impl PKPassKitErrorCode {
    #[doc(alias = "PKUnknownError")]
    pub const UnknownError: Self = Self(-1);
    #[doc(alias = "PKInvalidDataError")]
    pub const InvalidDataError: Self = Self(1);
    #[doc(alias = "PKUnsupportedVersionError")]
    pub const UnsupportedVersionError: Self = Self(2);
    #[doc(alias = "PKInvalidSignature")]
    pub const InvalidSignature: Self = Self(3);
    #[doc(alias = "PKNotEntitledError")]
    pub const NotEntitledError: Self = Self(4);
}

unsafe impl Encode for PKPassKitErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PKPassKitErrorCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymenterrordomain?language=objc)
    pub static PKPaymentErrorDomain: &'static NSString;
}

/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymenterrorcode?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PKPaymentErrorCode(pub NSInteger);
impl PKPaymentErrorCode {
    #[doc(alias = "PKPaymentUnknownError")]
    pub const UnknownError: Self = Self(-1);
    #[doc(alias = "PKPaymentShippingContactInvalidError")]
    pub const ShippingContactInvalidError: Self = Self(1);
    #[doc(alias = "PKPaymentBillingContactInvalidError")]
    pub const BillingContactInvalidError: Self = Self(2);
    #[doc(alias = "PKPaymentShippingAddressUnserviceableError")]
    pub const ShippingAddressUnserviceableError: Self = Self(3);
    #[doc(alias = "PKPaymentCouponCodeInvalidError")]
    pub const CouponCodeInvalidError: Self = Self(4);
    #[doc(alias = "PKPaymentCouponCodeExpiredError")]
    pub const CouponCodeExpiredError: Self = Self(5);
}

unsafe impl Encode for PKPaymentErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PKPaymentErrorCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymenterrorkey?language=objc)
// NS_TYPED_ENUM
pub type PKPaymentErrorKey = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymenterrorcontactfielduserinfokey?language=objc)
    pub static PKPaymentErrorContactFieldUserInfoKey: &'static PKPaymentErrorKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymenterrorpostaladdressuserinfokey?language=objc)
    pub static PKPaymentErrorPostalAddressUserInfoKey: &'static PKPaymentErrorKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkdisbursementerrordomain?language=objc)
    pub static PKDisbursementErrorDomain: &'static NSString;
}

/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkdisbursementerrorcode?language=objc)
// NS_ERROR_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PKDisbursementErrorCode(pub NSInteger);
impl PKDisbursementErrorCode {
    #[doc(alias = "PKDisbursementUnknownError")]
    pub const UnknownError: Self = Self(-1);
    #[doc(alias = "PKDisbursementUnsupportedCardError")]
    pub const UnsupportedCardError: Self = Self(1);
    #[doc(alias = "PKDisbursementRecipientContactInvalidError")]
    pub const RecipientContactInvalidError: Self = Self(2);
}

unsafe impl Encode for PKDisbursementErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PKDisbursementErrorCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkdisbursementerrorkey?language=objc)
// NS_TYPED_ENUM
pub type PKDisbursementErrorKey = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkdisbursementerrorcontactfielduserinfokey?language=objc)
    pub static PKDisbursementErrorContactFieldUserInfoKey: &'static PKDisbursementErrorKey;
}

/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkaddpaymentpasserror?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PKAddPaymentPassError(pub NSInteger);
impl PKAddPaymentPassError {
    #[doc(alias = "PKAddPaymentPassErrorUnsupported")]
    pub const Unsupported: Self = Self(0);
    #[doc(alias = "PKAddPaymentPassErrorUserCancelled")]
    pub const UserCancelled: Self = Self(1);
    #[doc(alias = "PKAddPaymentPassErrorSystemCancelled")]
    pub const SystemCancelled: Self = Self(2);
}

unsafe impl Encode for PKAddPaymentPassError {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PKAddPaymentPassError {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkaddsecureelementpasserrordomain?language=objc)
    pub static PKAddSecureElementPassErrorDomain: &'static NSString;
}

/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkaddsecureelementpasserrorcode?language=objc)
// NS_ERROR_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PKAddSecureElementPassErrorCode(pub NSInteger);
impl PKAddSecureElementPassErrorCode {
    #[doc(alias = "PKAddSecureElementPassGenericError")]
    pub const GenericError: Self = Self(0);
    #[doc(alias = "PKAddSecureElementPassUnknownError")]
    #[deprecated = "Use PKAddSecureElementPassGenericError instead."]
    pub const UnknownError: Self = Self(PKAddSecureElementPassErrorCode::GenericError.0);
    #[doc(alias = "PKAddSecureElementPassUserCanceledError")]
    pub const UserCanceledError: Self = Self(1);
    #[doc(alias = "PKAddSecureElementPassUnavailableError")]
    pub const UnavailableError: Self = Self(2);
    #[doc(alias = "PKAddSecureElementPassInvalidConfigurationError")]
    pub const InvalidConfigurationError: Self = Self(3);
    #[doc(alias = "PKAddSecureElementPassDeviceNotSupportedError")]
    pub const DeviceNotSupportedError: Self = Self(4);
    #[doc(alias = "PKAddSecureElementPassDeviceNotReadyError")]
    pub const DeviceNotReadyError: Self = Self(5);
    #[doc(alias = "PKAddSecureElementPassOSVersionNotSupportedError")]
    pub const OSVersionNotSupportedError: Self = Self(6);
}

unsafe impl Encode for PKAddSecureElementPassErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PKAddSecureElementPassErrorCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pksharesecureelementpasserrordomain?language=objc)
    pub static PKShareSecureElementPassErrorDomain: &'static NSString;
}

/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pksharesecureelementpasserrorcode?language=objc)
// NS_ERROR_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PKShareSecureElementPassErrorCode(pub NSInteger);
impl PKShareSecureElementPassErrorCode {
    #[doc(alias = "PKShareSecureElementPassUnknownError")]
    pub const UnknownError: Self = Self(0);
    #[doc(alias = "PKShareSecureElementPassSetupError")]
    pub const SetupError: Self = Self(1);
}

unsafe impl Encode for PKShareSecureElementPassErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PKShareSecureElementPassErrorCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}