objc2_pass_kit/generated/
PKAddSecureElementPassConfiguration.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-graphics")]
7use objc2_core_graphics::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkaddpassmetadatapreview?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct PKAddPassMetadataPreview;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for PKAddPassMetadataPreview {}
21);
22
23impl PKAddPassMetadataPreview {
24    extern_methods!(
25        #[cfg(feature = "objc2-core-graphics")]
26        /// Initializer preview object to represent the pass being added to Wallet.which requires a CGImage of the pass's card art and a localized description.
27        /// - Properties:
28        /// - passThumbnail: CGImage representing the card artwork of the pass to be presented during provisioning.
29        /// - localizedDescription: Localized description of the pass.
30        #[unsafe(method(initWithPassThumbnail:localizedDescription:))]
31        #[unsafe(method_family = init)]
32        pub unsafe fn initWithPassThumbnail_localizedDescription(
33            this: Allocated<Self>,
34            pass_thumbnail: &CGImage,
35            description: &NSString,
36        ) -> Retained<Self>;
37
38        #[cfg(feature = "objc2-core-graphics")]
39        #[unsafe(method(previewWithPassThumbnail:localizedDescription:))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn previewWithPassThumbnail_localizedDescription(
42            pass_thumbnail: &CGImage,
43            description: &NSString,
44        ) -> Retained<Self>;
45
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[unsafe(method(new))]
51        #[unsafe(method_family = new)]
52        pub unsafe fn new() -> Retained<Self>;
53
54        #[cfg(feature = "objc2-core-graphics")]
55        /// CGImage representing the pass in our provisioning UI.
56        #[unsafe(method(passThumbnailImage))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn passThumbnailImage(&self) -> Option<Retained<CGImage>>;
59
60        /// Localized description of the pass to be referenced during provisioning.
61        #[unsafe(method(localizedDescription))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn localizedDescription(&self) -> Option<Retained<NSString>>;
64    );
65}
66
67extern_class!(
68    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkaddsecureelementpassconfiguration?language=objc)
69    #[unsafe(super(NSObject))]
70    #[derive(Debug, PartialEq, Eq, Hash)]
71    pub struct PKAddSecureElementPassConfiguration;
72);
73
74extern_conformance!(
75    unsafe impl NSObjectProtocol for PKAddSecureElementPassConfiguration {}
76);
77
78impl PKAddSecureElementPassConfiguration {
79    extern_methods!(
80        #[unsafe(method(init))]
81        #[unsafe(method_family = init)]
82        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84        #[unsafe(method(new))]
85        #[unsafe(method_family = new)]
86        pub unsafe fn new() -> Retained<Self>;
87
88        #[unsafe(method(issuerIdentifier))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn issuerIdentifier(&self) -> Option<Retained<NSString>>;
91
92        /// Setter for [`issuerIdentifier`][Self::issuerIdentifier].
93        #[unsafe(method(setIssuerIdentifier:))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn setIssuerIdentifier(&self, issuer_identifier: Option<&NSString>);
96
97        #[unsafe(method(localizedDescription))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn localizedDescription(&self) -> Option<Retained<NSString>>;
100
101        /// Setter for [`localizedDescription`][Self::localizedDescription].
102        #[unsafe(method(setLocalizedDescription:))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn setLocalizedDescription(&self, localized_description: Option<&NSString>);
105    );
106}