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        ///
32        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
33        #[unsafe(method(setIdentifier:))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>);
36
37        #[unsafe(method(detail))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn detail(&self) -> Option<Retained<NSString>>;
40
41        /// Setter for [`detail`][Self::detail].
42        ///
43        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
44        #[unsafe(method(setDetail:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn setDetail(&self, detail: Option<&NSString>);
47
48        #[cfg(feature = "PKDateComponentsRange")]
49        #[unsafe(method(dateComponentsRange))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn dateComponentsRange(&self) -> Option<Retained<PKDateComponentsRange>>;
52
53        #[cfg(feature = "PKDateComponentsRange")]
54        /// Setter for [`dateComponentsRange`][Self::dateComponentsRange].
55        ///
56        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
57        #[unsafe(method(setDateComponentsRange:))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn setDateComponentsRange(
60            &self,
61            date_components_range: Option<&PKDateComponentsRange>,
62        );
63    );
64}
65
66/// Methods declared on superclass `PKPaymentSummaryItem`.
67#[cfg(feature = "PKPaymentSummaryItem")]
68impl PKShippingMethod {
69    extern_methods!(
70        #[unsafe(method(summaryItemWithLabel:amount:))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn summaryItemWithLabel_amount(
73            label: &NSString,
74            amount: &NSDecimalNumber,
75        ) -> Retained<Self>;
76
77        #[unsafe(method(summaryItemWithLabel:amount:type:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn summaryItemWithLabel_amount_type(
80            label: &NSString,
81            amount: &NSDecimalNumber,
82            r#type: PKPaymentSummaryItemType,
83        ) -> Retained<Self>;
84    );
85}
86
87/// Methods declared on superclass `NSObject`.
88#[cfg(feature = "PKPaymentSummaryItem")]
89impl PKShippingMethod {
90    extern_methods!(
91        #[unsafe(method(init))]
92        #[unsafe(method_family = init)]
93        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
94
95        #[unsafe(method(new))]
96        #[unsafe(method_family = new)]
97        pub unsafe fn new() -> Retained<Self>;
98    );
99}