//! 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-cloud-kit")]
use objc2_cloud_kit::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-user-notifications")]
use objc2_user_notifications::*;

use crate::*;

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

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

impl UISceneConnectionOptions {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

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

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

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

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

        #[unsafe(method(userActivities))]
        #[unsafe(method_family = none)]
        pub fn userActivities(&self) -> Retained<NSSet<NSUserActivity>>;

        #[cfg(feature = "objc2-user-notifications")]
        #[unsafe(method(notificationResponse))]
        #[unsafe(method_family = none)]
        pub fn notificationResponse(&self) -> Option<Retained<UNNotificationResponse>>;

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

        #[cfg(feature = "objc2-cloud-kit")]
        #[unsafe(method(cloudKitShareMetadata))]
        #[unsafe(method_family = none)]
        pub fn cloudKitShareMetadata(&self) -> Option<Retained<CKShareMetadata>>;
    );
}

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

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

impl UISceneOpenURLOptions {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

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

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

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

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

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

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

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

impl UISceneOpenExternalURLOptions {
    extern_methods!(
        #[unsafe(method(universalLinksOnly))]
        #[unsafe(method_family = none)]
        pub fn universalLinksOnly(&self) -> bool;

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

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

        #[cfg(feature = "UIEventAttribution")]
        /// Setter for [`eventAttribution`][Self::eventAttribution].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setEventAttribution:))]
        #[unsafe(method_family = none)]
        pub fn setEventAttribution(&self, event_attribution: Option<&UIEventAttribution>);
    );
}

/// Methods declared on superclass `NSObject`.
impl UISceneOpenExternalURLOptions {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiscenecollectionjoinbehavior?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UISceneCollectionJoinBehavior(pub NSInteger);
impl UISceneCollectionJoinBehavior {
    #[doc(alias = "UISceneCollectionJoinBehaviorAutomatic")]
    pub const Automatic: Self = Self(0);
    #[doc(alias = "UISceneCollectionJoinBehaviorPreferred")]
    pub const Preferred: Self = Self(1);
    #[doc(alias = "UISceneCollectionJoinBehaviorDisallowed")]
    pub const Disallowed: Self = Self(2);
    #[doc(alias = "UISceneCollectionJoinBehaviorPreferredWithoutActivating")]
    pub const PreferredWithoutActivating: Self = Self(3);
}

unsafe impl Encode for UISceneCollectionJoinBehavior {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for UISceneCollectionJoinBehavior {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

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

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

impl UISceneActivationRequestOptions {
    extern_methods!(
        #[cfg(all(feature = "UIResponder", feature = "UIScene"))]
        #[unsafe(method(requestingScene))]
        #[unsafe(method_family = none)]
        pub fn requestingScene(&self) -> Option<Retained<UIScene>>;

        #[cfg(all(feature = "UIResponder", feature = "UIScene"))]
        /// Setter for [`requestingScene`][Self::requestingScene].
        #[unsafe(method(setRequestingScene:))]
        #[unsafe(method_family = none)]
        pub fn setRequestingScene(&self, requesting_scene: Option<&UIScene>);

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

        /// Setter for [`collectionJoinBehavior`][Self::collectionJoinBehavior].
        #[unsafe(method(setCollectionJoinBehavior:))]
        #[unsafe(method_family = none)]
        pub fn setCollectionJoinBehavior(
            &self,
            collection_join_behavior: UISceneCollectionJoinBehavior,
        );
    );
}

/// Methods declared on superclass `NSObject`.
impl UISceneActivationRequestOptions {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}

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

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

impl UISceneDestructionRequestOptions {
    extern_methods!();
}

/// Methods declared on superclass `NSObject`.
impl UISceneDestructionRequestOptions {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
