objc2_pass_kit/generated/
PKShippingMethod.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkshippingmethod?language=objc)
12    #[unsafe(super(PKPaymentSummaryItem, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "PKPaymentSummaryItem")]
15    pub struct PKShippingMethod;
16);
17
18#[cfg(feature = "PKPaymentSummaryItem")]
19extern_conformance!(
20    unsafe impl NSObjectProtocol for PKShippingMethod {}
21);
22
23#[cfg(feature = "PKPaymentSummaryItem")]
24impl PKShippingMethod {
25    extern_methods!(
26        #[unsafe(method(identifier))]
27        #[unsafe(method_family = none)]
28        pub unsafe fn identifier(&self) -> Option<Retained<NSString>>;
29
30        /// Setter for [`identifier`][Self::identifier].
31        #[unsafe(method(setIdentifier:))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>);
34
35        #[unsafe(method(detail))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn detail(&self) -> Option<Retained<NSString>>;
38
39        /// Setter for [`detail`][Self::detail].
40        #[unsafe(method(setDetail:))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn setDetail(&self, detail: Option<&NSString>);
43
44        #[cfg(feature = "PKDateComponentsRange")]
45        #[unsafe(method(dateComponentsRange))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn dateComponentsRange(&self) -> Option<Retained<PKDateComponentsRange>>;
48
49        #[cfg(feature = "PKDateComponentsRange")]
50        /// Setter for [`dateComponentsRange`][Self::dateComponentsRange].
51        #[unsafe(method(setDateComponentsRange:))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn setDateComponentsRange(
54            &self,
55            date_components_range: Option<&PKDateComponentsRange>,
56        );
57    );
58}
59
60/// Methods declared on superclass `PKPaymentSummaryItem`.
61#[cfg(feature = "PKPaymentSummaryItem")]
62impl PKShippingMethod {
63    extern_methods!(
64        #[unsafe(method(summaryItemWithLabel:amount:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn summaryItemWithLabel_amount(
67            label: &NSString,
68            amount: &NSDecimalNumber,
69        ) -> Retained<Self>;
70
71        #[unsafe(method(summaryItemWithLabel:amount:type:))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn summaryItemWithLabel_amount_type(
74            label: &NSString,
75            amount: &NSDecimalNumber,
76            r#type: PKPaymentSummaryItemType,
77        ) -> Retained<Self>;
78    );
79}
80
81/// Methods declared on superclass `NSObject`.
82#[cfg(feature = "PKPaymentSummaryItem")]
83impl PKShippingMethod {
84    extern_methods!(
85        #[unsafe(method(init))]
86        #[unsafe(method_family = init)]
87        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
88
89        #[unsafe(method(new))]
90        #[unsafe(method_family = new)]
91        pub unsafe fn new() -> Retained<Self>;
92    );
93}