use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PKAddPaymentPassStyle(pub NSInteger);
impl PKAddPaymentPassStyle {
#[doc(alias = "PKAddPaymentPassStylePayment")]
pub const Payment: Self = Self(0);
#[doc(alias = "PKAddPaymentPassStyleAccess")]
pub const Access: Self = Self(1);
}
unsafe impl Encode for PKAddPaymentPassStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for PKAddPaymentPassStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct PKAddPaymentPassRequestConfiguration;
);
extern_conformance!(
unsafe impl NSObjectProtocol for PKAddPaymentPassRequestConfiguration {}
);
impl PKAddPaymentPassRequestConfiguration {
extern_methods!(
#[cfg(feature = "PKConstants")]
#[unsafe(method(initWithEncryptionScheme:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithEncryptionScheme(
this: Allocated<Self>,
encryption_scheme: &PKEncryptionScheme,
) -> Option<Retained<Self>>;
#[cfg(feature = "PKConstants")]
#[unsafe(method(encryptionScheme))]
#[unsafe(method_family = none)]
pub unsafe fn encryptionScheme(&self) -> Retained<PKEncryptionScheme>;
#[unsafe(method(style))]
#[unsafe(method_family = none)]
pub unsafe fn style(&self) -> PKAddPaymentPassStyle;
#[unsafe(method(setStyle:))]
#[unsafe(method_family = none)]
pub unsafe fn setStyle(&self, style: PKAddPaymentPassStyle);
#[unsafe(method(cardholderName))]
#[unsafe(method_family = none)]
pub unsafe fn cardholderName(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setCardholderName:))]
#[unsafe(method_family = none)]
pub unsafe fn setCardholderName(&self, cardholder_name: Option<&NSString>);
#[unsafe(method(primaryAccountSuffix))]
#[unsafe(method_family = none)]
pub unsafe fn primaryAccountSuffix(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setPrimaryAccountSuffix:))]
#[unsafe(method_family = none)]
pub unsafe fn setPrimaryAccountSuffix(&self, primary_account_suffix: Option<&NSString>);
#[cfg(feature = "PKLabeledValue")]
#[unsafe(method(cardDetails))]
#[unsafe(method_family = none)]
pub unsafe fn cardDetails(&self) -> Retained<NSArray<PKLabeledValue>>;
#[cfg(feature = "PKLabeledValue")]
#[unsafe(method(setCardDetails:))]
#[unsafe(method_family = none)]
pub unsafe fn setCardDetails(&self, card_details: &NSArray<PKLabeledValue>);
#[unsafe(method(localizedDescription))]
#[unsafe(method_family = none)]
pub unsafe fn localizedDescription(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setLocalizedDescription:))]
#[unsafe(method_family = none)]
pub unsafe fn setLocalizedDescription(&self, localized_description: Option<&NSString>);
#[unsafe(method(primaryAccountIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn primaryAccountIdentifier(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setPrimaryAccountIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn setPrimaryAccountIdentifier(
&self,
primary_account_identifier: Option<&NSString>,
);
#[cfg(feature = "PKConstants")]
#[unsafe(method(paymentNetwork))]
#[unsafe(method_family = none)]
pub unsafe fn paymentNetwork(&self) -> Option<Retained<PKPaymentNetwork>>;
#[cfg(feature = "PKConstants")]
#[unsafe(method(setPaymentNetwork:))]
#[unsafe(method_family = none)]
pub unsafe fn setPaymentNetwork(&self, payment_network: Option<&PKPaymentNetwork>);
#[unsafe(method(productIdentifiers))]
#[unsafe(method_family = none)]
pub unsafe fn productIdentifiers(&self) -> Retained<NSSet<NSString>>;
#[unsafe(method(setProductIdentifiers:))]
#[unsafe(method_family = none)]
pub unsafe fn setProductIdentifiers(&self, product_identifiers: &NSSet<NSString>);
#[unsafe(method(requiresFelicaSecureElement))]
#[unsafe(method_family = none)]
pub unsafe fn requiresFelicaSecureElement(&self) -> bool;
#[unsafe(method(setRequiresFelicaSecureElement:))]
#[unsafe(method_family = none)]
pub unsafe fn setRequiresFelicaSecureElement(&self, requires_felica_secure_element: bool);
);
}
impl PKAddPaymentPassRequestConfiguration {
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>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct PKAddPaymentPassRequest;
);
extern_conformance!(
unsafe impl NSObjectProtocol for PKAddPaymentPassRequest {}
);
impl PKAddPaymentPassRequest {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(encryptedPassData))]
#[unsafe(method_family = none)]
pub unsafe fn encryptedPassData(&self) -> Option<Retained<NSData>>;
#[unsafe(method(setEncryptedPassData:))]
#[unsafe(method_family = none)]
pub unsafe fn setEncryptedPassData(&self, encrypted_pass_data: Option<&NSData>);
#[unsafe(method(activationData))]
#[unsafe(method_family = none)]
pub unsafe fn activationData(&self) -> Option<Retained<NSData>>;
#[unsafe(method(setActivationData:))]
#[unsafe(method_family = none)]
pub unsafe fn setActivationData(&self, activation_data: Option<&NSData>);
#[unsafe(method(ephemeralPublicKey))]
#[unsafe(method_family = none)]
pub unsafe fn ephemeralPublicKey(&self) -> Option<Retained<NSData>>;
#[unsafe(method(setEphemeralPublicKey:))]
#[unsafe(method_family = none)]
pub unsafe fn setEphemeralPublicKey(&self, ephemeral_public_key: Option<&NSData>);
#[unsafe(method(wrappedKey))]
#[unsafe(method_family = none)]
pub unsafe fn wrappedKey(&self) -> Option<Retained<NSData>>;
#[unsafe(method(setWrappedKey:))]
#[unsafe(method_family = none)]
pub unsafe fn setWrappedKey(&self, wrapped_key: Option<&NSData>);
);
}
impl PKAddPaymentPassRequest {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}