objc2_user_notifications/generated/
UNNotificationRequest.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct UNNotificationRequest;
14);
15
16unsafe impl NSCoding for UNNotificationRequest {}
17
18unsafe impl NSCopying for UNNotificationRequest {}
19
20unsafe impl CopyingHelper for UNNotificationRequest {
21 type Result = Self;
22}
23
24unsafe impl NSObjectProtocol for UNNotificationRequest {}
25
26unsafe impl NSSecureCoding for UNNotificationRequest {}
27
28impl UNNotificationRequest {
29 extern_methods!(
30 #[unsafe(method(identifier))]
31 #[unsafe(method_family = none)]
32 pub unsafe fn identifier(&self) -> Retained<NSString>;
33
34 #[cfg(feature = "UNNotificationContent")]
35 #[unsafe(method(content))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn content(&self) -> Retained<UNNotificationContent>;
38
39 #[cfg(feature = "UNNotificationTrigger")]
40 #[unsafe(method(trigger))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn trigger(&self) -> Option<Retained<UNNotificationTrigger>>;
43
44 #[cfg(all(feature = "UNNotificationContent", feature = "UNNotificationTrigger"))]
45 #[unsafe(method(requestWithIdentifier:content:trigger:))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn requestWithIdentifier_content_trigger(
48 identifier: &NSString,
49 content: &UNNotificationContent,
50 trigger: Option<&UNNotificationTrigger>,
51 ) -> Retained<Self>;
52
53 #[unsafe(method(init))]
54 #[unsafe(method_family = init)]
55 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56 );
57}
58
59impl UNNotificationRequest {
61 extern_methods!(
62 #[unsafe(method(new))]
63 #[unsafe(method_family = new)]
64 pub unsafe fn new() -> Retained<Self>;
65 );
66}