//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uilocalnotification?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
    pub struct UILocalNotification;
);

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

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

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

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

impl UILocalNotification {
    extern_methods!(
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(fireDate))]
        #[unsafe(method_family = none)]
        pub fn fireDate(&self) -> Option<Retained<NSDate>>;

        /// Setter for [`fireDate`][Self::fireDate].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(setFireDate:))]
        #[unsafe(method_family = none)]
        pub fn setFireDate(&self, fire_date: Option<&NSDate>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(timeZone))]
        #[unsafe(method_family = none)]
        pub fn timeZone(&self) -> Option<Retained<NSTimeZone>>;

        /// Setter for [`timeZone`][Self::timeZone].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(setTimeZone:))]
        #[unsafe(method_family = none)]
        pub fn setTimeZone(&self, time_zone: Option<&NSTimeZone>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(repeatInterval))]
        #[unsafe(method_family = none)]
        pub fn repeatInterval(&self) -> NSCalendarUnit;

        /// Setter for [`repeatInterval`][Self::repeatInterval].
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(setRepeatInterval:))]
        #[unsafe(method_family = none)]
        pub fn setRepeatInterval(&self, repeat_interval: NSCalendarUnit);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(repeatCalendar))]
        #[unsafe(method_family = none)]
        pub fn repeatCalendar(&self) -> Option<Retained<NSCalendar>>;

        /// Setter for [`repeatCalendar`][Self::repeatCalendar].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(setRepeatCalendar:))]
        #[unsafe(method_family = none)]
        pub fn setRepeatCalendar(&self, repeat_calendar: Option<&NSCalendar>);

        #[cfg(feature = "objc2-core-location")]
        #[unsafe(method(region))]
        #[unsafe(method_family = none)]
        pub fn region(&self) -> Option<Retained<CLRegion>>;

        #[cfg(feature = "objc2-core-location")]
        /// Setter for [`region`][Self::region].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setRegion:))]
        #[unsafe(method_family = none)]
        pub fn setRegion(&self, region: Option<&CLRegion>);

        #[unsafe(method(regionTriggersOnce))]
        #[unsafe(method_family = none)]
        pub fn regionTriggersOnce(&self) -> bool;

        /// Setter for [`regionTriggersOnce`][Self::regionTriggersOnce].
        #[unsafe(method(setRegionTriggersOnce:))]
        #[unsafe(method_family = none)]
        pub fn setRegionTriggersOnce(&self, region_triggers_once: bool);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(alertBody))]
        #[unsafe(method_family = none)]
        pub fn alertBody(&self) -> Option<Retained<NSString>>;

        /// Setter for [`alertBody`][Self::alertBody].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(setAlertBody:))]
        #[unsafe(method_family = none)]
        pub fn setAlertBody(&self, alert_body: Option<&NSString>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(hasAction))]
        #[unsafe(method_family = none)]
        pub fn hasAction(&self) -> bool;

        /// Setter for [`hasAction`][Self::hasAction].
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(setHasAction:))]
        #[unsafe(method_family = none)]
        pub fn setHasAction(&self, has_action: bool);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(alertAction))]
        #[unsafe(method_family = none)]
        pub fn alertAction(&self) -> Option<Retained<NSString>>;

        /// Setter for [`alertAction`][Self::alertAction].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(setAlertAction:))]
        #[unsafe(method_family = none)]
        pub fn setAlertAction(&self, alert_action: Option<&NSString>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(alertLaunchImage))]
        #[unsafe(method_family = none)]
        pub fn alertLaunchImage(&self) -> Option<Retained<NSString>>;

        /// Setter for [`alertLaunchImage`][Self::alertLaunchImage].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(setAlertLaunchImage:))]
        #[unsafe(method_family = none)]
        pub fn setAlertLaunchImage(&self, alert_launch_image: Option<&NSString>);

        #[unsafe(method(alertTitle))]
        #[unsafe(method_family = none)]
        pub fn alertTitle(&self) -> Option<Retained<NSString>>;

        /// Setter for [`alertTitle`][Self::alertTitle].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setAlertTitle:))]
        #[unsafe(method_family = none)]
        pub fn setAlertTitle(&self, alert_title: Option<&NSString>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(soundName))]
        #[unsafe(method_family = none)]
        pub fn soundName(&self) -> Option<Retained<NSString>>;

        /// Setter for [`soundName`][Self::soundName].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(setSoundName:))]
        #[unsafe(method_family = none)]
        pub fn setSoundName(&self, sound_name: Option<&NSString>);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(applicationIconBadgeNumber))]
        #[unsafe(method_family = none)]
        pub fn applicationIconBadgeNumber(&self) -> NSInteger;

        /// Setter for [`applicationIconBadgeNumber`][Self::applicationIconBadgeNumber].
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(setApplicationIconBadgeNumber:))]
        #[unsafe(method_family = none)]
        pub fn setApplicationIconBadgeNumber(&self, application_icon_badge_number: NSInteger);

        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(userInfo))]
        #[unsafe(method_family = none)]
        pub fn userInfo(&self) -> Option<Retained<NSDictionary>>;

        /// Setter for [`userInfo`][Self::userInfo].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `user_info` generic should be of the correct type.
        #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
        #[unsafe(method(setUserInfo:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setUserInfo(&self, user_info: Option<&NSDictionary>);

        #[unsafe(method(category))]
        #[unsafe(method_family = none)]
        pub fn category(&self) -> Option<Retained<NSString>>;

        /// Setter for [`category`][Self::category].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setCategory:))]
        #[unsafe(method_family = none)]
        pub fn setCategory(&self, category: Option<&NSString>);
    );
}

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

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uilocalnotificationdefaultsoundname?language=objc)
    #[deprecated = "Use UserNotifications Framework's +[UNNotificationSound defaultSound]"]
    pub static UILocalNotificationDefaultSoundName: &'static NSString;
}
