objc2_user_notifications/generated/
UNNotificationRequest.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/usernotifications/unnotificationrequest?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct UNNotificationRequest;
14);
15
16extern_conformance!(
17    unsafe impl NSCoding for UNNotificationRequest {}
18);
19
20extern_conformance!(
21    unsafe impl NSCopying for UNNotificationRequest {}
22);
23
24unsafe impl CopyingHelper for UNNotificationRequest {
25    type Result = Self;
26}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for UNNotificationRequest {}
30);
31
32extern_conformance!(
33    unsafe impl NSSecureCoding for UNNotificationRequest {}
34);
35
36impl UNNotificationRequest {
37    extern_methods!(
38        #[unsafe(method(identifier))]
39        #[unsafe(method_family = none)]
40        pub fn identifier(&self) -> Retained<NSString>;
41
42        #[cfg(feature = "UNNotificationContent")]
43        #[unsafe(method(content))]
44        #[unsafe(method_family = none)]
45        pub fn content(&self) -> Retained<UNNotificationContent>;
46
47        #[cfg(feature = "UNNotificationTrigger")]
48        #[unsafe(method(trigger))]
49        #[unsafe(method_family = none)]
50        pub fn trigger(&self) -> Option<Retained<UNNotificationTrigger>>;
51
52        #[cfg(all(feature = "UNNotificationContent", feature = "UNNotificationTrigger"))]
53        #[unsafe(method(requestWithIdentifier:content:trigger:))]
54        #[unsafe(method_family = none)]
55        pub fn requestWithIdentifier_content_trigger(
56            identifier: &NSString,
57            content: &UNNotificationContent,
58            trigger: Option<&UNNotificationTrigger>,
59        ) -> Retained<Self>;
60
61        #[unsafe(method(init))]
62        #[unsafe(method_family = init)]
63        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
64    );
65}
66
67/// Methods declared on superclass `NSObject`.
68impl UNNotificationRequest {
69    extern_methods!(
70        #[unsafe(method(new))]
71        #[unsafe(method_family = new)]
72        pub unsafe fn new() -> Retained<Self>;
73    );
74}