//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/usernotifications/unnotificationrequest?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UNNotificationRequest;
);

extern_conformance!(
    unsafe impl NSCoding for UNNotificationRequest {}
);

extern_conformance!(
    unsafe impl NSCopying for UNNotificationRequest {}
);

unsafe impl CopyingHelper for UNNotificationRequest {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for UNNotificationRequest {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for UNNotificationRequest {}
);

impl UNNotificationRequest {
    extern_methods!(
        #[unsafe(method(identifier))]
        #[unsafe(method_family = none)]
        pub fn identifier(&self) -> Retained<NSString>;

        #[cfg(feature = "UNNotificationContent")]
        #[unsafe(method(content))]
        #[unsafe(method_family = none)]
        pub fn content(&self) -> Retained<UNNotificationContent>;

        #[cfg(feature = "UNNotificationTrigger")]
        #[unsafe(method(trigger))]
        #[unsafe(method_family = none)]
        pub fn trigger(&self) -> Option<Retained<UNNotificationTrigger>>;

        #[cfg(all(feature = "UNNotificationContent", feature = "UNNotificationTrigger"))]
        #[unsafe(method(requestWithIdentifier:content:trigger:))]
        #[unsafe(method_family = none)]
        pub fn requestWithIdentifier_content_trigger(
            identifier: &NSString,
            content: &UNNotificationContent,
            trigger: Option<&UNNotificationTrigger>,
        ) -> Retained<Self>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl UNNotificationRequest {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}
